UNPKG

786 kBJavaScriptView Raw
1function t(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var e,u,n,i=/*#__PURE__*/t(require("fast-diff"));function r(t){exports.isDebug=t}function o(t){switch(t){case"ltr":return exports.PageProgression.LTR;case"rtl":return exports.PageProgression.RTL;default:throw new Error("unknown PageProgression: "+t)}}function a(t){var e=Array.from(t),u=null;return e[0]instanceof Error&&(u=e.shift()),{error:u,messages:e}}function s(t){var e=t.error,u=e&&(e.frameTrace||e.stack),n=[].concat(t.messages);return e&&(n.length>0&&(n=n.concat(["\n"])),n=n.concat([e.toString()]),u&&(n=n.concat(["\n"]).concat(u))),n}exports.isDebug=!1,exports.PageProgression=void 0,function(t){t.LTR="ltr",t.RTL="rtl"}(exports.PageProgression||(exports.PageProgression={})),exports.PageSide=void 0,(e=exports.PageSide||(exports.PageSide={})).LEFT="left",e.RIGHT="right",exports.ReadyState=void 0,(u=exports.ReadyState||(exports.ReadyState={})).LOADING="loading",u.INTERACTIVE="interactive",u.COMPLETE="complete",function(t){t[t.DEBUG=1]="DEBUG",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR"}(n||(n={}));var l,D=new(/*#__PURE__*/function(){function t(t){this.opt_console=void 0,this.listeners={},this.opt_console=t}var e=t.prototype;return e.consoleDebug=function(t){var e,u,n;this.opt_console?this.opt_console.debug?(e=this.opt_console).debug.apply(e,t):(u=this.opt_console).log.apply(u,t):(n=console).debug.apply(n,t)},e.consoleInfo=function(t){var e,u,n;this.opt_console?this.opt_console.info?(e=this.opt_console).info.apply(e,t):(u=this.opt_console).log.apply(u,t):(n=console).info.apply(n,t)},e.consoleWarn=function(t){var e,u,n;this.opt_console?this.opt_console.warn?(e=this.opt_console).warn.apply(e,t):(u=this.opt_console).log.apply(u,t):(n=console).warn.apply(n,t)},e.consoleError=function(t){var e,u,n;this.opt_console?this.opt_console.error?(e=this.opt_console).error.apply(e,t):(u=this.opt_console).log.apply(u,t):(n=console).error.apply(n,t)},e.triggerListeners=function(t,e){var u=this.listeners[t];u&&u.forEach(function(t){t(e)})},e.addListener=function(t,e){var u=this.listeners[t];u||(u=this.listeners[t]=[]),u.push(e)},e.debug=function(){var t=a(arguments);this.consoleDebug(s(t)),this.triggerListeners(n.DEBUG,t)},e.info=function(){var t=a(arguments);this.consoleInfo(s(t)),this.triggerListeners(n.INFO,t)},e.warn=function(){var t=a(arguments);this.consoleWarn(s(t)),this.triggerListeners(n.WARN,t)},e.error=function(){var t=a(arguments);this.consoleError(s(t)),this.triggerListeners(n.ERROR,t)},t}());exports.HOOKS=void 0,(l=exports.HOOKS||(exports.HOOKS={})).SIMPLE_PROPERTY="SIMPLE_PROPERTY",l.PREPROCESS_SINGLE_DOCUMENT="PREPROCESS_SINGLE_DOCUMENT",l.PREPROCESS_TEXT_CONTENT="PREPROCESS_TEXT_CONTENT",l.PREPROCESS_ELEMENT_STYLE="PREPROCESS_ELEMENT_STYLE",l.POLYFILLED_INHERITED_PROPS="POLYFILLED_INHERITED_PROPS",l.CONFIGURATION="CONFIGURATION",l.RESOLVE_TEXT_NODE_BREAKER="RESOLVE_TEXT_NODE_BREAKER",l.RESOLVE_FORMATTING_CONTEXT="RESOLVE_FORMATTING_CONTEXT",l.RESOLVE_LAYOUT_PROCESSOR="RESOLVE_LAYOUT_PROCESSOR",l.POST_LAYOUT_BLOCK="POST_LAYOUT_BLOCK";var h={};function c(t,e,u){if(exports.HOOKS[t]){var n=h[t];n||(n=h[t]=[]),u?n.unshift(e):n.push(e)}else D.warn(new Error("Skipping unknown plugin hook '"+t+"'."))}function d(t,e){if(exports.HOOKS[t]){var u=h[t];if(u){var n=u.indexOf(e);n>=0&&u.splice(n,1)}}else D.warn(new Error("Ignoring unknown plugin hook '"+t+"'."))}function f(t){return h[t]||[]}var p={registerHook:c,removeHook:d},E=/*#__PURE__*/function(){function t(t){this.performanceInstance=void 0,this.timestamps={},this.registerTiming=void 0,this.registerStartTiming=void 0,this.registerEndTiming=void 0,this.performanceInstance=t,this.registerTiming=C,this.registerStartTiming=this.registerStartTiming=C,this.registerEndTiming=this.registerEndTiming=C}var e=t.prototype;return e.forceRegisterStartTiming=function(t,e){F.call(this,t,"start",e)},e.forceRegisterEndTiming=function(t,e){F.call(this,t,"end",e)},e.printTimings=function(){var t=this.timestamps,e="";Object.keys(t).forEach(function(u){for(var n=t[u],i=n.length,r=0;r<i;r++){var o=n[r];e+=u,i>1&&(e+="("+r+")"),e+=" => start: "+o.start+", end: "+o.end+", duration: "+(o.end-o.start)+"\n"}}),D.info(e)},e.disable=function(){this.registerTiming=C,this.registerStartTiming=this.registerStartTiming=C,this.registerEndTiming=this.registerEndTiming=C},e.enable=function(){this.registerTiming=F,this.registerStartTiming=this.registerStartTiming=A,this.registerEndTiming=this.registerEndTiming=g},e.isEnabled=function(){return this.registerStartTiming===A},t}();function C(){}function F(t,e,u){u||(u=this.performanceInstance.now());var n,i=this.timestamps[t];i||(i=this.timestamps[t]=[]);for(var r=i.length-1;r>=0&&(!(n=i[r])||n[e]);r--)n=null;n||i.push(n={}),n[e]=u}function A(t,e){this.registerTiming(t,"start",e)}function g(t,e){this.registerTiming(t,"end",e)}var v={now:Date.now},m=new E(window&&window.performance||v);m.forceRegisterStartTiming("load_vivliostyle");var B={profiler:{registerStartTiming:m.registerStartTiming,registerEndTiming:m.registerEndTiming,printTimings:m.printTimings,disable:m.disable,enable:m.enable}};function w(t,e){for(var u=0;u<e.length;u++){var n=e[u];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,"symbol"==typeof(i=function(t,e){if("object"!=typeof t||null===t)return t;var u=t[Symbol.toPrimitive];if(void 0!==u){var n=u.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key))?i:String(i),n)}var i}function y(t,e,u){return e&&w(t.prototype,e),u&&w(t,u),Object.defineProperty(t,"prototype",{writable:!1}),t}function N(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,S(t,e)}function b(t){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},b(t)}function S(t,e){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},S(t,e)}function x(t,e,u){return x=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}()?Reflect.construct.bind():function(t,e,u){var n=[null];n.push.apply(n,e);var i=new(Function.bind.apply(t,n));return u&&S(i,u.prototype),i},x.apply(null,arguments)}function T(t){var e="function"==typeof Map?new Map:void 0;return T=function(t){if(null===t||-1===Function.toString.call(t).indexOf("[native code]"))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,u)}function u(){return x(t,arguments,b(this).constructor)}return u.prototype=Object.create(t.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),S(u,t)},T(t)}function I(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function P(t,e){(null==e||e>t.length)&&(e=t.length);for(var u=0,n=new Array(e);u<e;u++)n[u]=t[u];return n}function R(t,e){var u="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(u)return(u=u.call(t)).next.bind(u);if(Array.isArray(t)||(u=function(t,e){if(t){if("string"==typeof t)return P(t,e);var u=Object.prototype.toString.call(t).slice(8,-1);return"Object"===u&&t.constructor&&(u=t.constructor.name),"Map"===u||"Set"===u?Array.from(t):"Arguments"===u||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u)?P(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){u&&(t=u);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var k=/^(?:[\t-\r -#%-\*,-\/:;\?@\[-\]_\{\}\xA0\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u0300-\u036F\u037E\u0387\u0483-\u0487\u055A-\u055F\u0589\u058A\u0591-\u05C7\u05F3\u05F4\u0609\u060A\u060C\u060D\u0610-\u061B\u061D-\u061F\u064B-\u065F\u066A-\u066D\u0670\u06D4\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0700-\u070D\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07F7-\u07F9\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0830-\u083E\u0859-\u085B\u085E\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962-\u0965\u0970\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09FD\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A76\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AF0\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B55\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C77\u0C81\u0C84\u0CBC\u0CBF\u0CC6\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0D81\u0DCA\u0DD2-\u0DD4\u0DD6\u0DF4\u0E31\u0E34-\u0E3A\u0E47-\u0E4F\u0E5A\u0E5B\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F04-\u0F12\u0F14\u0F18\u0F19\u0F35\u0F37\u0F39-\u0F3D\u0F71-\u0F7E\u0F80-\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u0FD0-\u0FD4\u0FD9\u0FDA\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u104A-\u104F\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u10FB\u135D-\u1368\u1400\u166E\u1680\u169B\u169C\u16EB-\u16ED\u1712-\u1714\u1732\u1733\u1735\u1736\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D6\u17D8-\u17DA\u17DD\u1800-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1944\u1945\u1A17\u1A18\u1A1B\u1A1E\u1A1F\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B5A-\u1B60\u1B6B-\u1B73\u1B7D\u1B7E\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1BFC-\u1BFF\u1C2C-\u1C33\u1C36\u1C37\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD0-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u2000-\u200A\u2010-\u2029\u202F-\u2043\u2045-\u2051\u2053-\u205F\u207D\u207E\u208D\u208E\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CEF-\u2CF1\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2D7F\u2DE0-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3000-\u3003\u3008-\u3011\u3014-\u301F\u302A-\u302D\u3030\u303D\u3099\u309A\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA66F\uA673-\uA67E\uA69E\uA69F\uA6F0-\uA6F7\uA802\uA806\uA80B\uA825\uA826\uA82C\uA874-\uA877\uA8C4\uA8C5\uA8CE\uA8CF\uA8E0-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF\uA926-\uA92F\uA947-\uA951\uA95F\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9C1-\uA9CD\uA9DE\uA9DF\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA5C-\uAA5F\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAADE\uAADF\uAAEC\uAAED\uAAF0\uAAF1\uAAF6\uABE5\uABE8\uABEB\uABED\uFB1E\uFD3E\uFD3F\uFE00-\uFE19\uFE20-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFEFF\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDDFD\uDEE0\uDF76-\uDF7A\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDE50-\uDE58\uDE7F\uDEE5\uDEE6\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD24-\uDD27\uDEAB-\uDEAD\uDEFD-\uDEFF\uDF46-\uDF50\uDF55-\uDF59\uDF82-\uDF89]|\uD804[\uDC01\uDC38-\uDC4D\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9-\uDCBC\uDCBE-\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD40-\uDD43\uDD73-\uDD75\uDD80\uDD81\uDDB6-\uDDBE\uDDC5-\uDDCD\uDDCF\uDDDB\uDDDD-\uDDDF\uDE2F-\uDE31\uDE34\uDE36-\uDE3E\uDE41\uDEA9\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF40\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDC5E\uDCB3-\uDCB8\uDCBA\uDCBF\uDCC0\uDCC2\uDCC3\uDCC6\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF-\uDDD7\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F-\uDE43\uDE60-\uDE6C\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDEB9\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B\uDF3C-\uDF3E]|\uD806[\uDC2F-\uDC37\uDC39-\uDC3B\uDD3B\uDD3C\uDD3E\uDD43-\uDD46\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDDE2\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC41-\uDC45\uDC70\uDC71\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDEF7\uDEF8\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDE6E\uDE6F\uDEF0-\uDEF5\uDF30-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDF4F\uDF8F-\uDF92\uDFE2\uDFE4]|\uD82F[\uDC9D-\uDC9F]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD67-\uDD69\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE87-\uDE8B\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A\uDD5E\uDD5F]|\uDB40[\uDD00-\uDDEF])*(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDCD0-\uDCEB\uDCF0-\uDCF9\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])(?:[\u0300-\u036F\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B55\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC6\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0D81\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099\u309A\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF40\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB3-\uDCB8\uDCBA\uDCBF\uDCC0\uDCC2\uDCC3\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD67-\uDD69\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF])*(?:[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*(?:[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F])(?:[\u0300-\u036F\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B55\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC6\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0D81\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099\u309A\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF40\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB3-\uDCB8\uDCBA\uDCBF\uDCC0\uDCC2\uDCC3\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD67-\uDD69\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF])*)*/,L="data-adapt-eloff",O={};function _(t){return JSON.parse(t)}function M(t){var e=t.match(/^([^#]*)/);return e?e[1]:t}var U=window.location.href;function V(t){U=t}var H,z=window.location.href;function G(t){z=t}function W(t,e){if(/^data:/i.test(e))return t||e;if(!e||t.match(/^\w{2,}:/))return t.toLowerCase().match("^javascript:")?"#":(t.match(/^\w{2,}:\/\/[^\/]+$/)&&(t+="/"),t);var u;if(e.match(/^\w{2,}:\/\/[^\/]+$/)&&(e+="/"),t.match(/^\/\//))return(u=e.match(/^(\w{2,}:)\/\//))?u[1]+t:t;if(t.match(/^\//))return(u=e.match(/^(\w{2,}:\/\/[^\/]+)\//))?u[1]+t:t;if(t.match(/^\.(\/|$)/)&&(t=t.substr(2)),e=function(t){var e=t.match(/^([^#?]*)/);return e?e[1]:t}(e),t.match(/^#/))return e+t;var n=e.lastIndexOf("/");if(n<0)return t;var i=e.substr(0,n+1)+t,r="";for((u=i.match(/^([^?#]*)([?#].*)$/))&&(i=u[1],r=u[2]);!((n=i.indexOf("/../"))<=0);){var o=i.lastIndexOf("/",n-1);if(o<=0)break;i=i.substr(0,o)+i.substr(n+3)}return i.replace(/\/(\.\/)+/g,"/")+r}function X(t){var e;return(e=/^(https?:)\/\/github\.com\/([^/]+\/[^/]+)\/(blob\/|tree\/|raw\/)?(.*)$/.exec(t))?t=e[1]+"//raw.githubusercontent.com/"+e[2]+"/"+(e[3]?"":"master/")+e[4]:(e=/^(https?:)\/\/www\.aozora\.gr\.jp\/(cards\/[^/]+\/files\/[^/.]+\.html)$/.exec(t))?t=e[1]+"//raw.githubusercontent.com/aozorabunko/aozorabunko/master/"+e[2]:(e=/^(https?:)\/\/gist\.github\.com\/([^/]+\/\w+)(\/|$)(raw(\/|$))?(.*)$/.exec(t))?t=e[1]+"//gist.githubusercontent.com/"+e[2]+"/raw/"+e[6]:(e=/^(https?:)\/\/(?:[^/.]+\.)?jsbin\.com\/(?!(?:blog|help)\b)(\w+)((\/\d+)?).*$/.exec(t))&&(t=e[1]+"//output.jsbin.com/"+e[2]+e[3]+"/"),t}function j(t){return null==t?t:t.toString()}!function(t){t.epub="http://www.idpf.org/2007/ops",t.EV="http://www.w3.org/2001/xml-events",t.MATHML="http://www.w3.org/1998/Math/MathML",t.XML="http://www.w3.org/XML/1998/namespace",t.XHTML="http://www.w3.org/1999/xhtml",t.XLINK="http://www.w3.org/1999/xlink",t.SHADOW="http://www.pyroxy.com/ns/shadow",t.SVG="http://www.w3.org/2000/svg",t.DC="http://purl.org/dc/elements/1.1/",t.NCX="http://www.daisy.org/z3986/2005/ncx/"}(H||(H={}));var K=/*#__PURE__*/function(){function t(){this.queue=[null]}var e=t.prototype;return e.length=function(){return this.queue.length-1},e.add=function(t){for(var e=this.queue.length;e>1;){var u=Math.floor(e/2),n=this.queue[u];if(n.compare(t)>0)return void(this.queue[e]=t);this.queue[e]=n,e=u}this.queue[1]=t},e.peek=function(){return this.queue[1]},e.remove=function(){var t=this.queue[1],e=this.queue.pop(),u=this.queue.length;if(u>1){for(var n=1;;){var i=2*n;if(i>=u)break;if(this.queue[i].compare(e)>0)i+1<u&&this.queue[i+1].compare(this.queue[i])>0&&i++;else{if(!(i+1<u&&this.queue[i+1].compare(e)>0))break;i++}this.queue[n]=this.queue[i],n=i}this.queue[n]=e}return t},t}(),Y=["","-webkit-","-moz-"],q={};function $(t,e){return CSS.supports(t+e,"unset")}function Q(t){var e=q[t];if(e||null===e)return e;switch(t){case"behavior":case"template":case"ua-list-item-count":case"x-first-pseudo":return q[t]=null,null;case"text-combine-upright":if($("-webkit-","text-combine")&&!$("","text-combine-upright"))return q[t]=["-webkit-text-combine"],["-webkit-text-combine"]}for(var u,n=R(Y);!(u=n()).done;){var i=u.value;if($(i,t))return q[t]=e=[i+t],e}return D.warn("Property not supported by the browser: ",t),q[t]=null,null}function Z(t,e,u){var n=null==t?void 0:t.style;if(n)if(e.startsWith("--"))n.setProperty(e,u||" ");else{var i=Q(e);if(i)for(var r,o=R(i);!(r=o()).done;){var a=r.value;switch(a){case"-webkit-text-combine":"all"===u&&(u="horizontal");break;case"text-combine-upright":"all"===u&&n.setProperty("text-indent","0")}n.setProperty(a,u)}}}function J(t,e,u){try{var n=q[e];return t.style.getPropertyValue(n?n[0]:e)}catch(t){}return u||""}function tt(t){var e=t.getAttributeNS(H.XML,"lang");return e||t.namespaceURI!=H.XHTML||(e=t.getAttribute("lang")),e}var et=/*#__PURE__*/function(){function t(){this.list=[]}var e=t.prototype;return e.append=function(t){return this.list.push(t),this},e.clear=function(){this.list=[]},e.toString=function(){var t=this.list.join("");return this.list=[t],t},t}();function ut(t){return"\\"+t.charCodeAt(0).toString(16)+" "}function nt(t){return t.replace(/[^-_a-zA-Z0-9\u0080-\uFFFF]/g,ut)}function it(t){return t.replace(/[\u0000-\u001F"\\]/g,ut)}function rt(t){return t.replace(/[\s+&?=#\u007F-\uFFFF]+/g,encodeURIComponent)}function ot(t){return!!t.match(/^[a-zA-Z\u009E\u009F\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u024F\u037B-\u037D\u0386\u0388-\u0482\u048A-\u0527]$/)}function at(t,e){return t.replace(/[^-a-zA-Z0-9_]/g,function(t){return function(t,e){return(e="string"==typeof e?e:"\\u")+(65536|t.charCodeAt(0)).toString(16).substr(1)}(t,e)})}function st(t){return at(t)}function lt(t,e){for(var u=0,n=t;;){if(0==u||e(u-1),n==t||e(n),u==n)return u;var i=u+n>>1;e(i)?n=i:u=i+1}}function Dt(t,e){return t-e}function ht(t,e){for(var u,n={},i=R(t);!(u=i()).done;){var r=u.value,o=e(r);o&&!n[o]&&(n[o]=r)}return n}function ct(t,e){for(var u,n={},i=R(t);!(u=i()).done;){var r=u.value,o=e(r);o&&(n[o]?n[o].push(r):n[o]=[r])}return n}var dt=/*#__PURE__*/function(){function t(){this.listeners={}}var e=t.prototype;return e.dispatchEvent=function(t){var e=this.listeners[t.type];if(e){t.target=this,t.currentTarget=this;for(var u=0;u<e.length;u++)e[u](t)}},e.addEventListener=function(t,e,u){if(!u){var n=this.listeners[t];n?n.includes(e)||n.push(e):this.listeners[t]=[e]}},e.removeEventListener=function(t,e,u){if(!u){var n=this.listeners[t];if(n){var i=n.indexOf(e);i>=0&&n.splice(i,1)}}},t}();function ft(t){if(1==t.nodeType){var e=t.getAttribute("id");if(e)return e}return null}function pt(t){return"^"+t}function Et(t){return t.replace(/[\[\]\(\),=;^]/g,pt)}function Ct(t){return t.substr(1)}function Ft(t){return t?t.replace(/\^[\[\]\(\),=;^]/g,Ct):t}function At(t){var e=[];do{var u=t.match(/^(\^,|[^,])*/),n=Ft(u[0]);if(!(t=t.substr(u[0].length+1))&&!e.length)return n;e.push(n)}while(t);return e}function gt(t){for(var e={};t;){var u=t.match(/^;([^;=]+)=(([^;]|\^;)*)/);if(!u)return e;e[u[1]]=At(u[2]),t=t.substr(u[0].length)}return e}var vt=/*#__PURE__*/function(){function t(){}var e=t.prototype;return e.appendTo=function(t){t.append("!")},e.applyTo=function(t){return!1},t}(),mt=/*#__PURE__*/function(){function t(t,e,u){this.index=void 0,this.id=void 0,this.sideBias=void 0,this.index=t,this.id=e,this.sideBias=u}var e=t.prototype;return e.appendTo=function(t){t.append("/"),t.append(this.index.toString()),(this.id||this.sideBias)&&(t.append("["),this.id&&t.append(this.id),this.sideBias&&(t.append(";s="),t.append(this.sideBias)),t.append("]"))},e.applyTo=function(t){if(1!=t.node.nodeType)throw new Error("E_CFI_NOT_ELEMENT");var e,u=t.node,n=u.children,i=n.length,r=Math.floor(this.index/2)-1;if(r<0||0==i)t.node=(e=u.firstChild)||u;else{if(e=n[Math.min(r,i-1)],1&this.index){var o=e.nextSibling;o&&1!=o.nodeType?e=o:t.after=!0}t.node=e}if(this.id&&(t.after||this.id!=ft(t.node))){var a=u.ownerDocument.getElementById(this.id);a?t.node=a:D.warn("E_CFI_ID_MISMATCH:",this.id)}return t.sideBias=this.sideBias,!0},t}(),Bt=/*#__PURE__*/function(){function t(t,e,u,n){this.offset=void 0,this.textBefore=void 0,this.textAfter=void 0,this.sideBias=void 0,this.offset=t,this.textBefore=e,this.textAfter=u,this.sideBias=n}var e=t.prototype;return e.applyTo=function(t){if(this.offset>0&&!t.after){for(var e=this.offset,u=t.node;;){var n=u.nodeType;if(1==n)break;var i=u.nextSibling;if(3<=n&&n<=5){var r=u.textContent.length;if(e<=r)break;if(!i){e=r;break}e-=r}if(!i){e=0;break}u=i}t.node=u,t.offset=e}return t.sideBias=this.sideBias,!0},e.appendTo=function(t){t.append(":"),t.append(this.offset.toString()),(this.textBefore||this.textAfter||this.sideBias)&&(t.append("["),(this.textBefore||this.textAfter)&&(this.textBefore&&t.append(Et(this.textBefore)),t.append(","),this.textAfter&&t.append(Et(this.textAfter))),this.sideBias&&(t.append(";s="),t.append(this.sideBias)),t.append("]"))},t}(),wt=/*#__PURE__*/function(){function t(){this.steps=null}var e=t.prototype;return e.fromString=function(t){var e=t.match(/^#?epubcfi\((.*)\)$/);if(!e)throw new Error("E_CFI_NOT_CFI");for(var u=decodeURIComponent(e[1]),n=0,i=[];;){var r=void 0;switch(u.charAt(n)){case"/":if(n++,!(e=u.substr(n).match(/^(0|[1-9][0-9]*)(\[(.*?)(;([^\]]|\^\])*)?\])?/)))throw new Error("E_CFI_NUMBER_EXPECTED");n+=e[0].length;var o=parseInt(e[1],10),a=e[3];r=gt(e[4]),i.push(new mt(o,a,j(r.s)));break;case":":if(n++,!(e=u.substr(n).match(/^(0|[1-9][0-9]*)(\[((([^\];,]|\^[\];,])*)(,(([^\];,]|\^[\];,])*))?)(;([^]]|\^\])*)?\])?/)))throw new Error("E_CFI_NUMBER_EXPECTED");n+=e[0].length;var s=parseInt(e[1],10),l=e[4];l&&(l=Ft(l));var D=e[7];D&&(D=Ft(D)),r=gt(e[10]),i.push(new Bt(s,l,D,j(r.s)));break;case"!":n++,i.push(new vt);break;case"~":case"@":case"":return void(this.steps=i);default:throw new Error("E_CFI_PARSE_ERROR")}}},e.navigate=function(e){for(var u={node:e.documentElement,offset:0,after:!1,sideBias:null,ref:null},n=0;n<this.steps.length;n++)if(!this.steps[n].applyTo(u)){u.ref=new t,u.ref.steps=this.steps.slice(n+1);break}return u},e.trim=function(t,e){return t.replace(/\s+/g," ").match(e?/^[ -\uD7FF\uE000-\uFFFF]{0,8}/:/[ -\uD7FF\uE000-\uFFFF]{0,8}$/)[0].replace(/^\s/,"").replace(/\s$/,"")},e.prependPathFromNode=function(t,e,u,n){for(var i=[],r=t.parentNode,o="",a="";t;){switch(t.nodeType){case 3:case 4:case 5:var s=t.textContent,l=s.length;u?(e+=l,o||(o=s)):(e>l&&(e=l),u=!0,o=s.substr(0,e),a=s.substr(e)),t=t.previousSibling;continue;case 8:t=t.previousSibling;continue}break}for((e>0||o||a)&&(o=this.trim(o,!1),a=this.trim(a,!0),i.push(new Bt(e,o,a,n)),n=null);r&&r&&9!=r.nodeType;){for(var D=u?null:ft(t),h=u?1:0;t;)1==t.nodeType&&(h+=2),t=t.previousSibling;i.push(new mt(h,D,n)),n=null,t=r,r=r.parentNode,u=!1}i.reverse(),this.steps?(i.push(new vt),this.steps=i.concat(this.steps)):this.steps=i},e.toString=function(){if(!this.steps)return"";var t=new et;t.append("epubcfi(");for(var e=0;e<this.steps.length;e++)this.steps[e].appendTo(t);return t.append(")"),t.toString().replace(/%/g,"%25")},t}();function yt(t){return{fontFamily:t.fontFamily,lineHeight:t.lineHeight,margin:t.margin,hyphenate:t.hyphenate,columnWidth:t.columnWidth,horizontal:t.horizontal,nightMode:t.nightMode,spreadView:t.spreadView,pageBorder:t.pageBorder,enabledMediaTypes:Object.assign({},t.enabledMediaTypes),defaultPaperSize:t.defaultPaperSize?Object.assign({},t.defaultPaperSize):void 0}}var Nt={fontFamily:"serif",lineHeight:1.25,margin:8,hyphenate:!1,columnWidth:25,horizontal:!1,nightMode:!1,spreadView:!1,pageBorder:1,enabledMediaTypes:{vivliostyle:!0,print:!0},defaultPaperSize:void 0},bt={};function St(t,e,u,n){var i=Math.min((t-0)/u,(e-0)/n);return"matrix("+i+",0,0,"+i+",0,0)"}function xt(t){return'"'+it(""+t)+'"'}function Tt(t){return nt(""+t)}function It(t,e){return t?nt(t)+"."+nt(e):nt(e)}var Pt=0,Rt=/*#__PURE__*/function(){function t(t,e){if(this.parent=void 0,this.resolver=void 0,this.scopeKey=void 0,this.children=[],this.zero=void 0,this.one=void 0,this._true=void 0,this._false=void 0,this.values={},this.funcs={},this.builtIns={},this.parent=t,this.resolver=e,this.scopeKey="S"+Pt++,this.zero=new Ee(this,0),this.one=new Ee(this,1),this._true=new Ee(this,!0),this._false=new Ee(this,!1),t&&t.children.push(this),!t){var u=this.builtIns;u.floor=Math.floor,u.ceil=Math.ceil,u.round=Math.round,u.sqrt=Math.sqrt,u.min=Math.min,u.max=Math.max,u.letterbox=St,u["css-string"]=xt,u["css-name"]=Tt,u.typeof=function(t){return typeof t},this.defineBuiltInName("page-width",function(){return this.pageWidth()}),this.defineBuiltInName("page-height",function(){return this.pageHeight()}),this.defineBuiltInName("pref-font-family",function(){return this.pref.fontFamily}),this.defineBuiltInName("pref-night-mode",function(){return this.pref.nightMode}),this.defineBuiltInName("pref-hyphenate",function(){return this.pref.hyphenate}),this.defineBuiltInName("pref-margin",function(){return this.pref.margin}),this.defineBuiltInName("pref-line-height",function(){return this.pref.lineHeight}),this.defineBuiltInName("pref-column-width",function(){return this.pref.columnWidth*this.fontSize}),this.defineBuiltInName("pref-horizontal",function(){return this.pref.horizontal}),this.defineBuiltInName("pref-spread-view",function(){return this.pref.spreadView}),this.defineBuiltInName("pub-title",function(){return xt(this.pubTitle?this.pubTitle:"")}),this.defineBuiltInName("doc-title",function(){return xt(this.docTitle?this.docTitle:"")})}}var e=t.prototype;return e.defineBuiltInName=function(t,e){this.values[t]=new de(this,e,t)},e.defineName=function(t,e){this.values[t]=e},e.defineFunc=function(t,e){this.funcs[t]=e},e.defineBuiltIn=function(t,e){this.builtIns[t]=e},t}();function kt(t){switch(null==t?void 0:t.toLowerCase()){case"vw":case"vh":case"vi":case"vb":case"vmin":case"vmax":case"pvw":case"pvh":case"pvi":case"pvb":case"pvmin":case"pvmax":return!0;default:return!1}}var Lt={px:1,in:96,pt:4/3,pc:16,cm:96/2.54,mm:96/25.4,q:96/2.54/40,em:16,rem:16,ex:8,lh:20,rlh:20,dppx:1,dpi:1/96,dpcm:2.54/96};function Ot(t){switch(t){case"q":return!CSS.supports("font-size","1q");case"lh":return!CSS.supports("line-height","1lh");case"rem":case"rlh":return!0;default:return!1}}var _t=/*#__PURE__*/function(){function t(t,e,u,n){this.rootScope=void 0,this.viewportWidth=void 0,this.viewportHeight=void 0,this.actualPageWidth=null,this.pageWidth=void 0,this.actualPageHeight=null,this.pageHeight=void 0,this.initialFontSize=void 0,this.rootFontSize=null,this.isRelativeRootFontSize=null,this.fontSize=void 0,this.rootLineHeight=null,this.pref=void 0,this.scopes={},this.pageAreaWidth=null,this.pageAreaHeight=null,this.pageVertical=null,this.pubTitle=null,this.docTitle=null,this.rootScope=t,this.viewportWidth=e,this.viewportHeight=u,this.pageWidth=function(){return this.actualPageWidth?this.actualPageWidth:this.pref.spreadView?Math.floor(e/2)-this.pref.pageBorder:e},this.pageHeight=function(){return this.actualPageHeight?this.actualPageHeight:u},this.initialFontSize=n,this.fontSize=function(){return this.rootFontSize?this.rootFontSize:n},this.pref=Nt}var e=t.prototype;return e.getScopeContext=function(t){var e=this.scopes[t.scopeKey];return e||(this.scopes[t.scopeKey]=e={}),e},e.clearScope=function(t){this.scopes[t.scopeKey]={};for(var e=0;e<t.children.length;e++)this.clearScope(t.children[e])},e.queryUnitSize=function(t,e,u){if(kt(t)){var n=this.pageWidth()/100,i=this.pageHeight()/100,r=null!=this.pageAreaWidth?this.pageAreaWidth/100:n,o=null!=this.pageAreaHeight?this.pageAreaHeight/100:i,a=null!=u?u:this.pageVertical;switch(t){case"vw":return r;case"vh":return o;case"vi":return a?o:r;case"vb":return a?r:o;case"vmin":return r<o?r:o;case"vmax":return r>o?r:o;case"pvw":return n;case"pvh":return i;case"pvi":return a?i:n;case"pvb":return a?n:i;case"pvmin":return n<i?n:i;case"pvmax":return n>i?n:i}}return"em"==t||"rem"==t?e?this.initialFontSize:this.fontSize():"ex"==t?Lt.ex*(e?this.initialFontSize:this.fontSize())/Lt.em:"lh"==t||"rlh"==t?this.rootLineHeight:Lt[t]},e.evalName=function(t,e){do{var u=t.values[e];if(u)return u;if(t.resolver&&(u=t.resolver.call(this,e,!1)))return u;t=t.parent}while(t);throw new Error("Name '"+e+"' is undefined")},e.evalCall=function(t,e,u,n){do{var i=t.funcs[e];if(i)return i;if(t.resolver&&(i=t.resolver.call(this,e,!0)))return i;var r=t.builtIns[e];if(r){if(n)return t.zero;for(var o=Array(u.length),a=0;a<u.length;a++)o[a]=u[a].evaluate(this);return new Ee(t,r.apply(this,o))}t=t.parent}while(t);throw new Error("Function '"+e+"' is undefined")},e.evalMediaName=function(t,e){var u="all"===t||!!this.pref.enabledMediaTypes[t];return e?!u:u},e.evalMediaTest=function(t,e){var u="",n=t.match(/^(min|max)-(.*)$/);n&&(u=n[1],t=n[2]);var i=null,r=null;switch(t){case"width":case"height":case"device-width":case"device-height":case"color":e&&(i=e.evaluate(this))}switch(t){case"width":r=this.pageWidth();break;case"height":r=this.pageHeight();break;case"device-width":r=window.screen.availWidth;break;case"device-height":r=window.screen.availHeight;break;case"color":r=window.screen.pixelDepth}if(null!=r&&null!=i)switch(u){case"min":return r>=Number(i);case"max":return r<=Number(i);default:return r==i}else if(null!=r&&null==e)return 0!==r;return!1},e.evalSupportsTest=function(t,e,u){return!1},e.queryVal=function(t,e){var u=t&&this.scopes[t.scopeKey];return u?u[e]:void 0},e.storeVal=function(t,e,u){this.getScopeContext(t)[e]=u},t}(),Mt=/*#__PURE__*/function(){function t(t){this.scope=void 0,this.key=void 0,this.scope=t,this.scope=t,this.key="_"+Pt++}var e=t.prototype;return e.toString=function(){var t=new et;return this.appendTo(t,0),t.toString()},e.appendTo=function(t,e){throw new Error("F_ABSTRACT")},e.evaluateCore=function(t){throw new Error("F_ABSTRACT")},e.expand=function(t,e){return this},e.dependCore=function(t,e,u){return t===this},e.dependOuter=function(t,e,u){var n=u[this.key];if(null!=n)return n!==bt&&n;u[this.key]=bt;var i=this.dependCore(t,e,u);return u[this.key]=i,i},e.depend=function(t,e){return this.dependOuter(t,e,{})},e.evaluate=function(t){var e=t.queryVal(this.scope,this.key);return void 0!==e||(e=this.evaluateCore(t),this.scope&&t.storeVal(this.scope,this.key,e)),e},e.isMediaName=function(){return!1},t}(),Ut=/*#__PURE__*/function(t){function e(e,u){var n;return(n=t.call(this,e)||this).val=void 0,n.val=u,n}N(e,t);var u=e.prototype;return u.getOp=function(){throw new Error("F_ABSTRACT")},u.evalPrefix=function(t){throw new Error("F_ABSTRACT")},u.evaluateCore=function(t){var e=this.val.evaluate(t);return this.evalPrefix(e)},u.dependCore=function(t,e,u){return t===this||this.val.dependOuter(t,e,u)},u.appendTo=function(t,e){10<e&&t.append("("),t.append(this.getOp()),this.val.appendTo(t,10),10<e&&t.append(")")},u.expand=function(t,e){var u=this.val.expand(t,e);return u===this.val?this:new this.constructor(this.scope,u)},e}(Mt),Vt=/*#__PURE__*/function(t){function e(e,u,n){var i;return(i=t.call(this,e)||this).lhs=void 0,i.rhs=void 0,i.lhs=u,i.rhs=n,i}N(e,t);var u=e.prototype;return u.getPriority=function(){throw new Error("F_ABSTRACT")},u.getOp=function(){throw new Error("F_ABSTRACT")},u.evalInfix=function(t,e){throw new Error("F_ABSTRACT")},u.evaluateCore=function(t){var e=this.lhs.evaluate(t),u=this.rhs.evaluate(t);return this.evalInfix(e,u)},u.dependCore=function(t,e,u){return t===this||this.lhs.dependOuter(t,e,u)||this.rhs.dependOuter(t,e,u)},u.appendTo=function(t,e){var u=this.getPriority();u<=e&&t.append("("),this.lhs.appendTo(t,u),t.append(this.getOp()),this.rhs.appendTo(t,u),u<=e&&t.append(")")},u.expand=function(t,e){var u=this.lhs.expand(t,e),n=this.rhs.expand(t,e);return u===this.lhs&&n===this.rhs?this:new this.constructor(this.scope,u,n)},e}(Mt),Ht=/*#__PURE__*/function(t){function e(e,u,n){return t.call(this,e,u,n)||this}return N(e,t),e.prototype.getPriority=function(){return 1},e}(Vt),zt=/*#__PURE__*/function(t){function e(e,u,n){return t.call(this,e,u,n)||this}return N(e,t),e.prototype.getPriority=function(){return 2},e}(Vt),Gt=/*#__PURE__*/function(t){function e(e,u,n){return t.call(this,e,u,n)||this}return N(e,t),e.prototype.getPriority=function(){return 3},e}(Vt),Wt=/*#__PURE__*/function(t){function e(e,u,n){return t.call(this,e,u,n)||this}return N(e,t),e.prototype.getPriority=function(){return 4},e}(Vt),Xt=/*#__PURE__*/function(t){function e(e,u){return t.call(this,e,u)||this}N(e,t);var u=e.prototype;return u.getOp=function(){return"!"},u.evalPrefix=function(t){return!t},e}(Ut),jt=/*#__PURE__*/function(t){function e(e,u){return t.call(this,e,u)||this}return N(e,t),e.prototype.getOp=function(){return"not "},e}(Xt),Kt=/*#__PURE__*/function(t){function e(e,u){return t.call(this,e,u)||this}N(e,t);var u=e.prototype;return u.getOp=function(){return"-"},u.evalPrefix=function(t){return-t},e}(Ut),Yt=/*#__PURE__*/function(t){function e(e,u,n){return t.call(this,e,u,n)||this}N(e,t);var u=e.prototype;return u.getOp=function(){return"&&"},u.evaluateCore=function(t){return this.lhs.evaluate(t)&&this.rhs.evaluate(t)},e}(Ht),qt=/*#__PURE__*/function(t){function e(e,u,n){return t.call(this,e,u,n)||this}return N(e,t),e.prototype.getOp=function(){return" and "},e}(Yt),$t=/*#__PURE__*/function(t){function e(e,u,n){return t.call(this,e,u,n)||this}N(e,t);var u=e.prototype;return u.getOp=function(){return"||"},u.evaluateCore=function(t){return this.lhs.evaluate(t)||this.rhs.evaluate(t)},e}(Ht),Qt=/*#__PURE__*/function(t){function e(e,u,n){return t.call(this,e,u,n)||this}return N(e,t),e.prototype.getOp=function(){return", "},e}($t),Zt=/*#__PURE__*/function(t){function e(e,u,n){return t.call(this,e,u,n)||this}return N(e,t),e.prototype.getOp=function(){return" or "},e}($t),Jt=/*#__PURE__*/function(t){function e(e,u,n){return t.call(this,e,u,n)||this}N(e,t);var u=e.prototype;return u.getOp=function(){return"<"},u.evalInfix=function(t,e){return t<e},e}(zt),te=/*#__PURE__*/function(t){function e(e,u,n){return t.call(this,e,u,n)||this}N(e,t);var u=e.prototype;return u.getOp=function(){return"<="},u.evalInfix=function(t,e){return t<=e},e}(zt),ee=/*#__PURE__*/function(t){function e(e,u,n){return t.call(this,e,u,n)||this}N(e,t);var u=e.prototype;return u.getOp=function(){return">"},u.evalInfix=function(t,e){return t>e},e}(zt),ue=/*#__PURE__*/function(t){function e(e,u,n){return t.call(this,e,u,n)||this}N(e,t);var u=e.prototype;return u.getOp=function(){return">="},u.evalInfix=function(t,e){return t>=e},e}(zt),ne=/*#__PURE__*/function(t){function e(e,u,n){return t.call(this,e,u,n)||this}N(e,t);var u=e.prototype;return u.getOp=function(){return"=="},u.evalInfix=function(t,e){return t==e},e}(zt),ie=/*#__PURE__*/function(t){function e(e,u,n){return t.call(this,e,u,n)||this}N(e,t);var u=e.prototype;return u.getOp=function(){return"!="},u.evalInfix=function(t,e){return t!=e},e}(zt),re=/*#__PURE__*/function(t){function e(e,u,n){return t.call(this,e,u,n)||this}N(e,t);var u=e.prototype;return u.getOp=function(){return"+"},u.evalInfix=function(t,e){return t+e},e}(Gt),oe=/*#__PURE__*/function(t){function e(e,u,n){return t.call(this,e,u,n)||this}N(e,t);var u=e.prototype;return u.getOp=function(){return" - "},u.evalInfix=function(t,e){return t-e},e}(Gt),ae=/*#__PURE__*/function(t){function e(e,u,n){return t.call(this,e,u,n)||this}N(e,t);var u=e.prototype;return u.getOp=function(){return"*"},u.evalInfix=function(t,e){return t*e},e}(Wt),se=/*#__PURE__*/function(t){function e(e,u,n){return t.call(this,e,u,n)||this}N(e,t);var u=e.prototype;return u.getOp=function(){return"/"},u.evalInfix=function(t,e){return t/e},e}(Wt),le=/*#__PURE__*/function(t){function e(e,u,n){return t.call(this,e,u,n)||this}N(e,t);var u=e.prototype;return u.getOp=function(){return"%"},u.evalInfix=function(t,e){return t%e},e}(Wt),De=/*#__PURE__*/function(t){function e(e,u,n){var i,r;return(r=t.call(this,e)||this).num=void 0,r.unit=void 0,r.num=u,r.unit=null!=(i=null==n?void 0:n.toLowerCase())?i:"",r}N(e,t);var u=e.prototype;return u.appendTo=function(t,e){t.append(this.num.toString()),t.append(nt(this.unit))},u.evaluateCore=function(t){return this.num*t.queryUnitSize(this.unit,!1)},e}(Mt),he=/*#__PURE__*/function(t){function e(e,u){var n;return(n=t.call(this,e)||this).qualifiedName=void 0,n.qualifiedName=u,n}N(e,t);var u=e.prototype;return u.appendTo=function(t,e){t.append(this.qualifiedName)},u.evaluateCore=function(t){return t.evalName(this.scope,this.qualifiedName).evaluate(t)},u.dependCore=function(t,e,u){return t===this||e.evalName(this.scope,this.qualifiedName).dependOuter(t,e,u)},e}(Mt),ce=/*#__PURE__*/function(t){function e(e,u,n){var i;return(i=t.call(this,e)||this).not=void 0,i.name=void 0,i.not=u,i.name=n,i}N(e,t);var u=e.prototype;return u.appendTo=function(t,e){this.not&&t.append("not "),t.append(nt(this.name))},u.evaluateCore=function(t){return t.evalMediaName(this.name,this.not)},u.isMediaName=function(){return!0},e}(Mt),de=/*#__PURE__*/function(t){function e(e,u,n){var i;return(i=t.call(this,e)||this).fn=void 0,i.str=void 0,i.fn=u,i.str=n,i}N(e,t);var u=e.prototype;return u.appendTo=function(t,e){t.append(this.str)},u.evaluateCore=function(t){return this.fn.call(t)},e}(Mt),fe=/*#__PURE__*/function(t){function e(e,u,n){var i;return(i=t.call(this,e)||this).qualifiedName=void 0,i.params=void 0,i.qualifiedName=u,i.params=n,i}N(e,t);var u=e.prototype;return u.appendTo=function(t,e){t.append(this.qualifiedName),function(t,e){t.append("(");for(var u=0;u<e.length;u++)u&&t.append(","),e[u].appendTo(t,0);t.append(")")}(t,this.params)},u.evaluateCore=function(t){return t.evalCall(this.scope,this.qualifiedName,this.params,!1).expand(t,this.params).evaluate(t)},u.dependCore=function(t,e,u){if(t===this)return!0;for(var n=0;n<this.params.length;n++)if(this.params[n].dependOuter(t,e,u))return!0;return e.evalCall(this.scope,this.qualifiedName,this.params,!0).dependOuter(t,e,u)},u.expand=function(t,u){var n=function(t,e,u){for(var n=e,i=0;i<e.length;i++){var r=e[i].expand(t,u);if(e!==n)n[i]=r;else if(r!==e[i]){n=Array(e.length);for(var o=0;o<i;o++)n[o]=e[o];n[i]=r}}return n}(t,this.params,u);return n===this.params?this:new e(this.scope,this.qualifiedName,n)},e}(Mt),pe=/*#__PURE__*/function(t){function e(e,u,n,i){var r;return(r=t.call(this,e)||this).cond=void 0,r.ifTrue=void 0,r.ifFalse=void 0,r.cond=u,r.ifTrue=n,r.ifFalse=i,r}N(e,t);var u=e.prototype;return u.appendTo=function(t,e){e>0&&t.append("("),this.cond.appendTo(t,0),t.append("?"),this.ifTrue.appendTo(t,0),t.append(":"),this.ifFalse.appendTo(t,0),e>0&&t.append(")")},u.evaluateCore=function(t){return this.cond.evaluate(t)?this.ifTrue.evaluate(t):this.ifFalse.evaluate(t)},u.dependCore=function(t,e,u){return t===this||this.cond.dependOuter(t,e,u)||this.ifTrue.dependOuter(t,e,u)||this.ifFalse.dependOuter(t,e,u)},u.expand=function(t,u){var n=this.cond.expand(t,u),i=this.ifTrue.expand(t,u),r=this.ifFalse.expand(t,u);return n===this.cond&&i===this.ifTrue&&r===this.ifFalse?this:new e(this.scope,n,i,r)},e}(Mt),Ee=/*#__PURE__*/function(t){function e(e,u){var n;return(n=t.call(this,e)||this).val=void 0,n.val=u,n}N(e,t);var u=e.prototype;return u.appendTo=function(t,e){switch(typeof this.val){case"number":case"boolean":t.append(this.val.toString());break;case"string":t.append('"'),t.append(it(this.val)),t.append('"');break;default:throw new Error("F_UNEXPECTED_STATE")}},u.evaluateCore=function(t){return this.val},e}(Mt),Ce=/*#__PURE__*/function(t){function e(e,u,n){var i;return(i=t.call(this,e)||this).name=void 0,i.value=void 0,i.name=u,i.value=n,i}N(e,t);var u=e.prototype;return u.appendTo=function(t,e){t.append("("),t.append(it(this.name.name)),t.append(":"),this.value.appendTo(t,0),t.append(")")},u.evaluateCore=function(t){return t.evalMediaTest(this.name.name,this.value)},u.dependCore=function(t,e,u){return t===this||this.value.dependOuter(t,e,u)},u.expand=function(t,u){var n=this.value.expand(t,u);return n===this.value?this:new e(this.scope,this.name,n)},e}(Mt),Fe=/*#__PURE__*/function(t){function e(e,u,n,i){var r;return(r=t.call(this,e)||this).name=void 0,r.value=void 0,r.isFunc=void 0,r.name=u,r.value=n,r.isFunc=i,r}N(e,t);var u=e.prototype;return u.appendTo=function(t,e){this.isFunc&&t.append(this.name),t.append("("),!this.isFunc&&this.name&&(t.append(this.name),t.append(":")),t.append(this.value),t.append(")")},u.evaluateCore=function(t){return t.evalSupportsTest(this.name,this.value,this.isFunc)},e}(Mt),Ae=/*#__PURE__*/function(t){function e(e,u){var n;return(n=t.call(this,e)||this).index=void 0,n.index=u,n}N(e,t);var u=e.prototype;return u.appendTo=function(t,e){t.append("$"),t.append(this.index.toString())},u.expand=function(t,e){var u=e[this.index];if(!u)throw new Error("Parameter missing: "+this.index);return u},e}(Mt);function ge(t,e,u){return e===t._false||e===t.zero||u==t._false||u==t.zero?t._false:e===t._true||e===t.one?u:u===t._true||u===t.one?e:new Yt(t,e,u)}function ve(t,e,u){return e===t.zero?u:u===t.zero?e:new re(t,e,u)}function me(t,e,u){return e===t.zero?new Kt(t,u):u===t.zero?e:new oe(t,e,u)}function Be(t,e,u){return e===t.zero||u===t.zero?t.zero:e===t.one?u:u===t.one?e:new ae(t,e,u)}function we(t,e,u){return e===t.zero?t.zero:u===t.one?e:new se(t,e,u)}var ye=/*#__PURE__*/function(){function t(){}var e=t.prototype;return e.visitValues=function(t){for(var e=0;e<t.length;e++)t[e].visit(this);return null},e.visitEmpty=function(t){return null},e.visitSlash=function(t){return null},e.visitStr=function(t){return null},e.visitIdent=function(t){return null},e.visitNumeric=function(t){return null},e.visitNum=function(t){return null},e.visitInt=function(t){return this.visitNum(t)},e.visitHexColor=function(t){return null},e.visitURL=function(t){return null},e.visitURange=function(t){return null},e.visitSpaceList=function(t){return this.visitValues(t.values),null},e.visitCommaList=function(t){return this.visitValues(t.values),null},e.visitFunc=function(t){return this.visitValues(t.values),null},e.visitExpr=function(t){return null},t}(),Ne=/*#__PURE__*/function(t){function e(){var e;return(e=t.call(this)||this).error=!1,e}N(e,t);var u=e.prototype;return u.visitValues=function(t){for(var e=null,u=0;u<t.length;u++){var n=t[u],i=n.visit(this);if(this.error)return[];if(e)e[u]=i;else if(n!==i){e=new Array(t.length);for(var r=0;r<u;r++)e[r]=t[r];e[u]=i}}return e||t},u.visitEmpty=function(t){return t},u.visitStr=function(t){return t},u.visitIdent=function(t){return t},u.visitSlash=function(t){return t},u.visitNumeric=function(t){return t},u.visitNum=function(t){return t},u.visitInt=function(t){return t},u.visitHexColor=function(t){return t},u.visitURL=function(t){return t},u.visitURange=function(t){return t},u.visitSpaceList=function(t){var e=this.visitValues(t.values);return this.error?xe:e===t.values?t:new Ge(e)},u.visitCommaList=function(t){var e=this.visitValues(t.values);return this.error?xe:e===t.values?t:new We(e)},u.visitFunc=function(t){var e=this.visitValues(t.values);return this.error?xe:e===t.values?t:new Xe(t.name,e)},u.visitExpr=function(t){return t},e}(ye),be=/*#__PURE__*/function(){function t(){}var e=t.prototype;return e.toString=function(){var t=new et;return this.appendTo(t,!0),t.toString()},e.stringValue=function(){var t=new et;return this.appendTo(t,!1),t.toString()},e.toExpr=function(t,e){return null},e.appendTo=function(t,e){t.append("[error]")},e.isExpr=function(){return!1},e.isNumeric=function(){return!1},e.isNum=function(){return!1},e.isIdent=function(){return!1},e.isSpaceList=function(){return!1},e.visit=function(t){return this},t}(),Se=/*#__PURE__*/function(t){function e(){return t.call(this)||this}N(e,t);var u=e.prototype;return u.toExpr=function(t,e){return new Ee(t,"")},u.appendTo=function(t,e){},u.visit=function(t){return t.visitEmpty(this)},y(e,null,[{key:"instance",get:function(){return this.empty||(this.empty=new e),this.empty}}]),e}(be);Se.empty=void 0;var xe=Se.instance,Te=/*#__PURE__*/function(t){function e(){return t.call(this)||this}N(e,t);var u=e.prototype;return u.toExpr=function(t,e){return new Ee(t,"/")},u.appendTo=function(t,e){t.append("/")},u.visit=function(t){return t.visitSlash(this)},y(e,null,[{key:"instance",get:function(){return this.slash||(this.slash=new e),this.slash}}]),e}(be);Te.slash=void 0;var Ie=Te.instance,Pe=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this)||this).str=void 0,u.str=e,u}N(e,t);var u=e.prototype;return u.toExpr=function(t,e){return new Ee(t,this.str)},u.appendTo=function(t,e){e?(t.append('"'),t.append(it(this.str)),t.append('"')):t.append(this.str)},u.visit=function(t){return t.visitStr(this)},e}(be),Re={},ke=/*#__PURE__*/function(t){function e(e){var u;if((u=t.call(this)||this).name=void 0,u.name=e,Re[e])throw new Error("E_INVALID_CALL");return Re[e]=I(u),u}N(e,t);var u=e.prototype;return u.toExpr=function(t,e){return new Ee(t,this.name)},u.appendTo=function(t,e){t.append(e?nt(this.name):this.name)},u.visit=function(t){return t.visitIdent(this)},u.isIdent=function(){return!0},e}(be);function Le(t){var e=Re[t];return e||(e=new ke(t)),e}var Oe=/*#__PURE__*/function(t){function e(e,u){var n,i;return(i=t.call(this)||this).num=void 0,i.unit=void 0,i.num=e,i.unit=null!=(n=null==u?void 0:u.toLowerCase())?n:"",i}N(e,t);var u=e.prototype;return u.toExpr=function(t,e){return 0==this.num?t.zero:e&&"%"==this.unit?100==this.num?e:new ae(t,e,new Ee(t,this.num/100)):new De(t,this.num,this.unit)},u.appendTo=function(t,e){t.append(this.num.toString()),t.append(this.unit)},u.visit=function(t){return t.visitNumeric(this)},u.isNumeric=function(){return!0},e}(be),_e=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this)||this).num=void 0,u.num=e,u}N(e,t);var u=e.prototype;return u.toExpr=function(t,e){return 0==this.num?t.zero:1==this.num?t.one:new Ee(t,this.num)},u.appendTo=function(t,e){t.append(this.num.toString())},u.visit=function(t){return t.visitNum(this)},u.isNum=function(){return!0},e}(be),Me=/*#__PURE__*/function(t){function e(e){return t.call(this,e)||this}return N(e,t),e.prototype.visit=function(t){return t.visitInt(this)},e}(_e),Ue=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this)||this).hex=void 0,u.hex=e,u}N(e,t);var u=e.prototype;return u.appendTo=function(t,e){t.append("#"),t.append(this.hex)},u.visit=function(t){return t.visitHexColor(this)},e}(be),Ve=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this)||this).url=void 0,u.url=e,u}N(e,t);var u=e.prototype;return u.appendTo=function(t,e){t.append('url("'),t.append(it(this.url)),t.append('")')},u.visit=function(t){return t.visitURL(this)},e}(be),He=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this)||this).urangeText=void 0,u.urangeText=e,u}N(e,t);var u=e.prototype;return u.appendTo=function(t,e){t.append(this.urangeText)},u.visit=function(t){return t.visitURange(this)},e}(be);function ze(t,e,u,n){var i=e.length;if(i>0){var r;null==(r=e[0])||r.appendTo(t,n);for(var o=1;o<i;o++){var a;t.append(u),null==(a=e[o])||a.appendTo(t,n)}}}var Ge=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this)||this).values=void 0,u.values=e,u}N(e,t);var u=e.prototype;return u.appendTo=function(t,e){ze(t,this.values," ",e)},u.visit=function(t){return t.visitSpaceList(this)},u.isSpaceList=function(){return!0},e}(be),We=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this)||this).values=void 0,u.values=e,u}N(e,t);var u=e.prototype;return u.appendTo=function(t,e){ze(t,this.values,",",e)},u.visit=function(t){return t.visitCommaList(this)},e}(be),Xe=/*#__PURE__*/function(t){function e(e,u){var n;return(n=t.call(this)||this).name=void 0,n.values=void 0,n.name=e,n.values=u,n}N(e,t);var u=e.prototype;return u.appendTo=function(t,e){t.append(nt(this.name)),t.append("("),ze(t,this.values,",",e),t.append(")")},u.visit=function(t){return t.visitFunc(this)},e}(be),je=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this)||this).expr=void 0,u.expr=e,u}N(e,t);var u=e.prototype;return u.toExpr=function(){return this.expr},u.appendTo=function(t,e){this.expr instanceof Ee||this.expr instanceof De?this.expr.appendTo(t,0):(t.append("-epubx-expr("),this.expr.appendTo(t,0),t.append(")"))},u.visit=function(t){return t.visitExpr(this)},u.isExpr=function(){return!0},e}(be),Ke=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this)||this).text=void 0,u.text=e,u}return N(e,t),e.prototype.appendTo=function(t,e){t.append(this.text||" ")},e}(be);function Ye(t,e){if(t){if(t.isNumeric()){var u=t;return e.queryUnitSize(u.unit,!1)*u.num}if(t.isNum())return t.num}return 0}function qe(t,e){return new Oe(Ye(t,e),"px")}var $e={absolute:Le("absolute"),all:Le("all"),always:Le("always"),anywhere:Le("anywhere"),auto:Le("auto"),avoid:Le("avoid"),balance:Le("balance"),balance_all:Le("balance-all"),block:Le("block"),block_end:Le("block-end"),block_start:Le("block-start"),both:Le("both"),bottom:Le("bottom"),border_box:Le("border-box"),break_all:Le("break-all"),break_word:Le("break-word"),clip:Le("clip"),crop:Le("crop"),cross:Le("cross"),column:Le("column"),discard:Le("discard"),exclusive:Le("exclusive"),_false:Le("false"),fixed:Le("fixed"),flex:Le("flex"),flow_root:Le("flow-root"),footnote:Le("footnote"),footer:Le("footer"),grid:Le("grid"),header:Le("header"),hidden:Le("hidden"),horizontal_tb:Le("horizontal-tb"),inherit:Le("inherit"),initial:Le("initial"),inline:Le("inline"),inline_block:Le("inline-block"),inline_end:Le("inline-end"),inline_start:Le("inline-start"),keep:Le("keep"),landscape:Le("landscape"),left:Le("left"),line:Le("line"),list_item:Le("list-item"),ltr:Le("ltr"),manual:Le("manual"),max_content:Le("max-content"),min_content:Le("min-content"),none:Le("none"),normal:Le("normal"),oeb_page_foot:Le("oeb-page-foot"),oeb_page_head:Le("oeb-page-head"),padding_box:Le("padding-box"),page:Le("page"),relative:Le("relative"),revert:Le("revert"),right:Le("right"),same:Le("same"),scale:Le("scale"),snap_block:Le("snap-block"),solid:Le("solid"),spread:Le("spread"),_static:Le("static"),rtl:Le("rtl"),table:Le("table"),table_caption:Le("table-caption"),table_cell:Le("table-cell"),table_footer_group:Le("table-footer-group"),table_header_group:Le("table-header-group"),table_row:Le("table-row"),top:Le("top"),transparent:Le("transparent"),unset:Le("unset"),vertical_lr:Le("vertical-lr"),vertical_rl:Le("vertical-rl"),visible:Le("visible"),_true:Le("true")},Qe=new Oe(100,"%"),Ze=new Oe(100,"pvw"),Je=new Oe(100,"pvh"),tu=new Oe(0,"px"),eu=new He("U+0-10FFFF"),uu={"font-size":1,"line-height":2,color:3};function nu(t){return t===$e.inherit||t===$e.initial||t===$e.revert||t===$e.unset}function iu(t,e){return(uu[t]||Number.MAX_VALUE)-(uu[e]||Number.MAX_VALUE)}function ru(t){return(null==t?void 0:t.length)>2&&t.startsWith("--")}var ou=function(t,e,u,n){this.x1=void 0,this.y1=void 0,this.x2=void 0,this.y2=void 0,this.x1=t,this.y1=e,this.x2=u,this.y2=n},au=function(t,e){this.x=void 0,this.y=void 0,this.x=t,this.y=e},su=function(t,e,u,n){this.left=void 0,this.top=void 0,this.right=void 0,this.bottom=void 0,this.left=t,this.top=e,this.right=u,this.bottom=n},lu=function(t,e,u,n){this.low=void 0,this.high=void 0,this.winding=void 0,this.shapeId=void 0,this.low=t,this.high=e,this.winding=u,this.shapeId=n},Du=function(t,e,u,n){this.y1=void 0,this.y2=void 0,this.x1=void 0,this.x2=void 0,this.left=null,this.right=null,this.y1=t,this.y2=e,this.x1=u,this.x2=n};function hu(t,e){return t.low.y-e.low.y||t.low.x-e.low.x}var cu=/*#__PURE__*/function(){function t(t){this.points=void 0,this.points=t}var e=t.prototype;return e.addSegments=function(t,e){for(var u=this.points,n=u.length,i=u[n-1],r=0;r<n;r++){var o,a=u[r];o=i.y<a.y?new lu(i,a,1,e):new lu(a,i,-1,e),t.push(o),i=a}},e.withOffset=function(e,u){for(var n,i=[],r=R(this.points);!(n=r()).done;){var o=n.value;i.push(new au(o.x+e,o.y+u))}return new t(i)},t}();function du(t,e,u,n){for(var i=[],r=0;r<20;r++){var o=2*r*Math.PI/20;i.push(new au(t+u*Math.sin(o),e+n*Math.cos(o)))}return new cu(i)}function fu(t,e,u,n){return new cu([new au(t,e),new au(u,e),new au(u,n),new au(t,n)])}var pu=function(t,e,u,n){this.x=void 0,this.winding=void 0,this.shapeId=void 0,this.lowOrHigh=void 0,this.x=t,this.winding=e,this.shapeId=u,this.lowOrHigh=n};function Eu(t,e){var u=t.low.x+(t.high.x-t.low.x)*(e-t.low.y)/(t.high.y-t.low.y);if(isNaN(u))throw new Error("Bad intersection");return u}function Cu(t,e,u,n){var i,r,o,a;e.high.y<u&&D.warn("Error: inconsistent segment (1)"),e.low.y<=u?(i=Eu(e,u),r=e.winding):(i=e.low.x,r=0),e.high.y>=n?(o=Eu(e,n),a=e.winding):(o=e.high.x,a=0),i<o?(t.push(new pu(i,r,e.shapeId,-1)),t.push(new pu(o,a,e.shapeId,1))):(t.push(new pu(o,a,e.shapeId,-1)),t.push(new pu(i,r,e.shapeId,1)))}function Fu(t,e,u){var n,i=e+u,r=Array(i),o=Array(i);for(n=0;n<=i;n++)r[n]=0,o[n]=0;for(var a=[],s=!1,l=t.length,D=0;D<l;D++){var h=t[D];r[h.shapeId]+=h.winding,o[h.shapeId]+=h.lowOrHigh;var c=!1;for(n=0;n<e;n++)if(r[n]&&!o[n]){c=!0;break}if(c)for(n=e;n<=i;n++)if(r[n]||o[n]){c=!1;break}s!=c&&(a.push(h.x),s=c)}return a}function Au(t,e){return e?Math.floor(t/e)*e:t}function gu(t){return new ou(t.y1,-t.x2,t.y2,-t.x1)}function vu(t){return new ou(-t.y2,t.x1,-t.y1,t.x2)}function mu(t){return new cu(t.points.map(function(t){return function(t){return new au(t.y,-t.x)}(t)}))}function Bu(t,e){for(var u=e.length-1,n=new Du(t.y2,t.y2,t.x1,t.x2);u>=0;){var i=n;((n=e[u]).y2-n.y1<1||n.x1==i.x1&&n.x2==i.x2)&&(i.y1=n.y1,e.splice(u,1),n=i),u--}}function wu(t,e){for(var u=0,n=t.length;u<n;){var i=Math.floor((u+n)/2);e>=t[i].y2?u=i+1:n=i}return u}function yu(t,e){if(!t.length)return e;var u,n,i=e.y1;for(n=0;n<t.length&&!((u=t[n]).y2>e.y1&&u.x1-.1<=e.x1&&u.x2+.1>=e.x2);n++)i=Math.max(i,u.y2);for(var r=i;n<t.length&&!((u=t[n]).y1>=e.y2||u.x1-.1>e.x1||u.x2+.1<e.x2);n++)r=u.y2;return(r=n===t.length?e.y2:Math.min(r,e.y2))<=i?null:new ou(e.x1,i,e.x2,r)}function Nu(t,e){if(!t.length)return e;var u,n,i=e.y2;for(n=t.length-1;n>=0&&(u=t[n],!(n===t.length-1&&u.y2<e.y2))&&!(u.y1<e.y2&&u.x1-.1<=e.x1&&u.x2+.1>=e.x2);n--)i=Math.min(i,u.y1);for(var r=Math.min(i,u.y2);n>=0&&!((u=t[n]).y2<=e.y1||u.x1-.1>e.x1||u.x2+.1<e.x2);n--)r=u.y1;return i<=(r=Math.max(r,e.y1))?null:new ou(e.x1,r,e.x2,i)}var bu=/*#__PURE__*/function(t){function e(){var e;return(e=t.call(this)||this).propSet={},e}N(e,t);var u=e.prototype;return u.visitIdent=function(t){return this.propSet[t.name]=!0,t},u.visitSpaceList=function(t){return this.visitValues(t.values),t},e}(ye),Su=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this)||this).value=void 0,u.value=e,u}return N(e,t),e.prototype.visitInt=function(t){return this.value=t.num,t},e}(ye);function xu(t,e){if(t){var u=new Su(e);try{return t.visit(u),u.value}catch(t){D.warn(t,"toInt: ")}}return e}var Tu=/*#__PURE__*/function(t){function e(){var e;return(e=t.call(this)||this).collect=!1,e.coords=[],e.name=null,e}N(e,t);var u=e.prototype;return u.visitNumeric=function(t){return this.collect&&this.coords.push(t),null},u.visitNum=function(t){return this.collect&&0==t.num&&this.coords.push(new Oe(0,"px")),null},u.visitSpaceList=function(t){return this.visitValues(t.values),null},u.visitFunc=function(t){return this.collect||(this.collect=!0,this.visitValues(t.values),this.collect=!1,this.name=t.name.toLowerCase()),null},u.getShape=function(t,e,u,n,i){var r=this;if(this.coords.length>0){var o=[];switch(this.coords.forEach(function(t,e){if("%"==t.unit){var a=e%2==0?u:n;3==e&&"circle"==r.name&&(a=Math.sqrt((u*u+n*n)/2)),o.push(t.num*a/100)}else o.push(t.num*i.queryUnitSize(t.unit,!1))}),this.name){case"polygon":if(o.length%2==0){for(var a=[],s=0;s<o.length;s+=2)a.push(new au(t+o[s],e+o[s+1]));return new cu(a)}break;case"rectangle":if(4==o.length)return fu(t+o[0],e+o[1],t+o[0]+o[2],e+o[1]+o[3]);break;case"ellipse":if(4==o.length)return du(t+o[0],e+o[1],o[2],o[3]);break;case"circle":if(3==o.length)return du(t+o[0],e+o[1],o[2],o[2])}}return null},e}(ye);function Iu(t,e,u,n,i,r){if(t){var o=new Tu;try{return t.visit(o),o.getShape(e,u,n,i,r)}catch(t){D.warn(t,"toShape:")}}return fu(e,u,e+n,u+i)}var Pu=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this)||this).reset=void 0,u.counters={},u.name=null,u.reset=e,u}N(e,t);var u=e.prototype;return u.visitIdent=function(t){return this.name=t.toString(),this.counters[this.name]=this.reset?0:(this.counters[this.name]||0)+1,t},u.visitInt=function(t){return this.name&&(this.counters[this.name]+=t.num-(this.reset?0:1)),t},u.visitSpaceList=function(t){return this.visitValues(t.values),t},e}(ye);function Ru(t,e){var u=new Pu(e);try{t.visit(u)}catch(t){D.warn(t,"toCounters:")}return u.counters}var ku=/*#__PURE__*/function(t){function e(e,u){var n;return(n=t.call(this)||this).baseUrl=void 0,n.transformer=void 0,n.baseUrl=e,n.transformer=u,n}return N(e,t),e.prototype.visitURL=function(t){return new Ve(this.transformer.transformURL(t.url,this.baseUrl))},e}(Ne);function Lu(t){var e={};return Object.keys(t).forEach(function(u){e[u]=Array.from(t[u])}),e}var Ou,_u=/*#__PURE__*/function(){function t(t,e){this.targetId=void 0,this.resolved=void 0,this.pageCounters=null,this.spineIndex=-1,this.pageIndex=-1,this.targetId=t,this.resolved=e}var e=t.prototype;return e.equals=function(t){return this===t||!!t&&this.targetId===t.targetId&&this.resolved===t.resolved&&this.spineIndex===t.spineIndex&&this.pageIndex===t.pageIndex},e.isResolved=function(){return this.resolved},e.resolve=function(){this.resolved=!0},e.unresolve=function(){this.resolved=!1},t}(),Mu=/*#__PURE__*/function(){function t(t,e){this.counterStore=void 0,this.baseURL=void 0,this.counterStore=t,this.baseURL=e}var e=t.prototype;return e.countersOfId=function(t,e){t=this.counterStore.documentURLTransformer.transformFragment(t,this.baseURL),this.counterStore.countersById[t]=e},e.getExprContentListener=function(){return this.counterStore.getExprContentListener()},t}(),Uu=/*#__PURE__*/function(){function t(t,e,u,n){this.counterStore=void 0,this.baseURL=void 0,this.rootScope=void 0,this.pageScope=void 0,this.styler=null,this.namedStringValues={},this.runningElements={},this.counterStore=t,this.baseURL=e,this.rootScope=u,this.pageScope=n}var e=t.prototype;return e.setStyler=function(t){this.styler=t},e.getFragment=function(t){var e=t.match(/^[^#]*#(.*)$/);return e?e[1]:null},e.getTransformedId=function(t){var e=this.counterStore.documentURLTransformer.transformURL(W(t,this.baseURL),this.baseURL);return"#"===e.charAt(0)&&(e=e.substring(1)),e},e.getPageCounterVal=function(t,e){var u=this,n=new de(this.pageScope,function(){return e(function(){var e=u.counterStore.currentPageCounters[t];return e&&e.length?e[e.length-1]:null}())},"page-counter-"+t);return this.counterStore.registerPageCounterExpr(t,function(t){return e(t[0])},n),n},e.getPageCountersVal=function(t,e){var u=this,n=new de(this.pageScope,function(){return e(u.counterStore.currentPageCounters[t]||[])},"page-counters-"+t);return this.counterStore.registerPageCounterExpr(t,e,n),n},e.getTargetCounters=function(t,e,u){var n=this.counterStore.countersById[e];return!n&&u&&t&&(this.styler.styleUntilIdIsReached(t),n=this.counterStore.countersById[e]),n||null},e.getTargetPageCounters=function(t){return this.counterStore.currentPage.elementsById[t]?this.counterStore.currentPageCounters:this.counterStore.pageCountersById[t]||null},e.getTargetCounterVal=function(t,e,u){var n=this,i=this.getFragment(t),r=this.getTransformedId(t),o=this.getTargetCounters(i,r,!1);if(o&&o[e]){var a=o[e];return new Ee(this.rootScope,u(a[a.length-1]||null))}return new de(this.pageScope,function(){if(o=n.getTargetCounters(i,r,!0)){if(o[e]){var t=o[e];return u(t[t.length-1]||null)}var a=n.getTargetPageCounters(r);if(a){if(n.counterStore.resolveReference(r),a[e]){var s=a[e];return u(s[s.length-1]||null)}return u(0)}return n.counterStore.saveReferenceOfCurrentPage(r,!1),"??"}return n.counterStore.saveReferenceOfCurrentPage(r,!1),"??"},"target-counter-"+e+"-of-"+t)},e.getTargetCountersVal=function(t,e,u){var n=this,i=this.getFragment(t),r=this.getTransformedId(t);return new de(this.pageScope,function(){var t=n.getTargetPageCounters(r);if(t){n.counterStore.resolveReference(r);var o=t[e]||[],a=n.getTargetCounters(i,r,!0);return u(o.concat(a[e]||[]))}return n.counterStore.saveReferenceOfCurrentPage(r,!1),"??"},"target-counters-"+e+"-of-"+t)},e.getNamedStringVal=function(t,e){var u=this;return new de(this.pageScope,function(){return u.getRunningValue(u.namedStringValues,t,e)},"named-string-"+e+"-"+t)},e.getRunningElementVal=function(t,e){var u=this;return new de(this.pageScope,function(){return u.getRunningValue(u.runningElements,t,e)},"running-element-"+e+"-"+t)},e.getRunningValue=function(t,e,u){var n=t[e];if(!n)return"";for(var i=Object.keys(n).map(function(t){return parseInt(t,10)}).sort(Dt),r=this.counterStore.currentPage,o=r.isBlankPage?r.offset-1:r.offset,a=r.isBlankPage?o:Math.max.apply(Math,[o].concat(Array.from(r.container.querySelectorAll("["+L+"]")).map(function(t){return parseInt(t.getAttribute(L),10)}))),s=-1,l=-1,D=-1,h=-1,c=0;c<i.length;c++){var d=i[c],f=c>0?i[c-1]:-1,p=c<i.length-1?i[c+1]:-1;if(d>a)break;if(d>=o){if(s<0&&(s=d,h=-1),l<0)if(d===o)l=d;else{f<s&&(l=f);var E=r.container.querySelector("["+L+'="'+d+'"]');if(E){var C=r.container.querySelector("["+L+'="'+o+'"]');if(C||(C=r.container.querySelector("["+L+'="0"]')),C)for(var F=C;F;F=F.firstElementChild)if(F===E){l=d;break}}else l<0&&(l=d)}D=d}else(p>a||p<0)&&(s=l=D=h=d)}return n[{first:s,start:l,last:D,"first-except":h}[u]]||""},e.setNamedString=function(t,e,u){(this.namedStringValues[t]||(this.namedStringValues[t]={}))[u]=e},e.setRunningElement=function(t,e){(this.runningElements[t]||(this.runningElements[t]={}))[e]=String(e)},t}(),Vu=/*#__PURE__*/function(){function t(t){this.documentURLTransformer=void 0,this.countersById={},this.pageCountersById={},this.currentPageCounters={},this.previousPageCounters={},this.currentPageCountersStack=[],this.pageIndicesById={},this.currentPage=null,this.newReferencesOfCurrentPage=[],this.referencesToSolve=[],this.referencesToSolveStack=[],this.unresolvedReferences={},this.resolvedReferences={},this.pagesCounterExprs=[],this.pageCounterExprs=[],this.documentURLTransformer=t,this.currentPageCounters.page=[0]}var e=t.prototype;return e.createCounterListener=function(t){return new Mu(this,t)},e.createCounterResolver=function(t,e,u){return new Uu(this,t,e,u)},e.setCurrentPage=function(t){this.currentPage=t},e.definePageCounter=function(t,e){this.currentPageCounters[t]?this.currentPageCounters[t].push(e):this.currentPageCounters[t]=[e]},e.forceSetPageCounter=function(t){var e=this.currentPageCounters.page;e&&e.length?e[e.length-1]=t:this.currentPageCounters.page=[t]},e.updatePageCounters=function(t,e){var u;this.previousPageCounters=Lu(this.currentPageCounters);var n,i=t["counter-reset"];if(i){var r=i.evaluate(e);r&&(u=Ru(r,!0))}if(u)for(var o in u)this.definePageCounter(o,u[o]);var a=t["counter-increment"];if(a){var s=a.evaluate(e);s&&(n=Ru(s,!1))}for(var l in n?"page"in n||(n.page=1):(n={}).page=1,n){this.currentPageCounters[l]||this.definePageCounter(l,0);var D=this.currentPageCounters[l];D[D.length-1]+=n[l]}},e.pushPageCounters=function(t){this.currentPageCountersStack.push(this.currentPageCounters),this.currentPageCounters=Lu(t)},e.popPageCounters=function(){this.currentPageCounters=this.currentPageCountersStack.pop()},e.resolveReference=function(t){var e=this.unresolvedReferences[t],u=this.resolvedReferences[t];u||(u=this.resolvedReferences[t]=[]);for(var n=!1,i=0;i<this.referencesToSolve.length;){var r=this.referencesToSolve[i];if(r.targetId===t){if(r.resolve(),this.referencesToSolve.splice(i,1),e){var o=e.indexOf(r);o>=0&&e.splice(o,1)}u.push(r),n=!0}else i++}n||this.saveReferenceOfCurrentPage(t,!0)},e.saveReferenceOfCurrentPage=function(t,e){if(!this.newReferencesOfCurrentPage.some(function(e){return e.targetId===t})){var u=new _u(t,e);this.newReferencesOfCurrentPage.push(u)}},e.finishPage=function(t,e){var u=this,n=Object.keys(this.currentPage.elementsById);if(n.length>0){var i=Lu(this.currentPageCounters);n.forEach(function(n){u.pageCountersById[n]=i;var r=u.pageIndicesById[n];if(r&&r.pageIndex<e){var o=u.resolvedReferences[n];if(o){var a,s=u.unresolvedReferences[n];for(s||(s=u.unresolvedReferences[n]=[]);a=o.shift();)a.unresolve(),s.push(a)}}u.pageIndicesById[n]={spineIndex:t,pageIndex:e}})}for(var r,o=this.previousPageCounters;r=this.newReferencesOfCurrentPage.shift();){r.pageCounters=o,r.spineIndex=t,r.pageIndex=e;var a=void 0;r.isResolved()?(a=this.resolvedReferences[r.targetId])||(a=this.resolvedReferences[r.targetId]=[]):(a=this.unresolvedReferences[r.targetId])||(a=this.unresolvedReferences[r.targetId]=[]),a.every(function(t){return!r.equals(t)})&&a.push(r)}this.currentPage=null},e.getUnresolvedRefsToPage=function(t){var e=this,u=[];Object.keys(t.elementsById).forEach(function(t){var n=e.unresolvedReferences[t];n&&(u=u.concat(n))}),u.sort(function(t,e){return t.spineIndex-e.spineIndex||t.pageIndex-e.pageIndex});var n=[],i=null;return u.forEach(function(t){i&&i.spineIndex===t.spineIndex&&i.pageIndex===t.pageIndex?i.refs.push(t):n.push(i={spineIndex:t.spineIndex,pageIndex:t.pageIndex,pageCounters:t.pageCounters,refs:[t]})}),n},e.pushReferencesToSolve=function(t){this.referencesToSolveStack.push(this.referencesToSolve),this.referencesToSolve=t},e.popReferencesToSolve=function(){this.referencesToSolve=this.referencesToSolveStack.pop()},e.registerPageCounterExpr=function(t,e,u){"pages"===t?this.pagesCounterExprs.push({expr:u,format:e}):this.pageCounterExprs.push({expr:u,format:e})},e.getExprContentListener=function(){return this.exprContentListener.bind(this)},e.exprContentListener=function(t,e,u){if(t instanceof de){if("viv-leader"==t.str){var n=u.createElementNS(H.XHTML,"span");return n.textContent=e,n.setAttribute("data-viv-leader",t.key),n.setAttribute("data-viv-leader-value",e),n}if(t.str.startsWith("running-element-")){var i=e&&u.querySelectorAll("["+L+'="'+e+'"]');if(!i||0===i.length)return null;var r=i[i.length-1].cloneNode(!0);return this.fixPageCounterInRunningElement(r),r.style.position="",r.style.visibility="",r}}var o=this.pagesCounterExprs.findIndex(function(e){return e.expr===t})>=0,a=!o&&this.pageCounterExprs.findIndex(function(e){return e.expr===t})>=0;if(o||a){var s=u.createElementNS(H.XHTML,"span");return s.textContent=e,s.setAttribute(o?Hu:zu,t.key),s}return null},e.fixPageCounterInRunningElement=function(t){for(var e,u=this,n=function(){var t=e.value,n=t.getAttribute(zu),i=u.pageCounterExprs.find(function(t){return t.expr.key===n}),r=(null==i?void 0:i.expr).str,o=null==r?void 0:r.replace(/^page-counters?-/,""),a=u.currentPageCounters[o];a&&(t.textContent=i.format(a))},i=R(t.querySelectorAll("["+zu+"]"));!(e=i()).done;)n()},e.finishLastPage=function(t){for(var e,u=this,n=t.root.querySelectorAll("["+Hu+"]"),i=this.currentPageCounters.page[0],r=function(){var t=e.value,n=t.getAttribute(Hu),r=u.pagesCounterExprs.findIndex(function(t){return t.expr.key===n});t.textContent=u.pagesCounterExprs[r].format([i])},o=R(n);!(e=o()).done;)r()},e.createLayoutConstraint=function(t){return new Gu(this,t)},t}(),Hu="data-vivliostyle-pages-counter",zu="data-vivliostyle-page-counter",Gu=/*#__PURE__*/function(){function t(t,e){this.counterStore=void 0,this.pageIndex=void 0,this.counterStore=t,this.pageIndex=e}return t.prototype.allowLayout=function(t){if(!t||t.after)return!0;var e=t.viewNode;if(!e||1!==e.nodeType)return!0;var u=e.getAttribute("data-vivliostyle-id")||e.getAttribute("id")||e.getAttribute("name");if(!u)return!0;if(!this.counterStore.resolvedReferences[u]&&!this.counterStore.unresolvedReferences[u])return!0;var n=this.counterStore.pageIndicesById[u];return!n||this.pageIndex>=n.pageIndex},t}();function Wu(t){if((t=t.substr(1)).match(/^[^0-9a-fA-F\n\r]$/))return t;var e=parseInt(t,16);return isNaN(e)?"":0===e||e>=55296&&e<=57343||e>1114111?"�":String.fromCodePoint(e)}function Xu(t){return t.replace(/\\([0-9a-fA-F]{1,6}(\r\n|[ \n\r\t\f])?|[^0-9a-fA-F\n\r])/g,Wu)}!function(t){t[t.EOF=0]="EOF",t[t.IDENT=1]="IDENT",t[t.STR=2]="STR",t[t.NUMERIC=3]="NUMERIC",t[t.NUM=4]="NUM",t[t.INT=5]="INT",t[t.FUNC=6]="FUNC",t[t.HASH=7]="HASH",t[t.URL=8]="URL",t[t.CLASS=9]="CLASS",t[t.O_PAR=10]="O_PAR",t[t.C_PAR=11]="C_PAR",t[t.O_BRC=12]="O_BRC",t[t.C_BRC=13]="C_BRC",t[t.O_BRK=14]="O_BRK",t[t.C_BRK=15]="C_BRK",t[t.COMMA=16]="COMMA",t[t.SEMICOL=17]="SEMICOL",t[t.COLON=18]="COLON",t[t.SLASH=19]="SLASH",t[t.AT=20]="AT",t[t.PERCENT=21]="PERCENT",t[t.QMARK=22]="QMARK",t[t.PLUS=23]="PLUS",t[t.MINUS=24]="MINUS",t[t.BAR_BAR=25]="BAR_BAR",t[t.AMP_AMP=26]="AMP_AMP",t[t.URANGE=27]="URANGE",t[t.BANG=31]="BANG",t[t.DOLLAR=32]="DOLLAR",t[t.HAT=33]="HAT",t[t.BAR=34]="BAR",t[t.TILDE=35]="TILDE",t[t.STAR=36]="STAR",t[t.GT=37]="GT",t[t.LT=38]="LT",t[t.EQ=39]="EQ",t[t.BANG_EQ=41]="BANG_EQ",t[t.DOLLAR_EQ=42]="DOLLAR_EQ",t[t.HAT_EQ=43]="HAT_EQ",t[t.BAR_EQ=44]="BAR_EQ",t[t.TILDE_EQ=45]="TILDE_EQ",t[t.STAR_EQ=46]="STAR_EQ",t[t.GT_EQ=47]="GT_EQ",t[t.LT_EQ=48]="LT_EQ",t[t.EQ_EQ=49]="EQ_EQ",t[t.COL_COL=50]="COL_COL",t[t.CDO=51]="CDO",t[t.CDC=52]="CDC",t[t.UNKNOWN=53]="UNKNOWN",t[t.INVALID=54]="INVALID",t[t.LAST=54]="LAST"}(Ou||(Ou={}));var ju,Ku=/*#__PURE__*/function(){function t(){this.type=void 0,this.precededBySpace=!1,this.num=0,this.text="",this.position=0,this.type=Ou.EOF}return t.prototype.toString=function(){switch(this.type){case Ou.O_PAR:return"(";case Ou.C_PAR:return")";case Ou.O_BRC:return"{";case Ou.C_BRC:return"}";case Ou.O_BRK:return"[";case Ou.C_BRK:return"]";case Ou.COMMA:return",";case Ou.SEMICOL:return";";case Ou.COLON:return":";case Ou.SLASH:return"/";case Ou.PERCENT:return"%";case Ou.QMARK:return"?";case Ou.PLUS:return"+";case Ou.MINUS:return"-";case Ou.BAR_BAR:return"||";case Ou.AMP_AMP:return"&&";case Ou.BANG:return"!";case Ou.DOLLAR:return"$";case Ou.HAT:return"^";case Ou.BAR:return"|";case Ou.TILDE:return"~";case Ou.STAR:return"*";case Ou.GT:return">";case Ou.LT:return"<";case Ou.EQ:return"=";case Ou.BANG_EQ:return"!=";case Ou.DOLLAR_EQ:return"$=";case Ou.HAT_EQ:return"^=";case Ou.BAR_EQ:return"|=";case Ou.TILDE_EQ:return"~=";case Ou.STAR_EQ:return"*=";case Ou.GT_EQ:return">=";case Ou.LT_EQ:return"<=";case Ou.EQ_EQ:return"==";case Ou.COL_COL:return"::";case Ou.CDO:return"\x3c!--";case Ou.CDC:return"--\x3e";case Ou.NUMERIC:return this.num.toString()+this.text;case Ou.NUM:case Ou.INT:return this.num.toString();case Ou.AT:return"@"+this.text;case Ou.HASH:return"#"+this.text;case Ou.FUNC:return this.text+"(";case Ou.CLASS:return"."+this.text;case Ou.EOF:return"/*EOF*/";default:return this.text}},t}();function Yu(t,e){var u,n=Array(128);for(u=0;u<128;u++)n[u]=t;for(n.NaN=t==ju.END?ju.END:ju.INVALID,u=0;u<e.length;u+=2)n[e[u]]=e[u+1];return n}!function(t){t[t.SPACE=1]="SPACE",t[t.INT=2]="INT",t[t.IDENT=3]="IDENT",t[t.BANG=4]="BANG",t[t.HASH=6]="HASH",t[t.DOLLAR=7]="DOLLAR",t[t.PERCENT=8]="PERCENT",t[t.AMP=9]="AMP",t[t.O_PAR=10]="O_PAR",t[t.C_PAR=11]="C_PAR",t[t.STAR=12]="STAR",t[t.PLUS=13]="PLUS",t[t.COMMA=14]="COMMA",t[t.MINUS=15]="MINUS",t[t.DOT=16]="DOT",t[t.SLASH=17]="SLASH",t[t.COLON=18]="COLON",t[t.SEMICOL=19]="SEMICOL",t[t.LT=20]="LT",t[t.EQ=21]="EQ",t[t.GT=22]="GT",t[t.QMARK=23]="QMARK",t[t.AT=24]="AT",t[t.O_BRK=25]="O_BRK",t[t.C_BRK=26]="C_BRK",t[t.O_BRC=27]="O_BRC",t[t.C_BRC=28]="C_BRC",t[t.BSLASH=29]="BSLASH",t[t.HAT=30]="HAT",t[t.BAR=31]="BAR",t[t.TILDE=32]="TILDE",t[t.STR1=33]="STR1",t[t.STR2=34]="STR2",t[t.END=35]="END",t[t.EQTAIL=36]="EQTAIL",t[t.ENDINT=37]="ENDINT",t[t.ENDNUM=38]="ENDNUM",t[t.CONT=39]="CONT",t[t.UNIT=40]="UNIT",t[t.PCUNIT=41]="PCUNIT",t[t.NUMBER=42]="NUMBER",t[t.ENDIDNT=43]="ENDIDNT",t[t.IDNTESC=44]="IDNTESC",t[t.ENDIDES=45]="ENDIDES",t[t.ENDSTR=46]="ENDSTR",t[t.ENDESTR=47]="ENDESTR",t[t.STR1ESC=48]="STR1ESC",t[t.STR2ESC=49]="STR2ESC",t[t.BAR_BAR=50]="BAR_BAR",t[t.AMP_AMP=51]="AMP_AMP",t[t.FUNC=52]="FUNC",t[t.FUNCES=53]="FUNCES",t[t.COMMENT=54]="COMMENT",t[t.COMMST=55]="COMMST",t[t.ENDNOTK=56]="ENDNOTK",t[t.MINMIN=57]="MINMIN",t[t.TOINT=58]="TOINT",t[t.TONUM=59]="TONUM",t[t.TOIDENT=60]="TOIDENT",t[t.TOIDES=61]="TOIDES",t[t.KILL1=62]="KILL1",t[t.KILL2=63]="KILL2",t[t.URL=64]="URL",t[t.URL1=65]="URL1",t[t.URL2=66]="URL2",t[t.ENDURL=67]="ENDURL",t[t.TERMURL=68]="TERMURL",t[t.FINURL=69]="FINURL",t[t.LT_BG=70]="LT_BG",t[t.LT_BG_M=71]="LT_BG_M",t[t.INVALID=72]="INVALID",t[t.CHKPOSS=73]="CHKPOSS",t[t.CHKPOSN=74]="CHKPOSN",t[t.URLESC=75]="URLESC",t[t.IDESCH=76]="IDESCH",t[t.COL_COL=77]="COL_COL",t[t.TOCLASS=78]="TOCLASS",t[t.CHKSP=79]="CHKSP",t[t.EOF=80]="EOF",t[t.CDO=81]="CDO",t[t.CDC=82]="CDC"}(ju||(ju={}));var qu=[ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.SPACE,ju.SPACE,ju.INVALID,ju.SPACE,ju.SPACE,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.SPACE,ju.BANG,ju.STR2,ju.HASH,ju.DOLLAR,ju.PERCENT,ju.AMP,ju.STR1,ju.O_PAR,ju.C_PAR,ju.STAR,ju.PLUS,ju.COMMA,ju.MINUS,ju.DOT,ju.SLASH,ju.INT,ju.INT,ju.INT,ju.INT,ju.INT,ju.INT,ju.INT,ju.INT,ju.INT,ju.INT,ju.COLON,ju.SEMICOL,ju.LT,ju.EQ,ju.GT,ju.QMARK,ju.AT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.O_BRK,ju.BSLASH,ju.C_BRK,ju.HAT,ju.IDENT,ju.INVALID,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.IDENT,ju.O_BRC,ju.BAR,ju.C_BRC,ju.TILDE,ju.INVALID];qu.NaN=ju.EOF;var $u=[ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.FUNC,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.CONT,ju.ENDIDNT,ju.ENDIDNT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.ENDIDNT,ju.IDNTESC,ju.ENDIDNT,ju.ENDIDNT,ju.CONT,ju.ENDIDNT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT,ju.ENDIDNT];$u.NaN=ju.ENDIDNT;var Qu=[ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.TOCLASS,ju.TONUM,ju.INVALID,ju.TONUM,ju.TONUM,ju.TONUM,ju.TONUM,ju.TONUM,ju.TONUM,ju.TONUM,ju.TONUM,ju.TONUM,ju.TONUM,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.INVALID,ju.TOIDES,ju.INVALID,ju.INVALID,ju.TOCLASS,ju.INVALID,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.TOCLASS,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID,ju.INVALID];$u.NaN=ju.ENDIDNT;var Zu=[ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.MINMIN,ju.TONUM,ju.END,ju.TOINT,ju.TOINT,ju.TOINT,ju.TOINT,ju.TOINT,ju.TOINT,ju.TOINT,ju.TOINT,ju.TOINT,ju.TOINT,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.END,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.END,ju.TOIDES,ju.END,ju.END,ju.TOIDENT,ju.END,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.TOIDENT,ju.END,ju.END,ju.END,ju.END,ju.END];Zu.NaN=ju.END;var Ju=[ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.CHKPOSS,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.CHKPOSS,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.FUNCES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.ENDIDES,ju.IDNTESC,ju.ENDIDES,ju.ENDIDES,ju.CONT,ju.ENDIDES,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES,ju.ENDIDES];Ju.NaN=ju.ENDIDES;var tn=[ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.PCUNIT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.NUMBER,ju.ENDINT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.UNIT,ju.ENDINT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT,ju.ENDINT];tn.NaN=ju.ENDINT;var en=[ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.PCUNIT,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.CONT,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.UNIT,ju.ENDNUM,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.UNIT,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM,ju.ENDNUM];en.NaN=ju.ENDNUM;var un,nn=Yu(ju.END,[61,ju.EQTAIL]),rn=Yu(ju.END,[58,ju.COL_COL]),on=Yu(ju.END,[61,ju.EQTAIL,124,ju.BAR_BAR]),an=Yu(ju.END,[38,ju.AMP_AMP]),sn=Yu(ju.END,[42,ju.COMMENT]),ln=Yu(ju.CONT,[42,ju.COMMST]),Dn=Yu(ju.COMMENT,[42,ju.COMMST,47,ju.ENDNOTK]),hn=Yu(ju.KILL1,[62,ju.CDC]),cn=Yu(ju.END,[61,ju.EQTAIL,33,ju.LT_BG]),dn=Yu(ju.KILL1,[45,ju.LT_BG_M]),fn=Yu(ju.KILL2,[45,ju.CDO]),pn=Yu(ju.IDESCH,[10,ju.INVALID,13,ju.INVALID]),En=Yu(ju.CONT,[39,ju.ENDSTR,10,ju.INVALID,13,ju.INVALID,92,ju.STR1ESC]),Cn=Yu(ju.CONT,[34,ju.ENDSTR,10,ju.INVALID,13,ju.INVALID,92,ju.STR2ESC]),Fn=Yu(ju.CONT,[39,ju.ENDESTR,10,ju.CHKPOSN,13,ju.CHKPOSN,92,ju.STR1ESC]),An=Yu(ju.CONT,[34,ju.ENDESTR,10,ju.CHKPOSN,13,ju.CHKPOSN,92,ju.STR2ESC]),gn=Yu(ju.URL,[9,ju.CONT,32,ju.CONT,34,ju.URL2,39,ju.URL1,41,ju.INVALID,10,ju.CONT,13,ju.CONT]),vn=Yu(ju.CONT,[41,ju.ENDURL,9,ju.CHKSP,10,ju.CHKSP,13,ju.CHKSP,32,ju.CHKSP,92,ju.URLESC,40,ju.INVALID,91,ju.INVALID,93,ju.INVALID,123,ju.INVALID,125,ju.INVALID,NaN,ju.ENDURL]),mn=Yu(ju.CONT,[39,ju.TERMURL,10,ju.CHKPOSN,13,ju.CHKPOSN,92,ju.URLESC,NaN,ju.ENDURL]),Bn=Yu(ju.CONT,[34,ju.TERMURL,10,ju.CHKPOSN,13,ju.CHKPOSN,92,ju.URLESC,NaN,ju.ENDURL]),wn=Yu(ju.INVALID,[9,ju.CONT,10,ju.CONT,13,ju.CONT,32,ju.CONT,41,ju.FINURL]),yn=/*#__PURE__*/function(){function t(t,e){this.input=void 0,this.handler=void 0,this.indexMask=void 0,this.buffer=void 0,this.tail=0,this.curr=0,this.position=0,this.input=t,this.handler=e,this.indexMask=15,this.buffer=Array(this.indexMask+1);for(var u=0;u<=this.indexMask;u++)this.buffer[u]=new Ku}var e=t.prototype;return e.token=function(){return this.tail==this.curr&&this.fillBuffer(),this.buffer[this.curr]},e.nthToken=function(t){return(this.tail-this.curr&this.indexMask)<=t&&this.fillBuffer(),this.buffer[this.curr+t&this.indexMask]},e.consume=function(){this.curr=this.curr+1&this.indexMask},e.fillBuffer=function(){var t=this.tail,e=this.curr,u=this.indexMask;if(t>=e?e+=u:e--,e==t)throw new Error("F_CSSTOK_INTERNAL");for(var n=qu,i=this.input,r=this.position,o=this.buffer,a=Ou.EOF,s=0,l="",D=0,h=!1,c=o[t],d=-9;;){var f=i.charCodeAt(r);switch(n[f]||n[65]){case ju.INVALID:l=i.substring(s,r),a=isNaN(f)?Ou.EOF:Ou.INVALID,n=qu;break;case ju.SPACE:r++,h=!0;continue;case ju.INT:s=r++,n=tn;continue;case ju.IDENT:a=Ou.IDENT,s=r++,n=$u;continue;case ju.BANG:s=r++,a=Ou.BANG,n=nn;continue;case ju.STR1:a=Ou.STR,s=++r,n=En;continue;case ju.STR2:a=Ou.STR,s=++r,n=Cn;continue;case ju.HASH:s=++r,a=Ou.HASH,n=$u;continue;case ju.DOLLAR:s=r++,a=Ou.DOLLAR,n=nn;continue;case ju.PERCENT:s=r++,a=Ou.PERCENT;break;case ju.AMP:s=r++,a=Ou.DOLLAR,n=an;continue;case ju.O_PAR:s=r++,a=Ou.O_PAR;break;case ju.C_PAR:s=r++,a=Ou.C_PAR;break;case ju.STAR:s=r++,a=Ou.STAR,n=nn;continue;case ju.PLUS:s=r++,a=Ou.PLUS;break;case ju.COMMA:s=r++,a=Ou.COMMA;break;case ju.MINUS:a=Ou.MINUS,s=r++,n=Zu;continue;case ju.DOT:s=r++,n=Qu;continue;case ju.TOCLASS:s=r++,a=Ou.CLASS,n=$u;continue;case ju.SLASH:s=r++,a=Ou.SLASH,n=sn;continue;case ju.COLON:s=r++,a=Ou.COLON,n=rn;continue;case ju.COL_COL:r++,a=Ou.COL_COL;break;case ju.SEMICOL:s=r++,a=Ou.SEMICOL;break;case ju.LT:s=r++,a=Ou.LT,n=cn;continue;case ju.EQ:s=r++,a=Ou.EQ,n=nn;continue;case ju.GT:s=r++,a=Ou.GT,n=nn;continue;case ju.QMARK:s=r++,a=Ou.QMARK;break;case ju.AT:s=++r,a=Ou.AT,n=$u;continue;case ju.O_BRK:s=r++,a=Ou.O_BRK;break;case ju.C_BRK:s=r++,a=Ou.C_BRK;break;case ju.O_BRC:s=r++,a=Ou.O_BRC;break;case ju.C_BRC:s=r++,a=Ou.C_BRC;break;case ju.BSLASH:d=s=r++,a=Ou.IDENT,n=pn;continue;case ju.HAT:s=r++,a=Ou.HAT,n=nn;continue;case ju.BAR:s=r++,a=Ou.BAR,n=on;continue;case ju.TILDE:s=r++,a=Ou.TILDE,n=nn;continue;case ju.END:break;case ju.EQTAIL:r++,a=a+Ou.BANG_EQ-Ou.BANG;break;case ju.ENDINT:a=Ou.INT,D=parseInt(i.substring(s,r),10);break;case ju.ENDNUM:a=Ou.NUM,D=parseFloat(i.substring(s,r));break;case ju.CONT:r++;continue;case ju.UNIT:a=Ou.NUMERIC,D=parseFloat(i.substring(s,r)),s=r++,n=$u;continue;case ju.PCUNIT:a=Ou.NUMERIC,D=parseFloat(i.substring(s,r)),l="%",s=r++;break;case ju.NUMBER:r++,n=en;continue;case ju.ENDIDNT:if(l=Xu(i.substring(s,r)),a===Ou.URANGE&&63===f||a===Ou.IDENT&&"u"===l.toLowerCase()&&/^(\bu\+[?0-9a-f]+(-[?0-9a-f]+)?|,|\s+|\/\*([^*]|\*[^/])*\*\/)+[;}]/i.test(i.substring(r-1))){a=Ou.URANGE,r++;continue}break;case ju.IDNTESC:d=r++,n=pn;continue;case ju.ENDIDES:l=Xu(i.substring(s,r));break;case ju.ENDSTR:l=i.substring(s,r),r++;break;case ju.ENDESTR:l=Xu(i.substring(s,r)),r++;break;case ju.STR1ESC:d=r,r+=2,n=Fn;continue;case ju.STR2ESC:d=r,r+=2,n=An;continue;case ju.BAR_BAR:r++,a=Ou.BAR_BAR;break;case ju.AMP_AMP:r++,a=Ou.AMP_AMP;break;case ju.FUNC:if(l=i.substring(s,r),a==Ou.IDENT){if(r++,"url"==l.toLowerCase()){n=gn;continue}a=Ou.FUNC}break;case ju.FUNCES:if(l=Xu(i.substring(s,r)),a==Ou.IDENT){if(r++,"url"==l.toLowerCase()){n=gn;continue}a=Ou.FUNC}break;case ju.COMMENT:n=ln,r++;continue;case ju.COMMST:n=Dn,r++;continue;case ju.ENDNOTK:n=qu,r++;continue;case ju.MINMIN:n=hn,">"!==i[++r]&&(a=Ou.IDENT,n=$u);continue;case ju.CDO:a=Ou.CDO,l=i.substring(s,++r),n=qu;break;case ju.CDC:a=Ou.CDC,l=i.substring(s,++r),n=qu;break;case ju.TOINT:a=Ou.INT,n=tn,r++;continue;case ju.TONUM:a=Ou.NUM,n=en,r++;continue;case ju.TOIDENT:a=Ou.IDENT,n=$u,r++;continue;case ju.TOIDES:a=Ou.IDENT,n=pn,d=r++;continue;case ju.KILL1:r--;break;case ju.KILL2:r-=2;break;case ju.URL:s=r++,n=vn;continue;case ju.URL1:s=++r,n=mn;continue;case ju.URL2:s=++r,n=Bn;continue;case ju.ENDURL:a=Ou.URL,l=Xu(i.substring(s,r)),r++;break;case ju.FINURL:r++;break;case ju.LT_BG:n=dn,r++;continue;case ju.LT_BG_M:n=fn,r++;continue;case ju.CHKSP:if(r-d<8&&i.substring(d+1,r+1).match(/^[0-9a-fA-F]{0,6}(\r\n|[\n\r])|[ \t]$/)){r++;continue}case ju.TERMURL:a=Ou.URL,l=Xu(i.substring(s,r)),r++,n=wn;continue;case ju.CHKPOSN:if(++r-d<9&&i.substring(d+1,r).match(/^[0-9a-fA-F]{0,6}(\r\n|[\n\r])$/))continue;a=Ou.INVALID,l="E_CSS_UNEXPECTED_NEWLINE",n=qu;break;case ju.CHKPOSS:if(r-d<9&&i.substring(d+1,r+1).match(/^[0-9a-fA-F]{0,6}[ \t]$/)){r++,n=$u;continue}l=Xu(i.substring(s,r));break;case ju.URLESC:d=r++;continue;case ju.IDESCH:r++,n=Ju;continue;default:if(n!==qu){a=Ou.INVALID,l="E_CSS_UNEXPECTED_STATE";break}s=r,a=Ou.EOF}if(c.type=a,c.precededBySpace=h,c.num=D,c.text=l,c.position=s,++t>=e)break;n=qu,h=!1,c=o[t&u]}this.position=r,this.tail=t&u},t}(),Nn=null,bn=null;function Sn(){return Nn}function xn(t){if(!Nn)throw new Error("E_TASK_NO_CONTEXT");Nn.name||(Nn.name=t);var e=Nn,u=new Un(e,e.top,t);return e.top=u,u.state=un.ACTIVE,u}function Tn(t){return new _n(t)}function In(t,e,u){var n=xn(t);n.handler=u;try{e(n)}catch(t){n.task.raise(t,n)}return n.result()}!function(t){t[t.INIT=0]="INIT",t[t.ACTIVE=1]="ACTIVE",t[t.FINISHED=2]="FINISHED",t[t.DEAD=3]="DEAD"}(un||(un={}));var Pn,Rn=/*#__PURE__*/function(){function t(){}var e=t.prototype;return e.currentTime=function(){return(new Date).valueOf()},e.setTimeout=function(t){function e(e,u){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(t,e){return setTimeout(t,e)}),e.clearTimeout=function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(t){clearTimeout(t)}),t}(),kn=/*#__PURE__*/function(){function t(t){this.timer=void 0,this.timeout=1,this.slice=25,this.sliceOverTime=0,this.queue=void 0,this.wakeupTime=null,this.timeoutToken=null,this.inTimeSlice=!1,this.order=0,this.timer=t,this.queue=new K,bn||(bn=this)}var e=t.prototype;return e.setSlice=function(t){this.slice=t},e.setTimeout=function(t){this.timeout=t},e.isTimeSliceOver=function(){return this.timer.currentTime()>=this.sliceOverTime},e.arm=function(){var t=this;if(!this.inTimeSlice){var e=this.queue.peek().scheduledTime,u=this.timer.currentTime();if(null!=this.timeoutToken){if(u+this.timeout>this.wakeupTime)return;this.timer.clearTimeout(this.timeoutToken)}var n=e-u;n<=this.timeout&&(n=this.timeout),this.wakeupTime=u+n,this.timeoutToken=this.timer.setTimeout(function(){t.timeoutToken=null,t.doTimeSlice()},n)}},e.schedule=function(t,e){var u=t,n=this.timer.currentTime();u.order=this.order++,u.scheduledTime=n+(e||0),this.queue.add(u),this.arm()},e.doTimeSlice=function(){null!=this.timeoutToken&&(this.timer.clearTimeout(this.timeoutToken),this.timeoutToken=null),this.inTimeSlice=!0;try{var t=this.timer.currentTime();for(this.sliceOverTime=t+this.slice;this.queue.length();){var e=this.queue.peek();if(e.scheduledTime>t)break;if(this.queue.remove(),e.canceled||e.resumeInternal(),(t=this.timer.currentTime())>=this.sliceOverTime)break}}catch(t){D.error(t)}this.inTimeSlice=!1,this.queue.length()&&this.arm()},e.run=function(t,e){var u=new On(this,e||"");u.top=new Un(u,null,"bootstrap"),u.top.state=un.ACTIVE,u.top.then(function(){var e=function(){u.running=!1;for(var t,e=R(u.callbacks);!(t=e()).done;){var n=t.value;try{n()}catch(t){D.error(t)}}};try{t().then(function(t){u.result=t,e()})}catch(t){u.raise(t),e()}});var n=Nn;return Nn=u,this.schedule(u.top.suspend("bootstrap")),Nn=n,u},t}(),Ln=/*#__PURE__*/function(){function t(t){this.task=void 0,this.scheduledTime=0,this.order=0,this.result=null,this.canceled=!1,this.task=t}var e=t.prototype;return e.compare=function(t){return t.scheduledTime-this.scheduledTime||t.order-this.order},e.getTask=function(){return this.task},e.schedule=function(t,e){this.result=t,this.task.scheduler.schedule(this,e)},e.resumeInternal=function(){var t=this.task;if(this.task=null,t&&t.continuation==this){t.continuation=null;var e=Nn;return Nn=t,t.top.finish(this.result),Nn=e,!0}return!1},e.cancel=function(){this.canceled=!0},t}(),On=/*#__PURE__*/function(){function t(t,e){this.scheduler=void 0,this.name=void 0,this.callbacks=[],this.exception=null,this.running=!0,this.result=null,this.waitTarget=null,this.top=null,this.continuation=null,this.scheduler=t,this.name=e}var e=t.prototype;return e.getName=function(){return this.name},e.interrupt=function(t){if(this.raise(t||new Error("E_TASK_INTERRUPT")),this!==Nn&&this.continuation){this.continuation.cancel();var e=new Ln(this);this.waitTarget="interrupt",this.continuation=e,this.scheduler.schedule(e)}},e.getScheduler=function(){return this.scheduler},e.isRunning=function(){return this.running},e.whenDone=function(t){this.callbacks.push(t)},e.join=function(){var t=this,e=xn("Task.join");if(this.running){var u=e.suspend(this);this.whenDone(function(){u.schedule(t.result)})}else e.finish(this.result);return e.result()},e.unwind=function(){for(;this.top&&!this.top.handler;)this.top=this.top.parent;if(this.top&&this.top.handler&&this.exception){var t=this.exception;this.exception=null,this.top.handler(this.top,t)}else this.exception&&D.error(this.exception,"Unhandled exception in task",this.name)},e.raise=function(t,e){if(this.fillStack(t),e){for(var u=this.top;u&&u!=e;)u=u.parent;u==e&&(this.top=u)}this.exception=t,this.unwind()},e.fillStack=function(t){var e=t.frameTrace;if(!e){e=t.stack?t.stack+"\n\t---- async ---\n":"";for(var u=this.top;u;u=u.parent)e+="\t",e+=u.getName(),e+="\n";t.frameTrace=e}},t}(),_n=/*#__PURE__*/function(){function t(t){this.value=void 0,this.value=t}var e=t.prototype;return e.then=function(t){t(this.value)},e.thenAsync=function(t){return t(this.value)},e.thenReturn=function(e){return new t(e)},e.thenFinish=function(t){t.finish(this.value)},e.isPending=function(){return!1},e.get=function(){return this.value},t}(),Mn=/*#__PURE__*/function(){function t(t){this.frame=void 0,this.frame=t}var e=t.prototype;return e.then=function(t){this.frame.then(t)},e.thenAsync=function(t){if(this.isPending()){var e=new Un(this.frame.task,this.frame.parent,"AsyncResult.thenAsync");return e.state=un.ACTIVE,this.frame.parent=e,this.frame.then(function(u){t(u).then(function(t){e.finish(t)})}),e.result()}return t(this.frame.res)},e.thenReturn=function(t){return this.isPending()?this.thenAsync(function(){return new _n(t)}):new _n(t)},e.thenFinish=function(t){this.isPending()?this.then(function(e){t.finish(e)}):t.finish(this.frame.res)},e.isPending=function(){return this.frame.state==un.ACTIVE},e.get=function(){if(this.isPending())throw new Error("Result is pending");return this.frame.res},t}(),Un=/*#__PURE__*/function(){function t(t,e,u){this.task=void 0,this.parent=void 0,this.name=void 0,this.res=null,this.state=void 0,this.callback=null,this.handler=null,this.task=t,this.parent=e,this.name=u,this.state=un.INIT}var e=t.prototype;return e.checkEnvironment=function(){if(!Nn)throw new Error("F_TASK_NO_CONTEXT");if(this!==Nn.top)throw new Error("F_TASK_NOT_TOP_FRAME")},e.result=function(){return new Mn(this)},e.finish=function(t){this.checkEnvironment(),Nn&&!Nn.exception&&(this.res=t),this.state=un.FINISHED;var e=this.parent;if(Nn&&(Nn.top=e),this.callback){try{this.callback(t)}catch(t){this.task.raise(t,e)}this.state=un.DEAD}},e.getTask=function(){return this.task},e.getName=function(){return this.name},e.getScheduler=function(){return this.task.scheduler},e.then=function(t){switch(this.state){case un.ACTIVE:if(this.callback)throw new Error("F_TASK_FRAME_ALREADY_HAS_CALLBACK");this.callback=t;break;case un.FINISHED:var e=this.task,u=this.parent;try{t(this.res),this.state=un.DEAD}catch(t){this.state=un.DEAD,e.raise(t,u)}break;case un.DEAD:throw new Error("F_TASK_DEAD_FRAME");default:throw new Error("F_TASK_UNEXPECTED_FRAME_STATE "+this.state)}},e.timeSlice=function(){var t=xn("Frame.timeSlice");return t.getScheduler().isTimeSliceOver()?(D.debug("-- time slice --"),t.suspend().schedule(!0)):t.finish(!0),t.result()},e.sleep=function(t){var e=xn("Frame.sleep");return e.suspend().schedule(!0,t),e.result()},e.loop=function(t){var e=xn("Frame.loop");return function u(n){try{for(;n;){var i=t();if(i.isPending())return void i.then(u);i.then(function(t){n=t})}e.finish(!0)}catch(t){e.task.raise(t,e)}}(!0),e.result()},e.loopWithFrame=function(t){var e=Nn;if(!e)throw new Error("E_TASK_NO_CONTEXT");return this.loop(function(){var u;do{var n=new Vn(e,e.top);e.top=n,n.state=un.ACTIVE,t(n),u=n.result()}while(!u.isPending()&&u.get());return u})},e.suspend=function(t){if(this.checkEnvironment(),this.task.continuation)throw new Error("E_TASK_ALREADY_SUSPENDED");var e=new Ln(this.task);return this.task.continuation=e,Nn=null,this.task.waitTarget=t||null,e},t}(),Vn=/*#__PURE__*/function(t){function e(e,u){return t.call(this,e,u,"loop")||this}N(e,t);var u=e.prototype;return u.continueLoop=function(){this.finish(!0)},u.breakLoop=function(){this.finish(!1)},e}(Un),Hn=/*#__PURE__*/function(){function t(t,e){this.fetch=void 0,this.name=void 0,this.arrived=!1,this.resource=null,this.task=null,this.piggybacks=[],this.fetch=t,this.name=e}var e=t.prototype;return e.start=function(){var t=this;this.task||(this.task=Sn().getScheduler().run(function(){var e=xn("Fetcher.run");return t.fetch().then(function(u){var n=t.piggybacks;if(t.arrived=!0,t.resource=u,t.task=null,t.piggybacks=[],n)for(var i=0;i<n.length;i++)try{n[i](u)}catch(t){D.error(t,"Error:")}e.finish(u)}),e.result()},this.name))},e.piggyback=function(t){this.arrived?t(this.resource):this.piggybacks.push(t)},e.get=function(){return this.arrived?Tn(this.resource):(this.start(),this.task.join())},e.hasArrived=function(){return this.arrived},t}(),zn=function(t){if(0==t.length)return Tn(!0);if(1==t.length)return t[0].get().thenReturn(!0);var e=xn("waitForFetches"),u=0;return e.loop(function(){for(;u<t.length;){var e=t[u++];if(!e.hasArrived())return e.get().thenReturn(!0)}return Tn(!1)}).then(function(){e.finish(!0)}),e.result()},Gn='\n@media screen {\n [data-vivliostyle-viewer-viewport] {\n background: #aaaaaa;\n }\n\n [data-vivliostyle-page-container] {\n background: white;\n z-index: 0;\n }\n\n [data-vivliostyle-viewer-viewport] {\n box-sizing: border-box;\n display: flex;\n overflow: auto;\n position: relative;\n }\n\n [data-vivliostyle-outer-zoom-box] {\n margin: auto;\n overflow: hidden;\n flex: none;\n }\n\n [data-vivliostyle-viewer-viewport] [data-vivliostyle-spread-container] {\n display: flex;\n flex: none;\n justify-content: center;\n transform-origin: left top;\n }\n\n [data-vivliostyle-viewer-viewport][data-vivliostyle-page-progression="ltr"]\n [data-vivliostyle-spread-container] {\n flex-direction: row;\n }\n\n [data-vivliostyle-viewer-viewport][data-vivliostyle-page-progression="rtl"]\n [data-vivliostyle-spread-container] {\n flex-direction: row-reverse;\n }\n\n [data-vivliostyle-viewer-viewport] [data-vivliostyle-page-container] {\n margin: 0 auto;\n flex: none;\n transform-origin: center top;\n }\n\n [data-vivliostyle-viewer-viewport][data-vivliostyle-spread-view="true"]\n [data-vivliostyle-page-container][data-vivliostyle-page-side="left"] {\n margin-right: 1px;\n transform-origin: right top;\n }\n\n [data-vivliostyle-viewer-viewport][data-vivliostyle-spread-view="true"]\n [data-vivliostyle-page-container][data-vivliostyle-page-side="right"] {\n margin-left: 1px;\n transform-origin: left top;\n }\n\n [data-vivliostyle-viewer-viewport][data-vivliostyle-spread-view="true"]\n [data-vivliostyle-page-container][data-vivliostyle-unpaired-page="true"] {\n margin-left: auto;\n margin-right: auto;\n transform-origin: center top;\n }\n}\n',Wn="\n[data-vivliostyle-layout-box] {\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n z-index: -1;\n transform-origin: left top;\n}\n\n[data-vivliostyle-debug] [data-vivliostyle-layout-box] {\n right: auto;\n bottom: auto;\n overflow: visible;\n z-index: auto;\n}\n\n[data-vivliostyle-spread-container] {\n transform: scale(var(--viv-outputScale,1));\n transform-origin: left top;\n}\n\n/* Emulate high pixel ratio using zoom & transform:scale() */\n@supports (zoom: 8) {\n [data-vivliostyle-layout-box] {\n zoom: calc(var(--viv-outputPixelRatio,1) / var(--viv-devicePixelRatio,1));\n transform: scale(calc(var(--viv-devicePixelRatio,1) / var(--viv-outputPixelRatio,1)));\n }\n [data-vivliostyle-spread-container] {\n zoom: calc(var(--viv-outputPixelRatio,1) / var(--viv-devicePixelRatio,1));\n transform: scale(calc(var(--viv-outputScale,1) * var(--viv-devicePixelRatio,1) / var(--viv-outputPixelRatio,1)));\n }\n /* Workaround for Chromium's default border etc. widths not zoomed but scaled down */\n [data-vivliostyle-spread-container] :where([style*=border],[style*=outline],[style*=rule]) {\n border-width: medium;\n outline-width: medium;\n column-rule-width: medium;\n }\n [data-vivliostyle-spread-container] ::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n }\n [data-vivliostyle-spread-container] ::-webkit-scrollbar-track {\n background-color: #f4f4f4;\n }\n [data-vivliostyle-spread-container] ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background: #c7c7c7;\n }\n [data-vivliostyle-spread-container] ::-webkit-scrollbar-thumb:hover {\n background: #7d7d7d;\n }\n}\n\n[data-vivliostyle-page-container] {\n position: relative;\n}\n\n[data-vivliostyle-bleed-box] {\n position: absolute;\n overflow: hidden;\n background-origin: content-box !important;\n box-sizing: border-box;\n}\n\n[data-vivliostyle-page-box] ~ [data-vivliostyle-page-box] {\n display: none;\n}\n\n[data-vivliostyle-toc-box] {\n position: absolute;\n left: 3px;\n top: 3px;\n overflow: scroll;\n overflow-x: hidden;\n background: rgba(248, 248, 248, 0.9);\n border-radius: 2px;\n box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);\n}\n\n@media print {\n [data-vivliostyle-toc-box] {\n display: none;\n }\n\n [data-vivliostyle-outer-zoom-box],\n [data-vivliostyle-spread-container] {\n width: 100% !important;\n height: 100% !important;\n }\n\n [data-vivliostyle-spread-container] {\n --viv-outputScale: 1 !important;\n --viv-devicePixelRatio: 1 !important;\n zoom: normal !important;\n transform: none !important;\n }\n\n @supports (zoom: 8) {\n [data-vivliostyle-spread-container] [data-vivliostyle-page-container] {\n zoom: var(--viv-outputPixelRatio,1);\n transform: scale(calc(1 / var(--viv-outputPixelRatio,1)));\n transform-origin: left top;\n }\n }\n\n [data-vivliostyle-spread-container] [data-vivliostyle-page-container] {\n display: block !important;\n max-height: 100vh;\n }\n\n [data-vivliostyle-spread-container] [data-vivliostyle-page-container]:not(:last-child) {\n break-after: page;\n }\n\n /* Gecko-only hack, see https://bugzilla.mozilla.org/show_bug.cgi?id=267029#c17 */\n @-moz-document url-prefix() {\n [data-vivliostyle-spread-container] [data-vivliostyle-page-container]:nth-last-child(n + 2) {\n top: -1px;\n margin-top: 1px;\n margin-bottom: -1px;\n }\n /* Workaround Gecko problem on page break */\n [data-vivliostyle-spread-container] [data-vivliostyle-page-container] {\n break-after: auto !important;\n height: 100% !important;\n }\n }\n}\n",Xn="\n/*\n * Copyright 2013 Google, Inc.\n * Copyright 2015 Trim-marks Inc.\n * Copyright 2019 Vivliostyle Foundation\n *\n * CSS property validation.\n */\nNUM = POS_NUM | ZERO | NEGATIVE;\nNNEG_NUM = POS_NUM | ZERO;\nINT = POS_INT | ZERO | NEGATIVE;\nNNEG_INT = POS_INT | ZERO;\nPERCENTAGE = POS_PERCENTAGE | ZERO | NEGATIVE;\nSTRICT_PERCENTAGE = POS_PERCENTAGE | ZERO_PERCENTAGE | NEGATIVE;\nNNEG_PERCENTAGE = POS_PERCENTAGE | ZERO;\nLENGTH = POS_LENGTH | ZERO | NEGATIVE;\nNNEG_LENGTH = POS_LENGTH | ZERO;\nPLENGTH = LENGTH | PERCENTAGE;\nPPLENGTH = POS_LENGTH | ZERO | POS_PERCENTAGE;\nALENGTH = LENGTH | auto;\nAPLENGTH = PLENGTH | auto;\nPAPLENGTH = PPLENGTH | auto;\nANGLE = POS_ANGLE | ZERO | NEGATIVE;\nLENGTH_OR_NUM = LENGTH | NUM;\nANGLE_OR_NUM = ANGLE | NUM;\nMIN_MAX_FIT_CONTENT = min-content | max-content | fit-content;\nBG_POSITION_TERM = PLENGTH | left | center | right | top | bottom;\nURI_OR_NONE = URI | none;\nIMAGE = URI | IMAGE_FUNCTION | none;\nbackground-attachment = COMMA( [scroll | fixed | local]+ );\nbackground-color = COLOR;\nbackground-image = COMMA( IMAGE+ );\nbackground-position = COMMA( SPACE(BG_POSITION_TERM{1,4})+ ); /* relaxed */\nbackground-repeat = COMMA( [repeat | repeat-x | repeat-y | no-repeat]+ );\nborder-collapse = collapse | separate;\nBORDER_SIDE_COLOR = COLOR;\nBORDER_SIDE_STYLE = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset;\nBORDER_SIDE_WIDTH = thin: 1px | medium: 3px | thick: 5px | NNEG_LENGTH;\nborder-spacing = LENGTH LENGTH?;\nborder-top-color = BORDER_SIDE_COLOR;\nborder-right-color = BORDER_SIDE_COLOR;\nborder-bottom-color = BORDER_SIDE_COLOR;\nborder-left-color = BORDER_SIDE_COLOR;\nborder-top-style = BORDER_SIDE_STYLE;\nborder-right-style = BORDER_SIDE_STYLE;\nborder-bottom-style = BORDER_SIDE_STYLE;\nborder-left-style = BORDER_SIDE_STYLE;\nborder-top-width = BORDER_SIDE_WIDTH;\nborder-right-width = BORDER_SIDE_WIDTH;\nborder-bottom-width = BORDER_SIDE_WIDTH;\nborder-left-width = BORDER_SIDE_WIDTH;\nBORDER_RADIUS = PLENGTH{1,2};\nborder-top-left-radius = BORDER_RADIUS;\nborder-top-right-radius = BORDER_RADIUS;\nborder-bottom-right-radius = BORDER_RADIUS;\nborder-bottom-left-radius = BORDER_RADIUS;\nborder-image-source = IMAGE;\nborder-image-slice = [NUM | PERCENTAGE]{1,4} || fill; /* relaxed */\nborder-image-width = [NUM | PLENGTH | auto]{1,4};\nborder-image-outset = [NUM | LENGTH]{1,4};\nborder-image-repeat = [ stretch | repeat | round | space ]{1,2};\nbottom = APLENGTH;\ncaption-side = top | bottom;\nclear = none | left | right | top | bottom | both | all | same;\nclip = rect(ALENGTH{4}) | rect(SPACE(ALENGTH{4})) | auto;\ncolor = COLOR;\nLIST_STYLE_TYPE = IDENT;\nTYPE_OR_UNIT_IN_ATTR = string | color | url | integer | number | length | angle | time | frequency;\nATTR = attr(SPACE(IDENT TYPE_OR_UNIT_IN_ATTR?) [ STRING | IDENT | COLOR | INT | NUM | PLENGTH | ANGLE | POS_TIME | FREQUENCY]?);\nCONTENT_LIST = [ STRING | URI | counter(IDENT LIST_STYLE_TYPE?) |\n counters(IDENT STRING LIST_STYLE_TYPE?) | ATTR |\n target-counter([ STRING | URI ] IDENT LIST_STYLE_TYPE?) |\n target-counter(ATTR IDENT LIST_STYLE_TYPE?) |\n target-counters([ STRING | URI ] IDENT STRING LIST_STYLE_TYPE?) |\n target-counters(ATTR IDENT STRING LIST_STYLE_TYPE?) |\n leader([ dotted | solid | space ] | STRING ) |\n open-quote | close-quote | no-open-quote | no-close-quote |\n content([ text | before | after | first-letter ]?) |\n string(IDENT [first | start | last | first-except]?) |\n element(IDENT [first | start | last | first-except]?) ]+;\nCONTENT = normal | none | CONTENT_LIST;\ncontent = CONTENT;\nCOUNTER = [ IDENT INT? ]+ | none;\ncounter-increment = COUNTER;\ncounter-reset = COUNTER;\ncounter-set = COUNTER;\ncursor = COMMA(URI* [ auto | crosshair | default | pointer | move | e-resize | ne-resize | nw-resize |\n n-resize | se-resize | sw-resize | s-resize | w-resize | text | wait | help | progress ]);\ndirection = ltr | rtl;\ndisplay = inline | block | list-item | inline-block | table | inline-table | table-row-group |\n table-header-group | table-footer-group | table-row | table-column-group | table-column |\n table-cell | table-caption | none | oeb-page-head | oeb-page-foot | flex | inline-flex |\n ruby | ruby-base | ruby-text | ruby-base-container | ruby-text-container | run-in | compact | marker |\n flow-root | grid | inline-grid | contents;\nempty-cells = show | hide;\nFAMILY = SPACE(IDENT+) | STRING;\nFAMILY_LIST = COMMA( FAMILY+ );\nfont-family = FAMILY_LIST;\nfont-size = xx-small | x-small | small | medium | large | x-large | xx-large | larger | smaller | PPLENGTH;\nfont-style = normal | italic | oblique;\nfont-weight = normal | bold | bolder | lighter | POS_NUM;\nheight = PAPLENGTH | MIN_MAX_FIT_CONTENT;\nleft = APLENGTH;\nletter-spacing = normal | LENGTH_OR_NUM;\nline-height = normal | POS_NUM | PPLENGTH;\nlist-style-image = IMAGE;\nlist-style-position = inside | outside;\nlist-style-type = LIST_STYLE_TYPE;\nmargin-right = APLENGTH;\nmargin-left = APLENGTH;\nmargin-top = APLENGTH;\nmargin-bottom = APLENGTH;\nNPLENGTH = none | PLENGTH;\nmax-height = NPLENGTH | MIN_MAX_FIT_CONTENT;\nmax-width = NPLENGTH | MIN_MAX_FIT_CONTENT;\nmin-height = APLENGTH | MIN_MAX_FIT_CONTENT;\nmin-width = APLENGTH | MIN_MAX_FIT_CONTENT;\norphans = POS_INT;\noutline-offset = LENGTH;\noutline-color = COLOR | invert;\noutline-style = BORDER_SIDE_STYLE;\noutline-width = BORDER_SIDE_WIDTH;\noverflow = visible | hidden | scroll | auto | clip;\npadding-right = PPLENGTH;\npadding-left = PPLENGTH;\npadding-top = PPLENGTH;\npadding-bottom = PPLENGTH;\nPAGE_BREAK = auto | always | avoid | left | right | recto | verso;\npage-break-after = PAGE_BREAK;\npage-break-before = PAGE_BREAK;\npage-break-inside = avoid | auto;\nposition = static | relative | absolute | fixed | running(IDENT);\nquotes = [STRING STRING]+ | none | auto;\nright = APLENGTH;\ntable-layout = auto | fixed;\ntext-align = left | right | center | justify | start | end;\ntext-indent = PLENGTH;\ntext-transform = capitalize | uppercase | lowercase | none;\ntop = APLENGTH;\nvertical-align = baseline | sub | super | top | text-top | middle | bottom | text-bottom | PLENGTH;\nvisibility = visible | hidden | collapse;\nwhite-space = normal | pre | nowrap | pre-wrap | pre-line | break-spaces;\nwidows = POS_INT;\nwidth = PAPLENGTH | MIN_MAX_FIT_CONTENT;\nword-spacing = normal | LENGTH_OR_NUM;\nz-index = auto | INT;\n\n[epub,moz,webkit]hyphens = auto | manual | none;\n[webkit]hyphenate-character = auto | STRING;\n\n/* css-logical */\nmargin-block-start = APLENGTH;\nmargin-block-end = APLENGTH;\nmargin-inline-start = APLENGTH;\nmargin-inline-end = APLENGTH;\npadding-block-start = APLENGTH;\npadding-block-end = APLENGTH;\npadding-inline-start = APLENGTH;\npadding-inline-end = APLENGTH;\nborder-block-start-color = BORDER_SIDE_COLOR;\nborder-block-end-color = BORDER_SIDE_COLOR;\nborder-inline-start-color = BORDER_SIDE_COLOR;\nborder-inline-end-color = BORDER_SIDE_COLOR;\nborder-block-start-style = BORDER_SIDE_STYLE;\nborder-block-end-style = BORDER_SIDE_STYLE;\nborder-inline-start-style = BORDER_SIDE_STYLE;\nborder-inline-end-style = BORDER_SIDE_STYLE;\nborder-block-start-width = BORDER_SIDE_WIDTH;\nborder-block-end-width = BORDER_SIDE_WIDTH;\nborder-inline-start-width = BORDER_SIDE_WIDTH;\nborder-inline-end-width = BORDER_SIDE_WIDTH;\nblock-start = APLENGTH;\nblock-end = APLENGTH;\ninline-start = APLENGTH;\ninline-end = APLENGTH;\nblock-size = PAPLENGTH | MIN_MAX_FIT_CONTENT;\ninline-size = PAPLENGTH | MIN_MAX_FIT_CONTENT;\nmax-block-size = NPLENGTH | MIN_MAX_FIT_CONTENT;\nmax-inline-size = NPLENGTH | MIN_MAX_FIT_CONTENT;\nmin-block-size = APLENGTH | MIN_MAX_FIT_CONTENT;\nmin-inline-size = APLENGTH | MIN_MAX_FIT_CONTENT;\n\nSHAPE = auto | rectangle( PLENGTH{4} ) | ellipse( PLENGTH{4} ) | circle( PLENGTH{3} ) |\n polygon( SPACE(PLENGTH+)+ );\n[epubx]shape-inside = SHAPE;\n[epubx,webkit]shape-outside = SHAPE;\n[epubx]wrap-flow = auto | both | start | end | maximum | clear | around /* epub al */;\n\nTRANSFORM_FUNCTION = matrix(NUM{6}) | translate(PLENGTH{1,2}) | translateX(PLENGTH) | translateY(PLENGTH) |\n scale(NUM{1,2}) | scaleX(NUM) | scaleY(NUM) | rotate(ANGLE) | skewX(ANGLE) | skewY(ANGLE);\n[epub]transform = none | TRANSFORM_FUNCTION+;\n[epub]transform-origin = [[[ top | bottom | left | right] PLENGTH?] | center | PLENGTH]{1,2}; /* relaxed */\n\nBOX = border-box | padding-box | content-box;\nSHADOW = SPACE(inset || LENGTH{2,4} || COLOR); /* relaxed */\n[webkit]background-size = COMMA( SPACE( [PLENGTH | auto ]{1,2} | cover | contain)+ );\n[webkit]background-origin = COMMA( BOX+ );\n[webkit]background-clip = COMMA( BOX+ );\n[webkit]box-shadow = none | COMMA( SHADOW+ );\ntext-shadow = none | COMMA( SHADOW+ );\n[webkit]box-decoration-break = slice | clone;\nFILTER_FUNCTION = blur(LENGTH) | brightness(NUM | PERCENTAGE) | contrast(NUM | PERCENTAGE) | drop-shadow(SPACE(LENGTH{2,3} COLOR?))\n | grayscale(NUM | PERCENTAGE) | hue-rotate(ANGLE) | invert(NUM | PERCENTAGE) | opacity(NUM | PERCENTAGE)\n | saturate(NUM | PERCENTAGE) | sepia(NUM | PERCENTAGE);\nFILTER_FUNCTION_LIST = FILTER_FUNCTION+;\n[webkit]filter = none | FILTER_FUNCTION_LIST;\n\nopacity = NUM;\n\n[moz,webkit]column-width = LENGTH | auto;\n[moz,webkit]column-count = INT | auto;\n[moz,webkit]column-gap = LENGTH | normal;\n[moz,webkit]column-rule-color = COLOR;\n[moz,webkit]column-rule-style = BORDER_SIDE_STYLE;\n[moz,webkit]column-rule-width = BORDER_SIDE_WIDTH;\nBREAK = auto | avoid | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region;\nbreak-before = BREAK;\nbreak-after = BREAK;\nbreak-inside = auto | avoid | avoid-page | avoid-column | avoid-region;\n[webkit]column-span = none | auto | all;\n[moz]column-fill = auto | balance | balance-all;\nmargin-break = auto | keep | discard;\n\nsrc = COMMA([SPACE(URI format(STRING+)?) | local(FAMILY)]+); /* for font-face */\n\n[epubx,webkit]flow-from = IDENT;\n[epubx,webkit]flow-into = IDENT;\n[epubx]flow-linger = INT | none;\n[epubx]flow-priority = INT;\n[epubx]flow-options = none | [ exclusive || last || static ];\n[epubx]page = INT | auto | IDENT; /* page: IDENT is for CSS Paged Media */\n[epubx]min-page-width = LENGTH;\n[epubx]min-page-height = LENGTH;\n[epubx]required = true | false;\n[epubx]enabled = true | false;\n[epubx]conflicting-partitions = COMMA(IDENT+);\n[epubx]required-partitions = COMMA(IDENT+);\n[epubx]snap-height = LENGTH | none;\n[epubx]snap-width = LENGTH | none;\n[epubx]flow-consume = all | some;\n[epubx]utilization = NUM;\n[epubx]text-zoom = font-size | scale;\n\n[adapt]template = URI_OR_NONE;\n[adapt]behavior = IDENT;\n\n/* CSS Fonts */\nCOMMON_LIG_VALUES = [ common-ligatures | no-common-ligatures ];\nDISCRETIONARY_LIG_VALUES = [ discretionary-ligatures | no-discretionary-ligatures ];\nHISTORICAL_LIG_VALUES = [ historical-ligatures | no-historical-ligatures ];\nCONTEXTUAL_ALT_VALUES = [ contextual | no-contextual ];\nfont-variant-ligatures = normal | none | [ COMMON_LIG_VALUES || DISCRETIONARY_LIG_VALUES || HISTORICAL_LIG_VALUES || CONTEXTUAL_ALT_VALUES ];\nfont-variant-caps = normal | small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps;\nNUMERIC_FIGURE_VALUES = [ lining-nums | oldstyle-nums ];\nNUMERIC_SPACING_VALUES = [ proportional-nums | tabular-nums ];\nNUMERIC_FRACTION_VALUES = [ diagonal-fractions | stacked-fractions ];\nfont-variant-numeric = normal | [ NUMERIC_FIGURE_VALUES || NUMERIC_SPACING_VALUES || NUMERIC_FRACTION_VALUES || ordinal || slashed-zero ];\nEAST_ASIAN_VARIANT_VALUES = [ jis78 | jis83 | jis90 | jis04 | simplified | traditional ];\nEAST_ASIAN_WIDTH_VALUES = [ full-width | proportional-width ];\nfont-variant-east-asian = normal | [ EAST_ASIAN_VARIANT_VALUES || EAST_ASIAN_WIDTH_VALUES || ruby ];\nfont-variant_css2 = normal | small-caps; /* for font shorthand */\nfont-size-adjust = none | NNEG_NUM;\n[webkit]font-kerning = auto | normal | none;\nfont-feature-settings = COMMA( normal | SPACE( STRING [ on | off | INT ]? )+ );\nFONT_STRETCH_CSS3_VALUES = normal | wider | narrower | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded;\nfont-stretch = FONT_STRETCH_CSS3_VALUES | PERCENTAGE;\nfont-stretch_css3 = FONT_STRETCH_CSS3_VALUES; /* for font shorthand */\nfont-display = [ auto | block | swap | fallback | optional ];\nunicode-range = COMMA( URANGE+ );\n\n/* CSS Images */\nimage-resolution = RESOLUTION;\nobject-fit = fill | contain | cover | none | scale-down;\nobject-position = COMMA( SPACE(BG_POSITION_TERM{1,4})+ ); /* relaxed */\n\n/* CSS Paged Media */\nPAGE_SIZE = a10 | a9 | a8 | a7 | a6 | a5 | a4 | a3 | a2 | a1 | a0\n | b10 | b9 | b8 | b7 | b6 | b5 | b4 | b3 | b2 | b1 | b0\n | c10 | c9 | c8 | c7 | c6 | c5 | c4 | c3 | c2 | c1 | c0\n | jis-b10 | jis-b9 | jis-b8 | jis-b7 | jis-b6 | jis-b5 | jis-b4 | jis-b3 | jis-b2 | jis-b1 | jis-b0\n | letter | legal | ledger;\nbleed = auto | LENGTH;\nmarks = none | [ crop || cross ];\nsize = POS_LENGTH{1,2} | auto | [ PAGE_SIZE || [ portrait | landscape ] ];\ncrop-offset = auto | LENGTH;\n\n/* CSS Page Floats */\nfloat-reference = inline | column | region | page;\nfloat = block-start | block-end | inline-start | inline-end | snap-block | snap-inline | left | right | top | bottom | none | footnote;\nfloat-min-wrap-block = PPLENGTH;\n\n/* CSS Ruby */\nruby-align = start | center | space-between | space-around;\nruby-position = over | under | inter-character;\n\n/* CSS Size Adjust */\n[moz]text-size-adjust = auto | none | POS_PERCENTAGE;\n\n/* CSS Text */\n[webkit]line-break = auto | loose | normal | strict | anywhere;\noverflow-wrap = normal | break-word | anywhere;\n[moz]tab-size = NNEG_INT | NNEG_LENGTH;\n[moz]text-align-last = auto | start | end | left | right | center | justify;\ntext-justify = auto | none | inter-word | inter-character;\nword-break = normal | keep-all | break-all | break-word;\ntext-spacing-trim = auto | normal | space-all | trim-auto |\n [[ trim-start | space-start | space-first ] ||\n [ trim-end | space-end | allow-end ] ||\n [ trim-adjacent | space-adjacent ]];\ntext-autospace = normal | auto | no-autospace |\n [[ ideograph-alpha || ideograph-numeric || punctuation ] || [ insert | replace ]];\nhanging-punctuation = none | [ first || [ force-end | allow-end ] || last ];\n\n/* CSS Text Decoration */\n[webkit]text-decoration-color = COLOR;\n[webkit]text-decoration-line = none | [ underline || overline || line-through || blink ];\n[webkit]text-decoration-skip = none | [ objects || spaces || ink || edges || box-decoration ];\n[webkit]text-decoration-style = solid | double | dotted | dashed | wavy;\n[webkit]text-decoration-thickness = from-font | APLENGTH;\n[epub,webkit]text-emphasis-color = COLOR;\n[webkit]text-emphasis-position = [ over | under ] [ right | left ];\n[epub,webkit]text-emphasis-style = none | [[ filled | open ] || [ dot | circle | double-circle | triangle | sesame ]] | STRING;\n[webkit]text-underline-position = auto | [ under || [ left | right ]];\n\n/* CSS Transforms */\n[webkit]backface-visibility = visible | hidden;\n\n/* CSS UI */\nbox-sizing = content-box | padding-box | border-box;\ntext-overflow = [clip | ellipsis | STRING]{1,2};\n\n/* CSS Writing Modes */\n[epub,webkit]text-combine = none | horizontal;\ntext-combine-upright = none | all; /* relaxed */\n[epub,webkit]text-orientation = mixed | upright | sideways-right | sideways-left | sideways | use-glyph-orientation /* the following values are kept for backward-compatibility */ | vertical-right | rotate-right | rotate-left | rotate-normal | auto;\nunicode-bidi = normal | embed | isolate | bidi-override | isolate-override | plaintext;\n[epub,webkit]writing-mode = horizontal-tb | vertical-rl | lr-tb | rl-tb | tb-rl | lr | rl | tb;\n\n/* CSS Flex box */\nFLEX_BASIS = content | PAPLENGTH;\nflex-direction = row | row-reverse | column | column-reverse;\nflex-wrap = nowrap | wrap | wrap-reverse;\norder = INT;\nflex-grow = NNEG_NUM;\nflex-shrink = NNEG_NUM;\nflex-basis = FLEX_BASIS;\nflex = none | [ [ NNEG_NUM NNEG_NUM? ] || FLEX_BASIS ];\njustify-content = flex-start | flex-end | center | space-between | space-around;\nalign-items = flex-start | flex-end | center | baseline | stretch;\nalign-self = auto | flex-start | flex-end | center | baseline | stretch;\nalign-content = flex-start | flex-end | center | space-between | space-around | stretch;\n\n/* Pointer Events */\ntouch-action = auto | none | [ pan-x || pan-y ] | manipulation;\n\n/* SVG 2 */\nOPACITY_VALUE = NUM | PERCENTAGE;\nDASH_ARRAY = COMMA( SPACE( [ LENGTH | PERCENTAGE | NUM ]+ )+ );\nPAINT = none | child | child(INT) | COLOR | SPACE( URI [none | COLOR]? ) | context-fill | context-stroke;\ncolor-interpolation = auto | sRGB | linearRGB;\ncolor-rendering = auto | optimizeSpeed | optimizeQuality;\nfill = PAINT;\nfill-opacity = OPACITY_VALUE;\nfill-rule = nonzero | evenodd;\nglyph-orientation-vertical = auto | NUM | ANGLE;\nimage-rendering = auto | optimizeSpeed | optimizeQuality | crisp-edges | pixelated;\nmarker-start = none | URI;\nmarker-mid = none | URI;\nmarker-end = none | URI;\npointer-events = bounding-box | visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all | none;\npaint-order = normal | [ fill || stroke || markers ];\nshape-rendering = auto | optimizeSpeed | crispEdges | geometricPrecision;\nstop-color = COLOR;\nstop-opacity = OPACITY_VALUE;\nstroke = PAINT;\nstroke-dasharray = none | DASH_ARRAY;\nstroke-dashoffset = PERCENTAGE | LENGTH_OR_NUM;\nstroke-linecap = butt | round | square;\nstroke-linejoin = miter | round | bevel;\nstroke-miterlimit = NUM;\nstroke-opacity = OPACITY_VALUE;\nstroke-width = PERCENTAGE | LENGTH_OR_NUM;\ntext-anchor = start | middle | end;\ntext-rendering = auto | optimizeSpeed | optimizeLegibility | geometricPrecision;\nvector-effect = none | SPACE( [ non-scaling-stroke | non-scaling-size | non-rotation | fixed-position ]+ [ viewport | screen ]? );\n\n/* SVG 1.1 */\nalignment-baseline = auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical;\nbaseline-shift = baseline | sub | super | PERCENTAGE | LENGTH_OR_NUM;\ndominant-baseline = auto | use-script | no-change | reset-size | ideographic | alphabetic | hanging | mathematical | central | middle | text-after-edge | text-before-edge;\nmask = none | URI;\n\n/* css-masking-1 */\nSHAPE_RADIUS = PLENGTH | closest-side | farthest-side;\nFILL_RULE = nonzero | evenodd;\nSHAPE_BOX = BOX | margin-box;\nGEOMETRY_BOX = SHAPE_BOX | fill-box | stroke-box | view-box;\nBASIC_SHAPE =\n inset( SPACE( PLENGTH{1,4} [ round PLENGTH{1,4} [ SLASH PLENGTH{1,4} ]? ]? ) )\n | circle( SPACE( [SHAPE_RADIUS]? [at BG_POSITION_TERM{1,4}]? ) )\n | ellipse( SPACE( SHAPE_RADIUS{2}? [at BG_POSITION_TERM{1,4}]? ) )\n | polygon( FILL_RULE? COMMA( SPACE( PLENGTH{2} )+ )+ );\n[webkit]clip-path = none | URI | [ BASIC_SHAPE || GEOMETRY_BOX ];\nclip-rule = nonzero | evenodd;\n\n/* filters */\nflood-color = COLOR;\nflood-opacity = OPACITY_VALUE;\nlighting-color = COLOR;\n\n/* compositing-1 */\nBLEND_MODE = normal | multiply | screen | overlay | darken | lighten | color-dodge | color-burn | hard-light | soft-light | difference | exclusion | hue | saturation | color | luminosity;\nmix-blend-mode = BLEND_MODE;\nisolation = auto | isolate;\nbackground-blend-mode = COMMA( BLEND_MODE+ );\n\n/* CSS GCPM */\nstring-set = COMMA( SPACE( IDENT CONTENT_LIST )+ | none );\nfootnote-policy = auto | line;\n\n/* CSS Repeated Headers and Footers */\n[viv]repeat-on-break = auto | none | header | footer;\n\n/* Compatibility */\n[webkit]text-fill-color = COLOR;\n[webkit]text-stroke-color = COLOR;\n[webkit]text-stroke-width = BORDER_SIDE_WIDTH;\n\nDEFAULTS\n\nbackground-attachment: scroll;\nbackground-color: transparent;\nbackground-image: none;\nbackground-repeat: repeat;\nbackground-position: 0% 0%;\nbackground-clip: border-box;\nbackground-origin: padding-box;\nbackground-size: auto;\nborder-top-color: currentColor;\nborder-right-color: currentColor;\nborder-bottom-color: currentColor;\nborder-left-color: currentColor;\nborder-top-style: none;\nborder-right-style: none;\nborder-bottom-style: none;\nborder-left-style: none;\nborder-top-width: 3px;\nborder-right-width: 3px;\nborder-bottom-width: 3px;\nborder-left-width: 3px;\nborder-top-left-radius: 0;\nborder-top-right-radius: 0;\nborder-bottom-right-radius: 0;\nborder-bottom-left-radius: 0;\nborder-image-source: none;\nborder-image-slice: 100%;\nborder-image-width: 1;\nborder-image-outset: 0;\nborder-image-repeat: stretch;\ncolumn-count: auto;\ncolumn-gap: normal;\ncolumn-width: auto;\ncolumn-rule-color: currentColor;\ncolumn-rule-style: none;\ncolumn-rule-width: 3px;\ncolumn-fill: balance;\noutline-color: currentColor;\noutline-style: none;\noutline-width: 3px;\nflex-direction: row;\nflex-wrap: nowrap;\nfont-family: serif;\nfont-style: normal;\nfont-size: medium;\nfont-size-adjust: none;\nfont-kerning: auto;\nfont-feature-settings: normal;\nfont-variant-ligatures: normal;\nfont-variant-caps: normal;\nfont-variant-numeric: normal;\nfont-variant-east-asian: normal;\nfont-weight: normal;\nfont-stretch: normal;\nline-height: normal;\nlist-style-image: none;\nlist-style-position: outside;\nlist-style-type: disc;\nmargin-bottom: auto;\nmargin-left: auto;\nmargin-right: auto;\nmargin-top: auto;\npadding-bottom: auto;\npadding-left: auto;\npadding-right: auto;\npadding-top: auto;\ntext-autospace: normal;\ntext-emphasis-color: currentColor;\ntext-emphasis-style: none;\ntext-spacing-trim: normal;\ntext-stroke-color: currentColor;\ntext-stroke-width: 0;\nmarker-start: none;\nmarker-mid: none;\nmarker-end: none;\n\n/* css-logical */\nborder-block-start-color: currentColor;\nborder-block-end-color: currentColor;\nborder-inline-start-color: currentColor;\nborder-inline-end-color: currentColor;\nborder-block-start-style: none;\nborder-block-end-style: none;\nborder-inline-start-style: none;\nborder-inline-end-style: none;\nborder-block-start-width: 3px;\nborder-block-end-width: 3px;\nborder-inline-start-width: 3px;\nborder-inline-end-width: 3px;\n\nSHORTHANDS\n\nall = ALL;\nbackground = COMMA background-image [background-position [ / background-size ]] background-repeat\n background-attachment [background-origin background-clip] background-color; /* background-color is a special case, see the code */\nborder-top = border-top-width border-top-style border-top-color;\nborder-right = border-right-width border-right-style border-right-color;\nborder-bottom = border-bottom-width border-bottom-style border-bottom-color;\nborder-left = border-left-width border-left-style border-left-color;\nborder-width = INSETS border-top-width border-right-width border-bottom-width border-left-width;\nborder-style = INSETS border-top-style border-right-style border-bottom-style border-left-style;\nborder-color = INSETS border-top-color border-right-color border-bottom-color border-left-color;\nborder = border-width border-style border-color;\nborder-image = border-image-source border-image-slice [ / border-image-width [ / border-image-outset ] ]\n border-image-repeat;\nborder-radius = INSETS_SLASH border-top-left-radius border-top-right-radius\n border-bottom-right-radius border-bottom-left-radius;\n[moz,webkit]columns = column-width column-count;\n[moz,webkit]column-rule = column-rule-width column-rule-style column-rule-color;\nflex-flow = flex-direction flex-wrap;\noeb-column-number = column-count;\noutline = outline-width outline-style outline-color;\nlist-style = list-style-position list-style-type list-style-image;\nmargin = INSETS margin-top margin-right margin-bottom margin-left;\npadding = INSETS padding-top padding-right padding-bottom padding-left;\nfont = FONT font-style font-variant_css2 font-weight font-stretch_css3 /* font-size line-height font-family are special-cased */;\nfont-variant = font-variant-ligatures font-variant-caps font-variant-numeric font-variant-east-asian;\n[epub,webkit]text-emphasis = text-emphasis-style text-emphasis-color;\nmarker = INSETS marker-start marker-mid marker-end;\n[webkit]text-stroke = text-stroke-width text-stroke-color;\ntext-decoration = text-decoration-line text-decoration-color text-decoration-style text-decoration-thickness;\ntext-spacing = TEXT_SPACING text-autospace text-spacing-trim;\n\n/* css-logical */\nmargin-block = INSETS margin-block-start margin-block-end;\nmargin-inline = INSETS margin-inline-start margin-inline-end;\npadding-block = INSETS padding-block-start padding-block-end;\npadding-inline = INSETS padding-inline-start padding-inline-end;\nborder-block-width = INSETS border-block-start-width border-block-end-width;\nborder-block-style = INSETS border-block-start-style border-block-end-style;\nborder-block-color = INSETS border-block-start-color border-block-end-color;\nborder-inline-width = INSETS border-inline-start-width border-inline-end-width;\nborder-inline-style = INSETS border-inline-start-style border-inline-end-style;\nborder-inline-color = INSETS border-inline-start-color border-inline-end-color;\nborder-block = border-block-width border-block-style border-block-color;\nborder-inline = border-inline-width border-inline-style border-inline-color;\nborder-block-start = border-block-start-width border-block-start-style border-block-start-color;\nborder-block-end = border-block-end-width border-block-end-style border-block-end-color;\nborder-inline-start = border-inline-start-width border-inline-start-style border-inline-start-color;\nborder-inline-end = border-inline-end-width border-inline-end-style border-inline-end-color;\ninset-block-start = block-start;\ninset-block-end = block-end;\ninset-inline-start = inline-start;\ninset-inline-end = inline-end;\ninset-block = INSETS block-start block-end;\ninset-inline = INSETS inline-start inline-end;\ninset = INSETS top right bottom left;\n\n/* old names */\nword-wrap = overflow-wrap;\n[adapt,webkit]margin-before = margin-block-start;\n[adapt,webkit]margin-after = margin-block-end;\n[adapt,webkit]margin-start = margin-inline-start;\n[adapt,webkit]margin-end = margin-inline-end;\n[adapt,webkit]padding-before = padding-block-start;\n[adapt,webkit]padding-after = padding-block-end;\n[adapt,webkit]padding-start = padding-inline-start;\n[adapt,webkit]padding-end = padding-inline-end;\n[adapt,webkit]border-before-color = border-block-start-color;\n[adapt,webkit]border-after-color = border-block-end-color;\n[adapt,webkit]border-start-color = border-inline-start-color;\n[adapt,webkit]border-end-color = border-inline-end-color;\n[adapt,webkit]border-before-style = border-block-start-style;\n[adapt,webkit]border-after-style = border-block-end-style;\n[adapt,webkit]border-start-style = border-inline-start-style;\n[adapt,webkit]border-end-style = border-inline-end-style;\n[adapt,webkit]border-before-width = border-block-start-width;\n[adapt,webkit]border-after-width = border-block-end-width;\n[adapt,webkit]border-start-width = border-inline-start-width;\n[adapt,webkit]border-end-width = border-inline-end-width;\n[adapt,webkit]before = block-start;\n[adapt,webkit]after = block-end;\n[adapt,webkit]start = inline-start;\n[adapt,webkit]end = inline-end;\n\n",jn='\n<!DOCTYPE html>\n<html xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://www.pyroxy.com/ns/shadow">\n<head>\n<style><![CDATA[\n\n.footnote-content {\n float: footnote;\n}\n\n.table-cell-container {\n display: block;\n}\n\n]]></style>\n</head>\n<body>\n\n<s:template id="footnote"><s:content/><s:include class="footnote-content"/></s:template>\n\n<s:template id="table-cell"><div data-vivliostyle-flow-root="true" class="table-cell-container"><s:content/></div></s:template>\n\n</body>\n</html>',Kn='\n@namespace "http://www.w3.org/1999/xhtml";\n\n:root {\n hyphens: -epubx-expr(pref-hyphenate? "auto": "manual");\n}\n:root[data-vivliostyle-epub-spine-properties~="page-spread-left"] {\n break-before: left;\n}\n:root[data-vivliostyle-epub-spine-properties~="page-spread-right"] {\n break-before: right;\n}\n\n@-adapt-footnote-area {\n display: block;\n margin-block-start: 0.5em;\n margin-block-end: 0.5em;\n}\n\n@-adapt-footnote-area ::before {\n display: block;\n border-block-start-width: 1px;\n border-block-start-style: solid;\n border-block-start-color: black;\n margin-block-end: 0.4em;\n margin-inline-start: 0;\n margin-inline-end: 60%;\n}\n\n/* default page master */\n@-epubx-page-master :background-host {\n @-epubx-partition :layout-host {\n -epubx-flow-from: body;\n top: -epubx-expr(header.margin-bottom-edge);\n bottom: -epubx-expr(page-height - footer.margin-top-edge);\n left: 0px;\n right: 0px;\n column-width: 25em;\n }\n @-epubx-partition footer :oeb-page-foot {\n writing-mode: horizontal-tb;\n -epubx-flow-from: oeb-page-foot;\n bottom: 0px;\n left: 0px;\n right: 0px;\n }\n @-epubx-partition header :oeb-page-head {\n writing-mode: horizontal-tb;\n -epubx-flow-from: oeb-page-head;\n top: 0px;\n left: 0px;\n right: 0px;\n }\n}\n\n@page {\n @top-left-corner {\n text-align: right;\n vertical-align: middle;\n }\n @top-left {\n text-align: left;\n vertical-align: middle;\n }\n @top-center {\n text-align: center;\n vertical-align: middle;\n }\n @top-right {\n text-align: right;\n vertical-align: middle;\n }\n @top-right-corner {\n text-align: left;\n vertical-align: middle;\n }\n @left-top {\n text-align: center;\n vertical-align: top;\n }\n @left-middle {\n text-align: center;\n vertical-align: middle;\n }\n @left-bottom {\n text-align: center;\n vertical-align: bottom;\n }\n @right-top {\n text-align: center;\n vertical-align: top;\n }\n @right-middle {\n text-align: center;\n vertical-align: middle;\n }\n @right-bottom {\n text-align: center;\n vertical-align: bottom;\n }\n @bottom-left-corner {\n text-align: right;\n vertical-align: middle;\n }\n @bottom-left {\n text-align: left;\n vertical-align: middle;\n }\n @bottom-center {\n text-align: center;\n vertical-align: middle;\n }\n @bottom-right {\n text-align: right;\n vertical-align: middle;\n }\n @bottom-right-corner {\n text-align: left;\n vertical-align: middle;\n }\n}\n\n@media print {\n @page {\n margin: 10%;\n }\n}\n',Yn='\n@namespace "http://www.w3.org/1999/xhtml";\n@namespace m "http://www.w3.org/1998/Math/MathML";\n@namespace epub "http://www.idpf.org/2007/ops";\n\nhtml,\naddress,\nblockquote,\nbody,\ndd,\ndiv,\ndl,\ndt,\nfieldset,\nform,\nframe,\nframeset,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nnoframes,\nol,\np,\nul,\ncenter,\ndir,\nhr,\nmenu,\npre,\ndetails,\ndialog,\nlegend,\nlisting,\noptgroup,\noption,\nplaintext,\nsearch,\nxmp,\narticle,\nsection,\nnav,\naside,\nhgroup,\nfooter,\nheader,\nfigure,\nfigcaption,\nmain {\n display: block;\n}\nli {\n display: list-item;\n}\nhead {\n display: none !important;\n}\ntable {\n display: table;\n}\ntr {\n display: table-row;\n}\nthead {\n display: table-header-group;\n break-after: avoid;\n}\ntbody {\n display: table-row-group;\n}\ntfoot {\n display: table-footer-group;\n break-before: avoid;\n}\ncol {\n display: table-column;\n}\ncolgroup {\n display: table-column-group;\n}\ntd,\nth {\n display: table-cell;\n}\ncaption {\n display: table-caption;\n text-align: center;\n}\nth {\n font-weight: bolder;\n text-align: center;\n}\n*[hidden],\nlink,\nstyle,\nscript {\n display: none;\n}\nh1 {\n font-size: 2em;\n margin-block: 0.67em;\n}\nh2 {\n font-size: 1.5em;\n margin-block: 0.83em;\n}\nh3 {\n font-size: 1.17em;\n margin-block: 1em;\n}\nh4 {\n font-size: 1em;\n margin-block: 1.33em;\n}\nh5 {\n font-size: 0.83em;\n margin-block: 1.67em;\n}\nh6 {\n font-size: 0.67em;\n margin-block: 2.33em;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-weight: bold;\n break-after: avoid;\n}\np,\nblockquote,\nfigure,\nul,\nol,\ndl,\ndir,\nmenu {\n margin-block: 1em;\n}\nb,\nstrong {\n font-weight: bolder;\n}\nblockquote,\nfigure {\n margin-inline: 40px;\n}\ni,\ncite,\ndfn,\nem,\nvar,\naddress {\n font-style: italic;\n}\npre,\ntt,\ncode,\nkbd,\nsamp {\n font-family: monospace;\n text-spacing: none;\n hanging-punctuation: none;\n}\nlisting,\nplaintext,\nxmp,\npre {\n white-space: pre;\n}\npre[wrap] {\n white-space: pre-wrap;\n}\nbutton,\ntextarea,\ninput,\nselect {\n display: inline-block;\n}\nbig {\n font-size: 1.17em;\n}\nsmall,\nsub,\nsup {\n font-size: 0.83em;\n}\nsub {\n vertical-align: sub;\n}\nsup {\n vertical-align: super;\n}\ntable {\n box-sizing: border-box;\n border-spacing: 2px;\n border-collapse: separate;\n text-indent: initial;\n}\nthead,\ntbody,\ntfoot,\ntable > tr {\n vertical-align: middle;\n}\ntr,\ntd,\nth {\n vertical-align: inherit;\n}\ns,\nstrike,\ndel {\n text-decoration: line-through;\n}\nhr {\n border-style: inset;\n border-width: 1px;\n margin-block: 0.5em;\n}\nhr[color],\nhr[noshade] {\n border-style: solid;\n}\nol,\nul,\ndir,\nmenu {\n padding-inline-start: 40px;\n}\ndd {\n margin-inline-start: 40px;\n}\nol ul,\nul ol,\nul ul,\nol ol {\n margin-block: 0;\n}\nu,\nins {\n text-decoration: underline;\n}\ncenter {\n text-align: center;\n}\nq::before {\n content: open-quote;\n}\nq::after {\n content: close-quote;\n}\n\nruby {\n display: ruby;\n}\nrp {\n display: none;\n}\nrbc {\n display: ruby-base-container;\n}\nrtc {\n display: ruby-text-container;\n}\nrb {\n display: ruby-base;\n white-space: nowrap;\n}\nrt {\n display: ruby-text;\n}\nrtc,\nrt {\n text-emphasis: none;\n white-space: nowrap;\n line-height: 1;\n}\nrtc,\nrt {\n font-size: 50%;\n}\nrtc:lang(zh-TW),\nrt:lang(zh-TW) {\n font-size: 30%;\n}\nrtc > rt,\nrtc > rt:lang(zh-TW) {\n font-size: 100%;\n}\n\n/* Bidi settings */\nbdo[dir="ltr"] {\n direction: ltr;\n unicode-bidi: bidi-override;\n}\nbdo[dir="rtl"] {\n direction: rtl;\n unicode-bidi: bidi-override;\n}\n*[dir="ltr"] {\n direction: ltr;\n unicode-bidi: isolate;\n}\n*[dir="rtl"] {\n direction: rtl;\n unicode-bidi: isolate;\n}\n\n/* MathML */\nm|math[display="block"] {\n display: block;\n}\n\n/*------------------ epub-specific ---------------------*/\n\na[epub|type="noteref"] {\n font-size: 0.75em;\n vertical-align: super;\n line-height: 0.01;\n}\n\na[epub|type="noteref"]:href-epub-type(footnote) {\n -adapt-template: url(user-agent.xml#footnote);\n text-decoration: none;\n}\n\naside[epub|type="footnote"] {\n display: none;\n}\n\naside[epub|type="footnote"]:footnote-content {\n display: block;\n margin: 0.25em;\n font-size: 1.2em;\n line-height: 1.2;\n}\n\nepub|trigger {\n display: none;\n}\n\nepub|switch {\n display: inline;\n}\n\nepub|default {\n display: inline;\n}\n\nepub|case {\n display: none;\n}\n\nepub|case[required-namespace::supported] {\n display: inline;\n}\n\nepub|case[required-namespace::supported] ~ epub|case {\n display: none;\n}\n\nepub|case[required-namespace::supported] ~ epub|default {\n display: none;\n}\n',qn='\n@namespace "http://www.w3.org/1999/xhtml";\n@namespace ncx "http://www.daisy.org/z3986/2005/ncx/";\n\nncx|ncx {\n display: block;\n padding-top: 10px;\n padding-bottom: 10px;\n}\n\nncx|content {\n display: none;\n}\n\n*:not([role=doc-toc],\n [role=doc-toc] *,\n :has([role=doc-toc]),\n :is(h1,h2,h3,h4,h5,h6):has(+:not(nav)[role=doc-toc])) {\n display: none;\n}\n\n[hidden] {\n display: revert;\n}\n\n[role=doc-toc] li a,\nncx|navLabel {\n -adapt-behavior: toc-node-anchor;\n}\n\n[role=doc-toc] li,\nncx|navPoint {\n -adapt-behavior: toc-node;\n}\n\n[role=doc-toc] li > :not(ul,ol):first-child {\n -adapt-behavior: toc-node-first-child;\n}\n\n[role=doc-toc] :is(ol,ul),\n[role=doc-toc]:is(ol,ul) {\n -adapt-behavior: toc-container;\n}\n',$n='\n[data-viv-margin-discard~="block-start"] {\n margin-block-start: 0 !important;\n}\n[data-viv-margin-discard~="block-end"] {\n margin-block-end: 0 !important;\n}\n[data-viv-margin-discard~="inline-start"] {\n margin-inline-start: 0 !important;\n}\n[data-viv-margin-discard~="inline-end"] {\n margin-inline-end: 0 !important;\n}\n\n[data-viv-box-break~="inline-start"]:not([data-viv-box-break~="clone"]) {\n margin-inline-start: 0 !important;\n padding-inline-start: 0 !important;\n border-inline-start-width: 0 !important;\n border-start-start-radius: 0 !important;\n border-end-start-radius: 0 !important;\n}\n[data-viv-box-break~="inline-end"]:not([data-viv-box-break~="clone"]) {\n margin-inline-end: 0 !important;\n padding-inline-end: 0 !important;\n border-inline-end-width: 0 !important;\n border-start-end-radius: 0 !important;\n border-end-end-radius: 0 !important;\n}\n[data-viv-box-break~="block-start"]:not([data-viv-box-break~="clone"]) {\n margin-block-start: 0 !important;\n padding-block-start: 0 !important;\n border-block-start-width: 0 !important;\n border-start-start-radius: 0 !important;\n border-start-end-radius: 0 !important;\n}\n[data-viv-box-break~="block-end"]:not([data-viv-box-break~="clone"]) {\n margin-block-end: 0 !important;\n padding-block-end: 0 !important;\n border-block-end-width: 0 !important;\n border-end-start-radius: 0 !important;\n border-end-end-radius: 0 !important;\n}\n[data-viv-box-break~="block-start"][data-viv-box-break~="text-start"] {\n text-indent: 0 !important;\n}\n[data-viv-box-break~="block-end"][data-viv-box-break~="text-end"][data-viv-box-break~="justify"] {\n text-align-last: justify !important;\n}\n[data-viv-box-break~="block-end"][data-viv-box-break~="text-end"][data-viv-box-break~="justify"] > * {\n text-align-last: auto;\n}\n[data-viv-box-break~="block-end"][data-viv-box-break~="text-end"]:not([data-viv-box-break~="justify"]) {\n text-align-last: auto !important;\n}\n\nspan.viv-anonymous-block {\n display: block;\n}\n\n[data-vivliostyle-page-container] {\n text-spacing-trim: space-all;\n text-autospace: no-autospace;\n}\nviv-ts-open.viv-ts-auto > viv-ts-inner,\nviv-ts-open.viv-ts-trim > viv-ts-inner {\n margin-inline-start: -0.5em;\n}\nviv-ts-close.viv-ts-auto > viv-ts-inner,\nviv-ts-close.viv-ts-trim > viv-ts-inner {\n letter-spacing: -0.5em;\n}\nviv-ts-close.viv-hang-end > viv-ts-inner,\nviv-ts-close.viv-hang-last > viv-ts-inner {\n letter-spacing: -1em;\n}\nviv-ts-open.viv-ts-auto::before,\nviv-ts-close.viv-ts-auto::after,\nviv-ts-close.viv-hang-end::after {\n content: " ";\n font-family: Courier, monospace;\n word-spacing: normal;\n letter-spacing: -0.11em;\n line-height: 0;\n text-orientation: mixed;\n visibility: hidden;\n}\nviv-ts-close.viv-hang-end:not(.viv-hang-hw)::after {\n letter-spacing: 0.4em;\n}\nviv-ts-close.viv-hang-hw > viv-ts-inner {\n letter-spacing: -0.5em;\n}\nviv-ts-open.viv-hang-first > viv-ts-inner {\n display: inline-block;\n line-height: 1;\n inline-size: 1em;\n text-indent: 0;\n text-align: end;\n text-align-last: end;\n margin-inline-start: -1em;\n}\nviv-ts-thin-sp::after {\n content: " ";\n font-family: Times, serif;\n word-spacing: normal;\n letter-spacing: -0.125em;\n line-height: 0;\n text-orientation: mixed;\n}\n\nspan[data-viv-leader] {\n text-combine-upright: none;\n text-orientation: mixed;\n white-space: pre;\n}\n';function Qn(t,e,u,n,i){var r=xn("ajax"),o=new XMLHttpRequest,a=r.suspend(o),s={status:0,statusText:"",url:t,contentType:null,responseText:null,responseXML:null,responseBlob:null};o.open(u||"GET",t,!0),e&&(o.responseType=e),o.onreadystatechange=function(){if(4===o.readyState){if(s.status=o.status,s.url=o.responseURL,s.statusText=o.statusText||404==o.status&&"Not Found"||"",200==s.status||0==s.status)if(e&&e!==Pn.DOCUMENT||!o.responseXML||"parsererror"==o.responseXML.documentElement.localName)if((!e||e===Pn.DOCUMENT)&&o.response instanceof Document)s.responseXML=o.response,s.contentType=o.response.contentType;else{var u=o.response;e&&e!==Pn.TEXT||"string"!=typeof u?u?s.responseBlob="string"==typeof u?Zn([u]):u:D.warn("Unexpected empty success response for",t):s.responseText=u;var n=o.getResponseHeader("Content-Type");n&&(s.contentType=n.replace(/(.*);.*$/,"$1"))}else s.responseXML=o.responseXML,s.contentType=o.responseXML.contentType;a.schedule(s)}};try{n?(o.setRequestHeader("Content-Type",i||"text/plain; charset=UTF-8"),o.send(n)):(/^file:|^https?:\/\/[^/]+\.githubusercontent\.com|\.(xhtml|xht|opf)$/i.test(t)?/\/aozorabunko\/[^/]+\/cards\/[^/]+\/files\/[^/.]+\.html$/.test(t)?o.overrideMimeType("text/html; charset=Shift_JIS"):/\.(html|htm)$/i.test(t)?o.overrideMimeType("text/html; charset=UTF-8"):/\.(xhtml|xht|xml|opf)$/i.test(t)?o.overrideMimeType("application/xml; charset=UTF-8"):/\.(txt|css)$/i.test(t)?o.overrideMimeType("text/plain; charset=UTF-8"):o.overrideMimeType("text/html; charset=UTF-8"):/^data:,(<|%3c)/i.test(t)?o.overrideMimeType("text/html; charset=UTF-8"):/^data:,/i.test(t)&&o.overrideMimeType("text/plain; charset=UTF-8"),o.send(null))}catch(e){D.warn(e,"Error fetching "+t),a.schedule(s)}return r.result()}function Zn(t,e){return new Blob(t,{type:e||"application/octet-stream"})}!function(t){t.DEFAULT="",t.ARRAYBUFFER="arraybuffer",t.BLOB="blob",t.DOCUMENT="document",t.JSON="json",t.TEXT="text"}(Pn||(Pn={}));var Jn=/*#__PURE__*/function(){function t(t,e){this.parser=void 0,this.type=void 0,this.resources={},this.fetchers={},this.parser=t,this.type=e}var e=t.prototype;return e.load=function(t,e,u){t=M(t);var n=this.resources[t];return void 0!==n?Tn(n):this.fetch(t,e,u).get()},e.fetchInner=function(t,e,u){var n=this,i=xn("fetch"),r=t.endsWith("?viv-toc-box");r&&(t=t.replace("?viv-toc-box",""));var o=W("user-agent.xml",z),a=!r&&t===o;return a&&(t="data:application/xml,"+encodeURIComponent(jn)),Qn(t,this.type).then(function(s){if(s.status>=400&&e)throw new Error((u||"Failed to fetch required resource: "+t)+" ("+s.status+(s.statusText?" "+s.statusText:"")+")");r?(t+="?viv-toc-box",s.url+="?viv-toc-box"):a&&(s.url=t=o),n.parser(s,n).then(function(e){delete n.fetchers[t],n.resources[t]=e,i.finish(e)})}),i.result()},e.fetch=function(t,e,u){var n=this;if(t=M(t),this.resources[t])return null;var i=this.fetchers[t];return i||(i=new Hn(function(){return n.fetchInner(t,e,u)},"Fetch "+t),this.fetchers[t]=i,i.start()),i},e.get=function(t){return this.resources[M(t)]},e.delete=function(t){delete this.resources[M(t)]},t}();function ti(t,e){var u=t.responseText;return Tn(u?_(u):null)}function ei(t,e){var u=new Hn(function(){var u=xn("loadElement"),n=u.suspend(t),i=!1,r=function(t){i||(i=!0,n.schedule(t?t.type:"timeout"))};return t.addEventListener("load",r,!1),t.addEventListener("error",r,!1),t.addEventListener("abort",r,!1),t.namespaceURI==H.SVG?(e&&t.setAttributeNS(H.XLINK,"xlink:href",e),setTimeout(r,300)):"script"===t.localName?setTimeout(r,3e3):e&&(t.src=e),u.result()},"loadElement "+(e||t.localName));return u.start(),u}var ui,ni=33554432,ii=50331648,ri=67108864;!function(t){t.USER_AGENT="UA",t.USER="User",t.AUTHOR="Author"}(ui||(ui={}));var oi,ai=/*#__PURE__*/function(){function t(t){this.scope=void 0,this.flavor=void 0,this.scope=t,this.flavor=ui.AUTHOR}var e=t.prototype;return e.getCurrentToken=function(){return null},e.getScope=function(){return this.scope},e.error=function(t,e){},e.startStylesheet=function(t){this.flavor=t},e.tagSelector=function(t,e){},e.classSelector=function(t){},e.pseudoclassSelector=function(t,e){},e.pseudoelementSelector=function(t,e){},e.idSelector=function(t){},e.attributeSelector=function(t,e,u,n){},e.descendantSelector=function(){},e.childSelector=function(){},e.adjacentSiblingSelector=function(){},e.followingSiblingSelector=function(){},e.nextSelector=function(){},e.startSelectorRule=function(){},e.startFontFaceRule=function(){},e.startFootnoteRule=function(t){},e.startViewportRule=function(){},e.startDefineRule=function(){},e.startRegionRule=function(){},e.startPageRule=function(){},e.startPageMarginBoxRule=function(t){},e.startWhenRule=function(t){},e.startMediaRule=function(t){this.startWhenRule(t)},e.startFlowRule=function(t){},e.startPageTemplateRule=function(){},e.startPageMasterRule=function(t,e,u){},e.startPartitionRule=function(t,e,u){},e.startPartitionGroupRule=function(t,e,u){},e.startRuleBody=function(){},e.property=function(t,e,u){},e.endRule=function(){},e.startFuncWithSelector=function(t){},e.endFuncWithSelector=function(){},e.pushSelectorText=function(t){},e.getImportantSpecificity=function(){switch(this.flavor){case ui.USER_AGENT:return 0;case ui.USER:return 100663296;default:return 83886080}},e.getBaseSpecificity=function(){switch(this.flavor){case ui.USER_AGENT:return 0;case ui.USER:return 16777216;default:return ni}},t}(),si=/*#__PURE__*/function(t){function e(){var e;return(e=t.call(this,null)||this).stack=[],e.tokenizer=null,e.slave=null,e}N(e,t);var u=e.prototype;return u.pushHandler=function(t){this.stack.push(this.slave),this.slave=t},u.popHandler=function(){this.slave=this.stack.pop()},u.getCurrentToken=function(){return this.tokenizer?this.tokenizer.token():null},u.getScope=function(){return this.slave.getScope()},u.error=function(t,e){this.slave.error(t,e)},u.errorMsg=function(t,e){var u;D.warn(t,null!=(u=null==e?void 0:e.toString())?u:"")},u.startStylesheet=function(e){t.prototype.startStylesheet.call(this,e),this.stack.length>0&&(this.slave=this.stack[0],this.stack=[]),this.slave.startStylesheet(e)},u.tagSelector=function(t,e){this.slave.tagSelector(t,e)},u.classSelector=function(t){this.slave.classSelector(t)},u.pseudoclassSelector=function(t,e){this.slave.pseudoclassSelector(t,e)},u.pseudoelementSelector=function(t,e){this.slave.pseudoelementSelector(t,e)},u.idSelector=function(t){this.slave.idSelector(t)},u.attributeSelector=function(t,e,u,n){this.slave.attributeSelector(t,e,u,n)},u.descendantSelector=function(){this.slave.descendantSelector()},u.childSelector=function(){this.slave.childSelector()},u.adjacentSiblingSelector=function(){this.slave.adjacentSiblingSelector()},u.followingSiblingSelector=function(){this.slave.followingSiblingSelector()},u.nextSelector=function(){this.slave.nextSelector()},u.startSelectorRule=function(){this.slave.startSelectorRule()},u.startFontFaceRule=function(){this.slave.startFontFaceRule()},u.startFootnoteRule=function(t){this.slave.startFootnoteRule(t)},u.startViewportRule=function(){this.slave.startViewportRule()},u.startDefineRule=function(){this.slave.startDefineRule()},u.startRegionRule=function(){this.slave.startRegionRule()},u.startPageRule=function(){this.slave.startPageRule()},u.startPageMarginBoxRule=function(t){this.slave.startPageMarginBoxRule(t)},u.startWhenRule=function(t){this.slave.startWhenRule(t)},u.startFlowRule=function(t){this.slave.startFlowRule(t)},u.startPageTemplateRule=function(){this.slave.startPageTemplateRule()},u.startPageMasterRule=function(t,e,u){this.slave.startPageMasterRule(t,e,u)},u.startPartitionRule=function(t,e,u){this.slave.startPartitionRule(t,e,u)},u.startPartitionGroupRule=function(t,e,u){this.slave.startPartitionGroupRule(t,e,u)},u.startRuleBody=function(){this.slave.startRuleBody()},u.property=function(t,e,u){this.slave.property(t,e,u)},u.endRule=function(){this.slave.endRule()},u.startFuncWithSelector=function(t){this.slave.startFuncWithSelector(t)},u.endFuncWithSelector=function(){this.slave.endFuncWithSelector()},u.pushSelectorText=function(t){this.slave.pushSelectorText(t)},e}(ai),li=/*#__PURE__*/function(t){function e(e,u,n){var i;return(i=t.call(this,e)||this).owner=void 0,i.topLevel=void 0,i.depth=0,i.owner=u,i.topLevel=n,u&&(i.flavor=u.flavor),i}N(e,t);var u=e.prototype;return u.getCurrentToken=function(){return this.owner.getCurrentToken()},u.error=function(t,e){this.owner.errorMsg(t,e)},u.startRuleBody=function(){this.depth++},u.endRule=function(){0!=--this.depth||this.topLevel||this.owner.popHandler()},e}(ai),Di=/*#__PURE__*/function(t){function e(e,u,n){return t.call(this,e,u,n)||this}N(e,t);var u=e.prototype;return u.report=function(t){this.error(t,this.getCurrentToken())},u.reportAndSkip=function(t){this.report(t),this.owner.pushHandler(new li(this.scope,this.owner,!1))},u.startSelectorRule=function(){this.reportAndSkip("E_CSS_UNEXPECTED_SELECTOR")},u.startFontFaceRule=function(){this.reportAndSkip("E_CSS_UNEXPECTED_FONT_FACE")},u.startFootnoteRule=function(t){this.reportAndSkip("E_CSS_UNEXPECTED_FOOTNOTE")},u.startViewportRule=function(){this.reportAndSkip("E_CSS_UNEXPECTED_VIEWPORT")},u.startDefineRule=function(){this.reportAndSkip("E_CSS_UNEXPECTED_DEFINE")},u.startRegionRule=function(){this.reportAndSkip("E_CSS_UNEXPECTED_REGION")},u.startPageRule=function(){this.reportAndSkip("E_CSS_UNEXPECTED_PAGE")},u.startWhenRule=function(t){this.reportAndSkip("E_CSS_UNEXPECTED_WHEN")},u.startFlowRule=function(t){this.reportAndSkip("E_CSS_UNEXPECTED_FLOW")},u.startPageTemplateRule=function(){this.reportAndSkip("E_CSS_UNEXPECTED_PAGE_TEMPLATE")},u.startPageMasterRule=function(t,e,u){this.reportAndSkip("E_CSS_UNEXPECTED_PAGE_MASTER")},u.startPartitionRule=function(t,e,u){this.reportAndSkip("E_CSS_UNEXPECTED_PARTITION")},u.startPartitionGroupRule=function(t,e,u){this.reportAndSkip("E_CSS_UNEXPECTED_PARTITION_GROUP")},u.startFuncWithSelector=function(t){this.reportAndSkip("E_CSS_UNEXPECTED_SELECTOR_FUNC")},u.endFuncWithSelector=function(){this.reportAndSkip("E_CSS_UNEXPECTED_END_SELECTOR_FUNC")},u.property=function(t,e,u){this.error("E_CSS_UNEXPECTED_PROPERTY",this.getCurrentToken())},e}(li),hi=[],ci=[],di=[],fi=[],pi=[],Ei=[],Ci=[],Fi=[],Ai=[],gi=[],vi=[],mi=[],Bi=[];!function(t){t[t.SELECTOR_NAME_1=1]="SELECTOR_NAME_1",t[t.SELECTOR_NAME=2]="SELECTOR_NAME",t[t.SELECTOR_ANY_1=3]="SELECTOR_ANY_1",t[t.SELECTOR_ANY=4]="SELECTOR_ANY",t[t.SELECTOR_ID_1=5]="SELECTOR_ID_1",t[t.SELECTOR_ID=6]="SELECTOR_ID",t[t.SELECTOR_CLASS_1=7]="SELECTOR_CLASS_1",t[t.SELECTOR_CLASS=8]="SELECTOR_CLASS",t[t.SELECTOR_ATTR_1=9]="SELECTOR_ATTR_1",t[t.SELECTOR_ATTR=10]="SELECTOR_ATTR",t[t.SELECTOR_CHILD=11]="SELECTOR_CHILD",t[t.SELECTOR_SIBLING=12]="SELECTOR_SIBLING",t[t.SELECTOR_BODY=13]="SELECTOR_BODY",t[t.SELECTOR_PSEUDOCLASS=14]="SELECTOR_PSEUDOCLASS",t[t.VAL_IDENT=15]="VAL_IDENT",t[t.VAL_HASH=16]="VAL_HASH",t[t.VAL_NUM=17]="VAL_NUM",t[t.VAL_INT=18]="VAL_INT",t[t.VAL_NUMERIC=19]="VAL_NUMERIC",t[t.VAL_STR=20]="VAL_STR",t[t.VAL_URL=21]="VAL_URL",t[t.VAL_COMMA=22]="VAL_COMMA",t[t.VAL_SLASH=23]="VAL_SLASH",t[t.VAL_FUNC=24]="VAL_FUNC",t[t.VAL_C_PAR=25]="VAL_C_PAR",t[t.VAL_END=26]="VAL_END",t[t.RULE_END=27]="RULE_END",t[t.IDENT=28]="IDENT",t[t.SELECTOR_START=29]="SELECTOR_START",t[t.AT=30]="AT",t[t.EXPR_IDENT=31]="EXPR_IDENT",t[t.EXPR_NUM=32]="EXPR_NUM",t[t.EXPR_NUMERIC=33]="EXPR_NUMERIC",t[t.EXPR_STR=34]="EXPR_STR",t[t.EXPR_PARAM=35]="EXPR_PARAM",t[t.EXPR_PREFIX=36]="EXPR_PREFIX",t[t.EXPR_INFIX=37]="EXPR_INFIX",t[t.EXPR_FUNC=38]="EXPR_FUNC",t[t.EXPR_C_PAR=39]="EXPR_C_PAR",t[t.EXPR_O_PAR=40]="EXPR_O_PAR",t[t.SELECTOR_NEXT=41]="SELECTOR_NEXT",t[t.SELECTOR_PSEUDOELEM=42]="SELECTOR_PSEUDOELEM",t[t.EXPR_O_BRC=43]="EXPR_O_BRC",t[t.VAL_FINISH=44]="VAL_FINISH",t[t.EXPR_INFIX_NAME=45]="EXPR_INFIX_NAME",t[t.PROP=46]="PROP",t[t.VAL_BANG=47]="VAL_BANG",t[t.VAL_BRC=48]="VAL_BRC",t[t.EXPR_SEMICOL=49]="EXPR_SEMICOL",t[t.ERROR_PUSH=50]="ERROR_PUSH",t[t.ERROR_POP=51]="ERROR_POP",t[t.ERROR_POP_DECL=52]="ERROR_POP_DECL",t[t.ERROR_SEMICOL=53]="ERROR_SEMICOL",t[t.VAL_PLUS=54]="VAL_PLUS",t[t.SELECTOR_PSEUDOCLASS_1=55]="SELECTOR_PSEUDOCLASS_1",t[t.SELECTOR_FOLLOWING_SIBLING=56]="SELECTOR_FOLLOWING_SIBLING",t[t.VAL_URANGE=57]="VAL_URANGE",t[t.SELECTOR_PSEUDOELEM_1=58]="SELECTOR_PSEUDOELEM_1",t[t.DONE=200]="DONE"}(oi||(oi={}));var wi,yi=Ou.LAST+1,Ni=Ou.LAST+2,bi=Ou.LAST+3;hi[Ou.IDENT]=oi.IDENT,hi[Ou.STAR]=oi.SELECTOR_START,hi[Ou.HASH]=oi.SELECTOR_START,hi[Ou.CLASS]=oi.SELECTOR_START,hi[Ou.O_BRK]=oi.SELECTOR_START,hi[Ou.COLON]=oi.SELECTOR_START,hi[Ou.COL_COL]=oi.SELECTOR_START,hi[Ou.AT]=oi.AT,hi[Ou.C_BRC]=oi.RULE_END,hi[Ou.EOF]=oi.DONE,ci[Ou.IDENT]=oi.PROP,ci[Ou.EOF]=oi.DONE,Ei[Ou.IDENT]=oi.SELECTOR_NAME,Ei[Ou.STAR]=oi.SELECTOR_ANY,Ei[Ou.HASH]=oi.SELECTOR_ID,Ei[Ou.CLASS]=oi.SELECTOR_CLASS,Ei[Ou.O_BRK]=oi.SELECTOR_ATTR,Ei[Ou.COLON]=oi.SELECTOR_PSEUDOCLASS,Ei[Ou.COL_COL]=oi.SELECTOR_PSEUDOELEM,di[Ou.GT]=oi.SELECTOR_CHILD,di[Ou.PLUS]=oi.SELECTOR_SIBLING,di[Ou.TILDE]=oi.SELECTOR_FOLLOWING_SIBLING,di[Ou.IDENT]=oi.SELECTOR_NAME_1,di[Ou.STAR]=oi.SELECTOR_ANY_1,di[Ou.HASH]=oi.SELECTOR_ID_1,di[Ou.CLASS]=oi.SELECTOR_CLASS_1,di[Ou.O_BRK]=oi.SELECTOR_ATTR_1,di[Ou.O_BRC]=oi.SELECTOR_BODY,di[Ou.COLON]=oi.SELECTOR_PSEUDOCLASS_1,di[Ou.COL_COL]=oi.SELECTOR_PSEUDOELEM_1,di[Ou.COMMA]=oi.SELECTOR_NEXT,fi[Ou.GT]=oi.SELECTOR_CHILD,fi[Ou.PLUS]=oi.SELECTOR_SIBLING,fi[Ou.TILDE]=oi.SELECTOR_FOLLOWING_SIBLING,fi[Ou.IDENT]=oi.SELECTOR_NAME_1,fi[Ou.STAR]=oi.SELECTOR_ANY_1,fi[Ou.HASH]=oi.SELECTOR_ID_1,fi[Ou.CLASS]=oi.SELECTOR_CLASS_1,fi[Ou.O_BRK]=oi.SELECTOR_ATTR_1,fi[Ou.COLON]=oi.SELECTOR_PSEUDOCLASS_1,pi[Ou.IDENT]=oi.SELECTOR_NAME,pi[Ou.STAR]=oi.SELECTOR_ANY,pi[Ou.HASH]=oi.SELECTOR_ID,pi[Ou.CLASS]=oi.SELECTOR_CLASS,pi[Ou.COLON]=oi.SELECTOR_PSEUDOCLASS,pi[Ou.COL_COL]=oi.SELECTOR_PSEUDOELEM,pi[Ou.O_BRK]=oi.SELECTOR_ATTR,pi[Ou.O_BRC]=oi.SELECTOR_BODY,Ci[Ou.IDENT]=oi.VAL_IDENT,Ci[Ou.HASH]=oi.VAL_HASH,Ci[Ou.NUM]=oi.VAL_NUM,Ci[Ou.INT]=oi.VAL_INT,Ci[Ou.NUMERIC]=oi.VAL_NUMERIC,Ci[Ou.STR]=oi.VAL_STR,Ci[Ou.URL]=oi.VAL_URL,Ci[Ou.URANGE]=oi.VAL_URANGE,Ci[Ou.COMMA]=oi.VAL_COMMA,Ci[Ou.SLASH]=oi.VAL_SLASH,Ci[Ou.FUNC]=oi.VAL_FUNC,Ci[Ou.C_PAR]=oi.VAL_C_PAR,Ci[Ou.SEMICOL]=oi.VAL_END,Ci[Ou.C_BRC]=oi.VAL_BRC,Ci[Ou.BANG]=oi.VAL_BANG,Ci[Ou.PLUS]=oi.VAL_PLUS,Ci[Ou.EOF]=oi.VAL_FINISH,Fi[Ou.IDENT]=oi.EXPR_IDENT,Fi[Ou.NUM]=oi.EXPR_NUM,Fi[Ou.INT]=oi.EXPR_NUM,Fi[Ou.NUMERIC]=oi.EXPR_NUMERIC,Fi[Ou.STR]=oi.EXPR_STR,Fi[Ou.O_PAR]=oi.EXPR_O_PAR,Fi[Ou.FUNC]=oi.EXPR_FUNC,Fi[Ou.BANG]=oi.EXPR_PREFIX,Fi[Ou.MINUS]=oi.EXPR_PREFIX,Fi[Ou.DOLLAR]=oi.EXPR_PARAM,Ai[Ou.IDENT]=oi.EXPR_INFIX_NAME,Ai[Ou.COMMA]=oi.EXPR_INFIX,Ai[Ou.GT]=oi.EXPR_INFIX,Ai[Ou.LT]=oi.EXPR_INFIX,Ai[Ou.GT_EQ]=oi.EXPR_INFIX,Ai[Ou.LT_EQ]=oi.EXPR_INFIX,Ai[Ou.EQ]=oi.EXPR_INFIX,Ai[Ou.EQ_EQ]=oi.EXPR_INFIX,Ai[Ou.BANG_EQ]=oi.EXPR_INFIX,Ai[Ou.AMP_AMP]=oi.EXPR_INFIX,Ai[Ou.BAR_BAR]=oi.EXPR_INFIX,Ai[Ou.PLUS]=oi.EXPR_INFIX,Ai[Ou.MINUS]=oi.EXPR_INFIX,Ai[Ou.SLASH]=oi.EXPR_INFIX,Ai[Ou.PERCENT]=oi.EXPR_INFIX,Ai[Ou.STAR]=oi.EXPR_INFIX,Ai[Ou.COLON]=oi.EXPR_INFIX,Ai[Ou.QMARK]=oi.EXPR_INFIX,Ai[Ou.C_PAR]=oi.EXPR_C_PAR,Ai[Ou.O_BRC]=oi.EXPR_O_BRC,Ai[Ou.SEMICOL]=oi.EXPR_SEMICOL,gi[Ou.EOF]=oi.DONE,gi[Ou.O_BRC]=oi.ERROR_PUSH,gi[Ou.C_BRC]=oi.ERROR_POP,gi[Ou.O_BRK]=oi.ERROR_PUSH,gi[Ou.C_BRK]=oi.ERROR_POP,gi[Ou.O_PAR]=oi.ERROR_PUSH,gi[Ou.C_PAR]=oi.ERROR_POP,gi[Ou.SEMICOL]=oi.ERROR_SEMICOL,vi[Ou.EOF]=oi.DONE,vi[Ou.O_BRC]=oi.ERROR_PUSH,vi[Ou.C_BRC]=oi.ERROR_POP_DECL,vi[Ou.O_BRK]=oi.ERROR_PUSH,vi[Ou.C_BRK]=oi.ERROR_POP,vi[Ou.O_PAR]=oi.ERROR_PUSH,vi[Ou.C_PAR]=oi.ERROR_POP,vi[Ou.SEMICOL]=oi.ERROR_SEMICOL,mi[Ou.EOF]=oi.DONE,mi[Ou.O_BRC]=oi.ERROR_PUSH,mi[Ou.C_BRC]=oi.ERROR_POP,mi[Ou.O_BRK]=oi.ERROR_PUSH,mi[Ou.C_BRK]=oi.ERROR_POP,mi[Ou.O_PAR]=oi.ERROR_PUSH,mi[Ou.C_PAR]=oi.ERROR_POP,Bi[Ou.C_PAR]=0,Bi[Ou.COMMA]=0,Bi[Ou.QMARK]=1,Bi[Ou.COLON]=1,Bi[Ou.AMP_AMP]=2,Bi[Ou.BAR_BAR]=2,Bi[Ou.LT]=3,Bi[Ou.GT]=3,Bi[Ou.LT_EQ]=3,Bi[Ou.GT_EQ]=3,Bi[Ou.EQ]=3,Bi[Ou.EQ_EQ]=3,Bi[Ou.BANG_EQ]=3,Bi[Ou.PLUS]=4,Bi[Ou.MINUS]=4,Bi[Ou.STAR]=5,Bi[Ou.SLASH]=5,Bi[Ou.PERCENT]=5,Bi[Ou.EOF]=6,Bi[yi]=2,Bi[Ni]=2,function(t){t[t.PROP=0]="PROP",t[t.WHEN=1]="WHEN",t[t.MEDIA=2]="MEDIA",t[t.IMPORT=3]="IMPORT",t[t.SUPPORTS=4]="SUPPORTS"}(wi||(wi={}));var Si=/*#__PURE__*/function(){function t(t,e,u,n){this.actions=void 0,this.tokenizer=void 0,this.handler=void 0,this.baseURL=void 0,this.valStack=[],this.namespacePrefixToURI={},this.defaultNamespaceURI=null,this.propName=null,this.propImportant=!1,this.exprContext=void 0,this.result=null,this.importReady=!1,this.importURL=null,this.importCondition=null,this.errorBrackets=[],this.ruleStack=[],this.regionRule=!1,this.pageRule=!1,this.inStyleDeclaration=!1,this.actions=t,this.tokenizer=e,this.handler=u,this.baseURL=n,this.exprContext=wi.MEDIA}var e=t.prototype;return e.extractVals=function(t,e){for(var u=[],n=this.valStack;e<n.length&&(u.push(n[e++]),e!==n.length);){if(n[e++]!==t)throw new Error("Unexpected state");e===n.length&&u.push(xe)}return u},e.valStackReduce=function(t,e){var u,n=this.valStack,i=n.length,r=0;do{if(u=n[--i],")"===t&&u instanceof Ke)if(")"===u.text)r++;else if("("===u.text){if(0===r)return null;r--}}while(void 0!==u&&"string"!=typeof u);var o=n.length-(i+1);if(o>1&&n.splice(i+1,o,new Ge(n.slice(i+1,n.length))),","==t)return null;i++;do{u=n[--i]}while(void 0!==u&&("string"!=typeof u||","==u));if(o=n.length-(i+1),"("==u){")"!=t&&e.type!==Ou.EOF&&(this.handler.error("E_CSS_MISMATCHED_C_PAR",e),this.actions=vi);var a=new Xe(n[i-1],this.extractVals(",",i+1));if(n.splice(i-1,o+2,a),"var"===a.name){var s=a.values[0]instanceof ke&&a.values[0].name;ru(s)&&s!==this.propName||(this.handler.error("E_CSS_INVALID_VAR "+a.toString(),e),this.actions=vi)}return a}if(";"!=t||i>=0)return this.handler.error("E_CSS_UNEXPECTED_VAL_END",e),this.actions=vi,null;if(o>1)return new We(this.extractVals(",",i+1));var l=n[0];return l instanceof be?l:l?new Ke(l.toString()):xe},e.exprError=function(t,e){this.actions=this.propName?vi:gi,D.warn(t,e.toString())},e.exprStackReduce=function(t,e){for(var u,n=this.valStack,i=this.handler,r=n.pop();;){var o=n.pop();if(t==Ou.C_PAR){for(var a=[r];o==Ou.COMMA;)a.unshift(n.pop()),o=n.pop();if("string"==typeof o){if("{"==o){for(;a.length>=2;){var s=a.shift(),l=a.shift(),D=new Qt(i.getScope(),s,l);a.unshift(D)}return n.push(new je(a[0])),!0}if("("==o){var h=n.pop(),c=n.pop();r=new fe(i.getScope(),It(c,h),a),t=Ou.EOF;continue}}if(o==Ou.O_PAR){r.isMediaName()&&(r=new Ce(i.getScope(),r,null)),t=Ou.EOF;continue}}else if("string"==typeof o){n.push(o);break}if(o<0)if(o==-Ou.BANG)r=new Xt(i.getScope(),r);else if(o==-Ou.MINUS)r=new Kt(i.getScope(),r);else{if(o!=-bi)return this.exprError("F_UNEXPECTED_STATE",e),!1;r=new jt(i.getScope(),r)}else{if(Bi[t]>Bi[o]){n.push(o);break}switch(u=n.pop(),o){case Ou.AMP_AMP:r=new Yt(i.getScope(),u,r);break;case yi:r=new qt(i.getScope(),u,r);break;case Ni:r=new Zt(i.getScope(),u,r);break;case Ou.BAR_BAR:r=new $t(i.getScope(),u,r);break;case Ou.LT:r=new Jt(i.getScope(),u,r);break;case Ou.GT:r=new ee(i.getScope(),u,r);break;case Ou.LT_EQ:r=new te(i.getScope(),u,r);break;case Ou.GT_EQ:r=new ue(i.getScope(),u,r);break;case Ou.EQ:case Ou.EQ_EQ:r=new ne(i.getScope(),u,r);break;case Ou.BANG_EQ:r=new ie(i.getScope(),u,r);break;case Ou.PLUS:r=new re(i.getScope(),u,r);break;case Ou.MINUS:r=new oe(i.getScope(),u,r);break;case Ou.STAR:r=new ae(i.getScope(),u,r);break;case Ou.SLASH:r=new se(i.getScope(),u,r);break;case Ou.PERCENT:r=new le(i.getScope(),u,r);break;case Ou.COLON:if(!(n.length>1))return this.exprError("E_CSS_EXPR_COND",e),!1;switch(n[n.length-1]){case Ou.QMARK:n.pop(),r=new pe(i.getScope(),n.pop(),u,r);break;case Ou.O_PAR:if(!u.isMediaName())return this.exprError("E_CSS_MEDIA_TEST",e),!1;r=new Ce(i.getScope(),u,r)}break;case Ou.QMARK:if(t!=Ou.COLON)return this.exprError("E_CSS_EXPR_COND",e),!1;case Ou.O_PAR:return n.push(u),n.push(o),n.push(r),!1;default:return this.exprError("F_UNEXPECTED_STATE",e),!1}}}return n.push(r),!1},e.readSupportsTest=function(t){var e,u,n=t.type===Ou.FUNC,i=this.tokenizer;if(n)e=t.position+(u=t.text).length+1;else{if(t.type!==Ou.O_PAR)return null;var r=i.nthToken(1),o=i.nthToken(2);if(r.type===Ou.IDENT&&o.type===Ou.COLON)i.consume(),i.consume(),u=r.text,e=o.position+1;else{if(r.type===Ou.O_PAR||r.type===Ou.FUNC||r.type===Ou.IDENT&&"not"===r.text.toLowerCase()&&(o.type===Ou.O_PAR||o.type===Ou.FUNC))return null;e=t.position+1}}for(var a,s=0,l=0;s>=0;)switch(i.consume(),(a=i.token()).type){case Ou.C_PAR:s--;break;case Ou.O_PAR:case Ou.FUNC:s++;break;case Ou.COMMA:0===s&&l++;break;case Ou.EOF:return this.exprError("E_CSS_UNEXPECTED_EOF",a),null}i.consume();var D=n&&"selector"===u&&l>0?"":i.input.substring(e,a.position).trim();return new Fe(this.handler.getScope(),u,D,n)},e.readPseudoParams=function(){for(var t=[];;){var e=this.tokenizer.token();switch(e.type){case Ou.IDENT:t.push(e.text);break;case Ou.PLUS:t.push("+");break;case Ou.NUM:case Ou.INT:t.push(e.num);break;default:return t}this.tokenizer.consume()}},e.readNthPseudoParams=function(){var t=!1,e=this.tokenizer.token();if(e.type===Ou.PLUS)t=!0,this.tokenizer.consume(),e=this.tokenizer.token();else if(e.type===Ou.IDENT&&("even"===e.text||"odd"===e.text))return this.tokenizer.consume(),[2,"odd"===e.text?1:0];switch(e.type){case Ou.NUMERIC:if(t&&e.num<0)return null;case Ou.IDENT:if(t&&"-"===e.text.charAt(0))return null;if("n"===e.text||"-n"===e.text){if(t&&e.precededBySpace)return null;var u="-n"===e.text?-1:1;e.type===Ou.NUMERIC&&(u=e.num);var n=0;this.tokenizer.consume();var i=(e=this.tokenizer.token()).type===Ou.MINUS,r=e.type===Ou.PLUS||i;if(r&&(this.tokenizer.consume(),e=this.tokenizer.token()),e.type===Ou.INT){if(1/(n=e.num)==1/-0){if(n=0,r)return null}else if(n<0){if(r)return null}else if(n>=0&&!r)return null;this.tokenizer.consume()}else if(r)return null;return[u,i&&n>0?-n:n]}if("n-"===e.text||"-n-"===e.text){if(t&&e.precededBySpace)return null;var o="-n-"===e.text?-1:1;if(e.type===Ou.NUMERIC&&(o=e.num),this.tokenizer.consume(),(e=this.tokenizer.token()).type===Ou.INT)return e.num<0||1/e.num==1/-0?null:(this.tokenizer.consume(),[o,e.num])}else{var a=e.text.match(/^n(-[0-9]+)$/);if(a)return t&&e.precededBySpace?null:(this.tokenizer.consume(),[e.type===Ou.NUMERIC?e.num:1,parseInt(a[1],10)]);if(a=e.text.match(/^-n(-[0-9]+)$/))return this.tokenizer.consume(),[-1,parseInt(a[1],10)]}return null;case Ou.INT:return t&&(e.precededBySpace||e.num<0)?null:(this.tokenizer.consume(),[0,e.num])}return null},e.makeCondition=function(t,e){var u=this.handler.getScope();if(!u)return null;if(e=e||u._true,t)for(var n,i=R(t.split(/\s+/));!(n=i()).done;)switch(n.value){case"vertical":e=ge(u,e,new Xt(u,new he(u,"pref-horizontal")));break;case"horizontal":e=ge(u,e,new he(u,"pref-horizontal"));break;case"day":e=ge(u,e,new Xt(u,new he(u,"pref-night-mode")));break;case"night":e=ge(u,e,new he(u,"pref-night-mode"));break;default:e=u._false}return e===u._true?null:new je(e)},e.isInsidePropertyOnlyRule=function(){switch(this.ruleStack[this.ruleStack.length-1]){case"[selector]":case"font-face":case"-epubx-flow":case"-epubx-viewport":case"-epubx-define":case"-adapt-footnote-area":return!0}return!1},e.runParser=function(t,e,u,n,i,r){var o,a,s,l,D,h,c,d=this.handler,f=this.tokenizer,p=this.valStack,E=null;for(u&&(this.inStyleDeclaration=!0),n&&(this.exprContext=wi.MEDIA,this.valStack.push("{"));t>0;--t)if(o=f.token(),i&&null===E&&"("===f.input[E=o.position-1]&&E++,this.actions===Ci&&this.errorBrackets.length>0&&(o.type===this.errorBrackets[this.errorBrackets.length-1]||o.type===Ou.SEMICOL||o.type===Ou.BANG)){if(o.type===this.errorBrackets[this.errorBrackets.length-1]&&(this.errorBrackets.pop(),o.type===Ou.C_PAR&&this.valStackReduce(")",o))){f.consume();continue}p.push(new Ke(o.toString())),f.consume()}else switch(this.actions[o.type]){case oi.IDENT:if(!this.inStyleDeclaration||f.nthToken(1).type!=Ou.COLON){this.isInsidePropertyOnlyRule()?(d.error("E_CSS_COLON_EXPECTED",f.nthToken(1)),this.actions=vi):(this.actions=Ei,d.startSelectorRule());continue}this.propName=o.text,this.propImportant=!1,f.consume(),f.consume(),this.actions=Ci,p.splice(0,p.length);continue;case oi.PROP:if(f.nthToken(1).type!=Ou.COLON){this.actions=vi,d.error("E_CSS_COLON_EXPECTED",f.nthToken(1));continue}this.propName=o.text,this.propImportant=!1,f.consume(),f.consume(),this.actions=Ci,p.splice(0,p.length);continue;case oi.SELECTOR_START:this.actions=Ei,d.startSelectorRule();continue;case oi.SELECTOR_NAME_1:if(!o.precededBySpace){this.actions=mi,d.error("E_CSS_SPACE_EXPECTED",o);continue}d.descendantSelector();case oi.SELECTOR_NAME:if(f.nthToken(1).type==Ou.BAR)if(f.consume(),f.consume(),null!=(s=this.namespacePrefixToURI[o.text]))switch((o=f.token()).type){case Ou.IDENT:d.tagSelector(s,o.text),this.actions=i?fi:di,f.consume();break;case Ou.STAR:d.tagSelector(s,null),this.actions=i?fi:di,f.consume();break;default:this.actions=gi,d.error("E_CSS_NAMESPACE",o)}else this.actions=gi,d.error("E_CSS_UNDECLARED_PREFIX",o);else d.tagSelector(this.defaultNamespaceURI,o.text),this.actions=i?fi:di,f.consume();continue;case oi.SELECTOR_ANY_1:if(!o.precededBySpace){this.actions=mi,d.error("E_CSS_SPACE_EXPECTED",o);continue}d.descendantSelector();case oi.SELECTOR_ANY:if(f.nthToken(1).type==Ou.BAR)switch(f.consume(),f.consume(),(o=f.token()).type){case Ou.IDENT:d.tagSelector(null,o.text),this.actions=i?fi:di,f.consume();break;case Ou.STAR:d.tagSelector(null,null),this.actions=i?fi:di,f.consume();break;default:this.actions=gi,d.error("E_CSS_NAMESPACE",o)}else d.tagSelector(this.defaultNamespaceURI,null),this.actions=i?fi:di,f.consume();continue;case oi.SELECTOR_ID_1:o.precededBySpace&&d.descendantSelector();case oi.SELECTOR_ID:if(!o.text){d.error("E_CSS_SYNTAX",o),f.consume();continue}d.idSelector(o.text),this.actions=i?fi:di,f.consume();continue;case oi.SELECTOR_CLASS_1:o.precededBySpace&&d.descendantSelector();case oi.SELECTOR_CLASS:d.classSelector(o.text),this.actions=i?fi:di,f.consume();continue;case oi.SELECTOR_PSEUDOCLASS_1:o.precededBySpace&&d.descendantSelector();case oi.SELECTOR_PSEUDOCLASS:f.consume();t:switch((o=f.token()).type){case Ou.IDENT:d.pseudoclassSelector(o.text,null),f.consume(),this.actions=i?fi:di;continue;case Ou.FUNC:switch(l=o.text,f.consume(),l){case"is":case"not":case"where":case"has":this.actions=Ei,d.startFuncWithSelector(l),this.actions=this.runParser(Number.POSITIVE_INFINITY,!1,!1,!1,!0,"has"===l)?di:mi;continue;case"lang":case"href-epub-type":if((o=f.token()).type===Ou.IDENT){c=[o.text],f.consume();break}break t;case"nth-child":case"nth-of-type":case"nth-last-child":case"nth-last-of-type":case"nth":if(c=this.readNthPseudoParams())break;break t;default:c=this.readPseudoParams()}if((o=f.token()).type==Ou.C_PAR){d.pseudoclassSelector(l,c),f.consume(),this.actions=i?fi:di;continue}}d.error("E_CSS_PSEUDOCLASS_SYNTAX",o),this.actions=gi;continue;case oi.SELECTOR_PSEUDOELEM_1:o.precededBySpace&&d.descendantSelector();case oi.SELECTOR_PSEUDOELEM:switch(f.consume(),(o=f.token()).type){case Ou.IDENT:d.pseudoelementSelector(o.text,null),this.actions=i?fi:di,f.consume();continue;case Ou.FUNC:if(l=o.text,f.consume(),"nth-fragment"==l){if(null===(c=this.readNthPseudoParams()))break}else c=this.readPseudoParams();if((o=f.token()).type==Ou.C_PAR){d.pseudoelementSelector(l,c),this.actions=i?fi:di,f.consume();continue}}d.error("E_CSS_PSEUDOELEM_SYNTAX",o),this.actions=gi;continue;case oi.SELECTOR_ATTR_1:o.precededBySpace&&d.descendantSelector();case oi.SELECTOR_ATTR:if(f.consume(),(o=f.token()).type==Ou.IDENT)l=o.text,f.consume();else if(o.type==Ou.STAR)l=null,f.consume();else{if(o.type!=Ou.BAR){this.actions=mi,d.error("E_CSS_ATTR",o),f.consume();continue}l=""}if((o=f.token()).type==Ou.BAR){if(null==(s=l?this.namespacePrefixToURI[l]:l)){this.actions=mi,d.error("E_CSS_UNDECLARED_PREFIX",o),f.consume();continue}if(f.consume(),(o=f.token()).type!=Ou.IDENT){this.actions=mi,d.error("E_CSS_ATTR_NAME_EXPECTED",o);continue}l=o.text,f.consume(),o=f.token()}else s="";switch(o.type){case Ou.EQ:case Ou.TILDE_EQ:case Ou.BAR_EQ:case Ou.HAT_EQ:case Ou.DOLLAR_EQ:case Ou.STAR_EQ:case Ou.COL_COL:D=o.type,f.consume(),o=f.token();break;case Ou.C_BRK:d.attributeSelector(s,l,Ou.EOF,null),this.actions=i?fi:di,f.consume();continue;default:this.actions=mi,d.error("E_CSS_ATTR_OP_EXPECTED",o);continue}switch(o.type){case Ou.IDENT:case Ou.STR:d.attributeSelector(s,l,D,o.text),f.consume(),o=f.token();break;default:this.actions=mi,d.error("E_CSS_ATTR_VAL_EXPECTED",o);continue}if(o.type!=Ou.C_BRK){this.actions=mi,d.error("E_CSS_ATTR",o);continue}this.actions=i?fi:di,f.consume();continue;case oi.SELECTOR_CHILD:d.childSelector(),this.actions=pi,f.consume();continue;case oi.SELECTOR_SIBLING:d.adjacentSiblingSelector(),this.actions=pi,f.consume();continue;case oi.SELECTOR_FOLLOWING_SIBLING:d.followingSiblingSelector(),this.actions=pi,f.consume();continue;case oi.SELECTOR_BODY:this.regionRule?(this.ruleStack.push("-epubx-region"),this.regionRule=!1):this.pageRule?(this.ruleStack.push("page"),this.pageRule=!1,this.inStyleDeclaration=!0):(this.ruleStack.push("[selector]"),this.inStyleDeclaration=!0),d.startRuleBody(),this.actions=hi,f.consume();continue;case oi.SELECTOR_NEXT:d.nextSelector(),this.actions=Ei,f.consume();continue;case oi.VAL_IDENT:p.push(Le(o.text)),f.consume();continue;case oi.VAL_HASH:D=parseInt(o.text,16),p.push(new Ue(o.text)),f.consume();continue;case oi.VAL_NUM:p.push(new _e(o.num)),f.consume();continue;case oi.VAL_INT:p.push(new Me(o.num)),f.consume();continue;case oi.VAL_NUMERIC:p.push(new Oe(o.num,o.text)),f.consume();continue;case oi.VAL_STR:p.push(new Pe(o.text)),f.consume();continue;case oi.VAL_URL:p.push(new Ve(W(o.text,this.baseURL))),f.consume();continue;case oi.VAL_URANGE:p.push(new He(o.text)),f.consume();continue;case oi.VAL_COMMA:this.valStackReduce(",",o),p.push(","),f.consume();continue;case oi.VAL_SLASH:p.push(Ie),f.consume();continue;case oi.VAL_FUNC:"-epubx-expr"==(l=o.text.toLowerCase())||"env"==l?(this.actions=Fi,this.exprContext=wi.PROP,p.push("{")):(p.push(l),p.push("("),this.errorBrackets.length>0&&this.errorBrackets.push(Ou.C_PAR)),f.consume();continue;case oi.VAL_C_PAR:this.valStackReduce(")",o),f.consume();continue;case oi.VAL_BANG:if(f.consume(),o=f.token(),a=f.nthToken(1),o.type==Ou.IDENT&&"important"==o.text.toLowerCase()&&(a.type==Ou.SEMICOL||a.type==Ou.EOF||a.type==Ou.C_BRC)){f.consume(),this.propImportant=!0;continue}this.exprError("E_CSS_SYNTAX",o);continue;case oi.VAL_PLUS:switch((a=f.nthToken(1)).type){case Ou.NUM:case Ou.NUMERIC:case Ou.INT:if(!a.precededBySpace){f.consume();continue}}p.push(new Ke("+")),f.consume();continue;case oi.VAL_END:f.consume();case oi.VAL_BRC:(h=this.valStackReduce(";",o))&&this.propName&&d.property(this.propName,h,this.propImportant),this.actions=u?ci:hi;continue;case oi.VAL_FINISH:for(f.consume();p.length>0;){var C=p.length;if(!(h=this.valStackReduce(";",o))||p.length===C)break}return e?(this.result=h,!0):(this.propName&&h&&d.property(this.propName,h,this.propImportant),!0);case oi.EXPR_IDENT:if((a=f.nthToken(1)).type==Ou.CLASS)f.nthToken(2).type!=Ou.O_PAR||f.nthToken(2).precededBySpace?(p.push(new he(d.getScope(),It(o.text,a.text))),this.actions=Ai):(p.push(o.text,a.text,"("),f.consume()),f.consume();else{if(this.exprContext==wi.MEDIA||this.exprContext==wi.IMPORT)"not"==o.text.toLowerCase()?(f.consume(),p.push(new ce(d.getScope(),!0,a.text))):("only"==o.text.toLowerCase()&&(f.consume(),o=a),p.push(new ce(d.getScope(),!1,o.text)));else{if(this.exprContext===wi.SUPPORTS&&"not"===o.text.toLowerCase()&&p[p.length-1]!==yi&&p[p.length-1]!==Ni&&(a.type===Ou.O_PAR||a.type===Ou.FUNC)){p.push(-bi),f.consume();continue}p.push(new he(d.getScope(),o.text))}this.actions=Ai}f.consume();continue;case oi.EXPR_FUNC:if(this.exprContext===wi.SUPPORTS){p.push(this.readSupportsTest(o)),this.actions=Ai;continue}p.push(null,o.text,"("),f.consume();continue;case oi.EXPR_NUM:p.push(new Ee(d.getScope(),o.num)),f.consume(),this.actions=Ai;continue;case oi.EXPR_NUMERIC:"%"==(l=o.text)&&(l=this.propName&&this.propName.match(/height|^(top|bottom)$/)?"vh":"vw"),p.push(new De(d.getScope(),o.num,l)),f.consume(),this.actions=Ai;continue;case oi.EXPR_STR:p.push(new Ee(d.getScope(),o.text)),f.consume(),this.actions=Ai;continue;case oi.EXPR_PARAM:f.consume(),(o=f.token()).type!=Ou.INT||o.precededBySpace?this.exprError("E_CSS_SYNTAX",o):(p.push(new Ae(d.getScope(),o.num)),f.consume(),this.actions=Ai);continue;case oi.EXPR_PREFIX:p.push(-o.type),f.consume();continue;case oi.EXPR_INFIX:this.actions=Fi,this.exprStackReduce(o.type,o),p.push(o.type),f.consume();continue;case oi.EXPR_INFIX_NAME:"and"===o.text.toLowerCase()&&p[p.length-2]!==Ni&&p[p.length-2]!==-bi?(this.actions=Fi,this.exprStackReduce(yi,o),p.push(yi),f.consume()):"or"===o.text.toLowerCase()&&p[p.length-2]!==yi&&p[p.length-2]!==-bi?(this.actions=Fi,this.exprStackReduce(Ni,o),p.push(Ni),f.consume()):this.exprError("E_CSS_SYNTAX",o);continue;case oi.EXPR_C_PAR:this.exprStackReduce(o.type,o)&&(this.actions=Ci),f.consume();continue;case oi.EXPR_O_BRC:this.exprStackReduce(Ou.C_PAR,o)&&(this.propName||this.exprContext==wi.IMPORT?this.exprError("E_CSS_UNEXPECTED_BRC",o):(this.exprContext==wi.WHEN?d.startWhenRule(p.pop()):d.startMediaRule(p.pop()),this.ruleStack.push("media"),d.startRuleBody(),this.actions=hi)),f.consume();continue;case oi.EXPR_SEMICOL:if(this.exprStackReduce(Ou.C_PAR,o))return this.propName||this.exprContext!=wi.IMPORT?(this.exprError("E_CSS_UNEXPECTED_SEMICOL",o),this.actions=hi,f.consume(),!1):(this.importCondition=p.pop(),this.importReady=!0,this.actions=hi,f.consume(),!1);f.consume();continue;case oi.EXPR_O_PAR:if(this.exprContext===wi.SUPPORTS){var F=this.readSupportsTest(o);if(F){p.push(F),this.actions=Ai;continue}}p.push(o.type),f.consume();continue;case oi.RULE_END:if(this.actions=hi,f.consume(),d.endRule(),this.inStyleDeclaration=!1,this.ruleStack.length)switch(this.ruleStack.pop(),this.ruleStack[this.ruleStack.length-1]){case"page":case"-epubx-page-master":case"-epubx-partition-group":this.inStyleDeclaration=!0}continue;case oi.AT:switch(l=o.text.toLowerCase()){case"import":if(f.consume(),(o=f.token()).type==Ou.STR||o.type==Ou.URL){if(this.importURL=o.text,f.consume(),(o=f.token()).type==Ou.SEMICOL||o.type==Ou.EOF)return this.importReady=!0,f.consume(),!1;this.propName=null,this.exprContext=wi.IMPORT,this.actions=Fi,p.push("{");continue}d.error("E_CSS_IMPORT_SYNTAX",o),this.actions=gi;continue;case"namespace":switch(f.consume(),(o=f.token()).type){case Ou.IDENT:if(l=o.text,f.consume(),((o=f.token()).type==Ou.STR||o.type==Ou.URL)&&f.nthToken(1).type==Ou.SEMICOL){this.namespacePrefixToURI[l]=o.text,f.consume(),f.consume();continue}break;case Ou.STR:case Ou.URL:if(f.nthToken(1).type==Ou.SEMICOL){this.defaultNamespaceURI=o.text,f.consume(),f.consume();continue}}d.error("E_CSS_NAMESPACE_SYNTAX",o),this.actions=gi;continue;case"charset":if(f.consume(),(o=f.token()).type==Ou.STR&&f.nthToken(1).type==Ou.SEMICOL){"utf-8"!=(l=o.text.toLowerCase())&&"utf-16"!=l&&d.error("E_CSS_UNEXPECTED_CHARSET "+l,o),f.consume(),f.consume();continue}d.error("E_CSS_CHARSET_SYNTAX",o),this.actions=gi;continue;case"font-face":case"-epubx-page-template":case"-epubx-define":case"-epubx-viewport":if(f.nthToken(1).type==Ou.O_BRC){switch(f.consume(),f.consume(),l){case"font-face":d.startFontFaceRule(),this.inStyleDeclaration=!0;break;case"-epubx-page-template":d.startPageTemplateRule();break;case"-epubx-define":d.startDefineRule(),this.inStyleDeclaration=!0;break;case"-epubx-viewport":d.startViewportRule(),this.inStyleDeclaration=!0}this.ruleStack.push(l),d.startRuleBody();continue}break;case"-adapt-footnote-area":switch(f.consume(),(o=f.token()).type){case Ou.O_BRC:f.consume(),d.startFootnoteRule(null),this.ruleStack.push(l),d.startRuleBody(),this.inStyleDeclaration=!0;continue;case Ou.COL_COL:if(f.consume(),(o=f.token()).type==Ou.IDENT&&f.nthToken(1).type==Ou.O_BRC){l=o.text,f.consume(),f.consume(),d.startFootnoteRule(l),this.ruleStack.push("-adapt-footnote-area"),d.startRuleBody(),this.inStyleDeclaration=!0;continue}}break;case"-epubx-region":f.consume(),d.startRegionRule(),this.regionRule=!0,this.actions=Ei;continue;case"page":f.consume(),d.startPageRule(),this.pageRule=!0,this.actions=pi;continue;case"top-left-corner":case"top-left":case"top-center":case"top-right":case"top-right-corner":case"right-top":case"right-middle":case"right-bottom":case"bottom-right-corner":case"bottom-right":case"bottom-center":case"bottom-left":case"bottom-left-corner":case"left-bottom":case"left-middle":case"left-top":if(f.consume(),(o=f.token()).type==Ou.O_BRC){f.consume(),d.startPageMarginBoxRule(l),this.ruleStack.push(l),d.startRuleBody(),this.inStyleDeclaration=!0;continue}break;case"-epubx-when":f.consume(),this.propName=null,this.exprContext=wi.WHEN,this.actions=Fi,p.push("{");continue;case"media":f.consume(),this.propName=null,this.exprContext=wi.MEDIA,this.actions=Fi,p.push("{");continue;case"supports":f.consume(),this.propName=null,this.exprContext=wi.SUPPORTS,this.actions=Fi,p.push("{");continue;case"-epubx-flow":if(f.nthToken(1).type==Ou.IDENT&&f.nthToken(2).type==Ou.O_BRC){d.startFlowRule(f.nthToken(1).text),f.consume(),f.consume(),f.consume(),this.ruleStack.push(l),d.startRuleBody(),this.inStyleDeclaration=!0;continue}break;case"-epubx-page-master":case"-epubx-partition":case"-epubx-partition-group":f.consume();var A=null,g=null,v=[];for((o=f.token()).type==Ou.IDENT&&(A=o.text,f.consume(),o=f.token()),o.type==Ou.COLON&&f.nthToken(1).type==Ou.IDENT&&(g=f.nthToken(1).text,f.consume(),f.consume(),o=f.token());o.type==Ou.FUNC&&"class"==o.text.toLowerCase()&&f.nthToken(1).type==Ou.IDENT&&f.nthToken(2).type==Ou.C_PAR;)v.push(f.nthToken(1).text),f.consume(),f.consume(),f.consume(),o=f.token();if(o.type==Ou.O_BRC){switch(f.consume(),l){case"-epubx-page-master":d.startPageMasterRule(A,g,v);break;case"-epubx-partition":d.startPartitionRule(A,g,v);break;case"-epubx-partition-group":d.startPartitionGroupRule(A,g,v)}this.ruleStack.push(l),d.startRuleBody(),this.inStyleDeclaration=!0;continue}break;case"":d.error("E_CSS_UNEXPECTED_AT"+l,o),this.actions=mi;continue;default:d.error("E_CSS_AT_UNKNOWN "+l,o),this.actions=gi;continue}d.error("E_CSS_AT_SYNTAX "+l,o),this.actions=gi;continue;case oi.ERROR_PUSH:this.errorBrackets.push(o.type+1),f.consume();continue;case oi.ERROR_POP_DECL:if(0==this.errorBrackets.length){this.actions=hi;continue}case oi.ERROR_POP:if(i&&0==this.errorBrackets.length&&o.type==Ou.C_PAR)return f.consume(),d.endFuncWithSelector(),!0;this.errorBrackets.length>0&&this.errorBrackets[this.errorBrackets.length-1]==o.type&&this.errorBrackets.pop(),0==this.errorBrackets.length&&o.type==Ou.C_BRC&&(this.actions=hi),f.consume();continue;case oi.ERROR_SEMICOL:0==this.errorBrackets.length&&(this.actions=hi),f.consume();continue;case oi.DONE:return!0;default:if(n)return!!this.exprStackReduce(Ou.C_PAR,o)&&(this.result=p.pop(),!0);if(i){switch(o.type){case Ou.COMMA:case Ou.C_PAR:if(this.actions===Ei)d.error("E_CSS_SYNTAX",o);else{var m=f.input.substring(E,o.position);d.pushSelectorText(m),E=o.position+1}if(o.type===Ou.COMMA){d.nextSelector(),this.actions=Ei,f.consume();continue}return d.endFuncWithSelector(),f.consume(),!0;case Ou.GT:case Ou.PLUS:case Ou.TILDE:if(r){this.actions=di;continue}break;case Ou.O_BRC:case Ou.O_BRK:case Ou.O_PAR:this.errorBrackets.push(o.type+1)}d.error("E_CSS_SYNTAX",o),f.consume(),this.actions=mi;continue}if(this.actions!==gi&&this.actions!==mi&&this.actions!==vi){if(o.type==Ou.INVALID)d.error("E_CSS_SYNTAX",o);else{if(this.actions===Ci){switch(o.type){case Ou.O_PAR:case Ou.O_BRC:case Ou.O_BRK:this.errorBrackets.push(o.type+1)}p.push(new Ke(o.toString())),f.consume();continue}if(o.type===Ou.O_BRC&&this.actions==Fi&&p.length>0){d.startMediaRule(p.pop()),this.ruleStack.push("media"),d.startRuleBody(),this.actions=hi,f.consume();continue}if(o.type===Ou.SEMICOL&&this.actions==Fi)return this.actions=hi,f.consume(),!1;d.error("E_CSS_SYNTAX",o)}this.actions=this.isInsidePropertyOnlyRule()?vi:mi;continue}f.consume();continue}return!1},t}(),xi=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this,null)||this).scope=void 0,u.scope=e,u}N(e,t);var u=e.prototype;return u.error=function(t,e){D.warn(t,e.toString())},u.getScope=function(){return this.scope},e}(ai);function Ti(t,e,u,n,i){return In("parseStylesheetFromText",function(r){(function(t,e,u,n,i){var r=xn("parseStylesheet"),o=new Si(hi,t,e,u),a=null;return i&&(a=function(t,e,u){var n=new Si(Fi,t,e,u);return n.runParser(Number.POSITIVE_INFINITY,!1,!1,!0,!1),n.result}(new yn(i,e),e,u)),(a=o.makeCondition(n,a&&a.toExpr()))&&(e.startMediaRule(a),e.startRuleBody()),r.loop(function(){for(var t=function(){if(o.importReady){var t=W(o.importURL,u);o.importCondition&&(e.startMediaRule(o.importCondition),e.startRuleBody());var n=xn("parseStylesheet.import");return Ii(t,e,null,null).then(function(){o.importCondition&&e.endRule(),o.importReady=!1,o.importURL=null,o.importCondition=null,n.finish(!0)}),{v:n.result()}}var i=r.timeSlice();if(i.isPending)return{v:i}};!o.runParser(100,!1,!1,!1,!1);){var n=t();if("object"==typeof n)return n.v}return Tn(!1)}).then(function(){a&&e.endRule(),r.finish(!0)}),r.result()})(new yn(t,e),e,u,n,i).thenFinish(r)},function(e,u){D.warn(u,"Failed to parse stylesheet text: "+t),e.finish(!1)})}function Ii(t,e,u,n){return In("parseStylesheetFromURL",function(i){Qn(t).then(function(r){r.responseText?Ti(r.responseText,e,t,u,n).then(function(e){e||D.warn("Failed to parse stylesheet from "+t),i.finish(!0)}):i.finish(!0)})},function(e,u){D.warn(u,"Exception while fetching and parsing:",t),e.finish(!0)})}function Pi(t,e,u){var n=new Si(Ci,e,new xi(t),u);return n.runParser(Number.POSITIVE_INFINITY,!0,!1,!1,!1),n.result}var Ri={"z-index":!0,"column-count":!0,"flow-linger":!0,opacity:!0,page:!0,"flow-priority":!0,utilization:!0};function ki(t,e,u){return t-=u,0===e?0===t:t%e==0&&t/e>=0}var Li=/*#__PURE__*/function(){function t(t){this.matchers=void 0,this.matchers=t}return t.prototype.matches=function(){return this.matchers.some(function(t){return t.matches()})},t}(),Oi=/*#__PURE__*/function(){function t(t){this.matchers=void 0,this.matchers=t}return t.prototype.matches=function(){return this.matchers.every(function(t){return t.matches()})},t}(),_i=/*#__PURE__*/function(){function t(t,e,u){this.elementOffset=void 0,this.a=void 0,this.b=void 0,this.elementOffset=t,this.a=e,this.b=u}return t.registerFragmentIndex=function(e,u,n){var i=t.fragmentIndices;(!i[e]||i[e].priority<=n)&&(i[e]={fragmentIndex:u,priority:n})},t.clearFragmentIndices=function(){t.fragmentIndices={}},t.prototype.matches=function(){var e=t.fragmentIndices[this.elementOffset];return null!=e&&null!=e.fragmentIndex&&ki(e.fragmentIndex,this.a,this.b)},t}();_i.fragmentIndices={};var Mi=/*#__PURE__*/function(){function t(){}return t.buildViewConditionMatcher=function(t,e){var u=e.split("_");return"NFS"==u[0]?new _i(t,parseInt(u[1],10),parseInt(u[2],10)):null},t.buildAllMatcher=function(t){return new Oi(t)},t.buildAnyMatcher=function(t){return new Li(t)},t}();function Ui(t){var e,u;return"clone"===(null==t||null==(e=t.style)?void 0:e["box-decoration-break"])||"clone"===(null==t||null==(u=t.style)?void 0:u["-webkit-box-decoration-break"])}function Vi(t){var e=t.getAttribute("data-viv-box-break");return e?e.split(" "):[]}function Hi(t,e){t.setAttribute("data-viv-box-break",e.join(" "))}function zi(t,e){var u=Vi(t);u.includes(e)||(u.push(e),Hi(t,u))}function Gi(t,e){var u=function(t){var e=t.getAttribute("data-viv-margin-discard");return e?e.split(" "):[]}(t);u.includes(e)||(u.push(e),function(t,e){t.setAttribute("data-viv-margin-discard",e.join(" "))}(t,u))}var Wi={page:!0,left:!0,right:!0,recto:!0,verso:!0,column:!0,region:!0};function Xi(t){return!!Wi[t]}var ji={left:!0,right:!0,recto:!0,verso:!0};function Ki(t){return!!ji[t]}var Yi,qi,$i,Qi,Zi,Ji,tr={avoid:!0,"avoid-page":!0,"avoid-column":!0,"avoid-region":!0};function er(t){return!!tr[t]}function ur(t,e){if(!t)return e;if(!e)return t;if(Ki(e))return e;if(Ki(t))return t;var u=Xi(t),n=Xi(e);if(!u||!n)return n?e:u?t:er(e)?e:er(t)?t:e;switch(e){case"column":return t;case"region":return"column"===t?e:t;default:return e}}function nr(t){return Xi(t)?t:"auto"}function ir(t){return t.reduce(function(t,e){return e[0]===i.default.DELETE?t:t+e[1]},"")}function rr(t,e,u){var n=0,r=0;return t.some(function(t){for(var o=0;o<t[1].length;o++){switch(t[0]*u){case i.default.INSERT:n++;break;case i.default.DELETE:n--,r++;break;case i.default.EQUAL:r++}if(r>e)return!0}return!1}),Math.max(Math.min(e,r-1)+n,0)}c("SIMPLE_PROPERTY",function(t){var e=t.name,u=t.value;switch(e){case"page-break-before":case"page-break-after":case"page-break-inside":return{name:e.replace(/^page-/,""),value:u===$e.always?$e.page:u,important:t.important};default:return t}}),function(t){t.isInstanceOfBlockFormattingContext=function(t){return t&&"Block"===t.formattingContextType}}(Yi||(Yi={})),function(t){!function(t){t.INLINE="inline",t.COLUMN="column",t.REGION="region",t.PAGE="page"}(t.FloatReference||(t.FloatReference={}))}(qi||(qi={})),function(t){t.isInstanceOfAfterIfContinuesLayoutConstraint=function(t){return t&&"AfterIfContinue"==t.flagmentLayoutConstraintType}}($i||($i={})),function(t){t.isInstanceOfRepetitiveElementsOwnerFormattingContext=function(t){return!!t&&("RepetitiveElementsOwner"===t.formattingContextType||Zi.isInstanceOfTableFormattingContext(t))},t.isInstanceOfRepetitiveElementsOwnerLayoutConstraint=function(t){return!!t&&("RepetitiveElementsOwner"===t.flagmentLayoutConstraintType||Zi.isInstanceOfTableRowLayoutConstraint(t))}}(Qi||(Qi={})),function(t){t.isInstanceOfTableFormattingContext=function(t){return t&&"Table"===t.formattingContextType},t.isInstanceOfTableRowLayoutConstraint=function(t){return t&&"TableRow"===t.flagmentLayoutConstraintType}}(Zi||(Zi={})),function(t){!function(t){t[t.IGNORE=0]="IGNORE",t[t.NEWLINE=1]="NEWLINE",t[t.PRESERVE=2]="PRESERVE"}(t.Whitespace||(t.Whitespace={})),function(t){t[t.NONE=0]="NONE",t[t.CONTENT=1]="CONTENT",t[t.ROOTLESS=2]="ROOTLESS",t[t.ROOTED=3]="ROOTED"}(t.ShadowType||(t.ShadowType={}))}(Ji||(Ji={}));var or={transform:!0,"transform-origin":!0},ar={top:!0,bottom:!0,left:!0,right:!0},sr=function(t,e,u){this.target=void 0,this.name=void 0,this.value=void 0,this.target=t,this.name=e,this.value=u},lr={show:function(t){t.style.visibility="visible"},hide:function(t){t.style.visibility="hidden"},play:function(t){t.currentTime=0,t.play()},pause:function(t){t.pause()},resume:function(t){t.play()},mute:function(t){t.muted=!0},unmute:function(t){t.muted=!1}};function Dr(t,e){var u=lr[e];return u?function(){for(var e=0;e<t.length;e++)try{u(t[e])}catch(t){}}:null}var hr=/*#__PURE__*/function(t){function e(e,u){var n;return(n=t.call(this)||this).container=void 0,n.bleedBox=void 0,n.pageAreaElement=null,n.delayedItems=[],n.hrefHandler=void 0,n.elementsById={},n.dimensions={width:0,height:0},n.isFirstPage=!1,n.isLastPage=!1,n.isBlankPage=!1,n.isAutoPageWidth=!0,n.isAutoPageHeight=!0,n.spineIndex=0,n.position=null,n.offset=-1,n.side=null,n.fetchers=[],n.marginBoxes={top:{},bottom:{},left:{},right:{}},n.pageType=null,n.container=e,n.bleedBox=u,n.hrefHandler=function(t){var e=t.currentTarget,u=e.getAttribute("href")||e.getAttributeNS(H.XLINK,"href");u&&n.dispatchEvent({type:"hyperlink",target:null,currentTarget:null,anchorElement:e,href:u,preventDefault:function(){t.preventDefault()}})},n}N(e,t);var u=e.prototype;return u.setAutoPageWidth=function(t){this.isAutoPageWidth=t,t?this.container.setAttribute(e.AUTO_PAGE_WIDTH_ATTRIBUTE,"true"):this.container.removeAttribute(e.AUTO_PAGE_WIDTH_ATTRIBUTE)},u.setAutoPageHeight=function(t){this.isAutoPageHeight=t,t?this.container.setAttribute(e.AUTO_PAGE_HEIGHT_ATTRIBUTE,"true"):this.container.removeAttribute(e.AUTO_PAGE_HEIGHT_ATTRIBUTE)},u.registerElementWithId=function(t,e){var u=this.elementsById[e];u?u.push(t):this.elementsById[e]=[t]},u.finish=function(t,e){var u=this;Object.keys(this.elementsById).forEach(function(t){for(var e=u.elementsById[t],n=0;n<e.length;)u.container.contains(e[n])?n++:e.splice(n,1);0===e.length&&delete u.elementsById[t]});for(var n=this.delayedItems,i=0;i<n.length;i++){var r=n[i];(r.target!==this.container||"transform"!==r.name||this.isAutoPageWidth||this.isAutoPageHeight)&&Z(r.target,r.name,r.value.toString())}var o=e.getElementClientRect(this.container);this.dimensions.width=o.width,this.dimensions.height=o.height;for(var a=0;a<t.length;a++){var s=t[a],l=this.elementsById[s.ref],D=this.elementsById[s.observer];if(l&&D){var h=Dr(l,s.action);if(h)for(var c=0;c<D.length;c++)D[c].addEventListener(s.event,h,!1)}}},e}(dt);hr.AUTO_PAGE_WIDTH_ATTRIBUTE="data-vivliostyle-auto-page-width",hr.AUTO_PAGE_HEIGHT_ATTRIBUTE="data-vivliostyle-auto-page-height";var cr="data-adapt-spec",dr=Ji.Whitespace;function fr(t){switch(t){case"normal":case"nowrap":return dr.IGNORE;case"pre-line":return dr.NEWLINE;case"pre":case"pre-wrap":case"break-spaces":return dr.PRESERVE;default:return null}}function pr(t,e){if(!t)return!0;if(1==t.nodeType)return!1;var u=t.textContent;switch(e){case dr.PRESERVE:return 0==u.length;case dr.NEWLINE:return!!u.match(/^[ \t]*$/);default:return!!u.match(/^[ \t\r\n\f]*$/)}}var Er=function(t,e){this.flowName=void 0,this.parentFlowName=void 0,this.forcedBreakOffsets=[],this.formattingContext=null,this.flowName=t,this.parentFlowName=e},Cr=/*#__PURE__*/function(){function t(t,e,u,n,i,r,o,a,s){this.flowName=void 0,this.element=void 0,this.startOffset=void 0,this.priority=void 0,this.linger=void 0,this.exclusive=void 0,this.repeated=void 0,this.last=void 0,this.breakBefore=void 0,this.startPage=-1,this.flowName=t,this.element=e,this.startOffset=u,this.priority=n,this.linger=i,this.exclusive=r,this.repeated=o,this.last=a,this.breakBefore=s}return t.prototype.isBetter=function(t){return!!this.exclusive&&(!t.exclusive||this.priority>t.priority||this.last)},t}();function Fr(t,e){return t.top-e.top}function Ar(t,e){return e.right-t.right}function gr(t,e){var u,n;return t===e||!(!t||!e)&&(t.node===e.node||!!t.shadowContext&&!!e.shadowContext&&t.shadowType===Ji.ShadowType.ROOTLESS&&e.shadowType===Ji.ShadowType.ROOTLESS&&(null==(u=t.node)?void 0:u.outerHTML)===(null==(n=e.node)?void 0:n.outerHTML))&&t.shadowType===e.shadowType&&Nr(t.shadowContext,e.shadowContext)&&Nr(t.nodeShadow,e.nodeShadow)&&gr(t.shadowSibling,e.shadowSibling)}function vr(t,e){if(t===e)return!0;if(!t||!e)return!1;if(t.offsetInNode!==e.offsetInNode||t.after!==e.after||t.steps.length!==e.steps.length)return!1;for(var u=0;u<t.steps.length;u++)if(!gr(t.steps[u],e.steps[u]))return!1;return!0}function mr(t,e){return{steps:[{node:t.sourceNode,shadowType:wr.NONE,shadowContext:t.shadowContext,nodeShadow:null,shadowSibling:null,formattingContext:null,fragmentIndex:null!=e?e:t.fragmentIndex}],offsetInNode:0,after:!1,preprocessedTextContent:t.preprocessedTextContent}}function Br(t,e){var u=new Sr(t.node,e,0);return u.shadowType=t.shadowType,u.shadowContext=t.shadowContext,u.nodeShadow=t.nodeShadow,u.shadowSibling=t.shadowSibling?Br(t.shadowSibling,e.copy()):null,u.formattingContext=t.formattingContext,u.fragmentIndex=t.fragmentIndex+1,u}var wr=Ji.ShadowType,yr=/*#__PURE__*/function(){function t(t,e,u,n,i,r,o){this.owner=void 0,this.root=void 0,this.xmldoc=void 0,this.parentShadow=void 0,this.type=void 0,this.styler=void 0,this.subShadow=null,this.owner=t,this.root=e,this.xmldoc=u,this.parentShadow=n,this.type=r,this.styler=o,i&&(i.subShadow=this)}return t.prototype.equals=function(t){return!!t&&this.owner===t.owner&&this.xmldoc===t.xmldoc&&this.type===t.type&&Nr(this.parentShadow,t.parentShadow)},t}();function Nr(t,e){return t===e||!!t&&!!e&&t.equals(e)}var br=function(t,e){this.outer=void 0,this.count=void 0,this.outer=t,this.count=e},Sr=/*#__PURE__*/function(){function t(t,e,u){this.sourceNode=void 0,this.parent=void 0,this.boxOffset=void 0,this.offsetInNode=0,this.after=!1,this.shadowType=void 0,this.shadowContext=void 0,this.nodeShadow=null,this.shadowSibling=null,this.shared=!1,this.inline=!0,this.overflow=!1,this.breakPenalty=void 0,this.display=null,this.floatReference=void 0,this.floatSide=null,this.clearSide=null,this.floatMinWrapBlock=null,this.columnSpan=null,this.verticalAlign="baseline",this.captionSide="top",this.inlineBorderSpacing=0,this.blockBorderSpacing=0,this.flexContainer=!1,this.whitespace=void 0,this.hyphenateCharacter=void 0,this.breakWord=void 0,this.establishesBFC=!1,this.containingBlockForAbsolute=!1,this.breakBefore=null,this.breakAfter=null,this.viewNode=null,this.clearSpacer=null,this.inheritedProps=void 0,this.vertical=void 0,this.direction=void 0,this.firstPseudo=void 0,this.lang=null,this.preprocessedTextContent=null,this.formattingContext=void 0,this.repeatOnBreak=null,this.pluginProps={},this.fragmentIndex=1,this.afterIfContinues=null,this.footnotePolicy=null,this.pageType=void 0,this.sourceNode=t,this.parent=e,this.boxOffset=u,this.shadowType=wr.NONE,this.shadowContext=e?e.shadowContext:null,this.breakPenalty=e?e.breakPenalty:0,this.floatReference=qi.FloatReference.INLINE,this.whitespace=e?e.whitespace:dr.IGNORE,this.hyphenateCharacter=e?e.hyphenateCharacter:null,this.breakWord=!!e&&e.breakWord,this.inheritedProps=e?e.inheritedProps:{},this.vertical=!!e&&e.vertical,this.direction=e?e.direction:"ltr",this.firstPseudo=e?e.firstPseudo:null,this.formattingContext=e?e.formattingContext:null,this.pageType=e?e.pageType:null}var e=t.prototype;return e.resetView=function(){this.inline=!0,this.breakPenalty=this.parent?this.parent.breakPenalty:0,this.viewNode=null,this.clearSpacer=null,this.offsetInNode=0,this.after=!1,this.display=null,this.floatReference=qi.FloatReference.INLINE,this.floatSide=null,this.clearSide=null,this.floatMinWrapBlock=null,this.columnSpan=null,this.verticalAlign="baseline",this.flexContainer=!1,this.whitespace=this.parent?this.parent.whitespace:dr.IGNORE,this.hyphenateCharacter=this.parent?this.parent.hyphenateCharacter:null,this.breakWord=!!this.parent&&this.parent.breakWord,this.breakBefore=null,this.breakAfter=null,this.nodeShadow=null,this.establishesBFC=!1,this.containingBlockForAbsolute=!1,this.vertical=!!this.parent&&this.parent.vertical,this.nodeShadow=null,this.preprocessedTextContent=null,this.formattingContext=this.parent?this.parent.formattingContext:null,this.repeatOnBreak=null,this.pluginProps={},this.fragmentIndex=1,this.afterIfContinues=null,this.footnotePolicy=null},e.cloneItem=function(){var e=new t(this.sourceNode,this.parent,this.boxOffset);return e.offsetInNode=this.offsetInNode,e.after=this.after,e.nodeShadow=this.nodeShadow,e.shadowType=this.shadowType,e.shadowContext=this.shadowContext,e.shadowSibling=this.shadowSibling,e.inline=this.inline,e.breakPenalty=this.breakPenalty,e.display=this.display,e.floatReference=this.floatReference,e.floatSide=this.floatSide,e.clearSide=this.clearSide,e.floatMinWrapBlock=this.floatMinWrapBlock,e.columnSpan=this.columnSpan,e.verticalAlign=this.verticalAlign,e.captionSide=this.captionSide,e.inlineBorderSpacing=this.inlineBorderSpacing,e.blockBorderSpacing=this.blockBorderSpacing,e.establishesBFC=this.establishesBFC,e.containingBlockForAbsolute=this.containingBlockForAbsolute,e.flexContainer=this.flexContainer,e.whitespace=this.whitespace,e.hyphenateCharacter=this.hyphenateCharacter,e.breakWord=this.breakWord,e.breakBefore=this.breakBefore,e.breakAfter=this.breakAfter,e.viewNode=this.viewNode,e.clearSpacer=this.clearSpacer,e.firstPseudo=this.firstPseudo,e.vertical=this.vertical,e.overflow=this.overflow,e.preprocessedTextContent=this.preprocessedTextContent,e.formattingContext=this.formattingContext,e.repeatOnBreak=this.repeatOnBreak,e.pluginProps=Object.create(this.pluginProps),e.fragmentIndex=this.fragmentIndex,e.afterIfContinues=this.afterIfContinues,e.footnotePolicy=this.footnotePolicy,e},e.modify=function(){return this.shared?this.cloneItem():this},e.copy=function(){var t=this;do{if(t.shared)break;t.shared=!0,t=t.parent}while(t);return this},e.clone=function(){for(var t,e=this.cloneItem(),u=e;null!=(t=u.parent);)t=t.cloneItem(),u.parent=t,u=t;return e},e.toNodePositionStep=function(){return{node:this.sourceNode,shadowType:this.shadowType,shadowContext:this.shadowContext,nodeShadow:this.nodeShadow,shadowSibling:this.shadowSibling?this.shadowSibling.toNodePositionStep():null,formattingContext:this.formattingContext,fragmentIndex:this.fragmentIndex}},e.toNodePosition=function(){var t,e,u,n=this,i=[];n.shadowType!==Ji.ShadowType.ROOTLESS||n.floatReference===qi.FloatReference.INLINE&&"footnote"!==n.floatSide||null==(t=n.shadowContext)||null==(e=t.styler)||null==(u=e.style)||!u._pseudos||(n=n.parent);do{n.firstPseudo&&n.parent&&n.parent.firstPseudo!==n.firstPseudo||i.push(n.toNodePositionStep()),n=n.parent}while(n);return{steps:i,offsetInNode:this.preprocessedTextContent?rr(this.preprocessedTextContent,this.offsetInNode,-1):this.offsetInNode,after:this.after,preprocessedTextContent:this.preprocessedTextContent}},e.isInsideBFC=function(){for(var t=this.parent;t;){if(t.establishesBFC)return!0;t=t.parent}return!1},e.getContainingBlockForAbsolute=function(){for(var t=this.parent;t;){if(t.containingBlockForAbsolute)return t;t=t.parent}return null},e.belongsTo=function(t){return this.formattingContext===t&&!!this.parent&&this.parent.formattingContext===t},t}(),xr=/*#__PURE__*/function(){function t(t){this.primary=void 0,this.floats=null,this.primary=t}var e=t.prototype;return e.clone=function(){var e=new t(this.primary);if(this.floats){e.floats=[];for(var u=0;u<this.floats.length;++u)e.floats[u]=this.floats[u]}return e},e.isSamePosition=function(t){if(!t)return!1;if(this===t)return!0;if(!vr(this.primary,t.primary))return!1;if(this.floats){if(!t.floats||this.floats.length!==t.floats.length)return!1;for(var e=0;e<this.floats.length;e++)if(!vr(this.floats[e],t.floats[e]))return!1}else if(t.floats)return!1;return!0},t}(),Tr=/*#__PURE__*/function(){function t(t,e){this.chunkPosition=void 0,this.flowChunk=void 0,this.chunkPosition=t,this.flowChunk=e}var e=t.prototype;return e.clone=function(){return new t(this.chunkPosition.clone(),this.flowChunk)},e.isSamePosition=function(t){return!!t&&(this===t||this.chunkPosition.isSamePosition(t.chunkPosition))},t}(),Ir=/*#__PURE__*/function(){function t(){this.positions=[],this.startBreakType=null,this.breakAfter=null}var e=t.prototype;return e.clone=function(){for(var e=new t,u=this.positions,n=e.positions,i=0;i<u.length;i++)n[i]=u[i].clone();return e.startBreakType=this.startBreakType,e.breakAfter=this.breakAfter,e},e.isSamePosition=function(t){if(this===t)return!0;if(!t||this.positions.length!==t.positions.length)return!1;for(var e=0;e<this.positions.length;e++)if(!this.positions[e].isSamePosition(t.positions[e]))return!1;return!0},e.hasContent=function(t){return this.positions.length>0&&this.positions[0].flowChunk.startOffset<=t},t}(),Pr=/*#__PURE__*/function(){function t(){this.page=0,this.flows={},this.flowPositions={},this.isBlankPage=!1,this.highestSeenOffset=0,this.highestSeenNode=void 0,this.lookupPositionOffset=void 0}var e=t.prototype;return e.clone=function(){var e=new t;for(var u in e.page=this.page,e.isBlankPage=this.isBlankPage,e.highestSeenNode=this.highestSeenNode,e.highestSeenOffset=this.highestSeenOffset,e.lookupPositionOffset=this.lookupPositionOffset,e.flows=this.flows,this.flowPositions)e.flowPositions[u]=this.flowPositions[u].clone();return e},e.isSamePosition=function(t){if(this===t)return!0;if(!t||this.page!==t.page)return!1;var e=Object.keys(this.flowPositions),u=Object.keys(t.flowPositions);if(e.length!==u.length)return!1;for(var n=0,i=e;n<i.length;n++){var r=i[n];if(!this.flowPositions[r].isSamePosition(t.flowPositions[r]))return!1}return!0},e.hasContent=function(t,e){var u=this.flowPositions[t];return!!u&&u.hasContent(e)},e.startSideOfFlow=function(t){var e,u=null==(e=this.flowPositions[t])?void 0:e.startBreakType;return u&&Ki(u)?u:"any"},e.firstFlowChunkOfFlow=function(t){var e=this.flowPositions[t];if(!e)return null;var u=e.positions[0];return u?u.flowChunk:null},t}(),Rr=/*#__PURE__*/function(){function t(t){this.element=void 0,this.left=0,this.top=0,this.marginLeft=0,this.marginRight=0,this.marginTop=0,this.marginBottom=0,this.borderLeft=0,this.borderRight=0,this.borderTop=0,this.borderBottom=0,this.paddingLeft=0,this.paddingRight=0,this.paddingTop=0,this.paddingBottom=0,this.width=0,this.height=0,this.originX=0,this.originY=0,this.exclusions=null,this.innerShape=null,this.computedBlockSize=0,this.snapWidth=0,this.snapHeight=0,this.snapOffsetX=0,this.snapOffsetY=0,this.vertical=!1,this.rtl=!1,this.element=t}var e=t.prototype;return e.getInsetTop=function(){return this.marginTop+this.borderTop+this.paddingTop},e.getInsetBottom=function(){return this.marginBottom+this.borderBottom+this.paddingBottom},e.getInsetLeft=function(){return this.marginLeft+this.borderLeft+this.paddingLeft},e.getInsetRight=function(){return this.marginRight+this.borderRight+this.paddingRight},e.getInsetBefore=function(){return this.vertical?this.getInsetRight():this.getInsetTop()},e.getInsetAfter=function(){return this.vertical?this.getInsetLeft():this.getInsetBottom()},e.getInsetStart=function(){return this.vertical?this.getInsetTop():this.getInsetLeft()},e.getInsetEnd=function(){return this.vertical?this.getInsetBottom():this.getInsetRight()},e.getBeforeEdge=function(t){return this.vertical?t.right:t.top},e.getAfterEdge=function(t){return this.vertical?t.left:t.bottom},e.getStartEdge=function(t){return this.vertical?this.rtl?t.bottom:t.top:this.rtl?t.right:t.left},e.getEndEdge=function(t){return this.vertical?this.rtl?t.top:t.bottom:this.rtl?t.left:t.right},e.getInlineSize=function(t){return this.vertical?t.bottom-t.top:t.right-t.left},e.getBoxSize=function(t){return this.vertical?t.right-t.left:t.bottom-t.top},e.getBoxDir=function(){return this.vertical?-1:1},e.getInlineDir=function(){return this.rtl?-1:1},e.copyFrom=function(t){this.element=t.element,this.left=t.left,this.top=t.top,this.marginLeft=t.marginLeft,this.marginRight=t.marginRight,this.marginTop=t.marginTop,this.marginBottom=t.marginBottom,this.borderLeft=t.borderLeft,this.borderRight=t.borderRight,this.borderTop=t.borderTop,this.borderBottom=t.borderBottom,this.paddingLeft=t.paddingLeft,this.paddingRight=t.paddingRight,this.paddingTop=t.paddingTop,this.paddingBottom=t.paddingBottom,this.width=t.width,this.height=t.height,this.originX=t.originX,this.originY=t.originY,this.innerShape=t.innerShape,this.exclusions=t.exclusions,this.computedBlockSize=t.computedBlockSize,this.snapWidth=t.snapWidth,this.snapHeight=t.snapHeight,this.vertical=t.vertical,this.rtl=t.rtl},e.setVerticalPosition=function(t,e){this.top=t,this.height=e,Z(this.element,"top",t+"px"),Z(this.element,"height",e+"px")},e.setHorizontalPosition=function(t,e){this.left=t,this.width=e,Z(this.element,"left",t+"px"),Z(this.element,"width",e+"px")},e.setBlockPosition=function(t,e){this.vertical?this.setHorizontalPosition(t+(e+this.marginLeft+this.marginRight+this.paddingLeft+this.paddingRight+this.borderLeft+this.borderRight)*this.getBoxDir(),e):this.setVerticalPosition(t,e)},e.setInlinePosition=function(t,e){this.vertical?this.setVerticalPosition(this.rtl?t+(e+this.marginTop+this.marginBottom+this.paddingTop+this.paddingBottom+this.borderTop+this.borderBottom)*this.getInlineDir():t,e):this.setHorizontalPosition(this.rtl?t+(e+this.marginLeft+this.marginRight+this.paddingLeft+this.paddingRight+this.borderLeft+this.borderRight)*this.getInlineDir():t,e)},e.clear=function(){for(var t,e=this.element;t=e.lastChild;)e.removeChild(t)},e.getInnerShape=function(){var t=this.getInnerRect();return this.innerShape?this.innerShape.withOffset(t.x1,t.y1):fu(t.x1,t.y1,t.x2,t.y2)},e.getInnerRect=function(){var t=this.originX+this.left+this.getInsetLeft(),e=this.originY+this.top+this.getInsetTop();return new ou(t,e,t+this.width,e+this.height)},e.getPaddingRect=function(){var t=this.originX+this.left+this.marginLeft+this.borderLeft,e=this.originY+this.top+this.marginTop+this.borderTop;return new ou(t,e,t+(this.paddingLeft+this.width+this.paddingRight),e+(this.paddingTop+this.height+this.paddingBottom))},e.getOuterShape=function(t,e){var u=this.getOuterRect();return Iu(t,u.x1,u.y1,u.x2-u.x1,u.y2-u.y1,e)},e.getOuterRect=function(){var t=this.originX+this.left,e=this.originY+this.top,u=this.getInsetLeft()+this.width+this.getInsetRight(),n=this.getInsetTop()+this.height+this.getInsetBottom();return new ou(t,e,t+u,e+n)},t}(),kr=/*#__PURE__*/function(t){function e(e,u,n,i){var r;return(r=t.call(this)||this).elem=void 0,r.context=void 0,r.rootContentValue=void 0,r.exprContentListener=void 0,r.elem=e,r.context=u,r.rootContentValue=n,r.exprContentListener=i,r}N(e,t);var u=e.prototype;return u.visitStrInner=function(t,e){if(!e){var u;if(3===(null==(u=this.elem.lastChild)?void 0:u.nodeType))return void(this.elem.lastChild.textContent+=t);e=this.elem.ownerDocument.createTextNode(t)}this.elem.appendChild(e)},u.visitStr=function(t){return this.visitStrInner(t.str),null},u.visitURL=function(t){if(this.rootContentValue.url)this.elem.setAttribute("src",t.url);else{var e=this.elem.ownerDocument.createElementNS(H.XHTML,"img");e.setAttribute("src",t.url),this.elem.appendChild(e)}return null},u.visitSpaceList=function(t){return this.visitValues(t.values),null},u.visitExpr=function(t){var e=t.toExpr(),u=e.evaluate(this.context);if("string"==typeof u){e instanceof he&&(u=Pi(e.scope,new yn(u,null),"").stringValue());var n=this.exprContentListener(e,u,this.elem.ownerDocument);!n&&u&&e instanceof de&&e.str.startsWith("running-element-")&&(u=""),this.visitStrInner(u,n)}return null},e}(ye);function Lr(t){return null!=t&&t!==xe&&t!==$e.normal&&t!==$e.none&&!nu(t)}var Or={"border-collapse":!0,"border-spacing":!0,"caption-side":!0,"clip-rule":!0,color:!0,"color-interpolation":!0,"color-rendering":!0,cursor:!0,direction:!0,"empty-cells":!0,fill:!0,"fill-opacity":!0,"fill-rule":!0,"font-kerning":!0,"font-size":!0,"font-size-adjust":!0,"font-family":!0,"font-feature-settings":!0,"font-style":!0,"font-stretch":!0,"font-variant-ligatures":!0,"font-variant-caps":!0,"font-variant-numeric":!0,"font-variant-east-asian":!0,"font-weight":!0,"glyph-orientation-vertical":!0,"hanging-punctuation":!0,hyphens:!0,"hyphenate-character":!0,"hyphenate-limit-chars":!0,"hyphenate-limit-last":!0,"image-rendering":!0,"image-resolution":!0,"letter-spacing":!0,"line-break":!0,"line-height":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,marker:!0,"marker-end":!0,"marker-mid":!0,"marker-start":!0,orphans:!0,"overflow-wrap":!0,"paint-order":!0,"pointer-events":!0,quotes:!0,"ruby-align":!0,"ruby-position":!0,"shape-rendering":!0,stroke:!0,"stroke-dasharray":!0,"stroke-dashoffset":!0,"stroke-linecap":!0,"stroke-linejoin":!0,"stroke-miterlimit":!0,"stroke-opacity":!0,"stroke-width":!0,"tab-size":!0,"text-align":!0,"text-align-last":!0,"text-anchor":!0,"text-autospace":!0,"text-decoration-skip":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-fill-color":!0,"text-combine-upright":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-rendering":!0,"text-size-adjust":!0,"text-spacing-trim":!0,"text-stroke-color":!0,"text-stroke-width":!0,"text-transform":!0,"text-underline-position":!0,visibility:!0,"white-space":!0,widows:!0,"word-break":!0,"word-spacing":!0,"writing-mode":!0},_r=["image-resolution","orphans","widows"];function Mr(){return f(exports.HOOKS.POLYFILLED_INHERITED_PROPS).reduce(function(t,e){return t.concat(e())},[].concat(_r))}var Ur={"http://www.idpf.org/2007/ops":!0,"http://www.w3.org/1999/xhtml":!0,"http://www.w3.org/2000/svg":!0},Vr=["margin-%","padding-%","border-%-width","border-%-style","border-%-color","%"],Hr=["max-%","min-%","%"],zr=function(){for(var t=["left","right","top","bottom"],e={width:!0,height:!0,"max-width":!0,"max-height":!0,"min-width":!0,"min-height":!0},u=0;u<Vr.length;u++)for(var n=0;n<t.length;n++)e[Vr[u].replace("%",t[n])]=!0;return e}();function Gr(t,e){for(var u,n={},i=R(Vr);!(u=i()).done;){var r=u.value;for(var o in t){var a=r.replace("%",o),s=r.replace("%",t[o]);n[a]=s,n[s]=a}}for(var l,D=R(Hr);!(l=D()).done;){var h=l.value;for(var c in e){var d=h.replace("%",c),f=h.replace("%",e[c]);n[d]=f,n[f]=d}}return n}var Wr=Gr({"block-start":"right","block-end":"left","inline-start":"top","inline-end":"bottom"},{"block-size":"width","inline-size":"height"}),Xr=Gr({"block-start":"top","block-end":"bottom","inline-start":"left","inline-end":"right"},{"block-size":"height","inline-size":"width"}),jr=Gr({"block-start":"right","block-end":"left","inline-start":"bottom","inline-end":"top"},{"block-size":"width","inline-size":"height"}),Kr=Gr({"block-start":"top","block-end":"bottom","inline-start":"right","inline-end":"left"},{"block-size":"height","inline-size":"width"}),Yr=/*#__PURE__*/function(){function t(t,e){this.value=void 0,this.priority=void 0,this.value=t,this.priority=e}var e=t.prototype;return e.getBaseValue=function(){return this},e.filterValue=function(e){var u=this.value.visit(e);return u===this.value?this:new t(u,this.priority)},e.increaseSpecificity=function(e){return 0==e?this:new t(this.value,this.priority+e)},e.evaluate=function(t,e,u,n){return e&&ru(e)?this.value:Oa(t,this.value,e,u,n)},e.isEnabled=function(t){return!0},t}(),qr=/*#__PURE__*/function(t){function e(e,u,n){var i;return(i=t.call(this,e,u)||this).condition=void 0,i.condition=n,i}N(e,t);var u=e.prototype;return u.getBaseValue=function(){return new Yr(this.value,this.priority)},u.filterValue=function(t){var u=this.value.visit(t);return u===this.value?this:new e(u,this.priority,this.condition)},u.increaseSpecificity=function(t){return 0==t?this:new e(this.value,this.priority+t,this.condition)},u.isEnabled=function(t){try{return!!this.condition.evaluate(t)}catch(t){D.warn(t)}return!1},e}(Yr);function $r(t,e,u){return(!e||u.priority>=e.priority)&&u.isEnabled(t)?u.getBaseValue():e}function Qr(t,e,u,n){if(u){var i=t[e];(!i||u.priority>=i.priority)&&(n?u.isEnabled(n)&&(t[e]=u.getBaseValue()):t[e]=u)}else delete t[e]}var Zr={"region-id":!0,"fragment-selector-id":!0};function Jr(t){return"_"===t.charAt(0)&&"_viewConditionalStyles"!==t}function to(t){return"_"!==t.charAt(0)&&!Zr[t]}function eo(t){return!!Or[t]||ru(t)}function uo(t,e){return t[e]}function no(t,e,u){u?t[e]=u:delete t[e]}function io(t,e){return t[e]}function ro(t,e){var u=t[e];return u||(t[e]=u={}),u}var oo=function(t){var e=t._viewConditionalStyles;return e||(t._viewConditionalStyles=e=[]),e};function ao(t,e){return t[e]}function so(t,e){var u=t[e];return u||(t[e]=u=[]),u}function lo(t,e,u,n,i,r,o){for(var a in[{id:i,styleKey:"_pseudos"},{id:r,styleKey:"_regions"}].forEach(function(t){if(t.id){var u=ro(e,t.styleKey);(e=u[t.id])||(u[t.id]=e={})}}),o&&oo(e).push({styles:e={},matcher:o}),u)if(!Jr(a))if(Zr[a]){var s=ao(u,a),l=so(e,a);Array.prototype.push.apply(l,s)}else{var D,h,c=uo(u,a).increaseSpecificity(n);Qr(e,a,c,t);var d=null==(D=t.style)||null==(h=D.validatorSet.shorthands[a])?void 0:h.propList;if(d)for(var f,p=R(d);!(f=p()).done;){var E=f.value,C=new Yr(xe,c.priority);Qr(e,E,C,t)}}}function Do(t,e){if(t.length>0){t.sort(function(t,e){return e.getPriority()-t.getPriority()});for(var u=null,n=t.length-1;n>=0;n--)(u=t[n]).chained=e,e=u;return u}return e}var ho=/*#__PURE__*/function(t){function e(e,u){var n;return(n=t.call(this)||this).props=void 0,n.context=void 0,n.propName="",n.props=e,n.context=u,n}N(e,t);var u=e.prototype;return u.setPropName=function(t){this.propName=t},u.getFontSize=function(){var t=uo(this.props,"font-size");if(!t.value.isNumeric())return Lt.em;var e=t.value;if(!function(t){switch(null==t?void 0:t.toLowerCase()){case"px":case"in":case"pt":case"pc":case"cm":case"mm":case"q":return!0;default:return!1}}(e.unit))throw new Error("Unexpected state");return e.num*Lt[e.unit]},u.visitNumeric=function(t){return"font-size"===this.propName?fo(t,this.getFontSize(),this.context):"em"===t.unit||"ex"===t.unit||"rem"===t.unit||"lh"===t.unit||"rlh"===t.unit?co(t,this.getFontSize(),this.context):t},u.visitExpr=function(t){return"font-size"==this.propName?Oa(this.context,t,this.propName).visit(this):t},e}(Ne);function co(t,e,u){var n=t.unit,i=t.num;return"em"===n||"ex"===n?new Oe(i*(Lt[n]/Lt.em)*e,"px"):"rem"===n?new Oe(i*u.fontSize(),"px"):"rlh"===n?new Oe(i*u.rootLineHeight,"px"):t}function fo(t,e,u){var n=(t=co(t,e,u)).unit,i=t.num;return"px"===n?t:new Oe("%"===n?i/100*e:i*u.queryUnitSize(n,!1),"px")}var po=/*#__PURE__*/function(){function t(){}var e=t.prototype;return e.apply=function(t){},e.mergeWith=function(t){return new Co([this,t])},e.clone=function(){return this},t}(),Eo=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this)||this).conditionItem=void 0,u.conditionItem=e,u}return N(e,t),e.prototype.apply=function(t){t.pushConditionItem(this.conditionItem.fresh(t))},e}(po),Co=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this)||this).list=void 0,u.list=e,u}N(e,t);var u=e.prototype;return u.apply=function(t){for(var e=0;e<this.list.length;e++)this.list[e].apply(t)},u.mergeWith=function(t){return this.list.push(t),this},u.clone=function(){return new e([].concat(this.list))},e}(po),Fo=/*#__PURE__*/function(t){function e(e,u,n,i,r){var o;return(o=t.call(this)||this).style=void 0,o.specificity=void 0,o.pseudoelement=void 0,o.regionId=void 0,o.viewConditionId=void 0,o.style=e,o.specificity=u,o.pseudoelement=n,o.regionId=i,o.viewConditionId=r,o}return N(e,t),e.prototype.apply=function(t){lo(t.context,t.currentStyle,this.style,this.specificity,this.pseudoelement,this.regionId,t.buildViewConditionMatcher(this.viewConditionId))},e}(po),Ao=/*#__PURE__*/function(t){function e(){var e;return(e=t.call(this)||this).chained=null,e}N(e,t);var u=e.prototype;return u.apply=function(t){this.chained.apply(t)},u.getPriority=function(){return 0},u.makePrimary=function(t){return!1},e}(po),go=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this)||this).className=void 0,u.className=e,u}N(e,t);var u=e.prototype;return u.apply=function(t){t.currentClassNames.includes(this.className)&&this.chained.apply(t)},u.getPriority=function(){return 10},u.makePrimary=function(t){return this.chained&&t.insertInTable(t.classes,this.className,this.chained),!0},e}(Ao),vo=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this)||this).id=void 0,u.id=e,u}N(e,t);var u=e.prototype;return u.apply=function(t){t.currentId!=this.id&&t.currentXmlId!=this.id||this.chained.apply(t)},u.getPriority=function(){return 11},u.makePrimary=function(t){return this.chained&&t.insertInTable(t.ids,this.id,this.chained),!0},e}(Ao),mo=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this)||this).localName=void 0,u.localName=e,u}N(e,t);var u=e.prototype;return u.apply=function(t){t.currentLocalName==this.localName&&this.chained.apply(t)},u.getPriority=function(){return 8},u.makePrimary=function(t){return this.chained&&t.insertInTable(t.tags,this.localName,this.chained),!0},e}(Ao),Bo=/*#__PURE__*/function(t){function e(e,u){var n;return(n=t.call(this)||this).ns=void 0,n.localName=void 0,n.ns=e,n.localName=u,n}N(e,t);var u=e.prototype;return u.apply=function(t){t.currentLocalName==this.localName&&t.currentNamespace==this.ns&&this.chained.apply(t)},u.getPriority=function(){return 8},u.makePrimary=function(t){if(this.chained){var e=t.nsPrefix[this.ns];e||(e="ns"+t.nsCount+++":",t.nsPrefix[this.ns]=e),t.insertInTable(t.nstags,e+this.localName,this.chained)}return!0},e}(Ao),wo=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this)||this).epubTypePatt=void 0,u.epubTypePatt=e,u}return N(e,t),e.prototype.apply=function(t){var e=t.currentElement;if(e&&"a"==t.currentLocalName){var u=e.getAttribute("href");if(u&&u.match(/^#/)){var n=u.substring(1),i=e.ownerDocument.getElementById(n);if(i){var r=i.getAttributeNS(H.epub,"type");r&&r.match(this.epubTypePatt)&&this.chained.apply(t)}}}},e}(Ao),yo=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this)||this).ns=void 0,u.ns=e,u}return N(e,t),e.prototype.apply=function(t){t.currentNamespace==this.ns&&this.chained.apply(t)},e}(Ao),No=/*#__PURE__*/function(t){function e(e,u){var n;return(n=t.call(this)||this).ns=void 0,n.name=void 0,n.ns=e,n.name=u,n}return N(e,t),e.prototype.apply=function(t){t.currentElement&&t.currentElement.hasAttributeNS(this.ns,this.name)&&this.chained.apply(t)},e}(Ao),bo=/*#__PURE__*/function(t){function e(e,u,n){var i;return(i=t.call(this)||this).ns=void 0,i.name=void 0,i.value=void 0,i.ns=e,i.name=u,i.value=n,i}N(e,t);var u=e.prototype;return u.apply=function(t){t.currentElement&&t.currentElement.getAttributeNS(this.ns,this.name)==this.value&&this.chained.apply(t)},u.getPriority=function(){return"type"==this.name&&this.ns==H.epub?9:0},u.makePrimary=function(t){return"type"==this.name&&this.ns==H.epub&&(this.chained&&t.insertInTable(t.epubtypes,this.value,this.chained),!0)},e}(Ao),So=/*#__PURE__*/function(t){function e(e,u){var n;return(n=t.call(this)||this).ns=void 0,n.name=void 0,n.ns=e,n.name=u,n}N(e,t);var u=e.prototype;return u.apply=function(t){if(t.currentElement){var e=t.currentElement.getAttributeNS(this.ns,this.name);e&&Ur[e]&&this.chained.apply(t)}},u.getPriority=function(){return 0},u.makePrimary=function(t){return!1},e}(Ao),xo=/*#__PURE__*/function(t){function e(e,u,n){var i;return(i=t.call(this)||this).ns=void 0,i.name=void 0,i.regexp=void 0,i.ns=e,i.name=u,i.regexp=n,i}return N(e,t),e.prototype.apply=function(t){if(t.currentElement){var e=t.currentElement.getAttributeNS(this.ns,this.name);e&&e.match(this.regexp)&&this.chained.apply(t)}},e}(Ao),To=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this)||this).langRegExp=void 0,u.langRegExp=e,u}return N(e,t),e.prototype.apply=function(t){t.lang.match(this.langRegExp)&&this.chained.apply(t)},e}(Ao),Io=/*#__PURE__*/function(t){function e(){return t.call(this)||this}N(e,t);var u=e.prototype;return u.apply=function(t){t.isFirst&&this.chained.apply(t)},u.getPriority=function(){return 6},e}(Ao),Po=/*#__PURE__*/function(t){function e(){return t.call(this)||this}N(e,t);var u=e.prototype;return u.apply=function(t){t.isRoot&&this.chained.apply(t)},u.getPriority=function(){return 12},e}(Ao),Ro=/*#__PURE__*/function(t){function e(e,u){var n;return(n=t.call(this)||this).a=void 0,n.b=void 0,n.a=e,n.b=u,n}return N(e,t),e.prototype.matchANPlusB=function(t){return ki(t,this.a,this.b)},e}(Ao),ko=/*#__PURE__*/function(t){function e(e,u){return t.call(this,e,u)||this}N(e,t);var u=e.prototype;return u.apply=function(t){this.matchANPlusB(t.currentSiblingOrder)&&this.chained.apply(t)},u.getPriority=function(){return 5},e}(Ro),Lo=/*#__PURE__*/function(t){function e(e,u){return t.call(this,e,u)||this}N(e,t);var u=e.prototype;return u.apply=function(t){this.matchANPlusB(t.currentSiblingTypeCounts[t.currentNamespace][t.currentLocalName])&&this.chained.apply(t)},u.getPriority=function(){return 5},e}(Ro),Oo=/*#__PURE__*/function(t){function e(e,u){return t.call(this,e,u)||this}N(e,t);var u=e.prototype;return u.apply=function(t){var e=t.currentFollowingSiblingOrder;null===e&&(e=t.currentFollowingSiblingOrder=t.currentElement.parentNode.childElementCount-t.currentSiblingOrder+1),this.matchANPlusB(e)&&this.chained.apply(t)},u.getPriority=function(){return 4},e}(Ro),_o=/*#__PURE__*/function(t){function e(e,u){return t.call(this,e,u)||this}N(e,t);var u=e.prototype;return u.apply=function(t){var e=t.currentFollowingSiblingTypeCounts;if(!e[t.currentNamespace]){var u=t.currentElement;do{var n=u.namespaceURI,i=u.localName,r=e[n];r||(r=e[n]={}),r[i]=(r[i]||0)+1}while(u=u.nextElementSibling)}this.matchANPlusB(e[t.currentNamespace][t.currentLocalName])&&this.chained.apply(t)},u.getPriority=function(){return 4},e}(Ro),Mo=/*#__PURE__*/function(t){function e(){return t.call(this)||this}N(e,t);var u=e.prototype;return u.apply=function(t){for(var e=t.currentElement.firstChild;e;){switch(e.nodeType){case Node.ELEMENT_NODE:return;case Node.TEXT_NODE:if(e.length>0)return}e=e.nextSibling}this.chained.apply(t)},u.getPriority=function(){return 4},e}(Ao),Uo=/*#__PURE__*/function(t){function e(){return t.call(this)||this}N(e,t);var u=e.prototype;return u.apply=function(t){!1===t.currentElement.disabled&&this.chained.apply(t)},u.getPriority=function(){return 5},e}(Ao),Vo=/*#__PURE__*/function(t){function e(){return t.call(this)||this}N(e,t);var u=e.prototype;return u.apply=function(t){!0===t.currentElement.disabled&&this.chained.apply(t)},u.getPriority=function(){return 5},e}(Ao),Ho=/*#__PURE__*/function(t){function e(){return t.call(this)||this}N(e,t);var u=e.prototype;return u.apply=function(t){var e=t.currentElement;!0!==e.selected&&!0!==e.checked||this.chained.apply(t)},u.getPriority=function(){return 5},e}(Ao),zo=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this)||this).condition=void 0,u.condition=e,u}N(e,t);var u=e.prototype;return u.apply=function(t){if(t.conditions[this.condition])try{t.dependentConditions.push(this.condition),this.chained.apply(t)}finally{t.dependentConditions.pop()}},u.getPriority=function(){return 5},e}(Ao),Go=/*#__PURE__*/function(t){function e(){var e;return(e=t.call(this)||this).applied=!1,e}N(e,t);var u=e.prototype;return u.apply=function(t){this.applied=!0},u.clone=function(){var t=new e;return t.applied=this.applied,t},e}(po),Wo=/*#__PURE__*/function(t){function e(e){var u;(u=t.call(this)||this).checkAppliedAction=void 0,u.firstActions=[],u.checkAppliedAction=new Go;for(var n,i=R(e);!(n=i()).done;)u.firstActions.push(Do(n.value,u.checkAppliedAction));return u}N(e,t);var u=e.prototype;return u.apply=function(t){for(var e,u=R(this.firstActions);!(e=u()).done&&(e.value.apply(t),!this.checkAppliedAction.applied););this.checkAppliedAction.applied===this.positive()&&this.chained.apply(t),this.checkAppliedAction.applied=!1},u.getPriority=function(){return Math.max.apply(Math,this.firstActions.map(function(t){return t instanceof Ao?t.getPriority():0}))},u.positive=function(){return!0},u.relational=function(){return!1},e}(Ao),Xo=/*#__PURE__*/function(t){function e(){return t.apply(this,arguments)||this}return N(e,t),e.prototype.positive=function(){return!1},e}(Wo),jo=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this,[])||this).selectorTexts=void 0,u.selectorTexts=e,u}N(e,t);var u=e.prototype;return u.apply=function(t){for(var e,u=R(this.selectorTexts);!(e=u()).done;){var n=e.value,i=void 0,r=void 0;/^\s*[+~]/.test(n)?(r=t.currentElement.parentElement,i=":scope > :nth-child("+(Array.from(r.children).indexOf(t.currentElement)+1)+") "+n):(r=t.currentElement,i=":scope "+n);try{if(r.querySelector(i)){this.checkAppliedAction.apply(t);break}}catch(t){}}this.checkAppliedAction.applied&&this.chained.apply(t),this.checkAppliedAction.applied=!1},u.relational=function(){return!0},e}(Wo),Ko=/*#__PURE__*/function(){function t(t,e,u){this.condition=void 0,this.viewConditionId=void 0,this.viewCondition=void 0,this.condition=t,this.viewConditionId=e,this.viewCondition=u}var e=t.prototype;return e.increment=function(t){t.increment(this.condition,this.viewCondition)},e.decrement=function(t){t.decrement(this.condition,this.viewCondition)},e.buildViewConditionMatcher=function(t){return t.buildViewConditionMatcher(this.viewConditionId)},t}(),Yo=/*#__PURE__*/function(t){function e(e,u,n){return t.call(this,e,u,n)||this}N(e,t);var u=e.prototype;return u.fresh=function(t){return new e(this.condition,this.viewConditionId,this.buildViewConditionMatcher(t))},u.push=function(t,e){return 0==e&&this.increment(t),!1},u.pop=function(t,e){return 0==e&&(this.decrement(t),!0)},e}(Ko),qo=/*#__PURE__*/function(t){function e(e,u,n){return t.call(this,e,u,n)||this}N(e,t);var u=e.prototype;return u.fresh=function(t){return new e(this.condition,this.viewConditionId,this.buildViewConditionMatcher(t))},u.push=function(t,e){return 0==e?this.increment(t):1==e&&this.decrement(t),!1},u.pop=function(t,e){return 0==e?(this.decrement(t),!0):(1==e&&this.increment(t),!1)},e}(Ko),$o=/*#__PURE__*/function(t){function e(e,u,n){var i;return(i=t.call(this,e,u,n)||this).fired=!1,i}N(e,t);var u=e.prototype;return u.fresh=function(t){return new e(this.condition,this.viewConditionId,this.buildViewConditionMatcher(t))},u.push=function(t,e){return!!this.fired&&(this.decrement(t),!0)},u.pop=function(t,e){return this.fired?(this.decrement(t),!0):(0==e&&(this.fired=!0,this.increment(t)),!1)},e}(Ko),Qo=/*#__PURE__*/function(t){function e(e,u,n){var i;return(i=t.call(this,e,u,n)||this).fired=!1,i}N(e,t);var u=e.prototype;return u.fresh=function(t){return new e(this.condition,this.viewConditionId,this.buildViewConditionMatcher(t))},u.push=function(t,e){return this.fired&&(-1==e?this.increment(t):0==e&&this.decrement(t)),!1},u.pop=function(t,e){if(this.fired){if(-1==e)return this.decrement(t),!0;0==e&&this.increment(t)}else 0==e&&(this.fired=!0,this.increment(t));return!1},e}(Ko),Zo=/*#__PURE__*/function(){function t(t,e){this.afterprop=void 0,this.element=void 0,this.afterprop=t,this.element=e}var e=t.prototype;return e.fresh=function(t){return this},e.push=function(t,e){return!1},e.pop=function(t,e){return 0==e&&(t.processPseudoelementProps(this.afterprop,this.element),!0)},t}(),Jo=/*#__PURE__*/function(){function t(t){this.lang=void 0,this.lang=t}var e=t.prototype;return e.fresh=function(t){return this},e.push=function(t,e){return!1},e.pop=function(t,e){return 0==e&&(t.lang=this.lang,!0)},t}(),ta=/*#__PURE__*/function(){function t(t){this.oldQuotes=void 0,this.oldQuotes=t}var e=t.prototype;return e.fresh=function(t){return this},e.push=function(t,e){return!1},e.pop=function(t,e){return 0==e&&(t.quotes=this.oldQuotes,!0)},t}(),ea=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this)||this).element=void 0,u.element=e,u}N(e,t);var u=e.prototype;return u.createValueFromString=function(t,e){return"url"===e?new Ve(t||"about:invalid"):new Pe(t||"")},u.visitFunc=function(e){if("attr"!==e.name)return t.prototype.visitFunc.call(this,e);var u,n="string",i=null;if(e.values[0]instanceof Ge){var r=e.values[0].values;r.length>=2&&(n=r[1].stringValue()),i=r[0].stringValue()}else i=e.values[0].stringValue();return u=this.createValueFromString(e.values.length>1?e.values[1].stringValue():null,n),this.element&&this.element.hasAttribute(i)?this.createValueFromString(this.element.getAttribute(i),n):u},e}(Ne);function ua(t){if(Lr(t)){if(t instanceof Pe)return t.stringValue();if(t instanceof Ge)return t.values.map(function(t){return ua(t)}).join("")}return""}var na=/*#__PURE__*/function(t){function e(e,u,n){var i;return(i=t.call(this)||this).cascade=void 0,i.element=void 0,i.counterResolver=void 0,i.cascade=e,i.element=u,i.counterResolver=n,i}N(e,t);var u=e.prototype;return u.visitIdent=function(t){var e=this.cascade,u=e.quotes,n=Math.floor(u.length/2)-1;switch(t.name){case"open-quote":var i=u[2*Math.min(n,e.quoteDepth)];return e.quoteDepth++,i;case"close-quote":return e.quoteDepth>0&&e.quoteDepth--,u[2*Math.min(n,e.quoteDepth)+1];case"no-open-quote":return e.quoteDepth++,new Pe("");case"no-close-quote":return e.quoteDepth>0&&e.quoteDepth--,new Pe("")}return t},u.format=function(t,e){var u,n=!1,i=!1;null!=(u=e.match(/^upper-(.*)/))?(n=!0,e=u[1]):null!=(u=e.match(/^lower-(.*)/))&&(i=!0,e=u[1]);var r="";return ia[e]?r=function(t,e){if(e>t[0]||e<=0||e!=Math.round(e))return"";for(var u="",n=1;n<t.length;n+=2){var i=t[n],r=Math.floor(e/i);if(r>20)return"";for(e-=r*i;r>0;)u+=t[n+1],r--}return u}(ia[e],t):ra[e]?r=function(t,e){if(e<=0||e!=Math.round(e))return"";var u=function(t){for(var e=[],u=0;u<t.length;)if("-"==t.substr(u+1,1)){var n=t.charCodeAt(u),i=t.charCodeAt(u+2);u+=3;for(var r=n;r<=i;r++)e.push(String.fromCharCode(r))}else e.push(t.substr(u++,1));return e}(t),n="";do{var i=--e%u.length;n=u[i]+n,e=(e-i)/u.length}while(e>0);return n}(ra[e],t):null!=oa[e]?r=oa[e]:"decimal-leading-zero"==e?1==(r=""+t).length&&(r="0"+r):r="cjk-ideographic"==e||"trad-chinese-informal"==e?function(t,e){if(t>9999||t<-9999)return""+t;if(0==t)return e.digits.charAt(0);var u=new et;if(t<0&&(u.append(e.negative),t=-t),t<10)u.append(e.digits.charAt(t));else if(!e.formal&&t<=19)u.append(e.markers.charAt(0)),0!=t&&u.append(e.digits.charAt(t-10));else{var n=Math.floor(t/1e3);n&&(u.append(e.digits.charAt(n)),u.append(e.markers.charAt(2)));var i=Math.floor(t/100)%10;i&&(u.append(e.digits.charAt(i)),u.append(e.markers.charAt(1)));var r=Math.floor(t/10)%10;r&&(u.append(e.digits.charAt(r)),u.append(e.markers.charAt(0)));var o=t%10;o&&u.append(e.digits.charAt(o))}return u.toString()}(t,aa):""+t,n?r.toUpperCase():i?r.toLowerCase():r},u.visitFuncCounter=function(t){var e=this,u=t[0].toString(),n=t.length>1?t[1].stringValue():"decimal",i=this.cascade.counters[u];if(i&&i.length)return new Pe(this.format(i&&i.length&&i[i.length-1]||0,n));var r=new je(this.counterResolver.getPageCounterVal(u,function(t){return e.format(t||0,n)}));return new Ge([r])},u.visitFuncCounters=function(t){var e=this,u=t[0].toString(),n=t[1].stringValue(),i=t.length>2?t[2].stringValue():"decimal",r=this.cascade.counters[u],o=new et;if(r&&r.length)for(var a=0;a<r.length;a++)a>0&&o.append(n),o.append(this.format(r[a],i));var s=new je(this.counterResolver.getPageCountersVal(u,function(t){var u=[];if(t.length)for(var r=0;r<t.length;r++)u.push(e.format(t[r],i));var a=o.toString();return a.length&&u.push(a),u.length?u.join(n):e.format(0,i)}));return new Ge([s])},u.visitFuncTargetCounter=function(t){var e,u=this,n=t[0];e=n instanceof Ve?n.url:n.stringValue();var i=t[1].toString(),r=t.length>2?t[2].stringValue():"decimal",o=new je(this.counterResolver.getTargetCounterVal(e,i,function(t){return u.format(t||0,r)}));return new Ge([o])},u.visitFuncTargetCounters=function(t){var e,u=this,n=t[0];e=n instanceof Ve?n.url:n.stringValue();var i=t[1].toString(),r=t[2].stringValue(),o=t.length>3?t[3].stringValue():"decimal",a=new je(this.counterResolver.getTargetCountersVal(e,i,function(t){var e=t.map(function(t){return u.format(t,o)});return e.length?e.join(r):u.format(0,o)}));return new Ge([a])},u.visitFuncString=function(t){var e=t.length>0?t[0].stringValue():"",u=t.length>1?t[1].stringValue():"first";return new je(this.counterResolver.getNamedStringVal(e,u))},u.visitFuncElement=function(t){var e=t.length>0?t[0].stringValue():"",u=t.length>1?t[1].stringValue():"first";return new je(this.counterResolver.getRunningElementVal(e,u))},u.visitFuncContent=function(t){var e=t.length>0?t[0].stringValue():"text",u="";switch(e){case"text":u=this.element.textContent;break;case"before":case"after":var n,i,r=io(this.cascade.currentStyle,"_pseudos");u=ua(null==r||null==(n=r[e])||null==(i=n.content)?void 0:i.value);break;case"first-letter":var o,a,s,l,D=io(this.cascade.currentStyle,"_pseudos"),h=(ua(null==D||null==(o=D.before)||null==(a=o.content)?void 0:a.value)||this.element.textContent||ua(null==D||null==(s=D.after)||null==(l=s.content)?void 0:l.value)).match(k);u=h?h[0]:""}return new Pe(u)},u.visitFuncLeader=function(t){var e="";if(t[0]instanceof ke)switch(t[0].stringValue()){case"dotted":e=".";break;case"solid":e="_";break;case"space":e=" "}else t[0]instanceof Pe&&(e=t[0].stringValue());return 0==e.length?new Pe(""):new je(new de(null,function(){return e},"viv-leader"))},u.visitFunc=function(t){switch(t.name){case"counter":if(t.values.length<=2)return this.visitFuncCounter(t.values);break;case"counters":if(t.values.length<=3)return this.visitFuncCounters(t.values);break;case"target-counter":if(t.values.length<=3)return this.visitFuncTargetCounter(t.values);break;case"target-counters":if(t.values.length<=4)return this.visitFuncTargetCounters(t.values);break;case"string":if(t.values.length<=2)return this.visitFuncString(t.values);break;case"element":if(t.values.length<=2)return this.visitFuncElement(t.values);break;case"content":if(t.values.length<=1)return this.visitFuncContent(t.values);break;case"leader":if(t.values.length<=1)return this.visitFuncLeader(t.values)}return t},e}(Ne);c(exports.HOOKS.POST_LAYOUT_BLOCK,function(t,e,u){for(var n,i=function(){for(var t=n.value,e=t.parent;e&&e.inline;)e=e.parent;var i=t.viewNode,r=i.parentElement,o=i.getAttribute("data-viv-leader-value"),a=i.textContent||o,s=u.clientLayout.getElementComputedStyle(r),l=s.writingMode,D=s.direction,h=s.marginInlineEnd;function c(t){if("rtl"===D){var e="‏";i.textContent=(t.startsWith(e)?"":e)+t+(t.endsWith(e)?"":e)}else i.textContent=t}i.style.marginInlineStart="1px",c(o),r.style.display="inline-block",r.style.textIndent="0";var d=u.clientLayout.getElementClientRect(e.viewNode),f=u.clientLayout.getElementClientRect(r),p=u.parseComputedLength(h);function E(){var t=u.clientLayout.getElementClientRect(r);return d.left>t.left||d.right<t.right||d.top>t.top||d.bottom<t.bottom}"vertical-rl"===l||"vertical-lr"===l?("rtl"===D?d.top+=p:d.bottom-=p,d.left=f.left,d.right=f.right,d.top=Math.min(f.top,d.top),d.bottom=Math.max(f.bottom,d.bottom)):("rtl"===D?d.left+=p:d.right-=p,d.top=f.top,d.bottom=f.bottom,d.left=Math.min(f.left,d.left),d.right=Math.max(f.right,d.right)),function(){var t,e;if(c(a),E())t=1,e=a.length/o.length;else{e=t=a.length/o.length;for(var u=0;u<16;u++){for(var n=a,i=0;i<1<<u;i++)n+=o;if(c(n),E()){e+=1<<u;break}}}for(var r=0;r<16;r++){for(var s="",l=Math.floor((t+e)/2),D=0;D<l;D++)s+=o;if(c(s),E())e=l;else{if(t==l)return;t=l}}c(o)}();var C=u.clientLayout.getElementClientRect(r);r.style.float="rtl"==D?"left":"right";var F=u.clientLayout.getElementClientRect(r);function A(t){for(var n=0,i=r.parentElement;i&&i!==e.viewNode;)n+=u.getComputedInsets(i)[t],i=i.parentElement;return n}var g=0;g="rtl"==D?"vertical-rl"==l||"vertical-lr"==l?C.top-F.top-A("top"):C.left-F.left-A("left"):"vertical-rl"==l||"vertical-lr"==l?F.bottom-C.bottom-A("bottom"):F.right-C.right-A("right"),g=Math.max(0,g-.1),r.style.float="",i.style.marginInlineStart=g+"px"},r=R(e.filter(function(t){return t.after&&1===t.viewNode.nodeType&&t.viewNode.getAttribute("data-viv-leader")}));!(n=r()).done;)i()});var ia={roman:[4999,1e3,"M",900,"CM",500,"D",400,"CD",100,"C",90,"XC",50,"L",40,"XL",10,"X",9,"IX",5,"V",4,"IV",1,"I"],armenian:[9999,9e3,"ք",8e3,"փ",7e3,"ւ",6e3,"ց",5e3,"ր",4e3,"տ",3e3,"վ",2e3,"ս",1e3,"ռ",900,"ջ",800,"պ",700,"չ",600,"ո",500,"շ",400,"ն",300,"յ",200,"մ",100,"ճ",90,"ղ",80,"ձ",70,"հ",60,"կ",50,"ծ",40,"խ",30,"լ",20,"ի",10,"ժ",9,"թ",8,"ը",7,"է",6,"զ",5,"ե",4,"դ",3,"գ",2,"բ",1,"ա"],georgian:[19999,1e4,"ჵ",9e3,"ჰ",8e3,"ჯ",7e3,"ჴ",6e3,"ხ",5e3,"ჭ",4e3,"წ",3e3,"ძ",2e3,"ც",1e3,"ჩ",900,"შ",800,"ყ",700,"ღ",600,"ქ",500,"ფ",400,"ჳ",300,"ტ",200,"ს",100,"რ",90,"ჟ",80,"პ",70,"ო",60,"ჲ",50,"ნ",40,"მ",30,"ლ",20,"კ",10,"ი",9,"თ",8,"ჱ",7,"ზ",6,"ვ",5,"ე",4,"დ",3,"გ",2,"ბ",1,"ა"],hebrew:[999,400,"ת",300,"ש",200,"ר",100,"ק",90,"צ",80,"פ",70,"ע",60,"ס",50,"נ",40,"מ",30,"ל",20,"כ",19,"יט",18,"יח",17,"יז",16,"טז",15,"טו",10,"י",9,"ט",8,"ח",7,"ז",6,"ו",5,"ה",4,"ד",3,"ג",2,"ב",1,"א"]},ra={latin:"a-z",alpha:"a-z",greek:"α-ρσ-ω",russian:"а-ик-щэ-я"},oa={square:"■",disc:"•",circle:"◦",none:""},aa={formal:!1,digits:"零一二三四五六七八九",markers:"十百千",negative:"負"},sa=1/1048576;function la(t,e){for(var u in t)e[u]=t[u].clone()}var Da,ha=/*#__PURE__*/function(){function t(){this.nsCount=0,this.nsPrefix={},this.tags={},this.nstags={},this.epubtypes={},this.classes={},this.ids={},this.pagetypes={},this.order=0}var e=t.prototype;return e.clone=function(){var e=new t;for(var u in e.nsCount=this.nsCount,this.nsPrefix)e.nsPrefix[u]=this.nsPrefix[u];return la(this.tags,e.tags),la(this.nstags,e.nstags),la(this.epubtypes,e.epubtypes),la(this.classes,e.classes),la(this.ids,e.ids),la(this.pagetypes,e.pagetypes),e.order=this.order,e},e.insertInTable=function(t,e,u){var n=t[e];n&&(u=n.mergeWith(u)),t[e]=u},e.createInstance=function(t,e,u,n){return new ca(this,t,e,u,n)},e.nextOrder=function(){return this.order+=sa},t}(),ca=/*#__PURE__*/function(){function t(t,e,u,n,i){this.context=void 0,this.counterListener=void 0,this.counterResolver=void 0,this.code=void 0,this.stack=[[],[]],this.conditions={},this.currentElement=null,this.currentElementOffset=null,this.currentStyle=null,this.currentClassNames=null,this.currentLocalName="",this.currentNamespace="",this.currentId="",this.currentXmlId="",this.currentNSTag="",this.currentEpubTypes=null,this.currentPageType=null,this.previousPageType=null,this.firstPageType=null,this.isFirst=!0,this.isRoot=!0,this.counters={},this.counterScoping=[{}],this.quotes=void 0,this.quoteDepth=0,this.lang="",this.siblingOrderStack=[0],this.currentSiblingOrder=0,this.siblingTypeCountsStack=[{}],this.currentSiblingTypeCounts=void 0,this.currentFollowingSiblingOrder=null,this.followingSiblingOrderStack=void 0,this.followingSiblingTypeCountsStack=[{}],this.currentFollowingSiblingTypeCounts=void 0,this.viewConditions={},this.dependentConditions=[],this.elementStack=void 0,this.context=e,this.counterListener=u,this.counterResolver=n,this.code=t,this.quotes=[new Pe("“"),new Pe("”"),new Pe("‘"),new Pe("’")],this.currentSiblingTypeCounts=this.siblingTypeCountsStack[0],this.followingSiblingOrderStack=[this.currentFollowingSiblingOrder],this.currentFollowingSiblingTypeCounts=this.siblingTypeCountsStack[0]}var e=t.prototype;return e.pushConditionItem=function(t){this.stack[this.stack.length-1].push(t)},e.increment=function(t,e){this.conditions[t]=(this.conditions[t]||0)+1,e&&(this.viewConditions[t]?this.viewConditions[t].push(e):this.viewConditions[t]=[e])},e.decrement=function(t,e){this.conditions[t]--,this.viewConditions[t]&&(this.viewConditions[t]=this.viewConditions[t].filter(function(t){return t!==e}),0===this.viewConditions[t].length&&delete this.viewConditions[t])},e.buildViewConditionMatcher=function(t){var e=this,u=null;t&&(u=Mi.buildViewConditionMatcher(this.currentElementOffset,t));var n=this.dependentConditions.map(function(t){var u=e.viewConditions[t];return u&&u.length>0?1===u.length?u[0]:Mi.buildAnyMatcher([].concat(u)):null}).filter(function(t){return t});return n.length<=0?u:null===u?1===n.length?n[0]:Mi.buildAllMatcher(n):Mi.buildAllMatcher([u].concat(n))},e.applyAction=function(t,e){var u=t[e];u&&u.apply(this)},e.pushRule=function(t,e,u){this.currentElement=null,this.currentElementOffset=null,this.currentStyle=u,this.currentNamespace="",this.currentLocalName="",this.currentId="",this.currentXmlId="",this.currentClassNames=t,this.currentNSTag="",this.currentEpubTypes=da,this.currentPageType=e,this.applyActions()},e.defineCounter=function(t,e){this.counters[t]?this.counters[t].push(e):this.counters[t]=[e];var u=this.counterScoping[this.counterScoping.length-1];u||(this.counterScoping[this.counterScoping.length-1]=u={}),u[t]=!0},e.pushCounters=function(t){var e,u=$e.inline,n=t.display;n&&(u=n.evaluate(this.context));var i=$e.inline,r=t.float;r&&(i=r.evaluate(this.context));var o=null,a=null,s=null,l=t["counter-reset"];if(l){var D=l.evaluate(this.context);D&&(o=Ru(D,!0))}var h=t["counter-set"];if(h){var c=h.evaluate(this.context);c&&(s=Ru(c,!1))}var d,f,p,E,C=t["counter-increment"];if(C){var F=C.evaluate(this.context);F&&(a=Ru(F,!1))}if("ol"!=this.currentLocalName&&"ul"!=this.currentLocalName||this.currentNamespace!=H.XHTML||(o||(o={}),o["ua-list-item"]=(null!=(d=null==(f=this.currentElement)?void 0:f.start)?d:1)-1),u===$e.list_item&&(a||(a={}),a["ua-list-item"]=1,/^\s*[-+]?\d/.test(null!=(p=null==(E=this.currentElement)?void 0:E.getAttribute("value"))?p:"")&&(o||(o={}),o["ua-list-item"]=this.currentElement.value-1)),(null==(e=this.currentElement)?void 0:e.parentNode.nodeType)===Node.DOCUMENT_NODE&&(o||(o={}),void 0===o.footnote&&(o.footnote=0)),i===$e.footnote&&(a||(a={}),void 0===a.footnote)){var A,g=null==(A=this.currentStyle["counter-increment"])?void 0:A.value;g&&(g===$e.footnote||g instanceof Ge&&g.values.includes($e.footnote))||(a.footnote=1)}if(o)for(var v in o)this.defineCounter(v,o[v]);if(s)for(var m in s)if(this.counters[m]){var B=this.counters[m];B[B.length-1]=s[m]}else this.defineCounter(m,s[m]);if(a)for(var w in a){this.counters[w]||this.defineCounter(w,0);var y=this.counters[w];y[y.length-1]+=a[w]}if(u===$e.list_item){var N=this.counters["ua-list-item"];t["ua-list-item-count"]=new Yr(new _e(N[N.length-1]),0)}this.counterScoping.push(null)},e.popCounters=function(){var t=this.counterScoping.pop();if(t)for(var e in t){var u=this.counters[e];u&&(1==u.length?delete this.counters[e]:u.pop())}},e.setNamedStrings=function(t){var e=t["string-set"];if(e){for(var u,n=R((e=e.filterValue(new na(this,this.currentElement,this.counterResolver))).value instanceof We?e.value.values:[e.value]);!(u=n()).done;){var i=u.value;if(i instanceof Ge){var r=i.values[0].stringValue(),o=i.values.slice(1).map(function(t){return ua(t)}).join("");this.counterResolver.setNamedString(r,o,this.currentElementOffset)}}delete t["string-set"]}},e.setRunningElement=function(t){var e=t.position;if((null==e?void 0:e.value)instanceof Xe&&"running"===e.value.name){var u=e.value.values[0].stringValue();this.counterResolver.setRunningElement(u,this.currentElementOffset)}},e.processPseudoelementProps=function(t,e){this.pushCounters(t);var u=t.content;u&&(t.content=u.filterValue(new na(this,e,this.counterResolver))),this.popCounters()},e.pushElement=function(t,e,u,n){var i=this;this.currentPageType=null,this.currentElement=e,this.currentElementOffset=n,this.currentStyle=u,this.currentNamespace=e.namespaceURI,this.currentLocalName=e.localName;var r=this.code.nsPrefix[this.currentNamespace];this.currentNSTag=r?r+this.currentLocalName:"",this.currentId=e.getAttribute("id"),this.currentXmlId=e.getAttributeNS(H.XML,"id");var o=e.getAttribute("class");this.currentClassNames=o?o.split(/\s+/):da;var a=e.getAttributeNS(H.epub,"type");this.currentEpubTypes=a?a.split(/\s+/):da;var s=tt(e);s&&(this.stack[this.stack.length-1].push(new Jo(this.lang)),this.lang=s.toLowerCase());var l=this.isRoot,D=this.siblingOrderStack;this.currentSiblingOrder=++D[D.length-1],D.push(0);var h=this.siblingTypeCountsStack,c=this.currentSiblingTypeCounts=h[h.length-1],d=c[this.currentNamespace];d||(d=c[this.currentNamespace]={}),d[this.currentLocalName]=(d[this.currentLocalName]||0)+1,h.push({});var f=this.followingSiblingOrderStack;this.currentFollowingSiblingOrder=null!==f[f.length-1]?--f[f.length-1]:null,f.push(null);var p=this.followingSiblingTypeCountsStack,E=this.currentFollowingSiblingTypeCounts=p[p.length-1];E&&E[this.currentNamespace]&&E[this.currentNamespace][this.currentLocalName]--,p.push({}),this.applyActions(),this.applyVarFilter([this.currentStyle],t,e),this.applyCalcFilter(this.currentStyle,this.context),this.applyAttrFilter(e);var C=u.quotes,F=null;if(C){var A=C.evaluate(this.context);A&&(F=new ta(this.quotes),A===$e.none?this.quotes=[new Pe(""),new Pe("")]:A===$e.auto||A===$e.initial?this.quotes=[new Pe("“"),new Pe("”"),new Pe("‘"),new Pe("’")]:A instanceof Ge&&(this.quotes=A.values))}this.pushCounters(this.currentStyle);var g=this.currentId||this.currentXmlId||e.getAttribute("name")||"";if(l||g){var v={};Object.keys(this.counters).forEach(function(t){v[t]=Array.from(i.counters[t])}),this.counterListener.countersOfId(g,v)}var m=io(this.currentStyle,"_pseudos");if(m)for(var B,w=!0,y=R(fa);!(B=y()).done;){var N=B.value;N||(w=!1);var b,S,x=m[N];x&&(("before"!==N&&"after"!==N||Lr(null==(b=x.content)?void 0:b.value))&&("footnote-call"!==N&&"footnote-marker"!==N||(null==(S=uo(this.currentStyle,"float"))?void 0:S.value)===$e.footnote)?w?this.processPseudoelementProps(x,e):this.stack[this.stack.length-2].push(new Zo(x,e)):delete m[N])}this.setNamedStrings(this.currentStyle),this.setRunningElement(this.currentStyle),F&&this.stack[this.stack.length-2].push(F)},e.applyAttrFilterInner=function(t,e){for(var u in e)to(u)&&!ru(u)&&(e[u]=e[u].filterValue(t))},e.applyAttrFilter=function(t){var e=new ea(t),u=this.currentStyle,n=io(u,"_pseudos");for(var i in n)this.applyAttrFilterInner(e,n[i]);this.applyAttrFilterInner(e,u)},e.applyVarFilter=function(t,e,u){var n=t[0],i=new ka(t,e,u),r={};for(var o in n)if(Jr(o)){var a=io(n,o);for(var s in a)this.applyVarFilter([a[s]].concat(t),e,u)}else if(to(o)){for(var l=uo(n,o),D=l.value,h=0;;h++){if(h>=32){D=xe;break}var c=D.visit(i);if(i.error){D=xe,i.error=!1;break}if(c===D)break;D=c}if(D!==l.value){var d,f=e.validatorSet,p=null==f||null==(d=f.shorthands[o])?void 0:d.clone();if(p)if(nu(D)){for(var E,C=R(p.propList);!(E=C()).done;){var F=E.value,A=new Yr(D,l.priority),g=uo(n,F);no(r,F,$r(this.context,g,A))}delete n[o]}else{var v=Pi(e.scope,new yn(D.toString(),null),"");if(v&&(v.visit(p),!p.error)){for(var m,B=R(p.propList);!(m=B()).done;){var w,y,N=m.value,b=new Yr(null!=(w=null!=(y=p.values[N])?y:f.defaultValues[N])?w:$e.initial,l.priority),S=uo(n,N);no(r,N,$r(this.context,S,b))}delete n[o]}}else n[o]=new Yr(D,l.priority)}if(r[o]){var x=uo(n,o);x&&x.value!==xe&&Qr(r,o,x,this.context)}}for(var T in r)n[T]=r[T]},e.applyCalcFilter=function(t,e){var u=new La(e);for(var n in t)if(Jr(n)){var i=io(t,n);for(var r in i)this.applyCalcFilter(i[r],e)}else if(to(n)&&!ru(n)){var o=uo(t,n),a=o.value.visit(u);a!==o.value&&(t[n]=new Yr(a,o.priority))}},e.applyActions=function(){var t;for(t=0;t<this.currentClassNames.length;t++)this.applyAction(this.code.classes,this.currentClassNames[t]);for(t=0;t<this.currentEpubTypes.length;t++)this.applyAction(this.code.epubtypes,this.currentEpubTypes[t]);this.applyAction(this.code.ids,this.currentId),this.applyAction(this.code.tags,this.currentLocalName),""!=this.currentLocalName&&this.applyAction(this.code.tags,"*"),this.applyAction(this.code.nstags,this.currentNSTag),null!==this.currentPageType&&(this.applyAction(this.code.pagetypes,this.currentPageType),this.applyAction(this.code.pagetypes,"*")),this.stack.push([]);for(var e=1;e>=-1;--e){var u=this.stack[this.stack.length-e-2];for(t=0;t<u.length;)u[t].push(this,e)?u.splice(t,1):t++}this.isFirst=!0,this.isRoot=!1},e.pop=function(){for(var t=1;t>=-1;--t)for(var e=this.stack[this.stack.length-t-2],u=0;u<e.length;)e[u].pop(this,t)?e.splice(u,1):u++;this.stack.pop(),this.isFirst=!1},e.popRule=function(){this.pop()},e.popElement=function(t){this.siblingOrderStack.pop(),this.siblingTypeCountsStack.pop(),this.followingSiblingOrderStack.pop(),this.followingSiblingTypeCountsStack.pop(),this.pop(),this.popCounters()},t}(),da=[],fa=["before","transclusion-before","footnote-call","footnote-marker","inner","first-letter","first-line","","transclusion-after","after"];!function(t){t[t.TOP=0]="TOP",t[t.SELECTOR=1]="SELECTOR",t[t.RULE=2]="RULE"}(Da||(Da={}));var pa=null,Ea=/*#__PURE__*/function(t){function e(e,u,n,i,r,o,a){var s;return(s=t.call(this,e,u,a)||this).condition=void 0,s.regionId=void 0,s.validatorSet=void 0,s.chain=null,s.specificity=0,s.elementStyle=null,s.conditionCount=0,s.pseudoelement=null,s.footnoteContent=!1,s.cascade=void 0,s.state=void 0,s.viewConditionId=null,s.insideSelectorRule=void 0,s.invalid=!1,s.condition=n,s.regionId=r,s.validatorSet=o,s.cascade=i?i.cascade:pa?pa.clone():new ha,s.state=Da.TOP,s}N(e,t);var u=e.prototype;return u.insertNonPrimary=function(t){this.cascade.insertInTable(this.cascade.tags,"*",t)},u.processChain=function(t){var e=Do(this.chain,t);e!==t&&e.makePrimary(this.cascade)||this.insertNonPrimary(e)},u.isInsideSelectorRule=function(t){return this.state!=Da.TOP&&(this.reportAndSkip(t),!0)},u.tagSelector=function(t,e){(e||t)&&(e&&(this.specificity+=1),this.chain.push(e&&t?new Bo(t,e.toLowerCase()):e?new mo(e.toLowerCase()):new yo(t)))},u.invalidSelector=function(t){D.warn(t),this.chain.push(new zo("")),this.setInvalid()},u.setInvalid=function(){this.invalid=!0;for(var t=this;t instanceof Aa;t=t.parent)t.parent.invalid=!0},u.classSelector=function(t){this.pseudoelement?this.invalidSelector("::"+this.pseudoelement+" followed by ."+t):(this.specificity+=256,this.chain.push(new go(t)))},u.pseudoclassSelector=function(t,e){if(this.pseudoelement)this.invalidSelector("::"+this.pseudoelement+" followed by :"+t);else{switch(t.toLowerCase()){case"enabled":this.chain.push(new Uo);break;case"disabled":this.chain.push(new Vo);break;case"checked":this.chain.push(new Ho);break;case"root":case"scope":this.chain.push(new Po);break;case"link":this.chain.push(new mo("a")),this.chain.push(new No("","href"));break;case"-adapt-href-epub-type":case"href-epub-type":if(e&&1==e.length&&"string"==typeof e[0]){var u=new RegExp("(^|s)"+st(e[0])+"($|s)");this.chain.push(new wo(u))}else this.chain.push(new zo(""));break;case"-adapt-footnote-content":case"footnote-content":this.footnoteContent=!0;break;case"visited":case"active":case"hover":case"focus":this.chain.push(new zo(""));break;case"lang":this.chain.push(e&&1==e.length&&"string"==typeof e[0]?new To(new RegExp("^"+st(e[0].toLowerCase())+"($|-)")):new zo(""));break;case"nth-child":case"nth-last-child":case"nth-of-type":case"nth-last-of-type":var n=Ca[t.toLowerCase()];this.chain.push(e&&2==e.length?new n(e[0],e[1]):new zo(""));break;case"first-child":this.chain.push(new Io);break;case"last-child":this.chain.push(new Oo(0,1));break;case"first-of-type":this.chain.push(new Lo(0,1));break;case"last-of-type":this.chain.push(new _o(0,1));break;case"only-child":this.chain.push(new Io),this.chain.push(new Oo(0,1));break;case"only-of-type":this.chain.push(new Lo(0,1)),this.chain.push(new _o(0,1));break;case"empty":this.chain.push(new Mo);break;case"before":case"after":case"first-line":case"first-letter":return void this.pseudoelementSelector(t,e);default:return void this.invalidSelector("Unknown pseudo-class :"+t)}this.specificity+=256}},u.pseudoelementSelector=function(t,e){switch(t){case"before":case"after":case"first-line":case"first-letter":case"footnote-call":case"footnote-marker":case"inner":case"after-if-continues":if(this.pseudoelement)return void this.invalidSelector("Double pseudo-element ::"+this.pseudoelement+"::"+t);this.pseudoelement=t;break;case"first-n-lines":if(e&&1==e.length&&"number"==typeof e[0]){var u=Math.round(e[0]);if(u>0&&u==e[0]){if(this.pseudoelement)return void this.invalidSelector("Double pseudo-element ::"+this.pseudoelement+"::"+t);this.pseudoelement="first-"+u+"-lines";break}}this.chain.push(new zo(""));break;case"nth-fragment":e&&2==e.length?this.viewConditionId="NFS_"+e[0]+"_"+e[1]:this.chain.push(new zo(""));break;default:return void this.invalidSelector("Unknown pseudo-element ::"+t)}this.specificity+=1},u.idSelector=function(t){this.specificity+=65536,this.chain.push(new vo(t))},u.attributeSelector=function(t,e,u,n){var i;switch(this.specificity+=256,e=e.toLowerCase(),n=n||"",u){case Ou.EOF:i=new No(t,e);break;case Ou.EQ:i=new bo(t,e,n);break;case Ou.TILDE_EQ:i=!n||n.match(/\s/)?new zo(""):new xo(t,e,new RegExp("(^|\\s)"+st(n)+"($|\\s)"));break;case Ou.BAR_EQ:i=new xo(t,e,new RegExp("^"+st(n)+"($|-)"));break;case Ou.HAT_EQ:i=n?new xo(t,e,new RegExp("^"+st(n))):new zo("");break;case Ou.DOLLAR_EQ:i=n?new xo(t,e,new RegExp(st(n)+"$")):new zo("");break;case Ou.STAR_EQ:i=n?new xo(t,e,new RegExp(st(n))):new zo("");break;case Ou.COL_COL:if("supported"!=n)return void this.invalidSelector("Unsupported :: attr selector op: "+n);i=new So(t,e);break;default:return void this.invalidSelector("Unsupported attr selector: "+u)}this.chain.push(i)},u.descendantSelector=function(){var t="d"+Fa++;this.processChain(new Eo(new Yo(t,this.viewConditionId,null))),this.chain=[new zo(t)],this.viewConditionId=null},u.childSelector=function(){var t="c"+Fa++;this.processChain(new Eo(new qo(t,this.viewConditionId,null))),this.chain=[new zo(t)],this.viewConditionId=null},u.adjacentSiblingSelector=function(){var t="a"+Fa++;this.processChain(new Eo(new $o(t,this.viewConditionId,null))),this.chain=[new zo(t)],this.viewConditionId=null},u.followingSiblingSelector=function(){var t="f"+Fa++;this.processChain(new Eo(new Qo(t,this.viewConditionId,null))),this.chain=[new zo(t)],this.viewConditionId=null},u.nextSelector=function(){this.finishChain(),this.pseudoelement=null,this.footnoteContent=!1,this.specificity=0,this.chain=[]},u.startSelectorRule=function(){this.isInsideSelectorRule("E_CSS_UNEXPECTED_SELECTOR")||(this.state=Da.SELECTOR,this.elementStyle={},this.pseudoelement=null,this.specificity=0,this.footnoteContent=!1,this.chain=[],this.invalid=!1)},u.error=function(e,u){t.prototype.error.call(this,e,u),this.state==Da.SELECTOR&&(this.state=Da.TOP),this.setInvalid()},u.startStylesheet=function(e){t.prototype.startStylesheet.call(this,e),this.state=Da.TOP},u.startRuleBody=function(){this.finishChain(),t.prototype.startRuleBody.call(this),this.state==Da.SELECTOR&&(this.state=Da.TOP)},u.endRule=function(){t.prototype.endRule.call(this),this.insideSelectorRule=Da.TOP},u.finishChain=function(){this.chain&&(this.processChain(this.makeApplyRuleAction(this.specificity)),this.chain=null,this.pseudoelement=null,this.viewConditionId=null,this.footnoteContent=!1,this.specificity=0)},u.makeApplyRuleAction=function(t){var e=this.regionId;return this.footnoteContent&&(e=e?"xxx-bogus-xxx":"footnote"),new Fo(this.elementStyle,t,this.pseudoelement,e,this.viewConditionId)},u.special=function(t,e){var u;u=this.condition?new qr(e,0,this.condition):new Yr(e,0),so(this.elementStyle,t).push(u)},u.property=function(t,e,u){this.validatorSet.validatePropertyAndHandleShorthand(t,e,u,this)},u.invalidPropertyValue=function(t,e){this.report("E_INVALID_PROPERTY_VALUE "+t+": "+e.toString())},u.unknownProperty=function(t,e){this.report("E_INVALID_PROPERTY "+t+": "+e.toString())},u.simpleProperty=function(t,e,u){"display"!=t||e!==$e.oeb_page_head&&e!==$e.oeb_page_foot||(this.simpleProperty("flow-options",new Ge([$e.exclusive,$e._static]),u),this.simpleProperty("flow-into",e,u),e=$e.block),f("SIMPLE_PROPERTY").forEach(function(n){var i=n({name:t,value:e,important:u});t=i.name,e=i.value,u=i.important});var n=(u?this.getImportantSpecificity():this.getBaseSpecificity())+this.cascade.nextOrder(),i=this.condition?new qr(e,n,this.condition):new Yr(e,n);Qr(this.elementStyle,t,i)},u.finish=function(){return this.cascade},u.startFuncWithSelector=function(t){var e;switch(t){case"is":e=new Aa(this);break;case"not":e=new ga(this);break;case"where":e=new va(this);break;case"has":e=new ma(this)}e&&(e.startSelectorRule(),this.owner.pushHandler(e))},e}(Di),Ca={"nth-child":ko,"nth-of-type":Lo,"nth-last-child":Oo,"nth-last-of-type":_o},Fa=0,Aa=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this,e.scope,e.owner,e.condition,e,e.regionId,e.validatorSet,!1)||this).parent=void 0,u.parentChain=void 0,u.chains=[],u.maxSpecificity=0,u.selectorTexts=[],u.parent=e,u.parentChain=e.chain,u}N(e,t);var u=e.prototype;return u.nextSelector=function(){this.chain&&this.chains.push(this.chain),this.maxSpecificity=Math.max(this.maxSpecificity,this.specificity),this.chain=[],this.pseudoelement=null,this.viewConditionId=null,this.footnoteContent=!1,this.specificity=0},u.endFuncWithSelector=function(){this.chain&&this.chains.push(this.chain),this.chains.length>0?(this.maxSpecificity=Math.max(this.maxSpecificity,this.specificity),this.parentChain.push(this.relational()?new jo(this.selectorTexts):this.positive()?new Wo(this.chains):new Xo(this.chains)),this.increasingSpecificity()&&(this.parent.specificity+=this.maxSpecificity)):this.parentChain.push(new zo("")),this.owner.popHandler()},u.startRuleBody=function(){this.reportAndSkip("E_CSS_UNEXPECTED_RULE_BODY")},u.error=function(u,n){t.prototype.error.call(this,u,n),this.chain=null,this.pseudoelement=null,this.viewConditionId=null,this.footnoteContent=!1,this.specificity=0;for(var i=!1,r=this;r instanceof e;r=r.parent)if(r.forgiving()){i=!0;break}i||this.owner.popHandler()},u.pushSelectorText=function(t){this.chain&&this.relational()&&this.selectorTexts.push(t)},u.positive=function(){return!0},u.increasingSpecificity=function(){return!0},u.forgiving=function(){return!0},u.relational=function(){return!1},e}(Ea),ga=/*#__PURE__*/function(t){function e(){return t.apply(this,arguments)||this}N(e,t);var u=e.prototype;return u.positive=function(){return!1},u.forgiving=function(){return!1},e}(Aa),va=/*#__PURE__*/function(t){function e(){return t.apply(this,arguments)||this}return N(e,t),e.prototype.increasingSpecificity=function(){return!1},e}(Aa),ma=/*#__PURE__*/function(t){function e(){return t.apply(this,arguments)||this}return N(e,t),e.prototype.relational=function(){return!0},e}(Aa),Ba=/*#__PURE__*/function(t){function e(e,u){return t.call(this,e,u,!1)||this}return N(e,t),e.prototype.property=function(t,e,u){if(this.scope.values[t])this.error("E_CSS_NAME_REDEFINED "+t,this.getCurrentToken());else{var n=t.match(/height|^(top|bottom)$/)?"vh":"vw",i=new De(this.scope,100,n);this.scope.defineName(t,e.toExpr(this.scope,i))}},e}(Di),wa=/*#__PURE__*/function(t){function e(e,u,n,i,r){var o;return(o=t.call(this,e,u,!1)||this).condition=void 0,o.elementStyle=void 0,o.validatorSet=void 0,o.order=void 0,o.condition=n,o.elementStyle=i,o.validatorSet=r,o.order=0,o}N(e,t);var u=e.prototype;return u.property=function(t,e,u){u?D.warn("E_IMPORTANT_NOT_ALLOWED"):this.validatorSet.validatePropertyAndHandleShorthand(t,e,u,this)},u.invalidPropertyValue=function(t,e){D.warn("E_INVALID_PROPERTY_VALUE",t+":",e.toString())},u.unknownProperty=function(t,e){D.warn("E_INVALID_PROPERTY",t+":",e.toString())},u.simpleProperty=function(t,e,u){var n=u?this.getImportantSpecificity():this.getBaseSpecificity();n+=this.order,this.order+=sa;var i=this.condition?new qr(e,n,this.condition):new Yr(e,n);Qr(this.elementStyle,t,i)},e}(Di),ya=/*#__PURE__*/function(t){function e(e,u){var n;return(n=t.call(this,e)||this).validatorSet=void 0,n.elementStyle={},n.order=0,n.validatorSet=u,n}N(e,t);var u=e.prototype;return u.property=function(t,e,u){this.validatorSet.validatePropertyAndHandleShorthand(t,e,u,this)},u.invalidPropertyValue=function(t,e){D.warn("E_INVALID_PROPERTY_VALUE",t+":",e.toString())},u.unknownProperty=function(t,e){D.warn("E_INVALID_PROPERTY",t+":",e.toString())},u.simpleProperty=function(t,e,u){var n=u?ri:ii;n+=this.order,this.order+=sa;var i=new Yr(e,n);Qr(this.elementStyle,t,i)},e}(xi);function Na(t,e){var u=oo(t);u&&u.forEach(function(t){t.matcher.matches()&&e(t.styles)})}function ba(t,e,u){Na(u,function(u){Pa(t,u,e)})}function Sa(t,e,u){var n=t["writing-mode"];if(n){var i=n.evaluate(e,"writing-mode");if(i&&i!==$e.inherit&&i!==$e.revert&&i!==$e.unset)return i===$e.vertical_rl}return u}function xa(t,e,u){var n=t.direction;if(n){var i=n.evaluate(e,"direction");if(i&&i!==$e.inherit&&i!==$e.revert&&i!==$e.unset)return i===$e.rtl}return u}function Ta(t,e,u,n,i){var r={};for(var o in t)to(o)&&(r[o]=uo(t,o));return ba(r,e,t),Ia(t,u,n,function(t,u){Pa(r,u,e),ba(r,e,u)}),r}function Ia(t,e,u,n){var i=io(t,"_regions");if((e||u)&&i){if(u){var r=["footnote"];e=e?e.concat(r):r}for(var o,a=R(e);!(o=a()).done;){var s=o.value,l=i[s];l&&n(s,l)}}}function Pa(t,e,u){for(var n in e)if(to(n)){var i=uo(e,n);t[n]=$r(u,t[n],i)}}var Ra=function(t,e,u,n,i){var r=u?n?jr:Wr:n?Kr:Xr;for(var o in t)if(t.hasOwnProperty(o)){var a=t[o];if(!a)continue;var s=r[o],l=void 0;if(s){var D=t[s];if(D&&D.priority>a.priority)continue;l=zr[s]?s:o}else l=o;e[l]=i(o,a)}},ka=/*#__PURE__*/function(t){function e(e,u,n){var i;return(i=t.call(this)||this).elementStyles=void 0,i.styler=void 0,i.element=void 0,i.elementStyles=e,i.styler=u,i.element=n,i}N(e,t);var u=e.prototype;return u.getVarValue=function(t){var e,u,n=null!=(e=this.element)?e:this.styler.root;if(null!=(u=this.elementStyles)&&u.length){for(var i,r=R(this.elementStyles);!(i=r()).done;){var o,a=null==(o=i.value[t])?void 0:o.value;if(a)return a}this.element&&(n=this.element.parentElement)}for(;n;n=n.parentElement){var s,l,D=null==(s=this.styler.getStyle(n,!1))||null==(l=s[t])?void 0:l.value;if(D)return D}return null},u.visitFunc=function(e){if("var"!==e.name)return t.prototype.visitFunc.call(this,e);var u=e.values[0]instanceof ke&&e.values[0].name;return u&&ru(u)?this.getVarValue(u)||(e.values.length<2?(this.error=!0,xe):2===e.values.length?e.values[1]:new We(e.values.slice(1))):(this.error=!0,xe)},e}(Ne),La=/*#__PURE__*/function(t){function e(e,u,n,i){var r;return(r=t.call(this)||this).context=void 0,r.resolveViewportUnit=void 0,r.percentRef=void 0,r.vertical=void 0,r.context=e,r.resolveViewportUnit=u,r.percentRef=n,r.vertical=i,r}N(e,t);var u=e.prototype;return u.visitFunc=function(e){var u=t.prototype.visitFunc.call(this,e);if("calc"!==e.name)return u;var n=u.toString().replace(/^calc\b/,"-epubx-expr");if(/\d(%|em|ex|cap|ch|ic|lh|p?v[whbi]|p?vmin|p?vmax)\W|\Wvar\(\s*--/i.test(n))return u;var i=Pi(this.context.rootScope,new yn(n,null),"");if(i instanceof je)try{var r=i.expr.evaluate(this.context);"number"==typeof r&&(u=new Oe(r,"px"))}catch(t){D.warn(t)}return u},u.visitNumeric=function(t){return this.resolveViewportUnit&&(kt(t.unit)||function(t){switch(null==t?void 0:t.toLowerCase()){case"rem":case"rlh":return!0;default:return!1}}(t.unit))?new Oe(t.num*this.context.queryUnitSize(t.unit,!1,this.vertical),"px"):"number"==typeof this.percentRef&&"%"===t.unit?new Oe(t.num*this.percentRef/100,"px"):t},e}(Ne);function Oa(t,e,u,n,i){try{if(e instanceof je)return e.expr instanceof de&&(e.expr.str.startsWith("named-string-")||e.expr.str.startsWith("running-element-"))?e:function(t,e,u){var n=e.evaluate(t);switch(typeof n){case"number":return function(t){return!!Ri[t]}(u)?n==Math.round(n)?new Me(n):new _e(n):new Oe(n,"px");case"string":return n?Pi(e.scope,new yn(n,null),""):xe;case"boolean":return n?$e._true:$e._false;case"undefined":return xe}throw new Error("E_UNEXPECTED")}(t,e.expr,u);if(e instanceof Oe||e instanceof Xe||e instanceof Ge||e instanceof We)return e.visit(new La(t,!0,n,i))}catch(t){return D.warn(t),xe}return e}function _a(t,e){var u={};return Object.keys(t).forEach(function(n){var i=u[n]={},r=t[n];Object.keys(r).forEach(function(t){i[t]=r[t].map(function(t){var u=e?t.physical:t.logical;return{regexp:new RegExp("(-?)"+(e?t.logical:t.physical)+"(-?)"),to:"$1"+u+"$2"}})})}),u}function Ma(t,e,u,n){var i=n[e];if(!i)throw new Error("unknown writing-mode: "+e);var r=i[u||"ltr"];if(!r)throw new Error("unknown direction: "+u);for(var o,a=R(r);!(o=a()).done;){var s=o.value,l=t.replace(s.regexp,s.to);if(l!==t)return l}return t}var Ua={"horizontal-tb":{ltr:[{logical:"inline-start",physical:"left"},{logical:"inline-end",physical:"right"},{logical:"block-start",physical:"top"},{logical:"block-end",physical:"bottom"},{logical:"inline-size",physical:"width"},{logical:"block-size",physical:"height"}],rtl:[{logical:"inline-start",physical:"right"},{logical:"inline-end",physical:"left"},{logical:"block-start",physical:"top"},{logical:"block-end",physical:"bottom"},{logical:"inline-size",physical:"width"},{logical:"block-size",physical:"height"}]},"vertical-rl":{ltr:[{logical:"inline-start",physical:"top"},{logical:"inline-end",physical:"bottom"},{logical:"block-start",physical:"right"},{logical:"block-end",physical:"left"},{logical:"inline-size",physical:"height"},{logical:"block-size",physical:"width"}],rtl:[{logical:"inline-start",physical:"bottom"},{logical:"inline-end",physical:"top"},{logical:"block-start",physical:"right"},{logical:"block-end",physical:"left"},{logical:"inline-size",physical:"height"},{logical:"block-size",physical:"width"}]},"vertical-lr":{ltr:[{logical:"inline-start",physical:"top"},{logical:"inline-end",physical:"bottom"},{logical:"block-start",physical:"left"},{logical:"block-end",physical:"right"},{logical:"inline-size",physical:"height"},{logical:"block-size",physical:"width"}],rtl:[{logical:"inline-start",physical:"bottom"},{logical:"inline-end",physical:"top"},{logical:"block-start",physical:"left"},{logical:"block-end",physical:"right"},{logical:"inline-size",physical:"height"},{logical:"block-size",physical:"width"}]}},Va=_a(Ua,!0);function Ha(t,e,u){return Ma(t,e,u||null,Va)}var za=_a(Ua,!1);function Ga(t,e,u){return Ma(t,e,u||null,za)}var Wa,Xa={"horizontal-tb":[{logical:"line-left",physical:"left"},{logical:"line-right",physical:"right"},{logical:"over",physical:"top"},{logical:"under",physical:"bottom"}],"vertical-rl":[{logical:"line-left",physical:"top"},{logical:"line-right",physical:"bottom"},{logical:"over",physical:"right"},{logical:"under",physical:"left"}],"vertical-lr":[{logical:"line-left",physical:"top"},{logical:"line-right",physical:"bottom"},{logical:"over",physical:"right"},{logical:"under",physical:"left"}]};function ja(t,e,u){var n={display:e.style.display,position:e.style.position,width:e.style.width,maxWidth:e.style.maxWidth,minWidth:e.style.minWidth,height:e.style.height,maxHeight:e.style.maxHeight,minHeight:e.style.minHeight},i=e.parentNode,r=e.ownerDocument.createElement("div");function o(u){return t.getElementComputedStyle(e).getPropertyValue(u)}Z(r,"position",n.position),i.insertBefore(r,e),r.appendChild(e),Z(e,"width","auto"),Z(e,"max-width","none"),Z(e,"min-width","0"),Z(e,"height","auto"),Z(e,"max-height","none"),Z(e,"min-height","0");var a=Q("writing-mode"),s=(a?o(a[0]):null)||o("writing-mode"),l="vertical-rl"===s||"tb-rl"===s||"vertical-lr"===s||"tb-lr"===s,D=l?"height":"width",h=l?"width":"height";function c(){return Z(e,"display","block"),Z(e,"position","static"),o(D)}function d(){Z(e,"display","inline-block"),Z(r,D,"99999999px");var t=o(D);return Z(r,D,""),t}function f(){Z(e,"display","inline-block"),Z(r,D,"0");var t=o(D);return Z(r,D,""),t}function p(){var t=c(),e=f(),u=parseFloat(t);if(u<=parseFloat(e))return e;var n=d();return u<=parseFloat(n)?t:n}function E(){return o(h)}function C(){throw new Error("Getting fill-available block size is not implemented")}var F={};return u.forEach(function(t){var u,i;switch(t){case Wa.FILL_AVAILABLE_INLINE_SIZE:i=c();break;case Wa.MAX_CONTENT_INLINE_SIZE:i=d();break;case Wa.MIN_CONTENT_INLINE_SIZE:i=f();break;case Wa.FIT_CONTENT_INLINE_SIZE:i=p();break;case Wa.FILL_AVAILABLE_BLOCK_SIZE:i=C();break;case Wa.MAX_CONTENT_BLOCK_SIZE:case Wa.MIN_CONTENT_BLOCK_SIZE:case Wa.FIT_CONTENT_BLOCK_SIZE:i=E();break;case Wa.FILL_AVAILABLE_WIDTH:i=l?C():c();break;case Wa.FILL_AVAILABLE_HEIGHT:i=l?c():C();break;case Wa.MAX_CONTENT_WIDTH:i=l?E():d();break;case Wa.MAX_CONTENT_HEIGHT:i=l?d():E();break;case Wa.MIN_CONTENT_WIDTH:i=l?E():f();break;case Wa.MIN_CONTENT_HEIGHT:i=l?f():E();break;case Wa.FIT_CONTENT_WIDTH:i=l?E():p();break;case Wa.FIT_CONTENT_HEIGHT:i=l?p():E()}"0px"!==i||1!==e.childNodes.length||"img"!==(null==(u=e.firstElementChild)?void 0:u.localName)||e.firstElementChild.complete||(i="1px"),F[t]=parseFloat(i),Z(e,"position",n.position),Z(e,"display",n.display)}),Z(e,"width",n.width),Z(e,"max-width",n.maxWidth),Z(e,"min-width",n.minWidth),Z(e,"height",n.height),Z(e,"max-height",n.maxHeight),Z(e,"min-height",n.minHeight),i.insertBefore(e,r),i.removeChild(r),F}!function(t){t.FILL_AVAILABLE_INLINE_SIZE="fill-available inline size",t.FILL_AVAILABLE_BLOCK_SIZE="fill-available block size",t.FILL_AVAILABLE_WIDTH="fill-available width",t.FILL_AVAILABLE_HEIGHT="fill-available height",t.MAX_CONTENT_INLINE_SIZE="max-content inline size",t.MAX_CONTENT_BLOCK_SIZE="max-content block size",t.MAX_CONTENT_WIDTH="max-content width",t.MAX_CONTENT_HEIGHT="max-content height",t.MIN_CONTENT_INLINE_SIZE="min-content inline size",t.MIN_CONTENT_BLOCK_SIZE="min-content block size",t.MIN_CONTENT_WIDTH="min-content width",t.MIN_CONTENT_HEIGHT="min-content height",t.FIT_CONTENT_INLINE_SIZE="fit-content inline size",t.FIT_CONTENT_BLOCK_SIZE="fit-content block size",t.FIT_CONTENT_WIDTH="fit-content width",t.FIT_CONTENT_HEIGHT="fit-content height"}(Wa||(Wa={}));var Ka=qi.FloatReference;function Ya(t){switch(t){case Ka.INLINE:return!1;case Ka.COLUMN:case Ka.REGION:case Ka.PAGE:return!0;default:throw new Error("Unknown float-reference: "+t)}}var qa=/*#__PURE__*/function(){function t(t,e,u,n,i,r){this.nodePosition=void 0,this.floatReference=void 0,this.floatSide=void 0,this.clearSide=void 0,this.flowName=void 0,this.floatMinWrapBlock=void 0,this.order=null,this.id=null,this.nodePosition=t,this.floatReference=e,this.floatSide=u,this.clearSide=n,this.flowName=i,this.floatMinWrapBlock=r}var e=t.prototype;return e.getOrder=function(){if(null===this.order)throw new Error("The page float is not yet added");return this.order},e.getId=function(){if(!this.id)throw new Error("The page float is not yet added");return this.id},e.isAllowedOnContext=function(t){return t.isAnchorAlreadyAppeared(this.getId())},e.isAllowedToPrecede=function(t){return!1},t}(),$a=/*#__PURE__*/function(){function t(){this.floats=[],this.nextPageFloatIndex=0}var e=t.prototype;return e.nextOrder=function(){return this.nextPageFloatIndex++},e.createPageFloatId=function(t){return"pf"+t},e.addPageFloat=function(t){if(this.floats.findIndex(function(e){return vr(e.nodePosition,t.nodePosition)})>=0)throw new Error("A page float with the same source node is already registered");var e=t.order=this.nextOrder();t.id=this.createPageFloatId(e),this.floats.push(t)},e.findPageFloatByNodePosition=function(t){var e=this.floats.findIndex(function(e){return vr(e.nodePosition,t)});return e>=0?this.floats[e]:null},e.findPageFloatById=function(t){var e=this.floats.findIndex(function(e){return e.id===t});return e>=0?this.floats[e]:null},t}(),Qa=/*#__PURE__*/function(){function t(t,e,u,n,i){this.floatReference=void 0,this.floatSide=void 0,this.continuations=void 0,this.area=void 0,this.continues=void 0,this.floatReference=t,this.floatSide=e,this.continuations=u,this.area=n,this.continues=i}var e=t.prototype;return e.hasFloat=function(t){return this.continuations.some(function(e){return e.float===t})},e.findNotAllowedFloat=function(t){for(var e=this.continuations.length-1;e>=0;e--){var u=this.continuations[e].float;if(!u.isAllowedOnContext(t))return u}return null},e.getOuterShape=function(){return this.area.getOuterShape(null,null)},e.getOuterRect=function(){return this.area.getOuterRect()},e.getOrder=function(){var t=this.continuations.map(function(t){return t.float});return Math.min.apply(null,t.map(function(t){return t.getOrder()}))},e.shouldBeStashedBefore=function(t){return this.getOrder()<t.getOrder()},e.addContinuations=function(t){var e=this;t.forEach(function(t){e.continuations.push(t)})},e.getFlowName=function(){var t=this.continuations[0].float.flowName;return this.continuations.every(function(e){return e.float.flowName===t}),t},t}(),Za=/*#__PURE__*/function(){function t(t,e){this.float=void 0,this.nodePosition=void 0,this.float=t,this.nodePosition=e}return t.prototype.equals=function(t){return!!t&&(this===t||this.float===t.float&&vr(this.nodePosition,t.nodePosition))},t}(),Ja=/*#__PURE__*/function(){function t(t,e,u,n,i,r,o){this.parent=void 0,this.floatReference=void 0,this.container=void 0,this.flowName=void 0,this.generatingNodePosition=void 0,this.children=[],this.writingMode=void 0,this.direction=void 0,this.invalidated=!1,this.floatStore=void 0,this.forbiddenFloats=[],this.floatFragments=[],this.stashedFloatFragments=[],this.floatAnchors={},this.floatsDeferredToNext=[],this.floatsDeferredFromPrevious=void 0,this.layoutConstraints=[],this.locked=!1,this.parent=t,this.floatReference=e,this.container=u,this.flowName=n,this.generatingNodePosition=i,t&&t.children.push(this),this.writingMode=r||t&&t.writingMode||$e.horizontal_tb,this.direction=o||t&&t.direction||$e.ltr,this.floatStore=t?t.floatStore:new $a;var a=this.getPreviousSibling();this.floatsDeferredFromPrevious=a?[].concat(a.floatsDeferredToNext):[]}var e=t.prototype;return e.getParent=function(t){if(!this.parent)throw new Error("No PageFloatLayoutContext for "+t);return this.parent},e.getPreviousSiblingOf=function(t,e,u,n){var i=this.children.indexOf(t);i<0&&(i=this.children.length);for(var r=i-1;r>=0;r--){var o=this.children[r];if(o.floatReference===e&&o.flowName===u&&vr(o.generatingNodePosition,n))return o;if(o=o.getPreviousSiblingOf(null,e,u,n))return o}return null},e.getPreviousSibling=function(){for(var t,e=this,u=this.parent;u;){if(t=u.getPreviousSiblingOf(e,this.floatReference,this.flowName,this.generatingNodePosition))return t;e=u,u=u.parent}return null},e.getContainer=function(t){return t&&t!==this.floatReference?this.getParent(t).getContainer(t):this.container},e.setContainer=function(t){this.container=t,this.reattachFloatFragments()},e.addPageFloat=function(t){this.floatStore.addPageFloat(t)},e.getPageFloatLayoutContext=function(t){return t===this.floatReference?this:this.getParent(t).getPageFloatLayoutContext(t)},e.findPageFloatByNodePosition=function(t){return this.floatStore.findPageFloatByNodePosition(t)},e.forbid=function(t){var e=t.getId(),u=t.floatReference;u===this.floatReference?this.forbiddenFloats.includes(e)||(this.forbiddenFloats.push(e),(new es).findByFloat(t).forbid(t,this)):this.getParent(u).forbid(t)},e.isForbidden=function(t){var e=t.getId(),u=t.floatReference;return u===this.floatReference?this.forbiddenFloats.includes(e):this.getParent(u).isForbidden(t)},e.addPageFloatFragment=function(t,e){var u=t.floatReference;u!==this.floatReference?this.getParent(u).addPageFloatFragment(t,e):this.floatFragments.includes(t)||(this.floatFragments.push(t),this.floatFragments.sort(function(t,e){return t.getOrder()-e.getOrder()})),e||this.invalidate()},e.removePageFloatFragment=function(t,e){var u=t.floatReference;if(u!==this.floatReference)this.getParent(u).removePageFloatFragment(t,e);else{var n=this.floatFragments.indexOf(t);if(n>=0){var i=this.floatFragments.splice(n,1)[0],r=i.area&&i.area.element;r&&r.parentNode&&r.parentNode.removeChild(r),e||this.invalidate()}}},e.findPageFloatFragment=function(t){if(t.floatReference!==this.floatReference)return this.getParent(t.floatReference).findPageFloatFragment(t);var e=this.floatFragments.findIndex(function(e){return e.hasFloat(t)});return e>=0?this.floatFragments[e]:null},e.hasFloatFragments=function(t){return!(!(this.floatFragments.length>0)||t&&!this.floatFragments.some(t))||!!this.parent&&this.parent.hasFloatFragments(t)},e.hasContinuingFloatFragmentsInFlow=function(t){return this.hasFloatFragments(function(e){return e.continues&&e.getFlowName()===t})},e.registerPageFloatAnchor=function(t,e){this.floatAnchors[t.getId()]=e},e.collectPageFloatAnchors=function(){var t=Object.assign({},this.floatAnchors);return this.children.reduce(function(t,e){return Object.assign(t,e.collectPageFloatAnchors())},t)},e.isAnchorAlreadyAppeared=function(t){if(this.getDeferredPageFloatContinuations().some(function(e){return e.float.getId()===t}))return!0;var e=this.collectPageFloatAnchors()[t];return!!e&&!(!this.container||!this.container.element)&&this.container.element.contains(e)},e.deferPageFloat=function(t){var e=t.float;if(e.floatReference===this.floatReference){var u=this.floatsDeferredToNext.findIndex(function(t){return t.float===e});u>=0?this.floatsDeferredToNext.splice(u,1,t):this.floatsDeferredToNext.push(t)}else this.getParent(e.floatReference).deferPageFloat(t)},e.hasPrecedingFloatsDeferredToNext=function(t,e){if(!e&&t.floatReference!==this.floatReference)return this.getParent(t.floatReference).hasPrecedingFloatsDeferredToNext(t,!1);var u=t.getOrder();return!!this.floatsDeferredToNext.some(function(e){return e.float.getOrder()<u&&!t.isAllowedToPrecede(e.float)})||!!this.parent&&this.parent.hasPrecedingFloatsDeferredToNext(t,!0)},e.getLastFollowingFloatInFragments=function(t){var e=t.getOrder(),u=null;if(this.floatFragments.forEach(function(t){t.continuations.forEach(function(t){var n=t.float,i=n.getOrder();i>e&&(!u||i>u.getOrder())&&(u=n)})}),this.parent){var n=this.parent.getLastFollowingFloatInFragments(t);n&&(!u||n.getOrder()>u.getOrder())&&(u=n)}return u},e.getDeferredPageFloatContinuations=function(t){t=t||this.flowName;var e=this.floatsDeferredFromPrevious.filter(function(e){return!t||e.float.flowName===t});return this.parent&&(e=this.parent.getDeferredPageFloatContinuations(t).concat(e)),e.sort(function(t,e){return t.float.getOrder()-e.float.getOrder()})},e.getPageFloatContinuationsDeferredToNext=function(t){t=t||this.flowName;var e=this.floatsDeferredToNext.filter(function(e){return!t||e.float.flowName===t});return this.parent?this.parent.getPageFloatContinuationsDeferredToNext(t).concat(e):e},e.getFloatsDeferredToNextInChildContexts=function(){for(var t=[],e=[],u=this.children.length-1;u>=0;u--){var n=this.children[u];e.includes(n.flowName)||(e.push(n.flowName),t=(t=t.concat(n.floatsDeferredToNext.map(function(t){return t.float}))).concat(n.getFloatsDeferredToNextInChildContexts()))}return t},e.checkAndForbidNotAllowedFloat=function(){if(this.checkAndForbidFloatFollowingDeferredFloat())return!0;for(var t=this.floatFragments.length-1;t>=0;t--){var e=this.floatFragments[t],u=e.findNotAllowedFloat(this);if(u)return this.locked?this.invalidate():(this.removePageFloatFragment(e),this.forbid(u),this.removeEndFloatFragments(e.floatSide)),!0}return!(this.floatReference!==Ka.REGION||!this.parent.locked)&&this.parent.checkAndForbidNotAllowedFloat()},e.checkAndForbidFloatFollowingDeferredFloat=function(){var t=this,e=this.getFloatsDeferredToNextInChildContexts(),u=this.floatFragments.reduce(function(t,e){return t.concat(e.continuations.map(function(t){return t.float}))},[]);u.sort(function(t,e){return e.getOrder()-t.getOrder()});for(var n,i=function(){var u=n.value,i=u.getOrder();if(e.some(function(t){return!u.isAllowedToPrecede(t)&&i>t.getOrder()})){if(t.locked)t.invalidate();else{t.forbid(u);var r=t.findPageFloatFragment(u);t.removePageFloatFragment(r)}return{v:!0}}},r=R(u);!(n=r()).done;){var o=i();if("object"==typeof o)return o.v}return!1},e.finish=function(){var t=this;if(!this.checkAndForbidNotAllowedFloat()){for(var e=this.floatsDeferredToNext.length-1;e>=0;e--)if(!this.floatsDeferredToNext[e].float.isAllowedOnContext(this)){if(this.locked)return void this.invalidate();this.floatsDeferredToNext.splice(e,1)}this.floatsDeferredFromPrevious.forEach(function(e){t.floatsDeferredToNext.findIndex(function(t){return e.equals(t)})>=0||t.floatFragments.some(function(t){return t.hasFloat(e.float)})||t.floatsDeferredToNext.push(e)})}},e.hasSameContainerAs=function(t){return!!this.container&&!!t.container&&this.container.element===t.container.element},e.invalidate=function(){var t=this;this.invalidated=!0,this.locked||(this.container&&(this.children.forEach(function(e){t.hasSameContainerAs(e)&&e.floatFragments.forEach(function(t){var e=t.area.element;e&&e.parentNode&&e.parentNode.removeChild(e)})}),this.container.clear()),this.children.forEach(function(t){t.layoutConstraints.splice(0)}),this.children.splice(0),Object.keys(this.floatAnchors).forEach(function(e){delete t.floatAnchors[e]}))},e.detachChildren=function(){var t=this.children.splice(0);return t.forEach(function(t){t.floatFragments.forEach(function(t){var e=t.area.element;e&&e.parentNode&&e.parentNode.removeChild(e)})}),t},e.attachChildren=function(t){var e=this;t.forEach(function(t){e.children.push(t),t.reattachFloatFragments()})},e.isInvalidated=function(){return this.invalidated||!!this.parent&&this.parent.isInvalidated()},e.validate=function(){this.invalidated=!1},e.toLogical=function(t){return Ga(t,this.writingMode.toString(),this.direction.toString())},e.toPhysical=function(t){return Ha(t,this.writingMode.toString(),this.direction.toString())},e.removeEndFloatFragments=function(t){var e=this.toLogical(t);if("block-end"===e||"inline-end"===e)for(var u=0;u<this.floatFragments.length;){var n=this.floatFragments[u];this.toLogical(n.floatSide)===e?this.removePageFloatFragment(n):u++}},e.stashEndFloatFragments=function(t){var e=t.floatReference;if(e===this.floatReference){var u=this.toLogical(t.floatSide);if("block-end"===u||"snap-block"===u||"inline-end"===u)for(var n=0;n<this.floatFragments.length;){var i=this.floatFragments[n],r=this.toLogical(i.floatSide);(r===u||"snap-block"===u&&"block-end"===r)&&i.shouldBeStashedBefore(t)?(this.stashedFloatFragments.push(i),this.floatFragments.splice(n,1)):n++}}else this.getParent(e).stashEndFloatFragments(t)},e.restoreStashedFragments=function(t){var e=this;t===this.floatReference?(this.stashedFloatFragments.forEach(function(t){e.addPageFloatFragment(t,!0)}),this.stashedFloatFragments.splice(0)):this.getParent(t).restoreStashedFragments(t)},e.discardStashedFragments=function(t){t===this.floatReference?this.stashedFloatFragments.splice(0):this.getParent(t).discardStashedFragments(t)},e.getStashedFloatFragments=function(t){return t===this.floatReference?this.stashedFloatFragments.concat().sort(function(t,e){return e.getOrder()-t.getOrder()}):this.getParent(t).getStashedFloatFragments(t)},e.getLimitValue=function(t,e,u,n){var i=this.toLogical(t),r=this.toPhysical(t),o=this.getLimitValueInner(i,e,u,n);if(this.parent&&this.parent.container){var a=this.parent.getLimitValue(r,e,u,n);switch(r){case"top":case"left":return Math.max(o,a);case"bottom":case"right":return Math.min(o,a)}}return o},e.getLimitValueInner=function(t,e,u,n){var i=this.getLimitValuesInner(e,u,n);switch(t){case"block-start":return this.container.vertical?i.right:i.top;case"block-end":return this.container.vertical?i.left:i.bottom;case"inline-start":return this.container.vertical?this.container.rtl?i.bottom:i.top:this.container.rtl?i.right:i.left;case"inline-end":return this.container.vertical?this.container.rtl?i.top:i.bottom:this.container.rtl?i.left:i.right;default:throw new Error("Unknown logical side: "+t)}},e.getLimitValuesInner=function(t,e,u){var n=this,i=this.container.originX,r=this.container.originY,o=this.container.getPaddingRect(),a={top:o.y1-r,left:o.x1-i,bottom:o.y2-r,right:o.x2-i,floatMinWrapBlockStart:0,floatMinWrapBlockEnd:0};function s(u,n,i){return"%"===u.unit?i*u.num/100:t.convertLengthToPx(u,n,e)}var l=this.floatFragments;return l.length>0&&(a=l.reduce(function(t,e){if(u&&!u(e,n))return t;var i=n.toLogical(e.floatSide),r=e.area,a=e.continuations[0].float.floatMinWrapBlock,l=t.top,D=t.left,h=t.bottom,c=t.right,d=t.floatMinWrapBlockStart,f=t.floatMinWrapBlockEnd;switch(i){case"inline-start":r.vertical?l=Math.max(l,r.top+r.height):D=Math.max(D,r.left+r.width);break;case"block-start":r.vertical?(a&&r.left<c&&(d=s(a,r.rootViewNodes[0],o.x2-o.x1)),c=Math.min(c,r.left)):(a&&r.top+r.height>l&&(d=s(a,r.rootViewNodes[0],o.y2-o.y1)),l=Math.max(l,r.top+r.height));break;case"inline-end":r.vertical?h=Math.min(h,r.top):c=Math.min(c,r.left);break;case"block-end":r.vertical?(a&&r.left+r.width>D&&(f=s(a,r.rootViewNodes[0],o.x2-o.x1)),D=Math.max(D,r.left+r.width)):(a&&r.top<h&&(f=s(a,r.rootViewNodes[0],o.y2-o.y1)),h=Math.min(h,r.top));break;default:throw new Error("Unknown logical float side: "+i)}return{top:l,left:D,bottom:h,right:c,floatMinWrapBlockStart:d,floatMinWrapBlockEnd:f}},a)),a.left+=i,a.right+=i,a.top+=r,a.bottom+=r,a},e.setFloatAreaDimensions=function(t,e,u,n,i,r,o){if(e!==this.floatReference)return this.getParent(e).setFloatAreaDimensions(t,e,u,n,i,r,o);var a=this.toLogical(u);if("snap-block"===a){if(!o["block-start"]&&!o["block-end"])return null}else if(!o[a])return null;var s,l,D,h,c=this.getLimitValue("block-start",t.layoutContext,t.clientLayout),d=this.getLimitValue("block-end",t.layoutContext,t.clientLayout),f=this.getLimitValue("inline-start",t.layoutContext,t.clientLayout),p=this.getLimitValue("inline-end",t.layoutContext,t.clientLayout),E=t.vertical?t.originX:t.originY,C=t.vertical?t.originY:t.originX;function F(e,u){var n=e(t.bands,u);return n?(t.vertical&&(n=vu(n)),c=t.vertical?Math.min(c,n.x2):Math.max(c,n.y1),d=t.vertical?Math.max(d,n.x1):Math.min(d,n.y2),!0):r}if(c=t.vertical?Math.min(c,t.left+t.getInsetLeft()+t.width+t.getInsetRight()+E):Math.max(c,t.top+E),d=t.vertical?Math.max(d,t.left+E):Math.min(d,t.top+t.getInsetTop()+t.height+t.getInsetBottom()+E),i){var A=t.vertical?gu(new ou(d,f,c,p)):new ou(f,c,p,d);if(("block-start"===a||"snap-block"===a||"inline-start"===a)&&!F(yu,A))return null;if(("block-end"===a||"snap-block"===a||"inline-end"===a)&&!F(Nu,A))return null;if(s=(D=(d-c)*t.getBoxDir())-t.getInsetBefore()-t.getInsetAfter(),l=(h=(p-f)*t.getInlineDir())-t.getInsetStart()-t.getInsetEnd(),!r&&(s<=0||l<=0))return null}else{D=(s=t.computedBlockSize)+t.getInsetBefore()+t.getInsetAfter();var g=(d-c)*t.getBoxDir();if("snap-block"===a){if(null===n)a="block-start";else{var v=this.container.getPaddingRect();a=this.container.getBoxDir()*(n-(this.container.vertical?v.x2:v.y1))<=this.container.getBoxDir()*((this.container.vertical?v.x1:v.y2)-n-D)?"block-start":"block-end"}if(!o[a]){if(!o["block-end"])return null;a="block-end"}}if(!r&&g<D)return null;h=(l="inline-start"===a||"inline-end"===a?ja(t.clientLayout,t.element,[Wa.FIT_CONTENT_INLINE_SIZE])[Wa.FIT_CONTENT_INLINE_SIZE]:t.adjustContentRelativeSize?t.getContentInlineSize():t.vertical?t.height:t.width)+t.getInsetStart()+t.getInsetEnd();var m=(p-f)*t.getInlineDir();if(!r&&m<h)return null}switch(c-=E,d-=E,f-=C,p-=C,a){case"inline-start":case"block-start":case"snap-block":t.setInlinePosition(f,l),t.setBlockPosition(c,s);break;case"inline-end":case"block-end":t.setInlinePosition(p-h*t.getInlineDir(),l),t.setBlockPosition(d-D*t.getBoxDir(),s);break;default:throw new Error("unknown float direction: "+u)}return a},e.getFloatFragmentExclusions=function(){var t=this.floatFragments.map(function(t){return t.getOuterShape()});return this.parent?this.parent.getFloatFragmentExclusions().concat(t):t},e.reattachFloatFragments=function(){var t=this.container.element&&this.container.element.parentNode;t&&this.floatFragments.forEach(function(e){t.appendChild(e.area.element)})},e.getMaxReachedAfterEdge=function(){var t=this.getContainer().vertical;return this.floatFragments.reduce(function(e,u){var n=u.getOuterRect();return t?Math.min(e,n.x1):Math.max(e,n.y2)},t?Infinity:0)},e.getBlockStartEdgeOfBlockEndFloats=function(){var t=this.getContainer().vertical;return this.floatFragments.filter(function(t){return"block-end"===t.floatSide}).reduce(function(e,u){var n=u.getOuterRect();return t?Math.max(e,n.x2):Math.min(e,n.y1)},t?0:Infinity)},e.getPageFloatClearEdge=function(t,e){function u(t){return function(e){return t.isAnchorAlreadyAppeared(e.float.getId())}}function n(t,e){return t.continuations.some(u(e))}for(var i=e.getPaddingRect(),r=e.vertical?i.x1:i.y2,o=this;o;){if(o.floatsDeferredToNext.some(u(o)))return r;o=o.parent}var a=this.getLimitValue("block-start",e.layoutContext,e.clientLayout,n);return this.getLimitValue("block-end",e.layoutContext,e.clientLayout,n)*e.getBoxDir()<r*e.getBoxDir()?r:a},e.getPageFloatPlacementCondition=function(t,e,u){var n=this;if(t.floatReference!==this.floatReference)return this.getParent(t.floatReference).getPageFloatPlacementCondition(t,e,u);var i={"block-start":!0,"block-end":!0,"inline-start":!0,"inline-end":!0};if(!u)return i;var r,o=this.toLogical(e),a=this.toLogical(u);r="all"===a?["block-start","block-end","inline-start","inline-end"]:"both"===a?["inline-start","inline-end"]:"same"===a?"snap-block"===o?["block-start","block-end"]:[o]:[a];var s=t.getOrder();function l(t){return function(e){return e.floatSide===t&&e.getOrder()<s}}function D(t,e){return t.children.some(function(t){return t.floatFragments.some(l(e))||D(t,e)})}function h(t,e){var u=t.parent;return!!u&&(u.floatFragments.some(l(e))||h(u,e))}return r.forEach(function(t){switch(t){case"block-start":case"inline-start":i[t]=!D(n,t);break;case"block-end":case"inline-end":i[t]=!h(n,t);break;default:throw new Error("Unexpected side: "+t)}}),i},e.getLayoutConstraints=function(){return(this.parent?this.parent.getLayoutConstraints():[]).concat(this.layoutConstraints)},e.addLayoutConstraint=function(t,e){e===this.floatReference?this.layoutConstraints.push(t):this.getParent(e).addLayoutConstraint(t,e)},e.isColumnFullWithPageFloats=function(t){for(var e=t.layoutContext,u=t.clientLayout,n=this,i=null;n&&n.container;){var r=n.getLimitValuesInner(e,u);i?t.vertical?(r.right<i.right&&(i.right=r.right,i.floatMinWrapBlockStart=r.floatMinWrapBlockStart),r.left>i.left&&(i.left=r.left,i.floatMinWrapBlockEnd=r.floatMinWrapBlockEnd)):(r.top>i.top&&(i.top=r.top,i.floatMinWrapBlockStart=r.floatMinWrapBlockStart),r.bottom<i.bottom&&(i.bottom=r.bottom,i.floatMinWrapBlockEnd=r.floatMinWrapBlockEnd)):i=r,n=n.parent}var o=Math.max(i.floatMinWrapBlockStart,i.floatMinWrapBlockEnd);return(t.vertical?i.right-i.left:i.bottom-i.top)<=o},e.getMaxBlockSizeOfPageFloats=function(){var t=this.getContainer().vertical;return this.floatFragments.length?Math.max.apply(null,this.floatFragments.map(function(e){var u=e.area;return t?u.width:u.height})):0},e.lock=function(){this.locked=!0},e.unlock=function(){this.locked=!1},e.isLocked=function(){return this.locked},t}(),ts=[],es=/*#__PURE__*/function(){function t(){}t.register=function(t){ts.push(t)};var e=t.prototype;return e.findByNodeContext=function(t){for(var e=ts.length-1;e>=0;e--){var u=ts[e];if(u.appliesToNodeContext(t))return u}throw new Error("No PageFloatLayoutStrategy found for "+t)},e.findByFloat=function(t){for(var e=ts.length-1;e>=0;e--){var u=ts[e];if(u.appliesToFloat(t))return u}throw new Error("No PageFloatLayoutStrategy found for "+t)},t}();es.register(new(/*#__PURE__*/function(){function t(){}var e=t.prototype;return e.appliesToNodeContext=function(t){return Ya(t.floatReference)},e.appliesToFloat=function(t){return!0},e.createPageFloat=function(t,e,u){var n=t.floatReference,i=t.floatSide,r=t.toNodePosition();return u.resolveFloatReferenceFromColumnSpan(n,t.columnSpan,t).thenAsync(function(u){var o=new qa(r,n=u,i,t.clearSide,e.flowName,t.floatMinWrapBlock);return e.addPageFloat(o),Tn(o)})},e.createPageFloatFragment=function(t,e,u,n){return new Qa(t[0].float.floatReference,e,t,u,n)},e.findPageFloatFragment=function(t,e){return e.findPageFloatFragment(t)},e.adjustPageFloatArea=function(t,e,u){},e.forbid=function(t,e){},t}()));var us=Qa,ns=/*#__PURE__*/function(t){function e(e,u,n,i,r){var o;return(o=t.call(this,e,u,"block-end",null,n,r)||this).footnotePolicy=void 0,o.footnotePolicy=i,o}return N(e,t),e.prototype.isAllowedToPrecede=function(t){return!(t instanceof e)},e}(qa),is=/*#__PURE__*/function(t){function e(e,u,n,i){return t.call(this,e,"block-end",u,n,i)||this}N(e,t);var u=e.prototype;return u.getOrder=function(){return Infinity},u.shouldBeStashedBefore=function(t){return t instanceof ns||this.getOrder()<t.getOrder()},e}(us),rs=/*#__PURE__*/function(){function t(t){this.footnote=void 0,this.footnote=t}return t.prototype.allowLayout=function(t){return!vr(t.toNodePosition(),this.footnote.nodePosition)},t}();function os(t){var e,u=t.toString();switch(u){case"inline-flex":e="flex";break;case"inline-grid":e="grid";break;case"inline-table":e="table";break;case"inline":case"table-row-group":case"table-column":case"table-column-group":case"table-header-group":case"table-footer-group":case"table-row":case"table-cell":case"table-caption":case"inline-block":e="block";break;default:e=u}return Le(e)}function as(t){return t===$e.absolute||t===$e.fixed}function ss(t){return t instanceof Xe&&"running"===t.name}function ls(t,e,u,n){return t===$e.none||(as(e)?(u=$e.none,t=os(t)):(u&&u!==$e.none&&!nu(u)||n)&&(t=os(t))),{display:t,position:e,float:u}}function Ds(t,e,u,n){return ls(t,e,u,n).display===$e.block}function hs(t){switch(t.toString()){case"inline":case"inline-block":case"inline-list-item":case"inline-flex":case"inline-grid":case"ruby":case"inline-table":return!0;default:return!1}}function cs(t){switch(t.toString()){case"ruby-base":case"ruby-text":case"ruby-base-container":case"ruby-text-container":return!0;default:return!1}}function ds(t,e,u,n){var i=t.viewNode;if(!i)return NaN;var r=1===i.nodeType?i:i.parentElement;if(r&&r.namespaceURI===H.XHTML&&/^([\d\.]|super|(text-)?top)/.test(r.style.verticalAlign))return NaN;if(i===r){if(t.after||!t.inline){if(t.after&&!t.inline&&r.querySelector("ruby")){var o=r.parentNode,a=r.nextSibling;o.removeChild(r),o.insertBefore(r,a)}var s=e.getElementClientRect(r);if(0===s.left&&0===s.top&&0===s.right&&0===s.bottom)return NaN;if(s.right>=s.left&&s.bottom>=s.top)return t.after?n?s.left:s.bottom:n?s.right:s.top}return NaN}var l=i.ownerDocument.createRange(),D=i.textContent.length;if(!D)return NaN;t.after&&(u+=D),u>=D&&(u=D-1),l.setStart(i,u),l.setEnd(i,u+1);var h=e.getRangeClientRects(l);return(h=h.filter(function(t){return t.right>t.left&&t.bottom>t.top})).length?n?Math.min.apply(null,h.map(function(t){return t.left})):Math.max.apply(null,h.map(function(t){return t.bottom})):NaN}function fs(t,e,u){var n=e.clientLayout.getElementClientRect(t),i=e.getComputedMargin(t);return u?n.width+i.left+i.right:n.height+i.top+i.bottom}function ps(t){for(;t;){if(t.parentNode===t.ownerDocument)return!1;t=t.parentNode}return!0}function Es(t,e){if(t)for(var u;(u=t.lastChild)!=e;)t.removeChild(u)}function Cs(t){return!!t.getAttribute(cr)}function Fs(t){var e;if(1!==(null==t?void 0:t.nodeType))return!1;var u=t;if(Cs(u))return!0;var n=null==(e=u.style)?void 0:e.position;return"absolute"===n||"fixed"===n}function As(t){var e=null==t?void 0:t.viewNode;return 1===(null==e?void 0:e.nodeType)&&Cs(e)}function gs(t){for(var e=t.parent;e;e=e.parent)if("inline"!==e.display&&hs(e.display))return e;return null}es.register(new(/*#__PURE__*/function(){function t(){}var e=t.prototype;return e.appliesToNodeContext=function(t){return"footnote"===t.floatSide},e.appliesToFloat=function(t){return t instanceof ns},e.createPageFloat=function(t,e,u){var n=Ka.REGION,i=e.getPageFloatLayoutContext(n);e.getPageFloatLayoutContext(Ka.PAGE).hasSameContainerAs(i)&&(n=Ka.PAGE);var r=t.toNodePosition(),o=new ns(r,n,e.flowName,t.footnotePolicy,t.floatMinWrapBlock);return e.addPageFloat(o),Tn(o)},e.createPageFloatFragment=function(t,e,u,n){return new is(t[0].float.floatReference,t,u,n)},e.findPageFloatFragment=function(t,e){return e.getPageFloatLayoutContext(t.floatReference).floatFragments.filter(function(t){return t instanceof is})[0]||null},e.adjustPageFloatArea=function(t,e,u){t.isFootnote=!0,t.adjustContentRelativeSize=!1;var n=t.element;t.vertical=u.layoutContext.applyFootnoteStyle(e.vertical,u.layoutContext.nodeContext&&"rtl"===u.layoutContext.nodeContext.direction,n),t.convertPercentageSizesToPx(n),u.setComputedInsets(n,t),u.setComputedWidthAndHeight(n,t)},e.forbid=function(t,e){var u=t;if(u.footnotePolicy===$e.line){var n=new rs(u);e.addLayoutConstraint(n,u.floatReference)}},t}()));var vs=/*#__PURE__*/function(){function t(){}var e=t.prototype;return e.calculateOffset=function(t){return ms(this.getNodeContext(),t.collectElementsOffset())},e.breakPositionChosen=function(t){},e.getNodeContext=function(){return null},t}();function ms(t,e){return{current:e.reduce(function(e,u){return e+u.calculateOffset(t)},0),minimum:e.reduce(function(e,u){return e+u.calculateMinimumOffset(t)},0)}}var Bs=/*#__PURE__*/function(t){function e(e,u,n,i){var r;return(r=t.call(this)||this).position=void 0,r.breakOnEdge=void 0,r.overflows=void 0,r.computedBlockSize=void 0,r.overflowIfRepetitiveElementsDropped=void 0,r.isEdgeUpdated=!1,r.edge=0,r.position=e,r.breakOnEdge=u,r.overflows=n,r.computedBlockSize=i,r.overflowIfRepetitiveElementsDropped=n,r}N(e,t);var u=e.prototype;return u.findAcceptableBreak=function(t,e){return this.updateOverflows(t),e<this.getMinBreakPenalty()?null:t.findEdgeBreakPosition(this)},u.getMinBreakPenalty=function(){if(!this.isEdgeUpdated)throw new Error("EdgeBreakPosition.prototype.updateEdge not called");var t=this.isFirstContentOfRepetitiveElementsOwner()&&!this.overflowIfRepetitiveElementsDropped;return(er(this.breakOnEdge)?1:0)+(this.overflows&&!t?3:0)+(this.position.parent?this.position.parent.breakPenalty:0)},u.updateEdge=function(t){var e=t.calculateClonedPaddingBorder(this.position);if(this.edge=ds(this.position,t.clientLayout,0,t.vertical)+e,!this.position.after&&!this.position.inline){var u=t.parseComputedLength(t.clientLayout.getElementComputedStyle(this.position.viewNode).marginBlockStart);this.edge-=(t.vertical?-1:1)*u}this.isEdgeUpdated=!0},u.updateOverflows=function(t){this.isEdgeUpdated||this.updateEdge(t);var e=this.edge,u=this.calculateOffset(t);this.overflowIfRepetitiveElementsDropped=t.isOverflown(e+(t.vertical?-1:1)*u.minimum),this.overflows=this.position.overflow=t.isOverflown(e+(t.vertical?-1:1)*u.current)},u.getNodeContext=function(){return this.position},u.isFirstContentOfRepetitiveElementsOwner=function(){var t=this.getNodeContext();if(!t||!t.parent)return!1;var e=t.parent.formattingContext;if(!Qi.isInstanceOfRepetitiveElementsOwnerFormattingContext(e))return!1;var u=e.getRepetitiveElements();return!!u&&u.isFirstContentNode(t)},e}(vs),ws=/*#__PURE__*/function(){function t(){}return t.prototype.find=function(t){for(var e=f(exports.HOOKS.RESOLVE_LAYOUT_PROCESSOR),u=0;u<e.length;u++){var n=e[u](t);if(n)return n}throw new Error("No processor found for a formatting context: "+t.getName())},t}(),ys=/*#__PURE__*/function(){function t(){}var e=t.prototype;return e.layout=function(t,e,u){return e.isFloatNodeContext(t)?e.layoutFloatOrFootnote(t):e.isBreakable(t)?e.layoutBreakableBlock(t):e.layoutUnbreakable(t)},e.createEdgeBreakPosition=function(t,e,u,n){return new Bs(t.copy(),e,u,n)},e.startNonInlineElementNode=function(t){return!1},e.afterNonInlineElementNode=function(t,e){return!1},e.clearOverflownViewNodes=function(t,e,u,n){var i;if(u.viewNode&&u.viewNode.parentNode&&(u.shadowType!==Ji.ShadowType.ROOTLESS||!As(u))){var r=u.viewNode;"viv-ts-inner"===(null==(i=r.parentElement)?void 0:i.localName)&&(r=r.parentElement.parentElement);var o=r.parentNode;Es(o,r),n&&o.removeChild(r)}},e.finishBreak=function(t,e,u,n){return t.clearOverflownViewNodes(e,u||null!=e.viewNode&&1==e.viewNode.nodeType&&!e.after),n&&t.layoutContext.processFragmentedBlockEdge(e),Tn(!0)},t}(),Ns=/*#__PURE__*/function(){function t(t){this.parent=void 0,this.formattingContextType="Block",this.parent=t}var e=t.prototype;return e.getName=function(){return"Block formatting context (BlockFormattingContext)"},e.isFirstTime=function(t,e){return e},e.getParent=function(){return this.parent},e.saveState=function(){},e.restoreState=function(t){},t}(),bs=new ys,Ss=Yi.isInstanceOfBlockFormattingContext;c(exports.HOOKS.RESOLVE_FORMATTING_CONTEXT,function(t,e,u,n,i,r){var o=t.parent;return!o&&t.formattingContext||o&&t.formattingContext!==o.formattingContext?null:t.establishesBFC||!t.formattingContext&&Ds(u,n,i,r)?new Ns(o?o.formattingContext:null):null}),c(exports.HOOKS.RESOLVE_LAYOUT_PROCESSOR,function(t){return t instanceof Ns?bs:null});var xs=/*#__PURE__*/function(){function t(){this.initialBreakPositions=null,this.initialStateOfFormattingContext=null,this.initialPosition=void 0,this.initialFragmentLayoutConstraints=void 0}var e=t.prototype;return e.layout=function(t,e){return this.prepareLayout(t,e),this.tryLayout(t,e)},e.tryLayout=function(t,e){var u=this,n=xn("AbstractLayoutRetryer.tryLayout");this.saveState(t,e);var i=this.resolveLayoutMode(t);return i.doLayout(t,e).then(function(r){var o=i.accept(r,e);(o=i.postLayout(r,u.initialPosition,e,o))?n.finish(r):(u.clearNodes(u.initialPosition),u.restoreState(t,e),u.tryLayout(u.initialPosition,e).thenFinish(n))}),n.result()},e.prepareLayout=function(t,e){},e.clearNodes=function(t){for(var e,u,n=t.viewNode||t.parent.viewNode;e=n.lastChild;)n.removeChild(e);for(;u=n.nextSibling;)u.parentNode.removeChild(u)},e.saveState=function(t,e){this.initialPosition=t.copy(),this.initialBreakPositions=[].concat(e.breakPositions),this.initialFragmentLayoutConstraints=[].concat(e.fragmentLayoutConstraints),t.formattingContext&&(this.initialStateOfFormattingContext=t.formattingContext.saveState())},e.restoreState=function(t,e){e.breakPositions=this.initialBreakPositions,e.fragmentLayoutConstraints=this.initialFragmentLayoutConstraints,t.formattingContext&&t.formattingContext.restoreState(this.initialStateOfFormattingContext)},t}(),Ts=/*#__PURE__*/function(){function t(){}var e=t.prototype;return e.initialState=function(t){return{nodeContext:t,atUnforcedBreak:!1,break:!1}},e.startNonDisplayableNode=function(t){},e.afterNonDisplayableNode=function(t){},e.startIgnoredTextNode=function(t){},e.afterIgnoredTextNode=function(t){},e.startNonElementNode=function(t){},e.afterNonElementNode=function(t){},e.startInlineElementNode=function(t){},e.afterInlineElementNode=function(t){},e.startNonInlineElementNode=function(t){},e.afterNonInlineElementNode=function(t){},e.finish=function(t){},t}(),Is=/*#__PURE__*/function(){function t(t,e){this.strategy=void 0,this.layoutContext=void 0,this.strategy=t,this.layoutContext=e}return t.prototype.iterate=function(t){var e=this,u=this.strategy,n=u.initialState(t),i=xn("LayoutIterator");return i.loopWithFrame(function(t){for(var i;n.nodeContext;){var r=((i=n.nodeContext.viewNode?1!==n.nodeContext.viewNode.nodeType?pr(n.nodeContext.viewNode,n.nodeContext.whitespace)?n.nodeContext.after?u.afterIgnoredTextNode(n):u.startIgnoredTextNode(n):n.nodeContext.after?u.afterNonElementNode(n):u.startNonElementNode(n):n.nodeContext.inline?n.nodeContext.after?u.afterInlineElementNode(n):u.startInlineElementNode(n):n.nodeContext.after?u.afterNonInlineElementNode(n):u.startNonInlineElementNode(n):n.nodeContext.after?u.afterNonDisplayableNode(n):u.startNonDisplayableNode(n))&&i.isPending()?i:Tn(!0)).thenAsync(function(){return n.break?Tn(null):e.layoutContext.nextInTree(n.nodeContext,n.atUnforcedBreak)});if(r.isPending())return void r.then(function(e){n.break?t.breakLoop():(n.nodeContext=e,t.continueLoop())});if(n.break)return void t.breakLoop();n.nodeContext=r.get()}u.finish(n),t.breakLoop()}).then(function(){i.finish(n.nodeContext)}),i.result()},t}(),Ps=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this)||this).leadingEdge=void 0,u.leadingEdge=e,u}N(e,t);var u=e.prototype;return u.startNonInlineBox=function(t){},u.endEmptyNonInlineBox=function(t){},u.endNonInlineBox=function(t){},u.initialState=function(t){return{nodeContext:t,atUnforcedBreak:!!this.leadingEdge&&t.after,break:!1,leadingEdge:this.leadingEdge,breakAtTheEdge:null,onStartEdges:!1,leadingEdgeContexts:[],lastAfterNodeContext:null}},u.processForcedBreak=function(t,e){var u=!t.leadingEdge&&Xi(t.breakAtTheEdge);if(u){var n=t.nodeContext=t.leadingEdgeContexts[0]||t.nodeContext;n.viewNode.parentNode.removeChild(n.viewNode),e.pageBreakType=t.breakAtTheEdge}return u},u.saveEdgeAndProcessOverflow=function(t,e){var u=e.checkOverflowAndSaveEdgeAndBreakPosition(t.lastAfterNodeContext,null,!0,t.breakAtTheEdge);return u&&(t.nodeContext=(t.lastAfterNodeContext||t.nodeContext).modify(),t.nodeContext.overflow=!0),u},u.processLayoutConstraint=function(t,e,u){var n=t.nodeContext,i=!e.allowLayout(n);return i&&(u.checkOverflowAndSaveEdgeAndBreakPosition(t.lastAfterNodeContext,null,!1,t.breakAtTheEdge),(n=t.nodeContext=n.modify()).overflow=!0),i},u.startNonElementNode=function(t){t.onStartEdges=!1},u.startNonInlineElementNode=function(t){return t.leadingEdgeContexts.push(t.nodeContext.copy()),t.breakAtTheEdge=ur(t.breakAtTheEdge,t.nodeContext.breakBefore),t.onStartEdges=!0,this.startNonInlineBox(t)},u.afterNonInlineElementNode=function(t){var e;return(t.onStartEdges?((e=this.endEmptyNonInlineBox(t))&&e.isPending()?e:Tn(!0)).thenAsync(function(){return t.break||(t.leadingEdgeContexts=[],t.leadingEdge=!1,t.atUnforcedBreak=!1,t.breakAtTheEdge=null),Tn(!0)}):(e=this.endNonInlineBox(t))&&e.isPending()?e:Tn(!0)).thenAsync(function(){return t.break||(t.onStartEdges=!1,t.lastAfterNodeContext=t.nodeContext.copy(),t.breakAtTheEdge=ur(t.breakAtTheEdge,t.nodeContext.breakAfter)),Tn(!0)})},e}(Ts),Rs=[],ks={first:!1,forceEnd:!1,allowEnd:!1,last:!1};function Ls(t){var e=t instanceof be?t:"string"==typeof t?Le(t):$e.none;if(e===$e.none)return ks;for(var u,n=e instanceof Ge?e.values:[e],i=Object.create(ks),r=R(n);!(u=r()).done;){var o=u.value;if(o instanceof ke)switch(o.name){case"first":i.first=!0;break;case"force-end":i.forceEnd=!0,i.allowEnd=!1;break;case"allow-end":i.forceEnd=!1,i.allowEnd=!0;break;case"last":i.last=!0}}return i}function Os(t){return!(t.first||t.last||t.forceEnd||t.allowEnd)}var _s={trimStart:!1,spaceFirst:!1,trimEnd:!1,allowEnd:!1,trimAdjacent:!1},Ms={trimStart:!1,spaceFirst:!1,trimEnd:!1,allowEnd:!0,trimAdjacent:!0},Us={trimStart:!0,spaceFirst:!1,trimEnd:!0,allowEnd:!1,trimAdjacent:!0};function Vs(t){var e=t instanceof be?t:"string"==typeof t?Le(t):$e.normal;if(e===$e.normal)return Ms;if(e===$e.none)return _s;if(e===$e.auto)return Us;for(var u,n=e instanceof Ge?e.values:[e],i=Object.create(Ms),r=R(n);!(u=r()).done;){var o=u.value;if(o instanceof ke)switch(o.name){case"trim-auto":return Us;case"space-all":return _s;case"trim-start":i.trimStart=!0,i.spaceFirst=!1;break;case"space-start":i.trimStart=!1,i.spaceFirst=!1;break;case"space-first":i.trimStart=!1,i.spaceFirst=!0;break;case"trim-end":i.trimEnd=!0,i.allowEnd=!1;break;case"space-end":i.trimEnd=!1,i.allowEnd=!1;break;case"allow-end":i.trimEnd=!1,i.allowEnd=!0;break;case"trim-adjacent":i.trimAdjacent=!0;break;case"space-adjacent":i.trimAdjacent=!1}}return i}var Hs={ideographAlpha:!1,ideographNumeric:!1},zs={ideographAlpha:!0,ideographNumeric:!0};function Gs(t){var e=t instanceof be?t:"string"==typeof t?Le(t):$e.normal;if(e===$e.normal||e===$e.auto)return zs;if(e===$e.none)return Hs;for(var u,n=e instanceof Ge?e.values:[e],i=Object.create(Hs),r=R(n);!(u=r()).done;){var o=u.value;if(o instanceof ke)switch(o.name){case"no-autospace":return Hs;case"ideograph-alpha":i.ideographAlpha=!0;break;case"ideograph-numeric":i.ideographNumeric=!0}}return i}function Ws(t,e){return!(t.ideographAlpha||t.ideographNumeric||e.trimStart||e.spaceFirst||e.trimEnd||e.allowEnd||e.trimAdjacent)}function Xs(t){return t?(t=t.toLowerCase(),/^zh\b.*-(hant|tw|hk)\b/.test(t)?"zh-hant":/^zh\b/.test(t)?"zh-hans":/^ja\b/.test(t)?"ja":/^ko\b/.test(t)?"ko":t):null}var js={audio:!0,canvas:!0,embed:!0,iframe:!0,img:!0,math:!0,object:!0,picture:!0,svg:!0,video:!0},Ks=new(/*#__PURE__*/function(){function t(){}var e=t.prototype;return e.getPolyfilledInheritedProps=function(){return["hanging-punctuation","text-autospace","text-spacing-trim"]},e.preprocessSingleDocument=function(t){t.body&&this.preprocessForTextSpacing(t.body)},e.preprocessForTextSpacing=function(t){for(var e=t.ownerDocument.createNodeIterator(t,NodeFilter.SHOW_TEXT),u=e.nextNode();u;u=e.nextNode()){var n;if(u.parentElement.namespaceURI===H.XHTML&&"true"!==(null==(n=u.parentElement.dataset)?void 0:n.mathTypeset)){var i=u.textContent.replace(/(?![\(\)\[\]\{\}])[\(\)\[\]\{\}\xAB\xBB\u0F3A-\u0F3D\u169B\u169C\u2018-\u201F\u2039\u203A\u2045\u2046\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2E02-\u2E05\u2E09\u2E0A\u2E0C\u2E0D\u2E1C\u2E1D\u2E20-\u2E29\u2E42\u2E55-\u2E5C\u3000-\u3002\u3008-\u3011\u3014-\u301B\u301D-\u301F\uFD3E\uFD3F\uFE17\uFE18\uFE35-\uFE44\uFE47\uFE48\uFE59-\uFE5E\uFF08\uFF09\uFF0C\uFF0E\uFF1A\uFF1B\uFF3B\uFF3D\uFF5B\uFF5D\uFF5F-\uFF64](?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC82\uDCB0-\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC9-\uDDCC\uDDCE\uDDCF\uDE2C-\uDE37\uDE3E\uDE41\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDD30-\uDD35\uDD37\uDD38\uDD3B-\uDD3E\uDD40\uDD42\uDD43\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE8A-\uDE99]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6\uDF00\uDF01\uDF03\uDF34-\uDF3A\uDF3E-\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF51-\uDF87\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF])*(?=(?:[\0-\u02FF\u0370-\u0482\u048A-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u060F\u061B-\u064A\u0660-\u066F\u0671-\u06D5\u06DD\u06DE\u06E5\u06E6\u06E9\u06EE-\u0710\u0712-\u072F\u074B-\u07A5\u07B1-\u07EA\u07F4-\u07FC\u07FE-\u0815\u081A\u0824\u0828\u082E-\u0858\u085C-\u0897\u08A0-\u08C9\u08E2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0964-\u0980\u0984-\u09BB\u09BD\u09C5\u09C6\u09C9\u09CA\u09CE-\u09D6\u09D8-\u09E1\u09E4-\u09FD\u09FF\u0A00\u0A04-\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A6F\u0A72-\u0A74\u0A76-\u0A80\u0A84-\u0ABB\u0ABD\u0AC6\u0ACA\u0ACE-\u0AE1\u0AE4-\u0AF9\u0B00\u0B04-\u0B3B\u0B3D\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B61\u0B64-\u0B81\u0B83-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE-\u0BD6\u0BD8-\u0BFF\u0C05-\u0C3B\u0C3D\u0C45\u0C49\u0C4E-\u0C54\u0C57-\u0C61\u0C64-\u0C80\u0C84-\u0CBB\u0CBD\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CE1\u0CE4-\u0CF2\u0CF4-\u0CFF\u0D04-\u0D3A\u0D3D\u0D45\u0D49\u0D4E-\u0D56\u0D58-\u0D61\u0D64-\u0D80\u0D84-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DF1\u0DF4-\u0E30\u0E32\u0E33\u0E3B-\u0E46\u0E4F-\u0EB0\u0EB2\u0EB3\u0EBD-\u0EC7\u0ECF-\u0F17\u0F1A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F40-\u0F70\u0F85\u0F88-\u0F8C\u0F98\u0FBD-\u0FC5\u0FC7-\u102A\u103F-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u109E-\u135C\u1360-\u1711\u1716-\u1731\u1735-\u1751\u1754-\u1771\u1774-\u17B3\u17D4-\u17DC\u17DE-\u180A\u180E\u1810-\u1884\u1887-\u18A8\u18AA-\u191F\u192C-\u192F\u193C-\u1A16\u1A1C-\u1A54\u1A5F\u1A7D\u1A7E\u1A80-\u1AAF\u1ACF-\u1AFF\u1B05-\u1B33\u1B45-\u1B6A\u1B74-\u1B7F\u1B83-\u1BA0\u1BAE-\u1BE5\u1BF4-\u1C23\u1C38-\u1CCF\u1CD3\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA-\u1DBF\u1E00-\u20CF\u20F1-\u2CEE\u2CF2-\u2D7E\u2D80-\u2DDF\u2E00-\u3029\u3030-\u3098\u309B-\uA66E\uA673\uA67E-\uA69D\uA6A0-\uA6EF\uA6F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA828-\uA82B\uA82D-\uA87F\uA882-\uA8B3\uA8C6-\uA8DF\uA8F2-\uA8FE\uA900-\uA925\uA92E-\uA946\uA954-\uA97F\uA984-\uA9B2\uA9C1-\uA9E4\uA9E6-\uAA28\uAA37-\uAA42\uAA44-\uAA4B\uAA4E-\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2-\uAAEA\uAAF0-\uAAF4\uAAF7-\uABE2\uABEB\uABEE-\uD7FF\uE000-\uFB1D\uFB1F-\uFDFF\uFE10-\uFE1F\uFE30-\uFFFF]|\uD800[\uDC00-\uDDFC\uDDFE-\uDEDF\uDEE1-\uDF75\uDF7B-\uDFFF]|[\uD801\uD808-\uD80C\uD80E-\uD819\uD81C-\uD82E\uD830-\uD832\uD835\uD837\uD83B-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD802[\uDC00-\uDE00\uDE04\uDE07-\uDE0B\uDE10-\uDE37\uDE3B-\uDE3E\uDE40-\uDEE4\uDEE7-\uDFFF]|\uD803[\uDC00-\uDD23\uDD28-\uDEAA\uDEAD-\uDEFC\uDF00-\uDF45\uDF51-\uDF81\uDF86-\uDFFF]|\uD804[\uDC03-\uDC37\uDC47-\uDC6F\uDC71\uDC72\uDC75-\uDC7E\uDC83-\uDCAF\uDCBB-\uDCC1\uDCC3-\uDCFF\uDD03-\uDD26\uDD35-\uDD44\uDD47-\uDD72\uDD74-\uDD7F\uDD83-\uDDB2\uDDC1-\uDDC8\uDDCD\uDDD0-\uDE2B\uDE38-\uDE3D\uDE3F\uDE40\uDE42-\uDEDE\uDEEB-\uDEFF\uDF04-\uDF3A\uDF3D\uDF45\uDF46\uDF49\uDF4A\uDF4E-\uDF56\uDF58-\uDF61\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC00-\uDC34\uDC47-\uDC5D\uDC5F-\uDCAF\uDCC4-\uDDAE\uDDB6\uDDB7\uDDC1-\uDDDB\uDDDE-\uDE2F\uDE41-\uDEAA\uDEB8-\uDF1C\uDF2C-\uDFFF]|\uD806[\uDC00-\uDC2B\uDC3B-\uDD2F\uDD36\uDD39\uDD3A\uDD3F\uDD41\uDD44-\uDDD0\uDDD8\uDDD9\uDDE1-\uDDE3\uDDE5-\uDE00\uDE0B-\uDE32\uDE3A\uDE3F-\uDE46\uDE48-\uDE50\uDE5C-\uDE89\uDE9A-\uDFFF]|\uD807[\uDC00-\uDC2E\uDC37\uDC40-\uDC91\uDCA8\uDCB7-\uDD30\uDD37-\uDD39\uDD3B\uDD3E\uDD46\uDD48-\uDD89\uDD8F\uDD92\uDD98-\uDEF2\uDEF7-\uDEFF\uDF02\uDF04-\uDF33\uDF3B-\uDF3D\uDF43-\uDFFF]|\uD80D[\uDC00-\uDC3F\uDC41-\uDC46\uDC56-\uDFFF]|\uD81A[\uDC00-\uDEEF\uDEF5-\uDF2F\uDF37-\uDFFF]|\uD81B[\uDC00-\uDF4E\uDF50\uDF88-\uDF8E\uDF93-\uDFE3\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD82F[\uDC00-\uDC9C\uDC9F-\uDFFF]|\uD833[\uDC00-\uDEFF\uDF2E\uDF2F\uDF47-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDC8E\uDC90-\uDD2F\uDD37-\uDEAD\uDEAF-\uDEEB\uDEF0-\uDFFF]|\uD839[\uDC00-\uDCEB\uDCF0-\uDFFF]|\uD83A[\uDC00-\uDCCF\uDCD7-\uDD43\uDD4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))|(?:[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])(?=(?![\(\)\[\]\{\}])[\(\)\[\]\{\}\xAB\xBB\u0F3A-\u0F3D\u169B\u169C\u2018-\u201F\u2039\u203A\u2045\u2046\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2E02-\u2E05\u2E09\u2E0A\u2E0C\u2E0D\u2E1C\u2E1D\u2E20-\u2E29\u2E42\u2E55-\u2E5C\u3000-\u3002\u3008-\u3011\u3014-\u301B\u301D-\u301F\uFD3E\uFD3F\uFE17\uFE18\uFE35-\uFE44\uFE47\uFE48\uFE59-\uFE5E\uFF08\uFF09\uFF0C\uFF0E\uFF1A\uFF1B\uFF3B\uFF3D\uFF5B\uFF5D\uFF5F-\uFF64])|(?!(?:[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]))(?:[\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u3005\u3007\u3021-\u3029\u3038-\u303B\u3041-\u30FF\u31C0-\u31FF\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFA6D\uFA70-\uFAD9]|\uD81B[\uDFE2\uDFE3\uDFF0\uDFF1]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC82\uDCB0-\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC9-\uDDCC\uDDCE\uDDCF\uDE2C-\uDE37\uDE3E\uDE41\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDD30-\uDD35\uDD37\uDD38\uDD3B-\uDD3E\uDD40\uDD42\uDD43\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE8A-\uDE99]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6\uDF00\uDF01\uDF03\uDF34-\uDF3A\uDF3E-\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF51-\uDF87\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF])*(?=(?!(?:[\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u3005\u3007\u3021-\u3029\u3038-\u303B\u3041-\u30FF\u31C0-\u31FF\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFA6D\uFA70-\uFAD9\uFF01-\uFF60]|\uD81B[\uDFE2\uDFE3\uDFF0\uDFF1]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF]))(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BEF\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D66-\u0D6F\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F29\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDD30-\uDD39\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC66-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF39\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCE9\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDF50-\uDF59\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDCD0-\uDCEB\uDCF0-\uDCF9\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF]))|(?!(?:[\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u3005\u3007\u3021-\u3029\u3038-\u303B\u3041-\u30FF\u31C0-\u31FF\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFA6D\uFA70-\uFAD9\uFF01-\uFF60]|\uD81B[\uDFE2\uDFE3\uDFF0\uDFF1]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF]))(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BEF\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D66-\u0D6F\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F29\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDD30-\uDD39\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC66-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF39\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCE9\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDF50-\uDF59\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDCD0-\uDCEB\uDCF0-\uDCF9\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC82\uDCB0-\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC9-\uDDCC\uDDCE\uDDCF\uDE2C-\uDE37\uDE3E\uDE41\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDD30-\uDD35\uDD37\uDD38\uDD3B-\uDD3E\uDD40\uDD42\uDD43\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE8A-\uDE99]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6\uDF00\uDF01\uDF03\uDF34-\uDF3A\uDF3E-\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF51-\uDF87\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF])*(?=(?!(?:[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]))(?:[\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u3005\u3007\u3021-\u3029\u3038-\u303B\u3041-\u30FF\u31C0-\u31FF\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFA6D\uFA70-\uFAD9]|\uD81B[\uDFE2\uDFE3\uDFF0\uDFF1]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF]))/g,"$&\0").split("\0");if(i.length>1){for(var r=i.length-1,o=0;o<r;o++)u.parentNode.insertBefore(document.createTextNode(i[o]),u);u.textContent=i[r]}}}},e.processGeneratedContent=function(t,e,u,n,i,r){i=Xs(i);var o=Gs(e),a=Vs(u),s=Ls(n);if(!Os(s)||!Ws(o,a)){this.preprocessForTextSpacing(t);var l=t.style.whiteSpace;0===(r?t.offsetHeight:t.offsetWidth)&&(t.style.whiteSpace="pre");for(var D=t.ownerDocument.createNodeIterator(t,NodeFilter.SHOW_TEXT),h=null,c=null,d=D.nextNode();d;d=c){c=D.nextNode();var f=!h,p=!h||/\n$/.test(h.textContent),E=!c||/^\n/.test(c.textContent);this.processTextSpacing(d,f||p,f,p,E,!c,h,c,o,a,s,i,r),h=d}t.style.whiteSpace=l}},e.postLayoutBlock=function(t,e){var u=this,n=!t||1===t.fragmentIndex&&function(){for(var t=e[0],u=t;;u=u.parent)if(!u||!u.inline){var n;if(1!==(null==(n=u)?void 0:n.fragmentIndex))return!1;break}if(!t.inline)return!0;for(var i=t.viewNode.previousSibling;i;i=i.previousSibling)if(!pr(i,t.whitespace)&&!r(i))return!1;return!0}(),i=n||function(){for(var t,u=e[0];u&&u.inline;){var n;if((t=null==(n=u.viewNode)?void 0:n.previousSibling)&&(3===t.nodeType&&/^[ \t\r\n\f]*$/.test(t.textContent)&&u.whitespace!==dr.PRESERVE&&(t=t.previousSibling),t))break;u=u.parent}for(;t;){if(1===t.nodeType){var i;if("br"===t.localName)return!0;var r=null==(i=t.style)?void 0:i.display;if(r&&"inline"!==r)return!/^(inline|ruby)\b/.test(r)}else if(3===t.nodeType)if(u.whitespace===dr.PRESERVE){if(/\n$/.test(t.textContent))return!0}else if(u.whitespace===dr.NEWLINE&&/\n[ \t\r\n\f]*$/.test(t.textContent))return!0;t=t.lastChild}return!1}();function r(t){var e;if(1!==(null==t?void 0:t.nodeType))return!1;var u=t;if(u.hasAttribute(cr))return!0;var n=null!=(e=u.style)?e:{},i=n.position,r=n.float;return"absolute"===i||"fixed"===i||r&&"none"!==r}for(var o=-1,a=function(){var a=e[s];if(!a.after&&a.inline&&!a.display&&a.parent&&a.viewNode.parentNode&&a.viewNode.nodeType===Node.TEXT_NODE&&!pr(a.viewNode,a.whitespace)){var l,D,h,c,d,f=function(t){var e,u;if(1===(null==(e=t.viewNode)?void 0:e.nodeType))return"br"===t.viewNode.localName;if(3===(null==(u=t.viewNode)?void 0:u.nodeType)){var n;if(t.whitespace===dr.PRESERVE){if(/\n$/.test(t.viewNode.textContent))return!0}else if(t.whitespace===dr.NEWLINE&&/\n[ \t\r\n\f]*$/.test(t.viewNode.textContent))return!0;if("br"===(null==(n=t.viewNode.previousElementSibling)?void 0:n.localName))return pr(t.viewNode,t.whitespace)}return!1},p=function(t){var e,u;if(1===(null==(e=t.viewNode)?void 0:e.nodeType))return"br"===t.viewNode.localName;if(3===(null==(u=t.viewNode)?void 0:u.nodeType)){var n;if(t.whitespace===dr.PRESERVE){if(/^\n/.test(t.viewNode.textContent))return!0}else if(t.whitespace===dr.NEWLINE&&/^[ \t\r\n\f]*\n/.test(t.viewNode.textContent))return!0;if("br"===(null==(n=t.viewNode.nextElementSibling)?void 0:n.localName))return pr(t.viewNode,t.whitespace)}return!1},E=Xs(null!=(l=null!=(D=null!=(h=a.lang)?h:a.parent.lang)?D:null==t?void 0:t.lang)?l:null==t||null==(c=t.parent)?void 0:c.lang),C=Gs(a.inheritedProps["text-autospace"]),F=Vs(a.inheritedProps["text-spacing-trim"]),A=Ls(a.inheritedProps["hanging-punctuation"]);if(Os(A)&&Ws(C,F))return"continue";if(/\b(flex|grid)\b/.test(a.parent.display))return"continue";o<0&&(o=s);for(var g=null,v=null,m=s===o,B=s===o&&n,w=s===o&&i,y=!1,N=!1,b=s-1;b>=0;b--){var S,x=e[b];if(f(x)){w=!0;break}if(!x.display&&x.viewNode.nodeType===Node.TEXT_NODE&&x.viewNode.textContent.length>0){g=x.viewNode;break}if(x.display&&!/^(inline|ruby)\b/.test(x.display)||1===(null==(S=x.viewNode)?void 0:S.nodeType)&&("br"===x.viewNode.localName||js[x.viewNode.localName]))break;0===b&&(m=!0,n&&(B=!0,w=!0))}for(var T=s+1;T<e.length;T++){var I,P=e[T];if(p(P)){y=!0;break}if(P.viewNode!==a.viewNode&&!P.display&&P.viewNode.nodeType===Node.TEXT_NODE&&P.viewNode.textContent.length>0){v=P.viewNode;break}if(P.display&&!/^(inline|ruby)\b/.test(P.display)||1===(null==(I=P.viewNode)?void 0:I.nodeType)&&("br"===P.viewNode.localName||js[P.viewNode.localName])){T===e.length-1&&r(P.viewNode)&&(N=!0);break}if(T===e.length-1){y=!0,N=!0;for(var R=P.viewNode.nextSibling;R;R=R.nextSibling)if(!r(R)){N=!1;break}}}if("inline-block"===(null==(d=a.parent)?void 0:d.display)){if(!B){for(var k=a.parent.viewNode.firstChild;pr(k,a.whitespace);)k=k.nextSibling;a.viewNode===k&&(B=!0)}if(!N){for(var L=a.parent.viewNode.lastChild;pr(L,a.whitespace);)L=L.previousSibling;a.viewNode===L&&(N=!0)}}u.processTextSpacing(a.viewNode,m,B,w,y,N,g,v,C,F,A,E,a.vertical)}},s=0;s<e.length;s++)a()},e.processTextSpacing=function(t,e,u,n,i,r,o,a,s,l,D,h,c){var d,f,p,E=t.textContent,C=t.ownerDocument;function F(){if(e)return!0;if(!o)return!1;d||(d=C.createRange()).selectNode(t);var u=d.getClientRects()[0];f||(f=C.createRange()).selectNode(o);var n=f.getClientRects(),i=n[n.length-1];return!(!u||!i)&&(c?u.top<i.top+i.height-u.width||u.left+u.width<i.left+u.width/10||u.left>i.left+i.width-u.width/10:u.left<i.left+i.width-u.height||u.top>i.top+i.height-u.height/10||u.top+u.height<i.top+u.height/10)}function A(){if(!a)return!1;d||(d=C.createRange()).selectNode(t);var e=d.getClientRects()[0];p||(p=C.createRange()).selectNode(a);var u=p.getClientRects()[0];return!(!e||!u)&&(c?e.top+e.height>u.top+e.width||e.left>u.left+u.width-e.width/10||e.left+e.width<u.left+e.width/10:e.left+e.width>u.left+e.height||e.top+e.height<u.top+e.height/10||e.top>u.top+u.height-e.height/10)}var g,v=!1,m=!1,B=!1,w=!1;if(u&&D.first&&/^["'\(\[\{\xAB\xBB\u0F3A\u0F3C\u169B\u2018-\u201F\u2039\u203A\u2045\u207D\u208D\u2308\u230A\u2329\u2768\u276A\u276C\u276E\u2770\u2772\u2774\u27C5\u27E6\u27E8\u27EA\u27EC\u27EE\u2983\u2985\u2987\u2989\u298B\u298D\u298F\u2991\u2993\u2995\u2997\u29D8\u29DA\u29FC\u2E02-\u2E05\u2E09\u2E0A\u2E0C\u2E0D\u2E1C\u2E1D\u2E20-\u2E22\u2E24\u2E26\u2E28\u2E42\u2E55\u2E57\u2E59\u2E5B\u3000\u3008\u300A\u300C\u300E\u3010\u3014\u3016\u3018\u301A\u301D\uFD3F\uFE17\uFE35\uFE37\uFE39\uFE3B\uFE3D\uFE3F\uFE41\uFE43\uFE47\uFE59\uFE5B\uFE5D\uFF08\uFF3B\uFF5B\uFF5F\uFF62](?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC82\uDCB0-\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC9-\uDDCC\uDDCE\uDDCF\uDE2C-\uDE37\uDE3E\uDE41\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDD30-\uDD35\uDD37\uDD38\uDD3B-\uDD3E\uDD40\uDD42\uDD43\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE8A-\uDE99]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6\uDF00\uDF01\uDF03\uDF34-\uDF3A\uDF3E-\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF51-\uDF87\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF])*$/.test(E)?(g="viv-ts-open",v=!0,m=!0):r&&D.last&&/^["'\)\]\}\xAB\xBB\u0F3B\u0F3D\u169C\u2018\u2019\u201B-\u201D\u201F\u2039\u203A\u2046\u207E\u208E\u2309\u230B\u232A\u2769\u276B\u276D\u276F\u2771\u2773\u2775\u27C6\u27E7\u27E9\u27EB\u27ED\u27EF\u2984\u2986\u2988\u298A\u298C\u298E\u2990\u2992\u2994\u2996\u2998\u29D9\u29DB\u29FD\u2E02-\u2E05\u2E09\u2E0A\u2E0C\u2E0D\u2E1C\u2E1D\u2E20\u2E21\u2E23\u2E25\u2E27\u2E29\u2E56\u2E58\u2E5A\u2E5C\u3009\u300B\u300D\u300F\u3011\u3015\u3017\u3019\u301B\u301E\u301F\uFD3E\uFE18\uFE36\uFE38\uFE3A\uFE3C\uFE3E\uFE40\uFE42\uFE44\uFE48\uFE5A\uFE5C\uFE5E\uFF09\uFF3D\uFF5D\uFF60\uFF63](?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC82\uDCB0-\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC9-\uDDCC\uDDCE\uDDCF\uDE2C-\uDE37\uDE3E\uDE41\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDD30-\uDD35\uDD37\uDD38\uDD3B-\uDD3E\uDD40\uDD42\uDD43\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE8A-\uDE99]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6\uDF00\uDF01\uDF03\uDF34-\uDF3A\uDF3E-\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF51-\uDF87\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF])*$/.test(E)?(g="viv-ts-close",v=!0,B=!0):(D.forceEnd||D.allowEnd)&&/^[\u3001\u3002\uFF0C\uFF0E\uFF61\uFF64](?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC82\uDCB0-\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC9-\uDDCC\uDDCE\uDDCF\uDE2C-\uDE37\uDE3E\uDE41\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDD30-\uDD35\uDD37\uDD38\uDD3B-\uDD3E\uDD40\uDD42\uDD43\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE8A-\uDE99]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6\uDF00\uDF01\uDF03\uDF34-\uDF3A\uDF3E-\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF51-\uDF87\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF])*$/.test(E)?(g="viv-ts-close",v=!0,w=!0):(l.trimStart||l.spaceFirst||l.trimAdjacent)&&/^[\u2018\u201C\u2329\u3008\u300A\u300C\u300E\u3010\u3014\u3016\u3018\u301A\u301D\uFF08\uFF3B\uFF5B\uFF5F](?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC82\uDCB0-\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC9-\uDDCC\uDDCE\uDDCF\uDE2C-\uDE37\uDE3E\uDE41\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDD30-\uDD35\uDD37\uDD38\uDD3B-\uDD3E\uDD40\uDD42\uDD43\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE8A-\uDE99]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6\uDF00\uDF01\uDF03\uDF34-\uDF3A\uDF3E-\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF51-\uDF87\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF])*$/.test(E)?(g="viv-ts-open",v=!0):(l.trimEnd||l.allowEnd||l.trimAdjacent)&&(/^[\u2019\u201D\u232A\u3009\u300B\u300D\u300F\u3011\u3015\u3017\u3019\u301B\u301E\u301F\uFF09\uFF3D\uFF5D\uFF60](?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC82\uDCB0-\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC9-\uDDCC\uDDCE\uDDCF\uDE2C-\uDE37\uDE3E\uDE41\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDD30-\uDD35\uDD37\uDD38\uDD3B-\uDD3E\uDD40\uDD42\uDD43\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE8A-\uDE99]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6\uDF00\uDF01\uDF03\uDF34-\uDF3A\uDF3E-\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF51-\uDF87\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF])*$/.test(E)||"zh-hans"===h&&/^[\uFF1A\uFF1B](?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC82\uDCB0-\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC9-\uDDCC\uDDCE\uDDCF\uDE2C-\uDE37\uDE3E\uDE41\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDD30-\uDD35\uDD37\uDD38\uDD3B-\uDD3E\uDD40\uDD42\uDD43\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE8A-\uDE99]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6\uDF00\uDF01\uDF03\uDF34-\uDF3A\uDF3E-\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF51-\uDF87\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF])*$/.test(E)||"zh-hant"!==h&&/^[\u3001\u3002\uFF0C\uFF0E](?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC82\uDCB0-\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC9-\uDDCC\uDDCE\uDDCF\uDE2C-\uDE37\uDE3E\uDE41\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDD30-\uDD35\uDD37\uDD38\uDD3B-\uDD3E\uDD40\uDD42\uDD43\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE8A-\uDE99]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6\uDF00\uDF01\uDF03\uDF34-\uDF3A\uDF3E-\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF51-\uDF87\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF])*$/.test(E))&&(g="viv-ts-close",v=!0),v){var y=function(){return c?N.offsetLeft:N.offsetTop};if("viv-ts-inner"===t.parentElement.localName)return;var N=C.createElement(g),b=C.createElement("viv-ts-inner");N.appendChild(b),t.parentNode.insertBefore(N,t),b.appendChild(t);var S=.7*parseFloat(C.defaultView.getComputedStyle(N).fontSize),x=(c?b.offsetHeight:b.offsetWidth)>S;if(x||m||B||w)if("viv-ts-open"===g)if(m)N.className="viv-hang-first";else if(u||n)N.className=l.trimStart?"viv-ts-trim":"viv-ts-space";else if(l.trimStart||l.spaceFirst||!F()){if(l.trimAdjacent&&o&&/[\(\)\[\]\{\}\xAB\xB7\xBB\u0F3A-\u0F3D\u169B\u169C\u2018-\u201F\u2027\u2039\u203A\u2045\u2046\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2E02-\u2E05\u2E09\u2E0A\u2E0C\u2E0D\u2E1C\u2E1D\u2E20-\u2E29\u2E42\u2E55-\u2E5C\u3000-\u3002\u3008-\u3011\u3014-\u301B\u301D-\u301F\u30FB\uFD3E\uFD3F\uFE17\uFE18\uFE35-\uFE44\uFE47\uFE48\uFE59-\uFE5E\uFF08\uFF09\uFF0C\uFF0E\uFF1A\uFF1B\uFF3B\uFF3D\uFF5B\uFF5D\uFF5F\uFF60\uFF62\uFF63](?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC82\uDCB0-\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC9-\uDDCC\uDDCE\uDDCF\uDE2C-\uDE37\uDE3E\uDE41\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDD30-\uDD35\uDD37\uDD38\uDD3B-\uDD3E\uDD40\uDD42\uDD43\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE8A-\uDE99]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6\uDF00\uDF01\uDF03\uDF34-\uDF3A\uDF3E-\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF51-\uDF87\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF])*$/.test(o.textContent)&&(!/[\)\]\}\xBB\u0F3B\u0F3D\u169C\u2019\u201D\u203A\u2046\u207E\u208E\u2309\u230B\u232A\u2769\u276B\u276D\u276F\u2771\u2773\u2775\u27C6\u27E7\u27E9\u27EB\u27ED\u27EF\u2984\u2986\u2988\u298A\u298C\u298E\u2990\u2992\u2994\u2996\u2998\u29D9\u29DB\u29FD\u2E03\u2E05\u2E0A\u2E0D\u2E1D\u2E21\u2E23\u2E25\u2E27\u2E29\u2E56\u2E58\u2E5A\u2E5C\u3009\u300B\u300D\u300F\u3011\u3015\u3017\u3019\u301B\u301E\u301F\uFD3E\uFE18\uFE36\uFE38\uFE3A\uFE3C\uFE3E\uFE40\uFE42\uFE44\uFE48\uFE5A\uFE5C\uFE5E\uFF09\uFF3D\uFF5D\uFF60\uFF63](?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC82\uDCB0-\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC9-\uDDCC\uDDCE\uDDCF\uDE2C-\uDE37\uDE3E\uDE41\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDD30-\uDD35\uDD37\uDD38\uDD3B-\uDD3E\uDD40\uDD42\uDD43\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE8A-\uDE99]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6\uDF00\uDF01\uDF03\uDF34-\uDF3A\uDF3E-\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF51-\uDF87\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF])*$/.test(o.textContent)||"viv-ts-inner"===o.parentElement.localName&&(c?o.parentElement.offsetHeight:o.parentElement.offsetWidth)>S))N.className="viv-ts-trim";else if((l.trimStart||l.spaceFirst)&&F()){var T=y();N.className="viv-ts-auto",T!==y()||F()||(N.className="viv-ts-trim")}}else N.className="viv-ts-space";else if("viv-ts-close"===g)if(B)N.className=x?"viv-hang-last":"viv-hang-last viv-hang-hw";else if(r||i){var I=y();w?(N.className=x?D.allowEnd&&l.allowEnd?"viv-ts-auto":"viv-hang-end":"viv-hang-end viv-hang-hw",D.allowEnd&&I===y()&&(l.trimEnd?N.className="viv-ts-trim":l.allowEnd?(N.className="viv-hang-end",I===y()&&(N.className="")):N.className="viv-ts-space")):l.trimEnd?N.className="viv-ts-trim":l.allowEnd?(N.className="viv-ts-auto",I===y()&&(N.className="")):N.className="viv-ts-space"}else if(a&&/^[\)\]\}\xB7\xBB\u0F3B\u0F3D\u169C\u2019\u201D\u2027\u203A\u2046\u207E\u208E\u2309\u230B\u232A\u2769\u276B\u276D\u276F\u2771\u2773\u2775\u27C6\u27E7\u27E9\u27EB\u27ED\u27EF\u2984\u2986\u2988\u298A\u298C\u298E\u2990\u2992\u2994\u2996\u2998\u29D9\u29DB\u29FD\u2E03\u2E05\u2E0A\u2E0D\u2E1D\u2E21\u2E23\u2E25\u2E27\u2E29\u2E56\u2E58\u2E5A\u2E5C\u3000-\u3002\u3009\u300B\u300D\u300F\u3011\u3015\u3017\u3019\u301B\u301E\u301F\u30FB\uFD3E\uFE18\uFE36\uFE38\uFE3A\uFE3C\uFE3E\uFE40\uFE42\uFE44\uFE48\uFE5A\uFE5C\uFE5E\uFF09\uFF0C\uFF0E\uFF1A\uFF1B\uFF3D\uFF5D\uFF60\uFF63]/.test(a.textContent))x&&l.trimAdjacent&&(N.className="viv-ts-trim");else if(w){var P=A(),R=P&&D.allowEnd;R||(N.className=x?"viv-hang-end":"viv-hang-end viv-hang-hw"),x?R&&l.trimEnd?N.className="viv-ts-auto":R||A()?!P&&D.allowEnd&&(l.trimEnd?(N.className="viv-ts-auto",A()||(N.className="viv-hang-end")):(N.className="viv-ts-space",A()||(l.allowEnd?(N.className="viv-ts-auto",A()||(N.className="viv-hang-end")):N.className="viv-hang-end"))):N.className="":P||A()||(N.className="")}else if(l.trimEnd||l.allowEnd)if(A())N.className=l.allowEnd?"viv-ts-space":"viv-ts-auto";else{var k=y();N.className="viv-ts-auto",k===y()&&(N.className="")}}function L(t){var e,u=null==t||null==(e=t.ownerDocument.defaultView)?void 0:e.getComputedStyle(t);return!!u&&("upright"===u.textOrientation||"all"===u.textCombineUpright||"horizontal"===u["-webkit-text-combine"])}function O(t,e){if(1===t.nodeType){var u=C.defaultView.getComputedStyle(t);if(parseFloat(u.marginInlineEnd)||parseFloat(u.borderInlineEndWidth)||parseFloat(u.paddingInlineEnd))return!0}var n=t.parentElement;if(n&&!n.contains(e))return O(n,e);if(1===e.nodeType){var i=C.defaultView.getComputedStyle(e);if(parseFloat(i.marginInlineStart)||parseFloat(i.borderInlineStartWidth)||parseFloat(i.paddingInlineStart))return!0}var r=e.parentElement;return!(!r||r.contains(t))&&O(t,r)}(s.ideographAlpha||s.ideographNumeric)&&(!(o&&/^(?!(?:[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]))(?:[\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u3005\u3007\u3021-\u3029\u3038-\u303B\u3041-\u30FF\u31C0-\u31FF\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFA6D\uFA70-\uFAD9]|\uD81B[\uDFE2\uDFE3\uDFF0\uDFF1]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])/.test(E)&&(s.ideographAlpha&&/(?!(?:[\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u3005\u3007\u3021-\u3029\u3038-\u303B\u3041-\u30FF\u31C0-\u31FF\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFA6D\uFA70-\uFAD9\uFF01-\uFF60]|\uD81B[\uDFE2\uDFE3\uDFF0\uDFF1]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF]))(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC82\uDCB0-\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC9-\uDDCC\uDDCE\uDDCF\uDE2C-\uDE37\uDE3E\uDE41\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDD30-\uDD35\uDD37\uDD38\uDD3B-\uDD3E\uDD40\uDD42\uDD43\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE8A-\uDE99]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6\uDF00\uDF01\uDF03\uDF34-\uDF3A\uDF3E-\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF51-\uDF87\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF])*$/.test(o.textContent)||s.ideographNumeric&&/(?![\uFF01-\uFF60])(?:[0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19]|\uD801[\uDCA0-\uDCA9]|\uD803[\uDD30-\uDD39]|\uD804[\uDC66-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDEF0-\uDEF9]|\uD805[\uDC50-\uDC59\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDF30-\uDF39]|\uD806[\uDCE0-\uDCE9\uDD50-\uDD59]|\uD807[\uDC50-\uDC59\uDD50-\uDD59\uDDA0-\uDDA9\uDF50-\uDF59]|\uD81A[\uDE60-\uDE69\uDEC0-\uDEC9\uDF50-\uDF59]|\uD835[\uDFCE-\uDFFF]|\uD838[\uDD40-\uDD49\uDEF0-\uDEF9]|\uD839[\uDCF0-\uDCF9]|\uD83A[\uDD50-\uDD59]|\uD83E[\uDFF0-\uDFF9])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC82\uDCB0-\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC9-\uDDCC\uDDCE\uDDCF\uDE2C-\uDE37\uDE3E\uDE41\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDD30-\uDD35\uDD37\uDD38\uDD3B-\uDD3E\uDD40\uDD42\uDD43\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE8A-\uDE99]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6\uDF00\uDF01\uDF03\uDF34-\uDF3A\uDF3E-\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF51-\uDF87\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF])*$/.test(o.textContent)))||c&&L(o.parentElement)||O(o,t)||t.parentNode.insertBefore(C.createElement("viv-ts-thin-sp"),t),!(a&&/(?!(?:[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]))(?:[\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u3005\u3007\u3021-\u3029\u3038-\u303B\u3041-\u30FF\u31C0-\u31FF\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFA6D\uFA70-\uFAD9]|\uD81B[\uDFE2\uDFE3\uDFF0\uDFF1]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC82\uDCB0-\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC9-\uDDCC\uDDCE\uDDCF\uDE2C-\uDE37\uDE3E\uDE41\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDD30-\uDD35\uDD37\uDD38\uDD3B-\uDD3E\uDD40\uDD42\uDD43\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE8A-\uDE99]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6\uDF00\uDF01\uDF03\uDF34-\uDF3A\uDF3E-\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF51-\uDF87\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF])*$/.test(E)&&(s.ideographAlpha&&/^(?!(?:[\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u3005\u3007\u3021-\u3029\u3038-\u303B\u3041-\u30FF\u31C0-\u31FF\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFA6D\uFA70-\uFAD9\uFF01-\uFF60]|\uD81B[\uDFE2\uDFE3\uDFF0\uDFF1]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF]))(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])/.test(a.textContent)||s.ideographNumeric&&/^(?![\uFF01-\uFF60])(?:[0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19]|\uD801[\uDCA0-\uDCA9]|\uD803[\uDD30-\uDD39]|\uD804[\uDC66-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDEF0-\uDEF9]|\uD805[\uDC50-\uDC59\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDF30-\uDF39]|\uD806[\uDCE0-\uDCE9\uDD50-\uDD59]|\uD807[\uDC50-\uDC59\uDD50-\uDD59\uDDA0-\uDDA9\uDF50-\uDF59]|\uD81A[\uDE60-\uDE69\uDEC0-\uDEC9\uDF50-\uDF59]|\uD835[\uDFCE-\uDFFF]|\uD838[\uDD40-\uDD49\uDEF0-\uDEF9]|\uD839[\uDCF0-\uDCF9]|\uD83A[\uDD50-\uDD59]|\uD83E[\uDFF0-\uDFF9])/.test(a.textContent)))||c&&L(a.parentElement)||O(t,a)||t.parentNode.insertBefore(C.createElement("viv-ts-thin-sp"),t.nextSibling))},e.registerHooks=function(){c(exports.HOOKS.POLYFILLED_INHERITED_PROPS,this.getPolyfilledInheritedProps.bind(this)),c(exports.HOOKS.PREPROCESS_SINGLE_DOCUMENT,this.preprocessSingleDocument.bind(this)),c(exports.HOOKS.POST_LAYOUT_BLOCK,this.postLayoutBlock.bind(this),!0)},t}());Ks.registerHooks();var Ys=(new DOMParser).parseFromString('<root xmlns="'+H.SHADOW+'"/>',"text/xml"),qs=["footnote-marker","first-5-lines","first-4-lines","first-3-lines","first-2-lines","first-line","first-letter","before","","after"],$s="data-adapt-pseudo";function Qs(t){return t.getAttribute($s)||""}function Zs(t,e){t.setAttribute($s,e)}var Js=/*#__PURE__*/function(){function t(t,e,u,n,i){this.element=void 0,this.style=void 0,this.styler=void 0,this.context=void 0,this.exprContentListener=void 0,this.contentProcessed={},this.element=t,this.style=e,this.styler=u,this.context=n,this.exprContentListener=i}var e=t.prototype;return e.getStyle=function(t,e){var u=Qs(t);this.styler&&u&&u.match(/after$/)&&(this.style=this.styler.getStyle(this.element,!0),this.styler=null);var n=io(this.style,"_pseudos")[u]||{};if(u.match(/^first-/)&&!n["x-first-pseudo"]){var i,r=1;"first-letter"==u?r=0:null!=(i=u.match(/^first-([0-9]+)-lines$/))&&(r=i[1]-0),n["x-first-pseudo"]=new Yr(new Me(r),0)}return n},e.processContent=function(t,e,u){var n=Qs(t);if(!this.contentProcessed[n]){this.contentProcessed[n]=!0;var i=e.content;i&&Lr(i)&&(i.visit(new kr(t,this.context,i,this.exprContentListener)),function(t){Ks.preprocessForTextSpacing(t)}(t))}},t}(),tl=_i.registerFragmentIndex,el=/*#__PURE__*/function(){function t(t,e){this.sourceNode=void 0,this.styler=void 0,this.sourceNode=t,this.styler=e}var e=t.prototype;return e.createElement=function(t,e){var u=this,n=e.viewNode.ownerDocument.createElement("div"),i=new Dl(t,n,e),r=i.getColumn().pageBreakType;return i.getColumn().pageBreakType=null,i.layout(this.createNodePositionForPseudoElement(),!0).thenAsync(function(){u.styler.contentProcessed["after-if-continues"]=!1,i.getColumn().pageBreakType=r;var t=n.firstChild;return Z(t,"display","block"),Tn(t)})},e.createNodePositionForPseudoElement=function(){var t=Ys.createElementNS(H.XHTML,"div");Zs(t,"after-if-continues");var e=this.createShadowContext(t);return new xr({steps:[{node:t,shadowType:e.type,shadowContext:e,nodeShadow:null,shadowSibling:null}],offsetInNode:0,after:!1,preprocessedTextContent:null})},e.createShadowContext=function(t){return new yr(this.sourceNode,t,null,null,null,Ji.ShadowType.ROOTED,this.styler)},t}(),ul=/*#__PURE__*/function(){function t(t,e,u){this.nodeContext=void 0,this.afterIfContinues=void 0,this.pseudoElementHeight=void 0,this.flagmentLayoutConstraintType="AfterIfContinue",this.nodeContext=t,this.afterIfContinues=e,this.pseudoElementHeight=u}var e=t.prototype;return e.allowLayout=function(t,e,u){return!(e&&!t||t&&t.overflow)},e.nextCandidate=function(t){return!1},e.postLayout=function(t,e,u,n){},e.finishBreak=function(t,e){var u=this;return this.getRepetitiveElements().affectTo(t)?this.afterIfContinues.createElement(e,this.nodeContext).thenAsync(function(t){return u.nodeContext.viewNode.appendChild(t),Tn(!0)}):Tn(!0)},e.getRepetitiveElements=function(){return new nl(this.nodeContext,this.pseudoElementHeight)},e.equalsTo=function(e){return e instanceof t&&this.afterIfContinues==e.afterIfContinues},e.getPriorityOfFinishBreak=function(){return 9},t}(),nl=/*#__PURE__*/function(){function t(t,e){this.nodeContext=void 0,this.pseudoElementHeight=void 0,this.nodeContext=t,this.pseudoElementHeight=e}var e=t.prototype;return e.calculateOffset=function(t){return this.affectTo(t)?this.pseudoElementHeight:0},e.calculateMinimumOffset=function(t){return this.calculateOffset(t)},e.affectTo=function(t){if(!t)return!1;var e=t.shadowContext?t.shadowContext.owner:t.sourceNode;if(e===this.nodeContext.sourceNode)return!!t.after;for(var u=e.parentNode;u;u=u.parentNode)if(u===this.nodeContext.sourceNode)return!0;return!1},t}();function il(t,e){if(!t||!t.afterIfContinues||t.after||e.isFloatNodeContext(t))return Tn(t);var u=t.afterIfContinues;return u.createElement(e,t).thenAsync(function(n){var i=function(t,e,u){var n=t.viewNode;n.appendChild(u);var i=fs(u,e,t.vertical);return n.removeChild(u),i}(t,e,n);return e.fragmentLayoutConstraints.push(new ul(t,u,i)),Tn(t)})}function rl(t,e){return t.thenAsync(function(t){return il(t,e)})}var ol={img:!0,svg:!0,audio:!0,video:!0},al=/*#__PURE__*/function(){function t(t){this.constraints=void 0,this.constraints=t}return t.prototype.allowLayout=function(t){return this.constraints.every(function(e){return e.allowLayout(t)})},t}(),sl=/*#__PURE__*/function(t){function e(e,u){var n;return(n=t.call(this)||this).checkPoints=void 0,n.penalty=void 0,n.alreadyEvaluated=!1,n.breakNodeContext=null,n.checkPoints=e,n.penalty=u,n}N(e,t);var u=e.prototype;return u.findAcceptableBreak=function(t,e){return e<this.getMinBreakPenalty()?null:(this.alreadyEvaluated||(this.breakNodeContext=t.findBoxBreakPosition(this,e>0),this.alreadyEvaluated=!0),this.breakNodeContext)},u.getMinBreakPenalty=function(){return this.penalty},u.getNodeContext=function(){return this.alreadyEvaluated?this.breakNodeContext:this.checkPoints[this.checkPoints.length-1]},e}(vs),ll=/*#__PURE__*/function(t){function e(e,u,n,i,r){var o;return(o=t.call(this,e)||this).layoutContext=void 0,o.clientLayout=void 0,o.layoutConstraint=void 0,o.pageFloatLayoutContext=void 0,o.last=void 0,o.viewDocument=void 0,o.flowRootFormattingContext=null,o.isFloat=!1,o.isFootnote=!1,o.startEdge=0,o.endEdge=0,o.beforeEdge=0,o.afterEdge=0,o.footnoteEdge=0,o.box=null,o.chunkPositions=null,o.bands=null,o.overflown=!1,o.breakPositions=null,o.pageBreakType=null,o.forceNonfitting=!0,o.leftFloatEdge=0,o.rightFloatEdge=0,o.bottommostFloatTop=0,o.stopAtOverflow=!0,o.lastAfterPosition=null,o.fragmentLayoutConstraints=[],o.pseudoParent=null,o.nodeContextOverflowingDueToRepetitiveElements=null,o.blockDistanceToBlockEndFloats=NaN,o.breakAtTheEdgeBeforeFloat=null,o.layoutContext=u,o.clientLayout=n,o.layoutConstraint=i,o.pageFloatLayoutContext=r,o.last=e.lastChild,o.viewDocument=e.ownerDocument,r.setContainer(I(o)),o}N(e,t);var u=e.prototype;return u.getTopEdge=function(){return this.vertical?this.rtl?this.endEdge:this.startEdge:this.beforeEdge},u.getBottomEdge=function(){return this.vertical?this.rtl?this.startEdge:this.endEdge:this.afterEdge},u.getLeftEdge=function(){return this.vertical?this.afterEdge:this.rtl?this.endEdge:this.startEdge},u.getRightEdge=function(){return this.vertical?this.beforeEdge:this.rtl?this.startEdge:this.endEdge},u.isFloatNodeContext=function(t){return!(!t.floatSide||this.isFloat&&!t.parent)},u.stopByOverflow=function(t){return this.stopAtOverflow&&!!t&&t.overflow},u.isOverflown=function(t){return this.vertical?t<this.footnoteEdge:t>this.footnoteEdge},u.getExclusions=function(){var t=this.pageFloatLayoutContext.getFloatFragmentExclusions();return this.exclusions.concat(t)},u.openAllViews=function(t){var e=this,u=xn("openAllViews"),n=t.steps;this.layoutContext.setViewRoot(this.element,this.isFootnote);var i=n.length-1,r=null;return u.loop(function(){for(;i>=0&&(r=Br(n[i],r),i!==n.length-1||r.formattingContext||(r.formattingContext=e.flowRootFormattingContext),0!=i||(r.offsetInNode=e.calculateOffsetInNodeForNodeContext(t),r.after=t.after,r.preprocessedTextContent=t.preprocessedTextContent,!r.after));){var u=e.layoutContext.setCurrent(r,0==i&&0==r.offsetInNode);if(i--,u.isPending())return u}return Tn(!1)}).then(function(){u.finish(r)}),u.result()},u.calculateOffsetInNodeForNodeContext=function(t){return t.preprocessedTextContent?rr(t.preprocessedTextContent,t.offsetInNode,1):t.offsetInNode},u.maybePeelOff=function(t,e){if(t.firstPseudo&&t.inline&&!t.after&&0==t.firstPseudo.count&&1!=t.viewNode.nodeType){var u,n,i=t.viewNode.textContent,r=i.match(k),o=r?r[0].length:0;if(!r&&3===(null==(u=t.sourceNode)?void 0:u.nodeType)&&3===(null==(n=t.sourceNode.nextSibling)?void 0:n.nodeType)&&i===t.sourceNode.textContent){var a=i+t.sourceNode.nextSibling.textContent,s=a.match(k);if(s){var l=s[0];o=l.length,t.sourceNode.textContent=l,t.viewNode.textContent=l,t.sourceNode.nextSibling.textContent=a.substr(o)}}return this.layoutContext.peelOff(t,o)}return Tn(t)},u.buildViewToNextBlockEdge=function(t,e){var u=this,n=!1,i=xn("buildViewToNextBlockEdge");return i.loopWithFrame(function(i){t.viewNode&&!As(t)&&e.push(t.copy()),u.maybePeelOff(t,0).then(function(r){r!==t&&(As(t=r)||e.push(t.copy())),u.nextInTree(t).then(function(e){(t=e)?(!n&&u.layoutConstraint.allowLayout(t)||(n=!0,(t=t.modify()).overflow=!0),u.isFloatNodeContext(t)&&(Ya(t.floatReference)||"footnote"===t.floatSide)?u.layoutFloatOrFootnote(t).then(function(e){t=e,u.pageFloatLayoutContext.isInvalidated()&&(t=null),t?i.continueLoop():i.breakLoop()}):t.inline?i.continueLoop():i.breakLoop()):i.breakLoop()})})}).then(function(){i.finish(t)}),i.result()},u.nextInTree=function(t,e){return rl(this.layoutContext.nextInTree(t,e),this)},u.buildDeepElementView=function(t){var e=this;if(!t.viewNode)return Tn(t);var u=[],n=t.sourceNode,i=xn("buildDeepElementView");return i.loopWithFrame(function(i){t.viewNode&&t.inline&&!As(t)?u.push(t.copy()):(u.length>0&&e.postLayoutBlock(t,u),u=[]),e.maybePeelOff(t,0).then(function(r){var o=r;if(o!==t){for(var a=o;a&&a.sourceNode!=n;)a=a.parent;if(null==a)return t=o,void i.breakLoop();As(o)||u.push(o.copy())}e.nextInTree(o).then(function(u){(t=u)&&t.sourceNode!=n?e.layoutConstraint.allowLayout(t)?i.continueLoop():((t=t.modify()).overflow=!0,e.stopAtOverflow?i.breakLoop():i.continueLoop()):i.breakLoop()})})}).then(function(){u.length>0&&e.postLayoutBlock(t,u),i.finish(t)}),i.result()},u.createFloat=function(t,e,u,n){var i=this.viewDocument.createElement("div");return this.vertical?(n>=this.height&&(n-=.1),Z(i,"height",u+"px"),Z(i,"width",n+"px")):(u>=this.width&&(u-=.1),Z(i,"width",u+"px"),Z(i,"height",n+"px")),Z(i,"float",e),Z(i,"clear",e),this.element.insertBefore(i,t),i},u.killFloats=function(){for(var t=this.element.firstChild;t;){var e=t.nextSibling;if(1==t.nodeType){var u=t,n=u.style.cssFloat;if("left"!=n&&"right"!=n&&"none"!==n)break;this.element.removeChild(u)}t=e}},u.createFloats=function(){for(var t,e=this.element.firstChild,u=this.bands,n=this.vertical?this.getTopEdge():this.getLeftEdge(),i=this.vertical?this.getBottomEdge():this.getRightEdge(),r=!1,o=R(u);!(t=o()).done;){var a=t.value,s=a.y2-a.y1;a.left=this.createFloat(e,"left",a.x1-n,s),a.right=this.createFloat(e,"right",i-a.x2,s),r||(a.x1>=i||a.x2<=n?Z(a.right,"float","none"):r=!0)}},u.calculateEdge=function(t,e,u,n){var i;if(t&&ps(t.viewNode))return NaN;if(t&&t.after&&!t.inline&&(i=ds(t,this.clientLayout,0,this.vertical),!isNaN(i)))return i;for(var r=n-(t=e[u]).boxOffset;;){if(i=ds(t,this.clientLayout,r,this.vertical),!isNaN(i))return i;if(r>0)r--;else{if(--u<0)return this.beforeEdge;1!=(t=e[u]).viewNode.nodeType&&(r=t.viewNode.textContent.length)}}},u.parseComputedLength=function(t){if("number"==typeof t)return t;var e=t.match(/^(-?[0-9]*(\.[0-9]*)?)px$/);return e?parseFloat(e[0]):0},u.getComputedMargin=function(t){var e=this.clientLayout.getElementComputedStyle(t),u=new su(0,0,0,0);return e&&(u.left=this.parseComputedLength(e.marginLeft),u.top=this.parseComputedLength(e.marginTop),u.right=this.parseComputedLength(e.marginRight),u.bottom=this.parseComputedLength(e.marginBottom)),u},u.getComputedPaddingBorder=function(t){var e=this.clientLayout.getElementComputedStyle(t),u=new su(0,0,0,0);return e&&(u.left=this.parseComputedLength(e.borderLeftWidth)+this.parseComputedLength(e.paddingLeft),u.top=this.parseComputedLength(e.borderTopWidth)+this.parseComputedLength(e.paddingTop),u.right=this.parseComputedLength(e.borderRightWidth)+this.parseComputedLength(e.paddingRight),u.bottom=this.parseComputedLength(e.borderBottomWidth)+this.parseComputedLength(e.paddingBottom)),u},u.getComputedInsets=function(t){var e=this.clientLayout.getElementComputedStyle(t),u=new su(0,0,0,0);if(e){if("border-box"==e.boxSizing)return this.getComputedMargin(t);u.left=this.parseComputedLength(e.marginLeft)+this.parseComputedLength(e.borderLeftWidth)+this.parseComputedLength(e.paddingLeft),u.top=this.parseComputedLength(e.marginTop)+this.parseComputedLength(e.borderTopWidth)+this.parseComputedLength(e.paddingTop),u.right=this.parseComputedLength(e.marginRight)+this.parseComputedLength(e.borderRightWidth)+this.parseComputedLength(e.paddingRight),u.bottom=this.parseComputedLength(e.marginBottom)+this.parseComputedLength(e.borderBottomWidth)+this.parseComputedLength(e.paddingBottom)}return u},u.setComputedInsets=function(t,e){var u=this.clientLayout.getElementComputedStyle(t);u&&(e.marginLeft=this.parseComputedLength(u.marginLeft),e.borderLeft=this.parseComputedLength(u.borderLeftWidth),e.paddingLeft=this.parseComputedLength(u.paddingLeft),e.marginTop=this.parseComputedLength(u.marginTop),e.borderTop=this.parseComputedLength(u.borderTopWidth),e.paddingTop=this.parseComputedLength(u.paddingTop),e.marginRight=this.parseComputedLength(u.marginRight),e.borderRight=this.parseComputedLength(u.borderRightWidth),e.paddingRight=this.parseComputedLength(u.paddingRight),e.marginBottom=this.parseComputedLength(u.marginBottom),e.borderBottom=this.parseComputedLength(u.borderBottomWidth),e.paddingBottom=this.parseComputedLength(u.paddingBottom))},u.setComputedWidthAndHeight=function(t,e){var u=this.clientLayout.getElementComputedStyle(t);u&&(e.width=this.parseComputedLength(u.width),e.height=this.parseComputedLength(u.height))},u.layoutUnbreakable=function(t){return this.buildDeepElementView(t)},u.layoutFloat=function(t){var e=this,u=xn("layoutFloat"),n=t.viewNode,i=function(t,e,u){var n=e?"vertical-rl":"horizontal-tb";if("top"!==t&&"bottom"!==t||(t=Ga(t,n,u)),"block-start"===t&&(t="inline-start"),"block-end"===t&&(t="inline-end"),"inline-start"===t||"inline-end"===t){var i=function(t,e){var u=Xa[e];if(!u)throw new Error("unknown writing-mode: "+e);for(var n=0;n<u.length;n++)if(u[n].physical===t)return u[n].logical;return t}(Ha(t,n,u),n);"line-left"===i?t="left":"line-right"===i&&(t="right")}return"left"!==t&&"right"!==t&&(D.warn("Invalid float value: "+t+". Fallback to left."),t="left"),t}(t.floatSide,t.vertical,t.direction);return Z(n,"float","none"),Z(n,"display","inline-block"),Z(n,"vertical-align","top"),this.buildDeepElementView(t).then(function(r){for(var o=e.clientLayout.getElementClientRect(n),a=e.getComputedMargin(n),s=new ou(o.left-a.left,o.top-a.top,o.right+a.right,o.bottom+a.bottom),l=e.rtl?e.endEdge:e.startEdge,D=e.rtl?e.startEdge:e.endEdge,h=t.parent;h&&h.inline;)h=h.parent;if(h){var c=h.viewNode.ownerDocument.createElement("div");c.style.left="0px",c.style.top="0px",e.vertical?(c.style.bottom="0px",c.style.width="1px"):(c.style.right="0px",c.style.height="1px"),h.viewNode.appendChild(c);var d=e.clientLayout.getElementClientRect(c);l=Math.max(e.rtl?e.getEndEdge(d):e.getStartEdge(d),l),D=Math.min(e.rtl?e.getStartEdge(d):e.getEndEdge(d),D),h.viewNode.removeChild(c);var f=e.vertical?s.y2-s.y1:s.x2-s.x1;"left"==i?D=Math.max(D,l+f):l=Math.min(l,D-f),t.firstPseudo||h.viewNode.appendChild(t.viewNode)}var p=new ou(l,e.getBoxDir()*e.beforeEdge,D,e.getBoxDir()*e.afterEdge),E=s;e.vertical&&(E=gu(s));var C=e.getBoxDir();if(E.y1<e.bottommostFloatTop*C){var F=E.y2-E.y1;E.y1=e.bottommostFloatTop*C,E.y2=E.y1+F}!function(t,e,u,n){for(var i=u.y1,r=u.x2-u.x1,o=u.y2-u.y1,a=wu(e,i);;){var s=i+o;if(s>t.y2)return!1;for(var l=t.x1,D=t.x2,h=a;h<e.length&&e[h].y1<s;h++){var c=e[h];c.x1>l&&(l=c.x1),c.x2<D&&(D=c.x2)}if(l+r<=D||a>=e.length)return"left"==n?(u.x1=l,u.x2=l+r):(u.x1=D-r,u.x2=D),u.y2+=i-u.y1,u.y1=i,!0;i=e[a].y2,a++}}(p,e.bands,E,i),e.vertical&&(s=vu(E));var A,g=e.getComputedInsets(n);Z(n,"width",s.x2-s.x1-g.left-g.right+"px"),Z(n,"height",s.y2-s.y1-g.top-g.bottom+"px"),Z(n,"position","absolute"),Z(n,"display",t.display);var v=null;if(h&&(v=h.containingBlockForAbsolute?h:h.getContainingBlockForAbsolute()),v){var m=v.viewNode.ownerDocument.createElement("div");m.style.position="absolute",v.vertical?m.style.right="0":m.style.left="0",m.style.top="0",v.viewNode.appendChild(m),A=e.clientLayout.getElementClientRect(m),v.viewNode.removeChild(m)}else A={left:e.getLeftEdge()-e.paddingLeft,right:e.getRightEdge()+e.paddingRight,top:e.getTopEdge()-e.paddingTop};(v?v.vertical:e.vertical)?Z(n,"right",A.right-s.x2+"px"):Z(n,"left",s.x1-A.left+"px"),Z(n,"top",s.y1-A.top+"px"),t.clearSpacer&&(t.clearSpacer.parentNode.removeChild(t.clearSpacer),t.clearSpacer=null);var B=e.vertical?s.x1:s.y2,w=e.vertical?s.x2:s.y1;e.isOverflown(B)&&0!=e.breakPositions.length?((t=t.modify()).overflow=!0,u.finish(t)):(e.killFloats(),p=new ou(e.getLeftEdge(),e.getTopEdge(),e.getRightEdge(),e.getBottomEdge()),e.vertical&&(p=gu(p)),function(t,e,u,n,i){for(n||(n=[new Du(u.y1,u.y2,u.x1,u.x2)]);n.length>0&&n[0].y2<=t.y1;)n.shift();if(0!=n.length){var r;n[0].y1<t.y1&&(n[0].y1=t.y1);var o=0==e.length?t.y1:e[e.length-1].y2;o<t.y2&&e.push(new Du(o,t.y2,t.x1,t.x2));for(var a,s=wu(e,n[0].y1),l=R(n);!(a=l()).done;){var D=a.value;if(s==e.length)break;for(e[s].y1<D.y1&&(r=e[s],s++,e.splice(s,0,new Du(D.y1,r.y2,r.x1,r.x2)),r.y2=D.y1);s<e.length&&((r=e[s++]).y2>D.y2&&(e.splice(s,0,new Du(D.y2,r.y2,r.x1,r.x2)),r.y2=D.y2),D.x1!=D.x2&&("left"==i?r.x1=Math.min(D.x2,t.x2):r.x2=Math.max(D.x1,t.x1)),r.y2!=D.y2););}Bu(t,e)}}(p,e.bands,E,null,i),e.createFloats(),"left"==i?e.leftFloatEdge=B:e.rightFloatEdge=B,e.bottommostFloatTop=w,e.updateMaxReachedAfterEdge(B),u.finish(r))}),u.result()},u.setupFloatArea=function(t,e,u,n,i,r){var o=this.pageFloatLayoutContext,a=o.getContainer(e),s=t.element;a.element.parentNode.appendChild(s),t.isFloat=!0,t.originX=a.originX,t.originY=a.originY,t.vertical=a.vertical,t.rtl=a.rtl,t.marginLeft=t.marginRight=t.marginTop=t.marginBottom=0,t.borderLeft=t.borderRight=t.borderTop=t.borderBottom=0,t.paddingLeft=t.paddingRight=t.paddingTop=t.paddingBottom=0,t.exclusions=(a.exclusions||[]).concat(),t.forceNonfitting=!o.hasFloatFragments(),t.innerShape=null;var l=a.getPaddingRect();t.setHorizontalPosition(l.x1-a.originX,l.x2-l.x1),t.setVerticalPosition(l.y1-a.originY,l.y2-l.y1),i.adjustPageFloatArea(t,a,this),t.init();var D=!!o.setFloatAreaDimensions(t,e,u,n,!0,!o.hasFloatFragments(),r);return D?(t.killFloats(),t.init()):a.element.parentNode.removeChild(s),D},u.createPageFloatArea=function(t,e,u,n,i){var r=this.element.ownerDocument.createElement("div");Z(r,"position","absolute");var o=this.pageFloatLayoutContext.getPageFloatLayoutContext(t.floatReference),a=new Ja(null,Ka.COLUMN,null,this.pageFloatLayoutContext.flowName,t.nodePosition,null,null),s=o.getContainer(),l=new pl(e,r,this.layoutContext.clone(),this.clientLayout,this.layoutConstraint,a,s);return a.setContainer(l),this.setupFloatArea(l,t.floatReference,e,u,n,i)?l:null},u.layoutSinglePageFloatFragment=function(t,e,u,n,i,r,o){var a=this.pageFloatLayoutContext,s=(t=(o?o.continuations:[]).concat(t))[0].float,l=a.getPageFloatPlacementCondition(s,e,u),D=this.createPageFloatArea(s,e,r,i,l),h={floatArea:D,pageFloatFragment:null,newPosition:null};if(!D)return Tn(h);var c=xn("layoutSinglePageFloatFragment"),d=!1,f=0;return c.loopWithFrame(function(e){if(f>=t.length)e.breakLoop();else{var u=new xr(t[f].nodePosition);D.layout(u,!0).then(function(t){h.newPosition=t,!t||n?(f++,e.continueLoop()):(d=!0,e.breakLoop())})}}).then(function(){if(!d){var u=a.setFloatAreaDimensions(D,s.floatReference,e,r,!1,n,l);if(u){var o=i.createPageFloatFragment(t,u,D,!!h.newPosition);a.addPageFloatFragment(o,!0),h.pageFloatFragment=o}else d=!0}c.finish(h)}),c.result()},u.layoutPageFloatInner=function(t,e,u,n){var i=this,r=this.pageFloatLayoutContext,o=t.float;function a(e,u){u?r.removePageFloatFragment(u,!0):e&&e.element.parentNode.removeChild(e.element),r.restoreStashedFragments(o.floatReference),r.deferPageFloat(t)}r.stashEndFloatFragments(o);var s=xn("layoutPageFloatInner");return this.layoutSinglePageFloatFragment([t],o.floatSide,o.clearSide,!r.hasFloatFragments(),e,u,n).then(function(t){var e=t.floatArea,u=t.pageFloatFragment,l=t.newPosition;u?i.layoutStashedPageFloats(o.floatReference,[n]).then(function(t){if(t){if(r.addPageFloatFragment(u),r.discardStashedFragments(o.floatReference),l){var n=new Za(o,l.primary);r.deferPageFloat(n)}s.finish(!0)}else a(e,u),s.finish(!1)}):(a(e,u),s.finish(!1))}),s.result()},u.layoutStashedPageFloats=function(t,e){var u=this,n=this.pageFloatLayoutContext,i=n.getStashedFloatFragments(t),r=[],o=[],a=!1,s=xn("layoutStashedPageFloats"),l=0;return s.loopWithFrame(function(t){if(l>=i.length)t.breakLoop();else{var n=i[l];if(e.includes(n))return l++,void t.continueLoop();var s=(new es).findByFloat(n.continuations[0].float);u.layoutSinglePageFloatFragment(n.continuations,n.floatSide,null,!1,s,null).then(function(e){var u=e.floatArea;u&&r.push(u);var n=e.pageFloatFragment;n?(o.push(n),l++,t.continueLoop()):(a=!0,t.breakLoop())})}}).then(function(){a?(o.forEach(function(t){n.removePageFloatFragment(t,!0)}),r.forEach(function(t){var e=t.element;e&&e.parentNode&&e.parentNode.removeChild(e)})):i.forEach(function(t){var e=t.area.element;e&&e.parentNode&&e.parentNode.removeChild(e)}),s.finish(!a)}),s.result()},u.setFloatAnchorViewNode=function(t){var e=t.viewNode.parentNode,u=e.ownerDocument.createElement("span");u.setAttribute(cr,"1"),"footnote"===t.floatSide&&this.layoutContext.applyPseudoelementStyle(t,"footnote-call",u),e.appendChild(u),e.removeChild(t.viewNode);var n=t.modify();return n.after=!0,n.viewNode=u,n},u.resolveFloatReferenceFromColumnSpan=function(t,e,u){var n=this,i=xn("resolveFloatReferenceFromColumnSpan"),r=this.pageFloatLayoutContext,o=r.getPageFloatLayoutContext(Ka.REGION);return r.getContainer().width<o.getContainer().width&&t===Ka.COLUMN?e===$e.auto?this.buildDeepElementView(u.copy()).then(function(e){var u=e.viewNode,r=ja(n.clientLayout,u,[Wa.MIN_CONTENT_INLINE_SIZE])[Wa.MIN_CONTENT_INLINE_SIZE],o=n.getComputedMargin(u);i.finish((r+=n.vertical?o.top+o.bottom:o.left+o.right)>n.width?Ka.REGION:t)}):i.finish(e===$e.all?Ka.REGION:t):i.finish(t),i.result()},u.layoutPageFloat=function(t){var e=this,u=this.pageFloatLayoutContext,n=(new es).findByNodeContext(t),i=u.findPageFloatByNodePosition(t.toNodePosition());return(i?Tn(i):n.createPageFloat(t,u,this)).thenAsync(function(i){var r=mr(t,0),o=e.setFloatAnchorViewNode(t),a=n.findPageFloatFragment(i,u),s=new Za(i,r);if(a&&a.hasFloat(i))return u.registerPageFloatAnchor(i,o.viewNode),Tn(o);if(u.isForbidden(i)||u.hasPrecedingFloatsDeferredToNext(i))return u.deferPageFloat(s),u.registerPageFloatAnchor(i,o.viewNode),Tn(o);if(e.nodeContextOverflowingDueToRepetitiveElements)return Tn(null);var l=ds(o,e.clientLayout,0,e.vertical);return e.isOverflown(l)?Tn(o):e.layoutPageFloatInner(s,n,l,a).thenAsync(function(t){return t?Tn(null):(u.registerPageFloatAnchor(i,o.viewNode),Tn(o))})})},u.processLineStyling=function(t,e,u){var n=this,i=xn("processLineStyling"),r=u.concat([]);u.splice(0,u.length);var o=0,a=t.firstPseudo;return 0==a.count&&(a=a.outer),i.loopWithFrame(function(u){if(a){var i=n.findLinePositions(r),s=a.count-o;if(i.length<=s)u.breakLoop();else{var l=n.findAcceptableBreakInside(r,i[s-1],!0);null!=l?n.finishBreak(l,!1,!1).then(function(){o+=s,n.layoutContext.peelOff(l,0).then(function(i){a=(t=i).firstPseudo,n.buildViewToNextBlockEdge(t,r=[]).then(function(t){e=t,u.continueLoop()})})}):u.breakLoop()}}else u.breakLoop()}).then(function(){Array.prototype.push.apply(u,r),i.finish(e)}),i.result()},u.isLoneImage=function(t){return!(2!=t.length&&this.breakPositions.length>0)&&t[0].sourceNode==t[1].sourceNode&&ol[t[0].sourceNode.localName]},u.getTrailingMarginEdgeAdjustment=function(t){for(var e=0,u=0,n=t.length-1;n>=0;n--){var i=t[n];if(!i.after||!i.viewNode||1!=i.viewNode.nodeType)break;var r=this.getComputedMargin(i.viewNode),o=this.vertical?-r.left:r.bottom;o>0?e=Math.max(e,o):u=Math.min(u,o)}return e+u},u.layoutBreakableBlock=function(t){var e=this,u=xn("layoutBreakableBlock"),n=[];return this.buildViewToNextBlockEdge(t,n).then(function(i){var r=n.length-1;if(r<0)u.finish(i);else{e.postLayoutBlock(i,n);var o=e.calculateEdge(i,n,r,n[r].boxOffset),a=!1;if(!i||!ps(i.viewNode)){var s=ms(i,e.collectElementsOffset());a=e.isOverflown(o+(e.vertical?-1:1)*s.minimum),e.isOverflown(o+(e.vertical?-1:1)*s.current)&&!e.nodeContextOverflowingDueToRepetitiveElements&&(e.nodeContextOverflowingDueToRepetitiveElements=i)}null==i&&(o+=e.getTrailingMarginEdgeAdjustment(n)),e.updateMaxReachedAfterEdge(o),(t.firstPseudo?e.processLineStyling(t,i,n):Tn(i)).then(function(t){n.length>0&&(e.saveBoxBreakPosition(n),a&&!e.isLoneImage(n)&&t&&((t=t.modify()).overflow=!0)),u.finish(t)})}}),u.result()},u.postLayoutBlock=function(t,e){var u=this;f(exports.HOOKS.POST_LAYOUT_BLOCK).forEach(function(n){n(t,e,u)})},u.findEndOfLine=function(t,e,u){for(var n,i=this.vertical?t-1:t+1,r=0,o=e[0].boxOffset,a=r,s=e.length-1,l=e[s].boxOffset;o<l;){n=o+Math.ceil((l-o)/2),a=r;for(var D=s;a<D;){var h=a+Math.ceil((D-a)/2);e[h].boxOffset>n?D=h-1:a=h}var c=this.calculateEdge(null,e,a,n);if(this.vertical?c<=i:c>=i){for(l=n-1;e[a].boxOffset==n;)a--;s=a}else u&&this.updateMaxReachedAfterEdge(c),o=n,r=a}return{nodeContext:e[a],index:o,checkPointIndex:a}},u.findAcceptableBreakInside=function(t,e,u){var n,i=this.findEndOfLine(e,t,!0),r=i.nodeContext,o=r.viewNode;if(1!=o.nodeType&&"viv-ts-inner"!==(null==(n=o.parentElement)?void 0:n.localName)){var a=o;r=this.resolveTextNodeBreaker(r).breakTextNode(a,r,i.index,t,i.checkPointIndex,u)}else{var s=gs(r);if(s){var l;if((null==(l=this.breakPositions)?void 0:l[0])instanceof sl&&null!=s&&s.viewNode.contains(this.breakPositions[0].checkPoints[0].viewNode))return null;r=s}}return this.clearOverflownViewNodes(r,!1),r},u.resolveTextNodeBreaker=function(t){return f(exports.HOOKS.RESOLVE_TEXT_NODE_BREAKER).reduce(function(e,u){return u(t)||e},hl.instance)},u.getRangeBoxes=function(t,e){for(var u,n=[],i=t.ownerDocument.createRange(),r=!1,o=t,a=null,s=!1,l=!0;l;){var D=!0;do{var h=null;o==e&&(l=1===e.nodeType&&!(!e.firstChild||r));var c=1===o.nodeType?o:null;c?r?r=!1:Cs(c)?D=!s:/^r(uby|[bt]c?)$/.test(c.localName)||"inline"!==(u=this.clientLayout.getElementComputedStyle(c).display)&&(hs(u)||cs(u))?((D=!s)&&("ruby"===c.localName&&o.firstChild&&(o=o.firstChild),i.setStartBefore(o),s=!0,a=o),o.contains(e)&&(l=!1)):h=o.firstChild:(s||(null==o.parentNode?l=!1:(i.setStartBefore(o),s=!0)),a=o),h||(h=o.nextSibling)||(r=!0,h=o.parentNode),o=h}while(D&&l);if(s){i.setEndAfter(a);for(var d=this.clientLayout.getRangeClientRects(i),f=0;f<d.length;f++)n.push(d[f]);s=!1}}return n},u.findLinePositions=function(t){var e=[],u=this.getRangeBoxes(t[0].viewNode,t[t.length-1].viewNode);u.sort(this.vertical?Ar:Fr);for(var n=0,i=0,r=0,o=0,a=0,s=this.getBoxDir();;){if(a<u.length){var l=u[a],D=1;if(o>0){var h=Math.max(this.getBoxSize(l),1);D=s*this.getBeforeEdge(l)<s*n?s*(this.getAfterEdge(l)-n)/h:s*this.getAfterEdge(l)>s*i?s*(i-this.getBeforeEdge(l))/h:1}if(0==o||D>=.6||D>=.2&&this.getStartEdge(l)>=r-1){r=this.getEndEdge(l),this.vertical?(n=0==o?l.right:Math.max(n,l.right),i=0==o?l.left:Math.min(i,l.left)):(n=0==o?l.top:Math.min(n,l.top),i=0==o?l.bottom:Math.max(i,l.bottom)),o++,a++;continue}}if(o>0&&(e.push(i),o=0),a>=u.length)break}return e.sort(Dt),this.vertical&&e.reverse(),e},u.calculateClonedPaddingBorder=function(t){for(var e=0,u=t;u;u=u.parent)if(!u.inline&&Ui(u.viewNode)){var n=this.getComputedPaddingBorder(u.viewNode);e+=u.vertical?-n.left:n.bottom,"table"===u.display&&(e+=(u.vertical?-1:1)*u.blockBorderSpacing)}return e},u.getOffsetByRepetitiveElements=function(t){return(t?t.calculateOffset(this):ms(null,this.collectElementsOffset())).current},u.findBoxBreakPosition=function(t,e){var u,n=this,i=this.element.parentNode,r=this.element.nextSibling;i.removeChild(this.element),i.insertBefore(this.element,r);for(var o,a,s=t.checkPoints,l=s[0];l.parent&&l.inline;)l=l.parent;e?(o=1,a=1):(o=Math.max((l.inheritedProps.widows||2)-0,1),a=Math.max((l.inheritedProps.orphans||2)-0,1));var D=this.calculateClonedPaddingBorder(l),h=this.findLinePositions(s),c=this.footnoteEdge-D,d=this.getBoxDir(),f=this.getOffsetByRepetitiveElements(t);c-=d*f;var p=this.findFirstOverflowingEdgeAndCheckPoint(s);isNaN(p.edge)&&(p.edge=Infinity*d);var E=lt(h.length,function(t){var e=h[t];return n.vertical?e<c||e<=p.edge:e>c||e>=p.edge}),C=E<=0;C&&(E=lt(h.length,function(t){return n.vertical?h[t]<c:h[t]>c}));var F,A=s[s.length-1].viewNode;if("viv-ts-inner"===(null==(u=A)?void 0:u.parentElement.localName)&&(A=A.parentElement.parentElement),(E===h.length&&A.nextSibling||E>=h.length-1&&A.parentElement.querySelector(".MJXc-display"))&&(o=0),(E=Math.min(h.length-o,E))<a)return null;if(c=h[E-1],F=C?p.checkPoint:this.findAcceptableBreakInside(t.checkPoints,c,e)){var g=this.getAfterEdgeOfBlockContainer(F);!isNaN(g)&&g<c&&(c=g),this.computedBlockSize=d*(c-this.beforeEdge)+f}return F},u.getAfterEdgeOfBlockContainer=function(t){var e=t;do{e=e.parent}while(e&&e.inline);return e?((e=e.copy().modify()).after=!0,ds(e,this.clientLayout,0,this.vertical)):NaN},u.findFirstOverflowingEdgeAndCheckPoint=function(t){var e=t.findIndex(function(t){return t.overflow});if(e<0)return{edge:NaN,checkPoint:null};var u=t[e];return{edge:this.calculateEdge(null,t,e,u.boxOffset),checkPoint:u}},u.findEdgeBreakPosition=function(t){return this.computedBlockSize=t.computedBlockSize+this.getOffsetByRepetitiveElements(t),t.position},u.finishBreak=function(t,e,u){var n=(new ws).find(t.formattingContext).finishBreak(this,t,e,u);return n||(n=bs.finishBreak(this,t,e,u)),n},u.findAcceptableBreakPosition=function(){var t=null,e=null,u=0,n=0;do{u=n,n=Number.MAX_VALUE;for(var i=this.breakPositions.length-1;i>=0&&!e;--i){e=(t=this.breakPositions[i]).findAcceptableBreak(this,u);var r=t.getMinBreakPenalty();r>u&&(n=Math.min(n,r))}}while(n>u&&!e&&this.forceNonfitting);return{breakPosition:e?t:null,nodeContext:e}},u.doFinishBreak=function(t,e,u,n){var i=this;if(this.pageFloatLayoutContext.isInvalidated()||this.pageBreakType||!e)return Tn(t);var r=xn("doFinishBreak"),o=!1;if(!t){if(this.forceNonfitting)return D.warn("Could not find any page breaks?!!"),this.skipTailEdges(e).then(function(t){t?((t=t.modify()).overflow=!1,i.finishBreak(t,o,!0).then(function(){r.finish(t)})):r.finish(t)}),r.result();t=u,o=!0,this.computedBlockSize=n}return this.finishBreak(t,o,!0).then(function(){r.finish(t)}),r.result()},u.isBreakable=function(t){return!!t.after||t.sourceNode.namespaceURI!==H.SVG&&!t.flexContainer},u.zeroIndent=function(t){var e=t.toString();return""==e||"auto"==e||!!e.match(/^0+(.0*)?[^0-9]/)},u.checkOverflowAndSaveEdge=function(t,e){if(!t)return!1;if(ps(t.viewNode))return!1;var u=ds(t,this.clientLayout,0,this.vertical),n=ms(t,this.collectElementsOffset()),i=this.isOverflown(u+(this.vertical?-1:1)*n.minimum);if(this.isOverflown(u+(this.vertical?-1:1)*n.current)&&!this.nodeContextOverflowingDueToRepetitiveElements)this.nodeContextOverflowingDueToRepetitiveElements=t;else if(e){var r=u+this.getTrailingMarginEdgeAdjustment(e),o=this.footnoteEdge-this.getBoxDir()*n.current;u=this.vertical?Math.min(u,Math.max(r,o)):Math.max(u,Math.min(r,o))}return this.updateMaxReachedAfterEdge(u),i},u.checkOverflowAndSaveEdgeAndBreakPosition=function(t,e,u,n){if(!t)return!1;if(ps(t.viewNode))return!1;var i=this.checkOverflowAndSaveEdge(t,e);return!u&&i||this.saveEdgeBreakPosition(t,n,i),i},u.applyClearance=function(t){if(!t.viewNode.parentNode)return!1;var e=this.getComputedMargin(t.viewNode),u=t.viewNode.ownerDocument.createElement("div");this.vertical?(u.style.bottom="0px",u.style.width="1px",u.style.marginRight=e.right+"px"):(u.style.right="0px",u.style.height="1px",u.style.marginTop=e.top+"px"),t.viewNode.parentNode.insertBefore(u,t.viewNode);var n=this.clientLayout.getElementClientRect(u),i=this.getBeforeEdge(n),r=this.getBoxDir(),o=t.clearSide,a=Infinity*-this.getBoxDir();switch("all"===o&&(a=this.pageFloatLayoutContext.getPageFloatClearEdge(o,this)),o){case"left":a=r*Math.max(a*r,this.leftFloatEdge*r);break;case"right":a=r*Math.max(a*r,this.rightFloatEdge*r);break;default:a=r*Math.max(a*r,Math.max(this.rightFloatEdge*r,this.leftFloatEdge*r))}if(i*r>=a*r)return t.viewNode.parentNode.removeChild(u),!1;var s=Math.max(1,(a-i)*r);this.vertical?u.style.width=s+"px":u.style.height=s+"px",n=this.clientLayout.getElementClientRect(u);var l=this.getAfterEdge(n);if(!t.floatSide)if(this.vertical){var D=l+e.right-a;D>0==e.right>=0&&(D+=e.right),u.style.marginLeft=D+"px"}else{var h=a-(l+e.top);h>0==e.top>=0&&(h+=e.top),u.style.marginBottom=h+"px"}return t.clearSpacer=u,!0},u.isBFC=function(t){return!!Ss(t)||!!Qi.isInstanceOfRepetitiveElementsOwnerFormattingContext(t)},u.skipEdges=function(t,e,u){var n,i=this,r=t.after?null==(n=t.parent)?void 0:n.formattingContext:t.formattingContext;if(r&&!this.isBFC(r))return Tn(t);var o=xn("skipEdges"),a=!u&&e&&t&&t.after,s=u,l=null,D=[],h=[],c=!1;function d(){return!!u||!e&&Xi(s)&&!function(){if(!l)return!1;for(var t=l;null!=(e=t)&&e.parent;t=t.parent){for(var e,u,n=t.after?t.viewNode:null==(u=t.viewNode)?void 0:u.previousSibling;n&&(pr(n,t.parent.whitespace)||Fs(n));)n=n.previousSibling;if(n)return!1}return!0}()}var f=function(){(t=D[0]||t).viewNode.parentNode.removeChild(t.viewNode),i.pageBreakType=s};return o.loopWithFrame(function(u){for(;t;){var n=(new ws).find(t.formattingContext);do{if(!t.viewNode)break;if(t.inline&&1!=t.viewNode.nodeType){if(pr(t.viewNode,t.whitespace))break;if(!t.after)return d()?f():i.checkOverflowAndSaveEdgeAndBreakPosition(l,null,!0,s)?(t=(i.stopAtOverflow&&l||t).modify()).overflow=!0:(t=t.modify()).breakBefore=s,void u.breakLoop()}if(!t.after){if(t.floatSide&&(i.breakAtTheEdgeBeforeFloat=er(s)?s:null),n&&n.startNonInlineElementNode(t))break;if(t.clearSide&&i.applyClearance(t)&&e&&0===i.breakPositions.length&&i.saveEdgeBreakPosition(t.copy(),s,!1),!t.inline&&(l?gs(l):i.breakPositions[i.breakPositions.length-1]instanceof sl)&&i.saveEdgeBreakPosition(t.copy(),s,!1),!i.isBFC(t.formattingContext)||Qi.isInstanceOfRepetitiveElementsOwnerFormattingContext(t.formattingContext)||i.isFloatNodeContext(t)||t.flexContainer||!t.nodeShadow&&!t.sourceNode.firstElementChild&&pr(t.sourceNode.firstChild,t.whitespace))return D.push(t.copy()),s=ur(s,t.breakBefore),d()?f():!i.checkOverflowAndSaveEdgeAndBreakPosition(l,null,!0,s)&&i.layoutConstraint.allowLayout(t)||((t=(i.stopAtOverflow&&l||t).modify()).overflow=!0),void u.breakLoop()}if(1!=t.viewNode.nodeType)break;var r=t.viewNode.style;if(t.after){var o;t.floatSide&&(s=null!=(o=s)?o:i.breakAtTheEdgeBeforeFloat,i.breakAtTheEdgeBeforeFloat=null);var p=t.sourceNode;if("svg"===p.localName||"math"===p.localName||"true"===p.getAttribute("data-math-typeset")){c=!1,l=t.copy(),h.push(l),s=ur(null,t.breakAfter),i.checkOverflowAndSaveEdgeAndBreakPosition(l,null,!i.stopAtOverflow,s);break}if(t.inline)break;if(n&&n.afterNonInlineElementNode(t,i.stopAtOverflow))break;if(c){if(d())return f(),void u.breakLoop();D=[],e=!1,a=!1,s=null}c=!1,l=t.copy(),h.push(l),s=ur(s,t.breakAfter),!r||i.zeroIndent(r.paddingBottom)&&i.zeroIndent(r.borderBottomWidth)||(h=[l])}else{var E;if(D.push(t.copy()),s=ur(s,t.breakBefore),!(t.pageType==(null==(E=t.parent)?void 0:E.pageType)&&Xi(s)||i.layoutConstraint.allowLayout(t))&&(i.checkOverflowAndSaveEdgeAndBreakPosition(l,null,!i.stopAtOverflow,s),(t=t.modify()).overflow=!0,i.stopAtOverflow))return void u.breakLoop();if(ol[t.viewNode.localName])return d()?f():i.checkOverflowAndSaveEdgeAndBreakPosition(l,null,!0,s)&&((t=(i.stopAtOverflow&&l||t).modify()).overflow=!0),void u.breakLoop();!r||i.zeroIndent(r.paddingTop)&&i.zeroIndent(r.borderTopWidth)||(a=!1,h=[]),c=!0}}while(0);var C=i.nextInTree(t,a);if(C.isPending())return void C.then(function(e){t=e,u.continueLoop()});t=C.get()}i.checkOverflowAndSaveEdgeAndBreakPosition(l,h,!i.stopAtOverflow,s)?l&&i.stopAtOverflow&&((t=l.modify()).overflow=!0):Xi(s)&&(i.pageBreakType=s),u.breakLoop()}).then(function(){l&&(i.lastAfterPosition=l.toNodePosition()),o.finish(t)}),o.result()},u.skipTailEdges=function(t){var e=this,u=t.copy(),n=xn("skipEdges"),i=null,r=!1;return n.loopWithFrame(function(n){for(;t;){do{if(!t.viewNode)break;if(t.inline&&1!=t.viewNode.nodeType){if(pr(t.viewNode,t.whitespace))break;if(!t.after)return Xi(i)&&(e.pageBreakType=i),void n.breakLoop()}if(!t.after&&(e.isFloatNodeContext(t)||t.flexContainer))return Xi(i=ur(i,t.breakBefore))&&(e.pageBreakType=i),void n.breakLoop();if(1!=t.viewNode.nodeType)break;var o=t.viewNode.style;if(t.after){if(r){if(Xi(i))return e.pageBreakType=i,void n.breakLoop();i=null}r=!1,i=ur(i,t.breakAfter)}else{if(i=ur(i,t.breakBefore),ol[t.viewNode.localName])return Xi(i)&&(e.pageBreakType=i),void n.breakLoop();if(o&&(!e.zeroIndent(o.paddingTop)||!e.zeroIndent(o.borderTopWidth)))return void n.breakLoop()}r=!0}while(0);var a=e.layoutContext.nextInTree(t);if(a.isPending())return void a.then(function(e){t=e,n.continueLoop()});t=a.get()}u=null,n.breakLoop()}).then(function(){n.finish(u)}),n.result()},u.layoutFloatOrFootnote=function(t){return Ya(t.floatReference)||"footnote"===t.floatSide?this.layoutPageFloat(t):this.layoutFloat(t)},u.layoutNext=function(t,e,u){var n=this,i=xn("layoutNext");return this.skipEdges(t,e,u||null).then(function(u){if(!(t=u)||n.pageBreakType||n.stopByOverflow(t))i.finish(t);else{var r=t.formattingContext;(new ws).find(r).layout(t,n,e).thenFinish(i)}}),i.result()},u.clearOverflownViewNodes=function(t,e){if(t)for(var u=t.parent;t;t=u,u=u?u.parent:null){var n=(u||t).formattingContext;(new ws).find(n).clearOverflownViewNodes(this,u,t,e),e=!1}},u.initGeom=function(){var t=this.element.ownerDocument.createElement("div");t.style.position="absolute",t.style.top=this.paddingTop+"px",t.style.right=this.paddingRight+"px",t.style.bottom=this.paddingBottom+"px",t.style.left=this.paddingLeft+"px",this.element.appendChild(t);var e=this.clientLayout.getElementClientRect(t);this.element.removeChild(t);var u=this.originX+this.left+this.getInsetLeft(),n=this.originY+this.top+this.getInsetTop();this.box=new ou(u,n,u+this.width,n+this.height),this.startEdge=e?this.vertical?this.rtl?e.bottom:e.top:this.rtl?e.right:e.left:0,this.endEdge=e?this.vertical?this.rtl?e.top:e.bottom:this.rtl?e.left:e.right:0,this.beforeEdge=e?this.vertical?e.right:e.top:0,this.afterEdge=e?this.vertical?e.left:e.bottom:0,this.leftFloatEdge=this.beforeEdge,this.rightFloatEdge=this.beforeEdge,this.bottommostFloatTop=this.beforeEdge,this.footnoteEdge=this.afterEdge,this.bands=function(t,e,u,n,i,r){r&&(t=gu(t),e=e.map(function(t){return mu(t)}),u=u.map(function(t){return mu(t)}));var o,a,s,l=e.length,D=u?u.length:0,h=[],c=[];for(o=0;o<l;o++)e[o].addSegments(c,o);for(o=0;o<D;o++)u[o].addSegments(c,o+l);var d=c.length;c.sort(hu);for(var f=0;c[f].shapeId>=l;)f++;var p=c[f].low.y;p>t.y1&&h.push(new Du(t.y1,p,t.x2,t.x2));for(var E,C,F=0,A=[];F<d&&(s=c[F]).low.y<p;)s.high.y>p&&A.push(s),F++;for(;F<d||A.length>0;){var g=t.y2,v=Math.min((E=Math.ceil(p+8),(C=i)?Math.ceil(E/C)*C:E),t.y2);for(a=0;a<A.length&&g>v;a++)(s=A[a]).low.x==s.high.x?s.high.y<g&&(g=Math.max(Au(s.high.y,i),v)):s.low.x!=s.high.x&&(g=v);for(g>t.y2&&(g=t.y2);F<d&&(s=c[F]).low.y<g;)if(s.high.y<p)F++;else{if(!(s.low.y<v)){var m=Au(s.low.y,i);m<g&&(g=m);break}s.low.y==s.high.y&&s.low.y==p||(A.push(s),g=v),F++}var B=[];for(a=0;a<A.length;a++)Cu(B,A[a],p,g);B.sort(function(t,e){return t.x-e.x||t.lowOrHigh-e.lowOrHigh});var w=Fu(B,l,D);if(0==w.length)h.push(new Du(p,g,t.x2,t.x2));else{var y=0,N=t.x1;for(a=0;a<w.length;a+=2){var b=Math.max(t.x1,w[a]),S=Math.min(t.x2,w[a+1])-b;S>y&&(y=S,N=b)}h.push(0==y?new Du(p,g,t.x2,t.x2):new Du(p,g,Math.max(N,t.x1),Math.min(N+y,t.x2)))}if(g==t.y2)break;for(p=g,a=A.length-1;a>=0;a--)A[a].high.y<=g&&A.splice(a,1)}return Bu(t,h),h}(this.box,[this.getInnerShape()],this.getExclusions(),0,this.snapHeight,this.vertical),this.createFloats()},u.init=function(){this.chunkPositions=[],Z(this.element,"width",this.width+"px"),Z(this.element,"height",this.height+"px"),this.initGeom(),this.computedBlockSize=0,this.overflown=!1,this.pageBreakType=null,this.lastAfterPosition=null},u.saveEdgeBreakPosition=function(t,e,u){var n=t.copy(),i=(new ws).find(t.formattingContext),r=this.calculateClonedPaddingBorder(n),o=i.createEdgeBreakPosition(n,e,u,this.computedBlockSize+r);this.breakPositions.push(o)},u.saveBoxBreakPosition=function(t){var e=t[0].breakPenalty;if(e){for(var u=t[0];u.parent&&u.inline;)u=u.parent;e=u.breakPenalty}var n=new sl(t,e);this.breakPositions.push(n)},u.updateMaxReachedAfterEdge=function(t){if(!isNaN(t)){var e=this.getBoxDir()*(t-this.beforeEdge);this.computedBlockSize=Math.max(e,this.computedBlockSize)}},u.layout=function(t,e,u){var n=this;if(this.chunkPositions.push(t),t.primary.after&&(this.lastAfterPosition=t.primary),this.stopAtOverflow&&this.overflown)return Tn(t);if(this.isFullWithPageFloats())return Tn(t.primary.after&&1===t.primary.steps.length?null:t);var i=xn("layout");return this.openAllViews(t.primary).then(function(t){var r=null;t.viewNode?r=t.copy():n.layoutContext.addEventListener("nextInTree",function t(e){e.nodeContext.viewNode&&(r=e.nodeContext,n.layoutContext.removeEventListener("nextInTree",t))});var o=new dl(e,u);o.layout(t,n).then(function(t){n.doFinishBreak(t,o.context.overflownNodeContext,r,o.initialComputedBlockSize).then(function(t){(n.pseudoParent?Tn(null):n.doFinishBreakOfFragmentLayoutConstraints(t)).then(function(){if(n.pageFloatLayoutContext.isInvalidated())i.finish(null);else if(t){n.overflown=!0;var e=new xr(t.toNodePosition());i.finish(e)}else i.finish(null)})})})}),i.result()},u.isFullWithPageFloats=function(){return this.pageFloatLayoutContext.isColumnFullWithPageFloats(this)},u.getMaxBlockSizeOfPageFloats=function(){return this.pageFloatLayoutContext.getMaxBlockSizeOfPageFloats()},u.doFinishBreakOfFragmentLayoutConstraints=function(t){var e=this,u=xn("doFinishBreakOfFragmentLayoutConstraints"),n=[].concat(this.fragmentLayoutConstraints);n.sort(function(t,e){return t.getPriorityOfFinishBreak()-e.getPriorityOfFinishBreak()});var i=0;return u.loop(function(){return i<n.length?n[i++].finishBreak(t,e).thenReturn(!0):Tn(!1)}).then(function(){u.finish(!0)}),u.result()},u.doLayout=function(t,e,u){var n=this,i=xn("doLayout"),r=null;return this.breakPositions=[],this.nodeContextOverflowingDueToRepetitiveElements=null,i.loopWithFrame(function(i){for(var o=function(){var o=!0;if(n.layoutNext(t,e,u||null).then(function(a){if(e=!1,u=null,n.nodeContextOverflowingDueToRepetitiveElements&&n.stopAtOverflow?(n.pageBreakType=null,(t=n.nodeContextOverflowingDueToRepetitiveElements).overflow=!0):t=a,n.pageFloatLayoutContext.isInvalidated())i.breakLoop();else if(n.pageBreakType)i.breakLoop();else if(t&&n.stopByOverflow(t)){r=t;var s=n.findAcceptableBreakPosition();t=s.nodeContext,s.breakPosition&&s.breakPosition.breakPositionChosen(n),i.breakLoop()}else o?o=!1:i.continueLoop()}),o)return o=!1,{v:void 0}};t;){var a=o();if("object"==typeof a)return a.v}n.computedBlockSize+=n.getOffsetByRepetitiveElements(),i.breakLoop()}).then(function(){i.finish({nodeContext:t,overflownNodeContext:r})}),i.result()},u.redoLayout=function(){for(var t=this,e=this.chunkPositions,u=this.element.lastChild;u!=this.last;){var n=u.previousSibling;this.element===u.parentNode&&this.layoutContext.isPseudoelement(u)||this.element.removeChild(u),u=n}this.killFloats(),this.init();var i=xn("redoLayout"),r=0,o=null,a=!0;return i.loopWithFrame(function(u){if(r<e.length){var n=e[r++];t.layout(n,a).then(function(t){a=!1,t?(o=t,u.breakLoop()):u.continueLoop()})}else u.breakLoop()}).then(function(){i.finish(o)}),i.result()},u.saveDistanceToBlockEndFloats=function(){var t=this.pageFloatLayoutContext.getBlockStartEdgeOfBlockEndFloats();t>0&&isFinite(t)&&(this.blockDistanceToBlockEndFloats=this.getBoxDir()*(t-this.beforeEdge-this.computedBlockSize))},u.collectElementsOffset=function(){for(var t=this,e=[],u=this;u;u=u.pseudoParent)u.fragmentLayoutConstraints.forEach(function(u){if(Qi.isInstanceOfRepetitiveElementsOwnerLayoutConstraint(u)){var n=u.getRepetitiveElements();e.push(n)}if($i.isInstanceOfAfterIfContinuesLayoutConstraint(u)){var i=u.getRepetitiveElements();e.push(i)}Zi.isInstanceOfTableRowLayoutConstraint(u)&&u.getElementsOffsetsForTableCell(t).forEach(function(t){e.push(t)})});return e},e}(Rr),Dl=/*#__PURE__*/function(){function t(t,e,u){this.startNodeContexts=[],this.column=void 0,this.column=Object.create(t),this.column.element=e,this.column.layoutContext=t.layoutContext.clone(),this.column.stopAtOverflow=!1,this.column.flowRootFormattingContext=u.formattingContext,this.column.pseudoParent=t;var n=this.column.calculateClonedPaddingBorder(u);this.column.footnoteEdge=this.column.footnoteEdge-n;var i=this;this.column.openAllViews=function(t){return ll.prototype.openAllViews.call(this,t).thenAsync(function(t){return i.startNodeContexts.push(t.copy()),Tn(t)})}}var e=t.prototype;return e.layout=function(t,e){return this.column.layout(t,e)},e.findAcceptableBreakPosition=function(t){var e=this.column.findAcceptableBreakPosition();if(t){var u=this.startNodeContexts[0].copy(),n=new Bs(u,null,u.overflow,0);if(n.findAcceptableBreak(this.column,0),!e.nodeContext)return{breakPosition:n,nodeContext:u}}return e},e.finishBreak=function(t,e,u){return this.column.finishBreak(t,e,u)},e.doFinishBreakOfFragmentLayoutConstraints=function(t){this.column.doFinishBreakOfFragmentLayoutConstraints(t)},e.isStartNodeContext=function(t){var e=this.startNodeContexts[0];return e.viewNode===t.viewNode&&e.after===t.after&&e.offsetInNode===t.offsetInNode},e.isLastAfterNodeContext=function(t){return vr(t.toNodePosition(),this.column.lastAfterPosition)},e.getColumnElement=function(){return this.column.element},e.getColumn=function(){return this.column},t}(),hl=/*#__PURE__*/function(){function t(){}var e=t.prototype;return e.breakTextNode=function(t,e,u,n,i,r){if(e.after)e.offsetInNode=t.length;else{var o=u-e.boxOffset,a=t.data;(o=173==a.charCodeAt(o)?this.breakAfterSoftHyphen(t,a,o,e):this.breakAfterOtherCharacter(t,a,o,e))>0&&(e=this.updateNodeContext(e,o,t))}return e},e.breakAfterSoftHyphen=function(t,e,u,n){return t.replaceData(u,e.length-u,n.breakWord?"":cl(n)),u+1},e.breakAfterOtherCharacter=function(t,e,u,n){var i=e.charAt(u);u++;var r=e.charAt(u);return t.replaceData(u,e.length-u,!n.breakWord&&ot(i)&&ot(r)?cl(n):""),u},e.updateNodeContext=function(t,e,u){return(t=t.modify()).offsetInNode+=e,t.breakBefore=null,t},t}();function cl(t){return t.hyphenateCharacter||t.parent&&t.parent.hyphenateCharacter||"-"}hl.instance=void 0,hl.instance=new hl;var dl=/*#__PURE__*/function(t){function e(e,u){var n;return(n=t.call(this)||this).leadingEdge=void 0,n.breakAfter=void 0,n.initialPageBreakType=null,n.initialComputedBlockSize=0,n.initialOverflown=!1,n.context={overflownNodeContext:null},n.leadingEdge=e,n.breakAfter=u||null,n}N(e,t);var u=e.prototype;return u.resolveLayoutMode=function(t){return new fl(this.leadingEdge,this.breakAfter,this.context)},u.prepareLayout=function(t,e){e.fragmentLayoutConstraints=[],e.pseudoParent||(Rs=[])},u.clearNodes=function(e){t.prototype.clearNodes.call(this,e);for(var u=e;u;){var n=u.viewNode;n&&Es(n.parentNode,n),u=u.parent}},u.saveState=function(e,u){t.prototype.saveState.call(this,e,u),this.initialPageBreakType=u.pageBreakType,this.initialComputedBlockSize=u.computedBlockSize,this.initialOverflown=u.overflown},u.restoreState=function(e,u){t.prototype.restoreState.call(this,e,u),u.pageBreakType=this.initialPageBreakType,u.computedBlockSize=this.initialComputedBlockSize,u.overflown=this.initialOverflown},e}(xs),fl=/*#__PURE__*/function(){function t(t,e,u){this.leadingEdge=void 0,this.breakAfter=void 0,this.context=void 0,this.leadingEdge=t,this.breakAfter=e,this.context=u}var e=t.prototype;return e.doLayout=function(t,e){var u=this,n=xn("DefaultLayoutMode.doLayout");return function(t,e){var u=xn("processAfterIfContinuesOfAncestors"),n=t;return u.loop(function(){if(null!==n){var t=il(n,e);return n=n.parent,t.thenReturn(!0)}return Tn(!1)}).then(function(){u.finish(!0)}),u.result()}(t,e).then(function(){e.doLayout(t,u.leadingEdge,u.breakAfter).then(function(t){u.context.overflownNodeContext=t.overflownNodeContext,n.finish(t.nodeContext)})}),n.result()},e.accept=function(t,e){var u=this;return!(!e.pageFloatLayoutContext.isInvalidated()&&!e.pageBreakType)||e.fragmentLayoutConstraints.length<=0||e.fragmentLayoutConstraints.every(function(n){return n.allowLayout(t,u.context.overflownNodeContext,e)})},e.postLayout=function(t,e,u,n){if(!n){var i=u.fragmentLayoutConstraints.some(function(e){return e.nextCandidate(t)});n=!i}return u.fragmentLayoutConstraints.forEach(function(i){i.postLayout(n,t,e,u)}),n},t}(),pl=/*#__PURE__*/function(t){function e(e,u,n,i,r,o,a){var s;return(s=t.call(this,u,n,i,r,o)||this).floatSide=void 0,s.parentContainer=void 0,s.rootViewNodes=[],s.floatMargins=[],s.adjustContentRelativeSize=!0,s.floatSide=e,s.parentContainer=a,s}N(e,t);var u=e.prototype;return u.openAllViews=function(e){var u=this;return t.prototype.openAllViews.call(this,e).thenAsync(function(t){return t&&u.fixFloatSizeAndPosition(t),Tn(t)})},u.convertPercentageSizesToPx=function(t){var e=this.parentContainer.getPaddingRect(),u=e.x2-e.x1,n=e.y2-e.y1;function i(e,u){e.forEach(function(e){var n=J(t,e);if(n&&"%"===n.charAt(n.length-1)){var i=parseFloat(n);Z(t,e,u*i/100+"px")}})}i(["width","max-width","min-width"],u),i(["height","max-height","min-height"],n),i(["margin-top","margin-right","margin-bottom","margin-left","padding-top","padding-right","padding-bottom","padding-left"],this.vertical?n:u),["margin-top","margin-right","margin-bottom","margin-left"].forEach(function(e){"auto"===J(t,e)&&Z(t,e,"0")})},u.fixFloatSizeAndPosition=function(t){for(;t.parent;)t=t.parent;var e=t.viewNode;if(this.rootViewNodes.push(e),this.adjustContentRelativeSize&&this.convertPercentageSizesToPx(e),this.floatMargins.push(this.getComputedMargin(e)),this.adjustContentRelativeSize){var u=this.floatSide;if(this.parentContainer.vertical){if("block-end"===u||"left"===u){var n=J(e,"height");""!==n&&"auto"!==n&&Z(e,"margin-top","auto")}}else if("block-end"===u||"bottom"===u){var i=J(e,"width");""!==i&&"auto"!==i&&Z(e,"margin-left","auto")}}},u.getContentInlineSize=function(){var t=this;return Math.max.apply(null,this.rootViewNodes.map(function(e,u){var n=t.clientLayout.getElementClientRect(e),i=t.floatMargins[u];return t.vertical?i.top+n.height+i.bottom:i.left+n.width+i.right}))},e}(ll),El=/*#__PURE__*/function(){function t(t,e){this.parent=void 0,this.rootSourceNode=void 0,this.formattingContextType="RepetitiveElementsOwner",this.isRoot=!1,this.repetitiveElements=null,this.parent=t,this.rootSourceNode=e}var e=t.prototype;return e.getName=function(){return"Repetitive elements owner formatting context (RepetitiveElementsOwnerFormattingContext)"},e.isFirstTime=function(t,e){return e},e.getParent=function(){return this.parent},e.getRepetitiveElements=function(){return this.repetitiveElements},e.getRootViewNode=function(t){var e=this.getRootNodeContext(t);return e?e.viewNode:null},e.getRootNodeContext=function(t){do{if(!t.belongsTo(this)&&t.sourceNode===this.rootSourceNode)return t}while(t=t.parent);return null},e.initializeRepetitiveElements=function(t){var e=this;this.repetitiveElements||Rs.some(function(t){return t.root===e.rootSourceNode&&(e.repetitiveElements=t.elements,!0)})||(this.repetitiveElements=new Cl(t,this.rootSourceNode),Rs.push({root:this.rootSourceNode,elements:this.repetitiveElements}))},e.saveState=function(){},e.restoreState=function(t){},t}(),Cl=/*#__PURE__*/function(){function t(t,e){this.vertical=void 0,this.ownerSourceNode=void 0,this.headerSourceNode=null,this.footerSourceNode=null,this.headerViewNode=null,this.footerViewNode=null,this.headerNodePosition=null,this.footerNodePosition=null,this.headerHeight=0,this.footerHeight=0,this.isSkipHeader=!1,this.isSkipFooter=!1,this.enableSkippingFooter=!0,this.enableSkippingHeader=!0,this.doneInitialLayout=!1,this.firstContentSourceNode=null,this.lastContentSourceNode=null,this.affectedNodeCache=[],this.afterLastContentNodeCache=[],this.allowInsert=!1,this.allowInsertRepeatitiveElements=void 0,this.vertical=t,this.ownerSourceNode=e}var e=t.prototype;return e.setHeaderNodeContext=function(t){this.headerNodePosition||(this.headerNodePosition=mr(t,0),this.headerSourceNode=t.sourceNode,this.headerViewNode=t.viewNode)},e.setFooterNodeContext=function(t){this.footerNodePosition||(this.footerNodePosition=mr(t,0),this.footerSourceNode=t.sourceNode,this.footerViewNode=t.viewNode)},e.updateHeight=function(t){this.headerViewNode&&(this.headerHeight=fs(this.headerViewNode,t,this.vertical),this.headerViewNode=null),this.footerViewNode&&(this.footerHeight=fs(this.footerViewNode,t,this.vertical),this.footerViewNode=null)},e.prepareLayoutFragment=function(){this.isSkipHeader=this.isSkipFooter=!1,this.enableSkippingFooter=!0,this.enableSkippingHeader=!0},e.appendHeaderToFragment=function(t,e,u){return!this.headerNodePosition||this.isSkipHeader?Tn(!0):this.appendElementToFragment(this.headerNodePosition,t,e,u)},e.appendFooterToFragment=function(t,e,u){return!this.footerNodePosition||this.isSkipFooter?Tn(!0):this.appendElementToFragment(this.footerNodePosition,t,e,u)},e.appendElementToFragment=function(t,e,u,n){var i=this,r=e.viewNode,o=e.viewNode.ownerDocument.createElement("div");r.appendChild(o);var a=new Dl(n,o,e),s=a.getColumn().pageBreakType;return a.getColumn().pageBreakType=null,this.allowInsertRepeatitiveElements=!0,a.layout(new xr(t),!0).thenAsync(function(){return i.allowInsertRepeatitiveElements=!1,r.removeChild(o),i.moveChildren(o,r,u),a.getColumn().pageBreakType=s,Tn(!0)})},e.moveChildren=function(t,e,u){if(e)for(;t.firstChild;){var n=t.firstChild;t.removeChild(n),n.setAttribute(cr,"1"),u?e.insertBefore(n,u):e.appendChild(n)}},e.calculateOffset=function(t){var e=0;return t&&!this.affectTo(t)||((!this.isSkipFooter||t&&this.isAfterLastContent(t))&&(e+=this.footerHeight),this.isSkipHeader||(e+=this.headerHeight)),e},e.calculateMinimumOffset=function(t){var e=0;return t&&!this.affectTo(t)||(t&&this.isAfterLastContent(t)&&(e+=this.footerHeight),this.enableSkippingHeader||(e+=this.headerHeight)),e},e.isAfterLastContent=function(t){var e=this;return this.findResultFromCache(t,this.afterLastContentNodeCache,function(u){return e.isAfterNodeContextOf(e.lastContentSourceNode,t,!1)})},e.affectTo=function(t){var e=this;return this.findResultFromCache(t,this.affectedNodeCache,function(u){return e.isAfterNodeContextOf(e.ownerSourceNode,t,!0)})},e.findResultFromCache=function(t,e,u){var n=e.filter(function(e){return e.nodeContext.sourceNode===t.sourceNode&&e.nodeContext.after===t.after});if(n.length>0)return n[0].result;var i=u(t);return e.push({nodeContext:t,result:i}),i},e.isAfterNodeContextOf=function(t,e,u){for(var n=[],i=t;i;i=i.parentNode){if(e.sourceNode===i)return e.after;n.push(i)}for(var r=e.sourceNode;r;r=r.parentNode){var o=n.indexOf(r);if(o>=0)return!!u&&0===o;for(var a=r;a;a=a.previousElementSibling)if(n.includes(a))return!0}return e.after},e.isFirstContentNode=function(t){return t&&this.firstContentSourceNode===t.sourceNode},e.isEnableToUpdateState=function(){return!!(!this.isSkipFooter&&this.enableSkippingFooter&&this.footerNodePosition||!this.isSkipHeader&&this.enableSkippingHeader&&this.headerNodePosition)},e.updateState=function(){!this.isSkipFooter&&this.enableSkippingFooter&&this.footerNodePosition?this.isSkipFooter=!0:!this.isSkipHeader&&this.enableSkippingHeader&&this.headerNodePosition&&(this.isSkipHeader=!0)},e.preventSkippingHeader=function(){this.isSkipHeader=!1,this.enableSkippingHeader=!1},e.preventSkippingFooter=function(){this.isSkipFooter=!1,this.enableSkippingFooter=!1},e.isHeaderRegistered=function(){return!!this.headerNodePosition},e.isFooterRegistered=function(){return!!this.footerNodePosition},e.isHeaderSourceNode=function(t){return this.headerSourceNode===t},e.isFooterSourceNode=function(t){return this.footerSourceNode===t},t}(),Fl=/*#__PURE__*/function(){function t(t){this.formattingContext=void 0,this.formattingContext=t}var e=t.prototype;return e.accept=function(t,e){return!!t},e.postLayout=function(t,e,u,n){var i=this.formattingContext.getRepetitiveElements();return i&&(i.doneInitialLayout||(i.updateHeight(u),i.doneInitialLayout=!0)),n},t}(),Al=/*#__PURE__*/function(){function t(t){this.formattingContext=void 0,this.formattingContext=t}var e=t.prototype;return e.accept=function(t,e){return!0},e.postLayout=function(t,e,u,n){return n},t}(),gl=/*#__PURE__*/function(t){function e(e,u){var n;return(n=t.call(this,e)||this).processor=void 0,n.processor=u,n}N(e,t);var u=e.prototype;return u.doLayout=function(t,e){return this.processor.doInitialLayout(t,e)},u.accept=function(t,e){return!1},e}(Fl),vl=/*#__PURE__*/function(t){function e(e,u){var n;return(n=t.call(this,e)||this).processor=void 0,n.processor=u,n}return N(e,t),e.prototype.doLayout=function(t,e){return t.belongsTo(this.formattingContext)||t.after||e.fragmentLayoutConstraints.unshift(new ml(t)),this.processor.doLayout(t,e)},e}(Al),ml=/*#__PURE__*/function(){function t(t){this.flagmentLayoutConstraintType="RepetitiveElementsOwner",this.nodeContext=void 0,this.nodeContext=t.formattingContext.getRootNodeContext(t)}var e=t.prototype;return e.allowLayout=function(t,e,u){var n=this.getRepetitiveElements();return!(n&&!ps(this.nodeContext.viewNode)&&n.isEnableToUpdateState()&&(e&&!t||t&&t.overflow))},e.nextCandidate=function(t){var e=this.getRepetitiveElements();return!!e&&!!e.isEnableToUpdateState()&&(e.updateState(),!0)},e.postLayout=function(t,e,u,n){var i=this.getRepetitiveElements();i&&t&&n.stopAtOverflow&&(null==e||i.isAfterLastContent(e))&&i.preventSkippingFooter()},e.finishBreak=function(t,e){var u=this.nodeContext.formattingContext,n=this.getRepetitiveElements();if(!n)return Tn(!0);var i=this.nodeContext;return function(t,e,u){var n=t.getRepetitiveElements();if(n){var i=t.getRootNodeContext(e);if(i.viewNode)return n.appendHeaderToFragment(i,i.viewNode.firstChild,u)}return Tn(!0)}(u,i,e).thenAsync(function(){return function(t,e,u){var n=t.getRepetitiveElements();if(n&&!n.isSkipFooter){var i=t.getRootNodeContext(e);if(i.viewNode)return n.appendFooterToFragment(i,null,u)}return Tn(!0)}(u,i,e).thenAsync(function(){return n.prepareLayoutFragment(),Tn(!0)})})},e.getRepetitiveElements=function(){return this.nodeContext.formattingContext.getRepetitiveElements()},e.equalsTo=function(e){return e instanceof t&&this.nodeContext.formattingContext===e.nodeContext.formattingContext},e.getPriorityOfFinishBreak=function(){return 10},t}(),Bl=/*#__PURE__*/function(t){function e(e,u){var n;return(n=t.call(this)||this).formattingContext=void 0,n.processor=void 0,n.formattingContext=e,n.processor=u,n}return N(e,t),e.prototype.resolveLayoutMode=function(t){var e=this.formattingContext.getRepetitiveElements();return t.belongsTo(this.formattingContext)||e.doneInitialLayout?(t.belongsTo(this.formattingContext)||t.after||e&&e.preventSkippingHeader(),new vl(this.formattingContext,this.processor)):new gl(this.formattingContext,this.processor)},e}(xs),wl=/*#__PURE__*/function(t){function e(e,u){var n;return(n=t.call(this)||this).formattingContext=void 0,n.column=void 0,n.formattingContext=e,n.column=u,n}N(e,t);var u=e.prototype;return u.startNonInlineElementNode=function(t){var e=this.formattingContext,u=t.nodeContext,n=e.getRepetitiveElements();if(u.parent&&e.rootSourceNode===u.parent.sourceNode){switch(u.repeatOnBreak){case"header":if(!n.isHeaderRegistered())return n.setHeaderNodeContext(u),Tn(!0);u.repeatOnBreak="none";break;case"footer":if(!n.isFooterRegistered())return n.setFooterNodeContext(u),Tn(!0);u.repeatOnBreak="none"}n.firstContentSourceNode||(n.firstContentSourceNode=u.sourceNode)}return Ps.prototype.startNonInlineElementNode.call(this,t)},u.afterNonInlineElementNode=function(t){var e=this.formattingContext,u=t.nodeContext;return u.sourceNode===e.rootSourceNode&&(e.getRepetitiveElements().lastContentSourceNode=t.lastAfterNodeContext&&t.lastAfterNodeContext.sourceNode,t.break=!0),"header"===u.repeatOnBreak||"footer"===u.repeatOnBreak?Tn(!0):Ps.prototype.afterNonInlineElementNode.call(this,t)},e}(Ps);function yl(t,e){t&&function(t,e){for(var u=t;u;u=u.parent){var n=u.formattingContext;n&&n instanceof El&&!u.belongsTo(n)&&e(n,u)}}(t.after?t.parent:t,function(t,u){Zi.isInstanceOfTableFormattingContext(t)||e.fragmentLayoutConstraints.push(new ml(u))})}var Nl=new(/*#__PURE__*/function(t){function e(){return t.apply(this,arguments)||this}N(e,t);var u=e.prototype;return u.layout=function(t,e,u){if(e.isFloatNodeContext(t))return e.layoutFloatOrFootnote(t);var n=t.formattingContext;return n.getRootViewNode(t)?(u&&yl(t.parent,e),t.belongsTo(n)?ys.prototype.layout.call(this,t,e,u):new Bl(n,this).layout(t,e)):e.buildDeepElementView(t)},u.startNonInlineElementNode=function(t){var e=function(t){var e=t.formattingContext;return e&&e instanceof El?e:null}(t),u=e.getRepetitiveElements();return!!u&&(u.allowInsertRepeatitiveElements||!u.isHeaderSourceNode(t.sourceNode)&&!u.isFooterSourceNode(t.sourceNode)||t.viewNode.parentNode.removeChild(t.viewNode),!1)},u.doInitialLayout=function(t,e){var u=xn("BlockLayoutProcessor.doInitialLayout");return this.layoutEntireBlock(t,e).thenFinish(u),u.result()},u.layoutEntireBlock=function(t,e){var u=new wl(t.formattingContext,e);return new Is(u,e.layoutContext).iterate(t)},u.doLayout=function(t,e){var u=t.formattingContext,n=xn("doLayout");return rl(e.layoutContext.nextInTree(t,!1),e).then(function(t){var i=t;n.loopWithFrame(function(t){for(var n=function(){var n=!0;if(e.layoutNext(i,!1).then(function(r){i=r,e.pageFloatLayoutContext.isInvalidated()||e.pageBreakType||i&&e.stopByOverflow(i)||i&&i.after&&i.sourceNode==u.rootSourceNode?t.breakLoop():n?n=!1:t.continueLoop()}),n)return n=!1,{v:void 0}};i;){var r=n();if("object"==typeof r)return r.v}t.breakLoop()}).then(function(){n.finish(i)})}),n.result()},u.finishBreak=function(t,e,u,n){return ys.prototype.finishBreak.call(this,t,e,u,n)},u.clearOverflownViewNodes=function(t,e,u,n){ys.prototype.clearOverflownViewNodes(t,e,u,n)},e}(ys));c(exports.HOOKS.RESOLVE_LAYOUT_PROCESSOR,function(t){return t instanceof El&&!Zi.isInstanceOfTableFormattingContext(t)?Nl:null});var bl=/*#__PURE__*/function(){function t(t,e){this.rowIndex=void 0,this.sourceNode=void 0,this.cells=[],this.rowIndex=t,this.sourceNode=e}var e=t.prototype;return e.addCell=function(t){this.cells.push(t)},e.getMinimumHeight=function(){return Math.min.apply(null,this.cells.map(function(t){return t.height}))},t}(),Sl=/*#__PURE__*/function(){function t(t,e,u){this.rowIndex=void 0,this.columnIndex=void 0,this.viewElement=void 0,this.colSpan=void 0,this.rowSpan=void 0,this.height=0,this.anchorSlot=null,this.rowIndex=t,this.columnIndex=e,this.viewElement=u,this.colSpan=u.colSpan||1,this.rowSpan=u.rowSpan||1}var e=t.prototype;return e.setHeight=function(t){this.height=t},e.setAnchorSlot=function(t){this.anchorSlot=t},t}(),xl=function(t,e,u){this.rowIndex=void 0,this.columnIndex=void 0,this.cell=void 0,this.rowIndex=t,this.columnIndex=e,this.cell=u},Tl=/*#__PURE__*/function(){function t(t,e,u){this.column=void 0,this.cellNodeContext=void 0,this.pseudoColumn=void 0,this.empty=!1,this.column=t,this.cellNodeContext=u,this.pseudoColumn=new Dl(t,e,u)}return t.prototype.findAcceptableBreakPosition=function(){var t=this.cellNodeContext.viewNode,e=this.cellNodeContext.verticalAlign;"middle"!==e&&"bottom"!==e||Z(t,"vertical-align","top");var u=this.pseudoColumn.findAcceptableBreakPosition(!0);return Z(t,"vertical-align",e),u},t}(),Il=function(t,e){this.viewNode=void 0,this.side=void 0,this.viewNode=t,this.side=e},Pl=/*#__PURE__*/function(t){function e(e,u,n,i){var r;return(r=t.call(this,e,u,n,i)||this).formattingContext=void 0,r.acceptableCellBreakPositions=null,r.rowIndex=null,r.formattingContext=e.formattingContext,r}N(e,t);var u=e.prototype;return u.findAcceptableBreak=function(e,u){var n=t.prototype.findAcceptableBreak.call(this,e,u);return u<this.getMinBreakPenalty()?null:this.getAcceptableCellBreakPositions().every(function(t){return!!t.nodeContext})?n:null},u.getMinBreakPenalty=function(){var e=t.prototype.getMinBreakPenalty.call(this);return this.getAcceptableCellBreakPositions().forEach(function(t){e+=t.breakPosition.getMinBreakPenalty()}),e},u.getAcceptableCellBreakPositions=function(){if(!this.acceptableCellBreakPositions){var t=this.getCellFragments();this.acceptableCellBreakPositions=t.map(function(t){return t.findAcceptableBreakPosition()})}return this.acceptableCellBreakPositions},u.getRowIndex=function(){return null!=this.rowIndex?this.rowIndex:this.rowIndex=this.formattingContext.findRowIndexBySourceNode(this.position.sourceNode)},u.getCellFragments=function(){return this.formattingContext.getRowSpanningCellsOverflowingTheRow(this.getRowIndex()).map(this.formattingContext.getCellFragmentOfCell,this.formattingContext)},e}(Bs),Rl=/*#__PURE__*/function(t){function e(e,u,n){var i;return(i=t.call(this)||this).rowIndex=void 0,i.beforeNodeContext=void 0,i.formattingContext=void 0,i.acceptableCellBreakPositions=null,i.rowIndex=e,i.beforeNodeContext=u,i.formattingContext=n,i}N(e,t);var u=e.prototype;return u.findAcceptableBreak=function(t,e){if(e<this.getMinBreakPenalty())return null;var u=this.getCellFragments(),n=this.getAcceptableCellBreakPositions(),i=n.every(function(t){return!!t.nodeContext})&&n.some(function(t,e){var n=u[e].pseudoColumn,i=t.nodeContext;return!n.isStartNodeContext(i)&&!n.isLastAfterNodeContext(i)});return this.beforeNodeContext.overflow=n.some(function(t){return t.nodeContext&&t.nodeContext.overflow}),i?this.beforeNodeContext:null},u.getMinBreakPenalty=function(){var t=this.formattingContext,e=t.getRowByIndex(this.rowIndex),u=0;return t.isFreelyFragmentableRow(e)||(u+=10),this.getAcceptableCellBreakPositions().forEach(function(t){u+=t.breakPosition.getMinBreakPenalty()}),u},u.getAcceptableCellBreakPositions=function(){if(!this.acceptableCellBreakPositions){var t=this.getCellFragments();this.acceptableCellBreakPositions=t.map(function(t){return t.findAcceptableBreakPosition()})}return this.acceptableCellBreakPositions},u.getCellFragments=function(){return this.formattingContext.getCellsFallingOnRow(this.rowIndex).map(this.formattingContext.getCellFragmentOfCell,this.formattingContext)},e}(vs),kl=/*#__PURE__*/function(t){function e(e,u){var n;return(n=t.call(this,e,u)||this).tableSourceNode=void 0,n.formattingContextType="Table",n.vertical=!1,n.columnCount=-1,n.tableWidth=0,n.captions=[],n.colGroups=null,n.colWidths=null,n.inlineBorderSpacing=0,n.rows=[],n.slots=[],n.cellFragments=[],n.lastRowViewNode=null,n.cellBreakPositions=[],n.repetitiveElements=null,n.tableSourceNode=u,n}N(e,t);var u=e.prototype;return u.getName=function(){return"Table formatting context (Table.TableFormattingContext)"},u.isFirstTime=function(t,e){if(!e)return e;switch(t.display){case"table-row":return 0===this.cellBreakPositions.length;case"table-cell":return!this.cellBreakPositions.some(function(e){return e.cellNodePosition.steps[0].node===t.sourceNode});default:return e}},u.getParent=function(){return this.parent},u.finishFragment=function(){this.cellFragments=[]},u.addRow=function(t,e){this.rows[t]=e},u.getRowSlots=function(t){var e=this.slots[t];return e||(e=this.slots[t]=[]),e},u.addCell=function(t,e){var u=this.rows[t];u||(this.addRow(t,new bl(t,null)),u=this.rows[t]),u.addCell(e);for(var n=t+e.rowSpan,i=this.getRowSlots(t),r=0;i[r];)r++;for(;t<n;t++){i=this.getRowSlots(t);for(var o=r;o<r+e.colSpan;o++){var a=i[o]=new xl(t,o,e);e.anchorSlot||e.setAnchorSlot(a)}}},u.getRowByIndex=function(t){return this.rows[t]},u.findRowIndexBySourceNode=function(t){return this.rows.findIndex(function(e){return t===e.sourceNode})},u.addCellFragment=function(t,e,u){var n=this.cellFragments[t];n||(n=this.cellFragments[t]=[]),n[e]=u},u.getCellsFallingOnRow=function(t){return this.getRowSlots(t).reduce(function(t,e){return e.cell!==t[t.length-1]?t.concat(e.cell):t},[])},u.getRowSpanningCellsOverflowingTheRow=function(t){return this.getCellsFallingOnRow(t).filter(function(e){return e.rowIndex+e.rowSpan-1>t})},u.getCellFragmentOfCell=function(t){return this.cellFragments[t.rowIndex]&&this.cellFragments[t.rowIndex][t.columnIndex]},u.isFreelyFragmentableRow=function(t){return t.getMinimumHeight()>this.tableWidth/2},u.getColumnCount=function(){return this.columnCount<0&&(this.columnCount=Math.max.apply(null,this.rows.map(function(t){return t.cells.reduce(function(t,e){return t+e.colSpan},0)}))),this.columnCount},u.updateCellSizes=function(t){var e=this;this.rows.forEach(function(u){u.cells.forEach(function(u){var n=t.getElementClientRect(u.viewElement);u.viewElement=null,u.setHeight(e.vertical?n.width:n.height)})})},u.findCellFromColumn=function(t){if(!t)return null;var e=null,u=0,n=0;t:for(u=0;u<this.cellFragments.length;u++)if(this.cellFragments[u])for(n=0;n<this.cellFragments[u].length;n++)if(this.cellFragments[u][n]&&t===this.cellFragments[u][n].pseudoColumn.getColumn()){e=this.rows[u].cells[n];break t}if(!e)return null;for(;u<this.slots.length;u++)for(;n<this.slots[u].length;n++){var i=this.slots[u][n];if(i.cell===e)return{rowIndex:i.rowIndex,columnIndex:i.columnIndex}}return null},u.collectElementsOffsetOfUpperCells=function(t){var e=this,u=[];return this.slots.reduce(function(n,i,r){if(r>=t.rowIndex)return n;var o=i[t.columnIndex]&&e.getCellFragmentOfCell(i[t.columnIndex].cell);return!o||u.includes(o)||(e.collectElementsOffsetFromColumn(o.pseudoColumn.getColumn(),n),u.push(o)),n},[])},u.collectElementsOffsetOfHighestColumn=function(){var t=this,e=[];return this.rows.forEach(function(u){u.cells.forEach(function(u,n){e[n]||(e[n]={collected:[],elements:[]});var i=e[n],r=t.getCellFragmentOfCell(u);r&&!i.collected.includes(r)&&(t.collectElementsOffsetFromColumn(r.pseudoColumn.getColumn(),i.elements),i.collected.push(r))})}),[new Ll(e.map(function(t){return t.elements}))]},u.collectElementsOffsetFromColumn=function(t,e){t.fragmentLayoutConstraints.forEach(function(t){if(Qi.isInstanceOfRepetitiveElementsOwnerLayoutConstraint(t)){var u=t.getRepetitiveElements();e.push(u)}Zi.isInstanceOfTableRowLayoutConstraint(t)&&t.getElementsOffsetsForTableCell(null).forEach(function(t){e.push(t)})})},u.saveState=function(){return[].concat(this.cellBreakPositions)},u.restoreState=function(t){this.cellBreakPositions=t},e}(El),Ll=/*#__PURE__*/function(){function t(t){this.repeatitiveElementsInColumns=void 0,this.repeatitiveElementsInColumns=t}var e=t.prototype;return e.calculateOffset=function(t){return this.calculateMaxOffsetOfColumn(t,function(t){return t.current})},e.calculateMinimumOffset=function(t){return this.calculateMaxOffsetOfColumn(t,function(t){return t.minimum})},e.calculateMaxOffsetOfColumn=function(t,e){var u=0;return this.repeatitiveElementsInColumns.forEach(function(n){var i=ms(t,n);u=Math.max(u,e(i))}),u},t}();function Ol(t){return function(t){return"table-row-group"===t||"table-header-group"===t||"table-footer-group"===t}(t)||function(t){return"table"===t||"inline-table"===t}(t)}function _l(t,e,u){var n=t.nodeContext,i=n.display,r=n.parent?n.parent.display:null,o=!1;if("inline-table"===r&&!(n.formattingContext instanceof kl))for(var a=n.parent;a;a=a.parent)if(a.formattingContext instanceof kl){o=a.formattingContext===e;break}return o||"table-row"===i&&!Ol(r)||"table-cell"===i&&"table-row"!==r&&!Ol(r)||n.formattingContext instanceof kl&&n.formattingContext!==e?u.buildDeepElementView(n).thenAsync(function(e){return t.nodeContext=e,Tn(!0)}):null}var Ml=/*#__PURE__*/function(t){function e(e,u){var n;return(n=t.call(this)||this).formattingContext=void 0,n.column=void 0,n.rowIndex=-1,n.columnIndex=0,n.inRow=!1,n.checkPoints=[],n.inHeaderOrFooter=!1,n.formattingContext=e,n.column=u,n}N(e,t);var u=e.prototype;return u.startNonInlineElementNode=function(e){var u=this.formattingContext,n=_l(e,u,this.column);if(n)return n;this.postLayoutBlockContents(e);var i=e.nodeContext,r=i.display,o=u.getRepetitiveElements();switch(r){case"table":u.inlineBorderSpacing=i.inlineBorderSpacing;break;case"table-caption":var a=new Il(i.viewNode,i.captionSide);u.captions.push(a);break;case"table-header-group":return o.isHeaderRegistered()||(this.inHeaderOrFooter=!0,o.setHeaderNodeContext(i)),Tn(!0);case"table-footer-group":return o.isFooterRegistered()||(this.inHeaderOrFooter=!0,o.setFooterNodeContext(i)),Tn(!0);case"table-row":this.inHeaderOrFooter||(this.inRow=!0,this.rowIndex++,this.columnIndex=0,u.addRow(this.rowIndex,new bl(this.rowIndex,i.sourceNode)),o.firstContentSourceNode||(o.firstContentSourceNode=i.sourceNode))}return t.prototype.startNonInlineElementNode.call(this,e)},u.afterNonInlineElementNode=function(e){var u=this.formattingContext,n=e.nodeContext,i=n.display,r=this.column.clientLayout;if(this.postLayoutBlockContents(e),n.sourceNode===u.tableSourceNode){var o=r.getElementComputedStyle(u.getRootViewNode(n));u.tableWidth=parseFloat(o[u.vertical?"height":"width"]),u.getRepetitiveElements().lastContentSourceNode=e.lastAfterNodeContext&&e.lastAfterNodeContext.sourceNode,e.break=!0}else switch(i){case"table-header-group":case"table-footer-group":if(this.inHeaderOrFooter)return this.inHeaderOrFooter=!1,Tn(!0);break;case"table-row":this.inHeaderOrFooter||(u.lastRowViewNode=n.viewNode,this.inRow=!1);break;case"table-cell":this.inHeaderOrFooter||(this.inRow||(this.rowIndex++,this.columnIndex=0,this.inRow=!0),u.addCell(this.rowIndex,new Sl(this.rowIndex,this.columnIndex,n.viewNode)),this.columnIndex++)}return t.prototype.afterNonInlineElementNode.call(this,e)},u.startNonElementNode=function(t){this.registerCheckPoint(t)},u.afterNonElementNode=function(t){this.registerCheckPoint(t)},u.startInlineElementNode=function(t){this.registerCheckPoint(t)},u.afterInlineElementNode=function(t){this.registerCheckPoint(t)},u.registerCheckPoint=function(t){var e=t.nodeContext;e&&e.viewNode&&!As(e)&&this.checkPoints.push(e.clone())},u.postLayoutBlockContents=function(t){this.checkPoints.length>0&&this.column.postLayoutBlock(t.nodeContext,this.checkPoints),this.checkPoints=[]},e}(Ps),Ul=/*#__PURE__*/function(t){function e(e,u){var n;return(n=t.call(this,!0)||this).formattingContext=void 0,n.column=void 0,n.inRow=!1,n.currentRowIndex=-1,n.currentColumnIndex=0,n.originalStopAtOverflow=void 0,n.inHeader=void 0,n.inFooter=void 0,n.formattingContext=e,n.column=u,n.originalStopAtOverflow=u.stopAtOverflow,u.stopAtOverflow=!1,n}N(e,t);var u=e.prototype;return u.resetColumn=function(){this.column.stopAtOverflow=this.originalStopAtOverflow},u.getColSpanningCellWidth=function(t){for(var e=this.formattingContext.colWidths,u=0,n=0;n<t.colSpan;n++)u+=e[t.anchorSlot.columnIndex+n];return u+this.formattingContext.inlineBorderSpacing*(t.colSpan-1)},u.layoutCell=function(t,e,u){var n=t.rowIndex,i=t.columnIndex,r=e.viewNode;t.colSpan>1&&(Z(r,"box-sizing","border-box"),Z(r,this.formattingContext.vertical?"height":"width",this.getColSpanningCellWidth(t)+"px"));var o=r.ownerDocument.createElement("div");r.appendChild(o);var a=new Tl(this.column,o,e);return this.formattingContext.addCellFragment(n,i,a),1===u.primary.steps.length&&u.primary.after&&(a.empty=!0),a.pseudoColumn.layout(u,!0).thenReturn(!0)},u.hasBrokenCellAtSlot=function(t){var e=this.formattingContext.cellBreakPositions[0];return!!e&&e.cell.anchorSlot.columnIndex===t},u.extractRowSpanningCellBreakPositions=function(){var t=this.formattingContext.cellBreakPositions;if(0===t.length)return[];var e=[],u=0;do{var n=t[u],i=n.cell.rowIndex;if(i<this.currentRowIndex){var r=e[i];r||(r=e[i]=[]),r.push(n),t.splice(u,1)}else u++}while(u<t.length);return e},u.layoutRowSpanningCellsFromPreviousFragment=function(t){var e=this,u=this.formattingContext,n=this.extractRowSpanningCellBreakPositions(),i=n.reduce(function(t){return t+1},0);if(0===i)return Tn(!0);var r=this.column.layoutContext,o=t.nodeContext;o.viewNode.parentNode.removeChild(o.viewNode);var a=xn("layoutRowSpanningCellsFromPreviousFragment"),s=Tn(!0),l=0,D=[];return n.forEach(function(t){s=s.thenAsync(function(){var n=Br(t[0].cellNodePosition.steps[1],o.parent);return r.setCurrent(n,!1).thenAsync(function(){var o=Tn(!0),a=0;function s(t){for(;a<t;){if(!D.includes(a)){var e=n.viewNode.ownerDocument.createElement("td");Z(e,"padding","0"),n.viewNode.appendChild(e)}a++}}return t.forEach(function(t){o=o.thenAsync(function(){var u=t.cell;s(u.anchorSlot.columnIndex);var o=t.cellNodePosition,h=Br(o.steps[0],n);return h.offsetInNode=o.offsetInNode,h.after=o.after,h.fragmentIndex=o.steps[0].fragmentIndex+1,r.setCurrent(h,!1).thenAsync(function(){for(var n=t.breakChunkPosition,r=0;r<u.colSpan;r++)D.push(a+r);return a+=u.colSpan,e.layoutCell(u,h,n).thenAsync(function(){return h.viewNode.rowSpan=u.rowIndex+u.rowSpan-e.currentRowIndex+i-l,Tn(!0)})})})}),o.thenAsync(function(){return s(u.getColumnCount()),l++,Tn(!0)})})})}),s.then(function(){r.setCurrent(o,!0,t.atUnforcedBreak).then(function(){a.finish(!0)})}),a.result()},u.startTableRow=function(t){var e=this;if(this.inHeader||this.inFooter)return Tn(!0);var u=t.nodeContext,n=this.formattingContext;return this.currentRowIndex<0?this.currentRowIndex=n.findRowIndexBySourceNode(u.sourceNode):this.currentRowIndex++,this.currentColumnIndex=0,this.inRow=!0,this.layoutRowSpanningCellsFromPreviousFragment(t).thenAsync(function(){return e.registerCellFragmentIndex(),e.column.checkOverflowAndSaveEdgeAndBreakPosition(t.lastAfterNodeContext,null,!0,t.breakAtTheEdge)&&0===n.getRowSpanningCellsOverflowingTheRow(e.currentRowIndex-1).length&&(e.resetColumn(),u.overflow=!0,t.break=!0),Tn(!0)})},u.registerCellFragmentIndex=function(){var t=this;this.formattingContext.getRowByIndex(this.currentRowIndex).cells.forEach(function(e){var u=t.formattingContext.cellBreakPositions[e.columnIndex];if(u&&u.cell.anchorSlot.columnIndex==e.anchorSlot.columnIndex){var n=u.cellNodePosition.steps[0],i=t.column.layoutContext.xmldoc.getElementOffset(n.node);tl(i,n.fragmentIndex+1,1)}})},u.startTableCell=function(t){var e=this;if(this.inHeader||this.inFooter)return Tn(!0);var u=t.nodeContext;this.inRow||(this.currentRowIndex<0?this.currentRowIndex=0:this.currentRowIndex++,this.currentColumnIndex=0,this.inRow=!0);var n=this.formattingContext.getRowByIndex(this.currentRowIndex).cells[this.currentColumnIndex];if(!n)return t.break=!0,Tn(!0);var i=u.copy().modify();i.after=!0,t.nodeContext=i;var r,o=xn("startTableCell");if(this.hasBrokenCellAtSlot(n.anchorSlot.columnIndex)){var a=this.formattingContext.cellBreakPositions.shift();u.fragmentIndex=a.cellNodePosition.steps[0].fragmentIndex+1,r=Tn(a.breakChunkPosition)}else r=this.column.nextInTree(u,t.atUnforcedBreak).thenAsync(function(t){t.viewNode&&u.viewNode.removeChild(t.viewNode);var e=mr(t,0);return Tn(new xr(e))});return r.then(function(i){e.layoutCell(n,u,i).then(function(){e.afterNonInlineElementNode(t),e.currentColumnIndex++,o.finish(!0)})}),o.result()},u.startNonInlineBox=function(t){var e=_l(t,this.formattingContext,this.column);if(e)return e;var u=t.nodeContext,n=this.formattingContext.getRepetitiveElements(),i=u.display;return"table-header-group"===i&&n&&n.isHeaderSourceNode(u.sourceNode)?(this.inHeader=!0,Tn(!0)):"table-footer-group"===i&&n&&n.isFooterSourceNode(u.sourceNode)?(this.inFooter=!0,Tn(!0)):"table-row"===i?this.startTableRow(t):"table-cell"===i?this.startTableCell(t):Tn(!0)},u.endNonInlineBox=function(t){var e=t.nodeContext;if("table-row"===e.display&&(this.inRow=!1,!this.inHeader&&!this.inFooter)){var u=e.copy().modify();u.after=!1;var n=new Rl(this.currentRowIndex,u,this.formattingContext);this.column.breakPositions.push(n)}return Tn(!0)},u.afterNonInlineElementNode=function(u){var n=u.nodeContext,i=this.formattingContext.getRepetitiveElements(),r=n.display;if("table-header-group"===r?i&&!i.allowInsertRepeatitiveElements&&i.isHeaderSourceNode(n.sourceNode)?(this.inHeader=!1,n.viewNode.parentNode.removeChild(n.viewNode)):Z(n.viewNode,"display","table-row-group"):"table-footer-group"===r&&(i&&!i.allowInsertRepeatitiveElements&&i.isFooterSourceNode(n.sourceNode)?(this.inFooter=!1,n.viewNode.parentNode.removeChild(n.viewNode)):Z(n.viewNode,"display","table-row-group")),r&&e.ignoreList[r])n.viewNode.parentNode.removeChild(n.viewNode);else{if(n.sourceNode!==this.formattingContext.tableSourceNode)return t.prototype.afterNonInlineElementNode.call(this,u);n.overflow=this.column.checkOverflowAndSaveEdge(n,null),this.resetColumn(),u.break=!0}return Tn(!0)},e}(Ps);Ul.ignoreList={"table-caption":!0,"table-column-group":!0,"table-column":!0};var Vl=[],Hl=/*#__PURE__*/function(){function t(){}var e=t.prototype;return e.layoutEntireTable=function(t,e){var u=new Ml(t.formattingContext,e);return new Is(u,e.layoutContext).iterate(t)},e.getColumnWidths=function(t,e,u,n){for(var i=t.ownerDocument,r=i.createElement("tr"),o=[],a=0;a<e;a++){var s=i.createElement("td");r.appendChild(s),o.push(s)}t.parentNode.insertBefore(r,t.nextSibling);var l=o.map(function(t){var e=n.getElementClientRect(t);return Math.ceil(u?e.height:e.width)});return t.parentNode.removeChild(r),l},e.getColGroupElements=function(t){for(var e=[],u=t.firstElementChild;u;)"colgroup"===u.localName&&e.push(u),u=u.nextElementSibling;return e},e.normalizeAndGetColElements=function(t){var e=[];return t.forEach(function(t){var u=t.span;t.removeAttribute("span");for(var n=t.firstElementChild;n;){if("col"===n.localName){var i=n.span;for(n.removeAttribute("span"),u-=i;i-- >1;){var r=n.cloneNode(!0);t.insertBefore(r,n),e.push(r)}e.push(n)}n=n.nextElementSibling}for(;u-- >0;)n=t.ownerDocument.createElement("col"),t.appendChild(n),e.push(n)}),e},e.addMissingColElements=function(t,e,u,n){if(t.length<u){var i=n.ownerDocument.createElement("colgroup");e.push(i);for(var r=t.length;r<u;r++){var o=n.ownerDocument.createElement("col");i.appendChild(o),t.push(o)}}},e.normalizeColGroups=function(t,e,u){var n=t.vertical,i=t.lastRowViewNode;if(i){t.lastRowViewNode=null;var r=i.ownerDocument.createDocumentFragment(),o=t.getColumnCount();if(o>0){var a=t.colWidths=this.getColumnWidths(i,o,n,u.clientLayout),s=this.getColGroupElements(e),l=this.normalizeAndGetColElements(s);this.addMissingColElements(l,s,o,e),l.forEach(function(t,e){Z(t,n?"height":"width",a[e]+"px")}),s.forEach(function(t){r.appendChild(t.cloneNode(!0))}),t.colGroups=r}else t.colGroups=r}},e.doInitialLayout=function(t,e){var u=this,n=t.formattingContext;n.vertical=t.vertical,n.initializeRepetitiveElements(t.vertical);var i,r,o,a=(i=t.sourceNode,r=Vl.findIndex(function(t){return t.root===i}),(o=Vl[r])?o.tableLayoutOption:null);!function(t){var e=Vl.findIndex(function(e){return e.root===t});e>=0&&Vl.splice(e,1)}(t.sourceNode);var s=xn("TableLayoutProcessor.doInitialLayout"),l=t.copy();return this.layoutEntireTable(t,e).then(function(i){var r=i.viewNode,o=e.clientLayout.getElementClientRect(r),D=e.vertical?o.left:o.bottom;if(D+=(e.vertical?-1:1)*ms(t,e.collectElementsOffset()).current,!(e.isOverflown(D)||a&&a.calculateBreakPositionsInside))return e.breakPositions.push(new Wl(l)),void s.finish(i);u.normalizeColGroups(n,r,e),n.updateCellSizes(e.clientLayout),s.finish(null)}),s.result()},e.addCaptions=function(t,e,u){var n=t.captions;n.forEach(function(t,i){t&&(e.insertBefore(t.viewNode,u),"top"===t.side&&(n[i]=null))})},e.addColGroups=function(t,e,u){t.colGroups&&0===this.getColGroupElements(e).length&&e.insertBefore(t.colGroups.cloneNode(!0),u)},e.removeColGroups=function(t,e){if(t.colGroups&&e){var u=this.getColGroupElements(e);u&&u.forEach(function(t){e.removeChild(t)})}},e.doLayout=function(t,e){var u=t.formattingContext,n=u.getRootViewNode(t),i=n.firstChild;this.addCaptions(u,n,i),this.addColGroups(u,n,i);var r=new Ul(u,e),o=new Is(r,e.layoutContext),a=xn("TableFormattingContext.doLayout");return o.iterate(t).thenFinish(a),a.result()},e.layout=function(t,e,u){var n=t.formattingContext;return n.getRootViewNode(t)?(u&&yl(t.parent,e),new zl(n,this).layout(t,e)):e.buildDeepElementView(t)},e.createEdgeBreakPosition=function(t,e,u,n){return new Pl(t,e,u,n)},e.startNonInlineElementNode=function(t){return!1},e.afterNonInlineElementNode=function(t,e){return!1},e.finishBreak=function(t,e,u,n){var i=e.formattingContext;if("table-row"===e.display){var r,o=i.findRowIndexBySourceNode(e.sourceNode);if(i.cellBreakPositions=[],(r=e.after?i.getRowSpanningCellsOverflowingTheRow(o):i.getCellsFallingOnRow(o)).length){var a=xn("TableLayoutProcessor.finishBreak"),s=0;return a.loopWithFrame(function(t){if(s!==r.length){var e=r[s++],u=i.getCellFragmentOfCell(e),n=u.findAcceptableBreakPosition().nodeContext,a=u.cellNodeContext,l=a.toNodePosition(),D=new xr(n.toNodePosition());i.cellBreakPositions.push({cellNodePosition:l,breakChunkPosition:D,cell:e});var h=a.viewNode;u.column.layoutContext.processFragmentedBlockEdge(u.cellNodeContext),o<e.rowIndex+e.rowSpan-1&&(h.rowSpan=o-e.rowIndex+1),u.empty?t.continueLoop():u.pseudoColumn.finishBreak(n,!1,!0).then(function(){!function(t,e,u){var n=e.getRepetitiveElements();if(n){var i=e.vertical,r=t.column,o=t.pseudoColumn.getColumnElement(),a=t.cellNodeContext.viewNode,s=r.clientLayout.getElementClientRect(a),l=r.getComputedPaddingBorder(a);i?Z(o,"max-width",s.right-r.footnoteEdge-n.calculateOffset(u)-l.right+"px"):Z(o,"max-height",r.footnoteEdge-n.calculateOffset(u)-s.top-l.top+"px"),Z(o,"overflow","hidden")}}(u,i,n),t.continueLoop()})}else t.breakLoop()}).then(function(){t.clearOverflownViewNodes(e,!1),t.layoutContext.processFragmentedBlockEdge(e),i.finishFragment(),a.finish(!0)}),a.result()}}return i.finishFragment(),bs.finishBreak(t,e,u,n)},e.clearOverflownViewNodes=function(t,e,u,n){ys.prototype.clearOverflownViewNodes(t,e,u,n)},t}(),zl=/*#__PURE__*/function(t){function e(e,u){var n;return(n=t.call(this)||this).tableFormattingContext=void 0,n.processor=void 0,n.tableFormattingContext=e,n.processor=u,n}N(e,t);var u=e.prototype;return u.resolveLayoutMode=function(t){var e=this.tableFormattingContext.getRepetitiveElements();return e&&e.doneInitialLayout?(t.sourceNode!==this.tableFormattingContext.tableSourceNode||t.after||e&&e.preventSkippingHeader(),new jl(this.tableFormattingContext,this.processor)):new Gl(this.tableFormattingContext,this.processor)},u.clearNodes=function(e){t.prototype.clearNodes.call(this,e);var u=this.tableFormattingContext.getRootViewNode(e);this.processor.removeColGroups(this.tableFormattingContext,u)},u.restoreState=function(e,u){t.prototype.restoreState.call(this,e,u),this.tableFormattingContext.finishFragment()},e}(xs),Gl=/*#__PURE__*/function(t){function e(e,u){var n;return(n=t.call(this,e)||this).processor=void 0,n.processor=u,n}return N(e,t),e.prototype.doLayout=function(t,e){return this.processor.doInitialLayout(t,e)},e}(Fl),Wl=/*#__PURE__*/function(t){function e(e){return t.call(this,e,null,e.overflow,0)||this}N(e,t);var u=e.prototype;return u.getMinBreakPenalty=function(){if(!this.isEdgeUpdated)throw new Error("EdgeBreakPosition.prototype.updateEdge not called");return(this.overflows?3:0)+(this.position.parent?this.position.parent.breakPenalty:0)},u.breakPositionChosen=function(t){t.fragmentLayoutConstraints.push(new Xl(this.position.sourceNode))},e}(Bs),Xl=/*#__PURE__*/function(){function t(t){this.tableRootNode=void 0,this.flagmentLayoutConstraintType="EntireTable",this.tableRootNode=t}var e=t.prototype;return e.allowLayout=function(t,e,u){return!1},e.nextCandidate=function(t){return!0},e.postLayout=function(t,e,u,n){Vl.push({root:e.sourceNode,tableLayoutOption:{calculateBreakPositionsInside:!0}})},e.finishBreak=function(t,e){return Tn(!0)},e.equalsTo=function(e){return e instanceof t&&e.tableRootNode===this.tableRootNode},e.getPriorityOfFinishBreak=function(){return 0},t}(),jl=/*#__PURE__*/function(t){function e(e,u){var n;return(n=t.call(this,e)||this).processor=void 0,n.processor=u,n}return N(e,t),e.prototype.doLayout=function(t,e){var u=this.formattingContext.getRepetitiveElements();if(u&&!u.isAfterLastContent(t)){var n=new Kl(t);e.fragmentLayoutConstraints.some(function(t){return n.equalsTo(t)})||e.fragmentLayoutConstraints.unshift(n)}return this.processor.doLayout(t,e)},e}(Al),Kl=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this,e)||this).flagmentLayoutConstraintType="TableRow",u.cellFragmentLayoutConstraints=[],u}N(e,t);var u=e.prototype;return u.allowLayout=function(t,e,u){var n=this.getRepetitiveElements();return!(n&&!u.pseudoParent&&!ps(this.nodeContext.viewNode)&&n.isEnableToUpdateState()&&(e&&!t||t&&t.overflow))},u.nextCandidate=function(e){return!!this.collectCellFragmentLayoutConstraints(e,this.nodeContext.formattingContext).some(function(t){return t.constraints.some(function(t){return t.nextCandidate(e)})})||t.prototype.nextCandidate.call(this,e)},u.postLayout=function(e,u,n,i){var r=this.nodeContext.formattingContext;if(this.cellFragmentLayoutConstraints=this.collectCellFragmentLayoutConstraints(u,r),this.cellFragmentLayoutConstraints.forEach(function(t){t.constraints.forEach(function(u){u.postLayout(e,t.breakPosition,n,i)})}),!e){var o=r.getRootViewNode(this.nodeContext);(new Hl).removeColGroups(r,o),this.removeDummyRowNodes(n)}t.prototype.postLayout.call(this,e,u,n,i)},u.finishBreak=function(e,u){var n=this,i=xn("finishBreak"),r=this.cellFragmentLayoutConstraints.reduce(function(t,e){return t.concat(e.constraints.map(function(t){return{constraint:t,breakPosition:e.breakPosition}}))},[]),o=0;return i.loop(function(){if(o<r.length){var t=r[o++];return t.constraint.finishBreak(t.breakPosition,u).thenReturn(!0)}return Tn(!1)}).then(function(){i.finish(!0)}),i.result().thenAsync(function(){return t.prototype.finishBreak.call(n,e,u)})},u.removeDummyRowNodes=function(t){if(t&&"table-row"===t.display&&t.viewNode)for(;t.viewNode.previousElementSibling;){var e=t.viewNode.previousElementSibling;e.parentNode&&e.parentNode.removeChild(e)}},u.collectCellFragmentLayoutConstraints=function(t,e){return this.getCellFragemnts(t,e).map(function(t){return{constraints:t.fragment.pseudoColumn.getColumn().fragmentLayoutConstraints,breakPosition:t.breakPosition}})},u.getCellFragemnts=function(t,e){var u=Number.MAX_VALUE;t&&"table-row"===t.display&&(u=e.findRowIndexBySourceNode(t.sourceNode)+1),u=Math.min(e.cellFragments.length,u);for(var n=[],i=0;i<u;i++)e.cellFragments[i]&&e.cellFragments[i].forEach(function(t){t&&n.push({fragment:t,breakPosition:t.findAcceptableBreakPosition().nodeContext})});return n},u.getElementsOffsetsForTableCell=function(t){var e=this.nodeContext.formattingContext,u=e.findCellFromColumn(t);return u?e.collectElementsOffsetOfUpperCells(u):e.collectElementsOffsetOfHighestColumn()},u.equalsTo=function(t){return t instanceof e&&this.nodeContext.formattingContext===t.nodeContext.formattingContext},e}(ml),Yl=new Hl;function ql(t){return t.reduce(function(t,e){return t+e},0)/t.length}c(exports.HOOKS.RESOLVE_FORMATTING_CONTEXT,function(t,e,u,n,i,r){if(!e)return null;if(u===$e.table){var o=t.parent;return new kl(o?o.formattingContext:null,t.sourceNode)}return null}),c(exports.HOOKS.RESOLVE_LAYOUT_PROCESSOR,function(t){return t instanceof kl?Yl:null});var $l=function(t,e){this.layoutResult=void 0,this.penalty=void 0,this.layoutResult=t,this.penalty=e};function Ql(t){return t.vertical?t.width:t.height}function Zl(t,e){t.vertical?t.width=e:t.height=e}var Jl=/*#__PURE__*/function(){function t(t,e,u){this.layoutContainer=void 0,this.columnGenerator=void 0,this.regionPageFloatLayoutContext=void 0,this.originalContainerBlockSize=void 0,this.layoutContainer=t,this.columnGenerator=e,this.regionPageFloatLayoutContext=u,this.originalContainerBlockSize=Ql(t)}var e=t.prototype;return e.balanceColumns=function(t){var e=this,u=xn("ColumnBalancer#balanceColumns");this.preBalance(t),this.savePageFloatLayoutContexts(t),this.layoutContainer.clear();var n=[this.createTrialResult(t)];return u.loopWithFrame(function(t){e.hasNextCandidate(n)?(e.updateCondition(n),e.columnGenerator().then(function(u){e.savePageFloatLayoutContexts(u),e.layoutContainer.clear(),u?(n.push(e.createTrialResult(u)),t.continueLoop()):t.breakLoop()})):t.breakLoop()}).then(function(){var t=n.reduce(function(t,e){return e.penalty<t.penalty?e:t},n[0]);e.restoreContents(t.layoutResult),e.postBalance(),u.finish(t.layoutResult)}),u.result()},e.createTrialResult=function(t){var e=this.calculatePenalty(t);return new $l(t,e)},e.preBalance=function(t){},e.postBalance=function(){Zl(this.layoutContainer,this.originalContainerBlockSize)},e.savePageFloatLayoutContexts=function(t){var e=this.regionPageFloatLayoutContext.detachChildren();t&&(t.columnPageFloatLayoutContexts=e)},e.restoreContents=function(t){var e=this.layoutContainer.element;t.columns.forEach(function(t){e.appendChild(t.element)}),this.regionPageFloatLayoutContext.attachChildren(t.columnPageFloatLayoutContexts)},t}();function tD(t){var e=t[t.length-1];if(0===e.penalty)return!1;var u=t[t.length-2];if(u&&e.penalty>=u.penalty)return!1;var n=e.layoutResult.columns;return Math.max.apply(null,n.map(function(t){return t.computedBlockSize}))>Math.max.apply(null,n.map(function(t){return t.getMaxBlockSizeOfPageFloats()}))+1}function eD(t,e){var u=Math.max.apply(null,t[t.length-1].layoutResult.columns.map(function(t){return isNaN(t.blockDistanceToBlockEndFloats)?t.computedBlockSize:t.computedBlockSize-t.blockDistanceToBlockEndFloats+1}))-1;u<Ql(e)?Zl(e,u):Zl(e,Ql(e)-1)}var uD=/*#__PURE__*/function(t){function e(e,u,n,i){var r;return(r=t.call(this,n,e,u)||this).columnCount=void 0,r.originalPosition=null,r.foundUpperBound=!1,r.columnCount=i,r}N(e,t);var u=e.prototype;return u.preBalance=function(t){var e=t.columns.reduce(function(t,e){return t+e.computedBlockSize},0);Zl(this.layoutContainer,e/this.columnCount),this.originalPosition=t.position},u.checkPosition=function(t){return this.originalPosition?this.originalPosition.isSamePosition(t):null===t},u.calculatePenalty=function(t){if(!this.checkPosition(t.position))return Infinity;var e=t.columns;return nD(e)?Infinity:Math.max.apply(null,e.map(function(t){return t.computedBlockSize}))},u.hasNextCandidate=function(t){if(1===t.length)return!0;if(this.foundUpperBound)return tD(t);var e=t[t.length-1];return this.checkPosition(e.layoutResult.position)&&!nD(e.layoutResult.columns)?(this.foundUpperBound=!0,!0):Ql(this.layoutContainer)<this.originalContainerBlockSize},u.updateCondition=function(t){if(this.foundUpperBound)eD(t,this.layoutContainer);else{var e=Math.min(this.originalContainerBlockSize,Ql(this.layoutContainer)+.1*this.originalContainerBlockSize);Zl(this.layoutContainer,e)}},e}(Jl);function nD(t){if(t.length<=1)return!1;var e=t[t.length-1].computedBlockSize;return t.slice(0,t.length-1).every(function(t){return e>t.computedBlockSize})}var iD,rD=/*#__PURE__*/function(t){function e(e,u,n){return t.call(this,n,e,u)||this}N(e,t);var u=e.prototype;return u.calculatePenalty=function(t){if(t.columns.every(function(t){return 0===t.computedBlockSize}))return Infinity;var e,u,n=t.columns.filter(function(t){return!t.pageBreakType}).map(function(t){return t.computedBlockSize});return u=ql(e=n),ql(e.map(function(t){var e=t-u;return e*e}))},u.hasNextCandidate=function(t){return tD(t)},u.updateCondition=function(t){eD(t,this.layoutContainer)},e}(Jl),oD=function(t,e,u){this.endStuckFixed=void 0,this.endFixed=void 0,this.endSlipped=void 0,this.endStuckFixed=t,this.endFixed=e,this.endSlipped=u},aD=/*#__PURE__*/function(){function t(){this.map=[]}var e=t.prototype;return e.getMaxFixed=function(){return 0==this.map.length?0:this.map[this.map.length-1].endFixed},e.getMaxSlipped=function(){return 0==this.map.length?0:this.map[this.map.length-1].endSlipped},e.addStuckRange=function(t){if(0==this.map.length)this.map.push(new oD(t,t,t));else{var e=this.map[this.map.length-1],u=e.endSlipped+t-e.endFixed;e.endFixed==e.endStuckFixed?(e.endFixed=t,e.endStuckFixed=t,e.endSlipped=u):this.map.push(new oD(t,t,u))}},e.addSlippedRange=function(t){0==this.map.length?this.map.push(new oD(t,0,0)):this.map[this.map.length-1].endFixed=t},e.slippedByFixed=function(t){var e=this,u=lt(this.map.length,function(u){return t<=e.map[u].endFixed}),n=this.map[u];return n.endSlipped-Math.max(0,n.endStuckFixed-t)},e.fixedBySlipped=function(t){var e=this,u=lt(this.map.length,function(u){return t<=e.map[u].endSlipped}),n=this.map[u];return n.endStuckFixed-(n.endSlipped-t)},t}(),sD=/*#__PURE__*/function(){function t(e,u,n,i,r,o,a,s){if(this.context=void 0,this.style=void 0,this.offset=void 0,this.isRoot=void 0,this.flowChunk=void 0,this.atBlockStart=void 0,this.atFlowStart=void 0,this.isParentBoxDisplayed=void 0,this.flowName=void 0,this.isBlockValue=null,this.hasBoxValue=null,this.styleValues={},this.beforeBox=null,this.afterBox=null,this.breakBefore=null,this.context=e,this.style=u,this.offset=n,this.isRoot=i,this.flowChunk=r,this.atBlockStart=o,this.atFlowStart=a,this.isParentBoxDisplayed=s,this.flowName=r.flowName,this.hasBox()){var l=u._pseudos;if(l&&l.before){var D=new t(e,l.before,n,!1,r,this.isBlock(),a,!0);Lr(D.styleValue("content"))&&(this.beforeBox=D,this.breakBefore=D.breakBefore)}}this.breakBefore=ur(this.getBreakValue("before"),this.breakBefore),this.atFlowStart&&Xi(this.breakBefore)&&(r.breakBefore=ur(r.breakBefore,this.breakBefore))}var e=t.prototype;return e.buildAfterPseudoElementBox=function(e,u,n){if(this.hasBox()){var i=this.style._pseudos;if(i&&i.after){var r=new t(this.context,i.after,e,!1,this.flowChunk,u,n,!0);Lr(r.styleValue("content"))&&(this.afterBox=r)}}},e.styleValue=function(t,e){if(!(t in this.styleValues)){var u=this.style[t];this.styleValues[t]=u?u.evaluate(this.context,t):e||null}return this.styleValues[t]},e.displayValue=function(){return this.styleValue("display",$e.inline)},e.isBlock=function(){if(null===this.isBlockValue){var t=this.displayValue(),e=this.styleValue("position"),u=this.styleValue("float");this.isBlockValue=Ds(t,e,u,this.isRoot)}return this.isBlockValue},e.hasBox=function(){return null===this.hasBoxValue&&(this.hasBoxValue=this.isParentBoxDisplayed&&this.displayValue()!==$e.none),this.hasBoxValue},e.getBreakValue=function(t){var e=null;if(this.isBlock()){var u=this.styleValue("break-"+t);u&&(e=u.toString())}return e},t}(),lD=/*#__PURE__*/function(){function t(t){this.context=void 0,this.stack=[],this.atBlockStart=!0,this.atFlowStart=!0,this.atStartStack=[],this.context=t}var e=t.prototype;return e.empty=function(){return 0===this.stack.length},e.lastBox=function(){return this.stack[this.stack.length-1]},e.lastFlowName=function(){var t=this.lastBox();return t?t.flowChunk.flowName:null},e.isCurrentBoxDisplayed=function(){return this.stack.every(function(t){return t.displayValue()!==$e.none})},e.push=function(t,e,u,n){var i=this.lastBox();n&&i&&n.flowName!==i.flowName&&this.atStartStack.push({atBlockStart:this.atBlockStart,atFlowStart:this.atFlowStart});var r=n||i.flowChunk,o=this.atFlowStart||!!n,a=this.isCurrentBoxDisplayed(),s=new sD(this.context,t,e,u,r,o||this.atBlockStart,o,a);return this.stack.push(s),this.atBlockStart=s.hasBox()?!s.beforeBox&&s.isBlock():this.atBlockStart,this.atFlowStart=s.hasBox()?!s.beforeBox&&o:this.atFlowStart,s},e.encounteredTextNode=function(t){var e=this.lastBox();if((t.nodeType===Node.TEXT_NODE||t.nodeType===Node.CDATA_SECTION_NODE)&&(this.atBlockStart||this.atFlowStart)&&e.hasBox()){var u=fr(e.styleValue("white-space",$e.normal).toString());u&&!pr(t,u)&&(this.atBlockStart=!1,this.atFlowStart=!1)}},e.pop=function(t){var e=this.stack.pop();if(e.buildAfterPseudoElementBox(t,this.atBlockStart,this.atFlowStart),this.atFlowStart&&e.afterBox){var u=e.afterBox.getBreakValue("before");e.flowChunk.breakBefore=ur(e.flowChunk.breakBefore,u)}var n=this.lastBox();if(n)if(n.flowName===e.flowName)e.hasBox()&&(this.atBlockStart=this.atFlowStart=!1);else{var i=this.atStartStack.pop();this.atBlockStart=i.atBlockStart,this.atFlowStart=i.atFlowStart}return e},e.nearestBlockStartOffset=function(t){if(!t.atBlockStart)return t.offset;var e=this.stack.length-1,u=this.stack[e];for(u===t&&(e--,u=this.stack[e]);e>=0;){if(u.flowName!==t.flowName)return t.offset;if(!u.atBlockStart)return u.offset;if(u.isRoot)return u.offset;t=u,u=this.stack[--e]}throw new Error("No block start offset found!")},t}(),DD=/*#__PURE__*/function(){function t(t,e,u,n,i,r,o,a){this.xmldoc=void 0,this.scope=void 0,this.context=void 0,this.primaryFlows=void 0,this.validatorSet=void 0,this.counterListener=void 0,this.root=void 0,this.cascadeHolder=void 0,this.last=void 0,this.rootStyle={},this.styleMap={},this.flows={},this.flowChunks=[],this.flowListener=null,this.flowToReach=null,this.idToReach=null,this.cascade=void 0,this.offsetMap=void 0,this.primary=!0,this.primaryStack=[],this.rootBackgroundAssigned=!1,this.rootLayoutAssigned=!1,this.lastOffset=void 0,this.breakBeforeValues={},this.boxStack=void 0,this.bodyReached=!0,this.xmldoc=t,this.scope=u,this.context=n,this.primaryFlows=i,this.validatorSet=r,this.counterListener=o,this.root=t.root,this.cascadeHolder=e,this.last=this.root,this.cascade=e.createInstance(n,o,a,t.lang),this.offsetMap=new aD;var s=t.getElementOffset(this.root);this.lastOffset=s,this.boxStack=new lD(n),this.offsetMap.addStuckRange(s);var l=this.getAttrStyle(this.root);this.cascade.pushElement(this,this.root,l,s),this.postprocessTopStyle(l,!1),this.root.namespaceURI===H.XHTML&&(this.bodyReached=!1),this.primaryStack.push(!0),this.styleMap={},this.styleMap["e"+s]=l,this.lastOffset++,this.replayFlowElementsFromOffset(-1)}var e=t.prototype;return e.hasProp=function(t,e,u){var n=t[u];return n&&n.evaluate(this.context)!==e[u]},e.transferPropsToRoot=function(t,e){for(var u in e){var n=t[u];if(n)this.rootStyle[u]=n,delete t[u];else{var i=e[u];i&&(this.rootStyle[u]=new Yr(i,ni))}}},e.postprocessTopStyle=function(t,e){if(e)for(var u=0,n=["writing-mode","direction"];u<n.length;u++){var i=n[u];!t[i]||e&&this.rootStyle[i]||(this.rootStyle[i]=t[i])}else for(var r in t)eo(r)&&(this.rootStyle[r]=t[r]);if(!this.rootBackgroundAssigned){var o=this.hasProp(t,this.validatorSet.backgroundProps,"background-color")?t["background-color"].evaluate(this.context):null,a=this.hasProp(t,this.validatorSet.backgroundProps,"background-image")?t["background-image"].evaluate(this.context):null;(o&&!nu(o)||a&&!nu(a))&&(this.transferPropsToRoot(t,this.validatorSet.backgroundProps),this.rootBackgroundAssigned=!0)}if(!this.rootLayoutAssigned)for(var s=0;s<hD.length;s++)if(this.hasProp(t,this.validatorSet.layoutProps,hD[s])){this.transferPropsToRoot(t,this.validatorSet.layoutProps),this.rootLayoutAssigned=!0;break}if(!e){var l,D=t["font-size"],h=!0;if(D&&!nu(D.value)){var c=D.evaluate(this.context);if(c instanceof Oe){var d=c.num;switch(c.unit){case"em":case"rem":d*=this.context.initialFontSize;break;case"ex":d*=this.context.initialFontSize*Lt.ex/Lt.em;break;case"%":d*=this.context.initialFontSize/100;break;case"lh":case"rlh":d*=this.context.initialFontSize*Lt.lh/Lt.em;break;default:var f=Lt[c.unit];f&&(d*=f),h=!1}this.context.rootFontSize=d,this.context.isRelativeRootFontSize=h}}var p=null!=(l=this.context.rootFontSize)?l:this.context.initialFontSize,E=t["line-height"];if(E&&!nu(E.value)){var C=E.evaluate(this.context);if(C instanceof _e)this.context.rootLineHeight=C.num*p;else if(C instanceof Oe){var F=C.num;switch(C.unit){case"em":case"rem":F*=p;break;case"ex":F*=p*Lt.ex/Lt.em;break;case"%":F*=p/100;break;case"lh":case"rlh":F*=this.context.initialFontSize*Lt.lh/Lt.em;break;default:var A=Lt[C.unit];A&&(F*=A)}this.context.rootLineHeight=F}}else this.context.rootLineHeight=this.context.fontSize()*Lt.lh/Lt.em}},e.getTopContainerStyle=function(){for(var t=0;!this.bodyReached&&this.styleUntil(t+=5e3,0)!=Number.POSITIVE_INFINITY;);return this.rootStyle},e.getAttrStyle=function(t){if(t.style instanceof CSSStyleDeclaration){var e=t.getAttribute("style");if(e)return function(t,e,u,n){var i=new ya(t,e),r=new yn(n,i);try{!function(t,e,u){new Si(ci,t,e,u).runParser(Number.POSITIVE_INFINITY,!1,!0,!1,!1)}(r,i,u)}catch(t){D.warn(t,"Style attribute parse error:")}return i.elementStyle}(this.scope,this.validatorSet,this.xmldoc.url,e)}return{}},e.getReachedOffset=function(){return this.lastOffset},e.replayFlowElementsFromOffset=function(t){if(!(t>=this.lastOffset)){var e=this.context,u=this.xmldoc.getElementOffset(this.root);if(t<u){var n=this.getStyle(this.root,!1),i=uo(n,"flow-into"),r=i?i.evaluate(e,"flow-into").toString():"body",o=this.encounteredFlowElement(r,n,this.root,u);this.boxStack.empty()&&this.boxStack.push(n,u,!0,o)}var a=this.xmldoc.getNodeByOffset(t),s=this.xmldoc.getNodeOffset(a,0,!1);if(!(s>=this.lastOffset))for(;;){if(1!=a.nodeType)s+=a.textContent.length;else{var l=a,D=this.getStyle(l,!1),h=D["flow-into"];if(h){var c=h.evaluate(e,"flow-into").toString();this.encounteredFlowElement(c,D,l,s)}s++}if(s>=this.lastOffset)break;var d=a.firstChild;if(null==d)for(;!(d=a.nextSibling);)if((a=a.parentNode)===this.root)return;a=d}}},e.resetFlowChunkStream=function(t){this.flowListener=t;for(var e=0;e<this.flowChunks.length;e++)this.flowListener.encounteredFlowChunk(this.flowChunks[e],this.flows[this.flowChunks[e].flowName])},e.styleUntilFlowIsReached=function(t){this.flowToReach=t;for(var e=0;null!=this.flowToReach&&this.styleUntil(e+=5e3,0)!=Number.POSITIVE_INFINITY;);},e.styleUntilIdIsReached=function(t){if(t){this.idToReach=t;for(var e=0;this.idToReach&&this.styleUntil(e+=5e3,0)!==Number.POSITIVE_INFINITY;);this.idToReach=null}},e.encounteredFlowElement=function(t,e,u,n){var i=0,r=Number.POSITIVE_INFINITY,o=!1,a=!1,s=!1,l=e["flow-options"];if(l){var h=function(t){if(t){var e=new bu;try{return t.visit(e),e.propSet}catch(t){D.warn(t,"toSet:")}}return{}}(l.evaluate(this.context,"flow-options"));o=!!h.exclusive,a=!!h.static,s=!!h.last}var c=e["flow-linger"];c&&(r=xu(c.evaluate(this.context,"flow-linger"),Number.POSITIVE_INFINITY));var d=e["flow-priority"];d&&(i=xu(d.evaluate(this.context,"flow-priority"),0));var f=this.breakBeforeValues[n]||null,p=this.flows[t];if(!p){var E=this.boxStack.lastFlowName();p=this.flows[t]=new Er(t,E)}var C=new Cr(t,u,n,i,r,o,a,s,f);return this.flowChunks.push(C),this.flowToReach==t&&(this.flowToReach=null),this.flowListener&&this.flowListener.encounteredFlowChunk(C,p),C},e.registerForcedBreakOffset=function(t,e,u){if(Xi(t)){var n=this.flows[u].forcedBreakOffsets;(0===n.length||n[n.length-1]<e)&&n.push(e)}this.breakBeforeValues[e]=ur(this.breakBeforeValues[e],t)},e.styleUntil=function(t,e){var u=-1;if(t<=this.lastOffset&&(u=this.offsetMap.slippedByFixed(t)+e)<this.offsetMap.getMaxSlipped())return this.offsetMap.fixedBySlipped(u);if(null==this.last)return Number.POSITIVE_INFINITY;for(var n=this.context;;){var i=this.last.firstChild;if(null==i)for(;;){if(1==this.last.nodeType){this.cascade.popElement(this.last),this.primary=this.primaryStack.pop();var r=this.boxStack.pop(this.lastOffset),o=null;if(r.afterBox){var a=r.afterBox.getBreakValue("before");this.registerForcedBreakOffset(a,r.afterBox.atBlockStart?this.boxStack.nearestBlockStartOffset(r):r.afterBox.offset,r.flowName),o=r.afterBox.getBreakValue("after")}o=ur(o,r.getBreakValue("after")),this.registerForcedBreakOffset(o,this.lastOffset,r.flowName)}if(i=this.last.nextSibling)break;if(this.last=this.last.parentNode,this.last===this.root)return this.last=null,t<this.lastOffset&&(u<0&&(u=this.offsetMap.slippedByFixed(t)+e),u<=this.offsetMap.getMaxSlipped())?this.offsetMap.fixedBySlipped(u):Number.POSITIVE_INFINITY}if(this.last=i,1!=this.last.nodeType)this.lastOffset+=this.last.textContent.length,this.boxStack.encounteredTextNode(this.last),this.primary?this.offsetMap.addStuckRange(this.lastOffset):this.offsetMap.addSlippedRange(this.lastOffset);else{var s=this.last,l=this.getAttrStyle(s);this.primaryStack.push(this.primary),this.cascade.pushElement(this,s,l,this.lastOffset);var D=s.getAttribute("id")||s.getAttributeNS(H.XML,"id");D&&D===this.idToReach&&(this.idToReach=null),this.bodyReached||"body"!=s.localName||s.parentNode!=this.root||(this.postprocessTopStyle(l,!0),this.bodyReached=!0);var h=void 0,c=l["flow-into"];if(c){var d=c.evaluate(n,"flow-into").toString(),f=this.encounteredFlowElement(d,l,s,this.lastOffset);this.primary=!!this.primaryFlows[d],h=this.boxStack.push(l,this.lastOffset,s===this.root,f)}else h=this.boxStack.push(l,this.lastOffset,s===this.root),s===this.xmldoc.body&&(h.breakBefore=ur(h.flowChunk.breakBefore,h.breakBefore));var p=this.boxStack.nearestBlockStartOffset(h);if(0===p){var E=l.page,C=E&&!nu(E.value)&&E.value.toString();C&&"auto"!==C.toLowerCase()&&(this.cascade.firstPageType=C)}if(this.registerForcedBreakOffset(h.breakBefore,p,h.flowName),h.beforeBox){var F=h.beforeBox.getBreakValue("after");this.registerForcedBreakOffset(F,h.beforeBox.atBlockStart?p:h.offset,h.flowName)}if(this.primary&&h.displayValue()===$e.none&&(this.primary=!1),this.styleMap["e"+this.lastOffset]=l,this.lastOffset++,this.primary?this.offsetMap.addStuckRange(this.lastOffset):this.offsetMap.addSlippedRange(this.lastOffset),this.bodyReached&&0===p)continue;if(t<this.lastOffset&&(u<0&&(u=this.offsetMap.slippedByFixed(t)+e),u<=this.offsetMap.getMaxSlipped()))return this.offsetMap.fixedBySlipped(u)}}},e.getStyle=function(t,e){var u=this.xmldoc.getElementOffset(t),n="e"+u;return e&&(u=this.xmldoc.getNodeOffset(t,0,!0)),this.lastOffset<=u&&this.styleUntil(u,0),this.styleMap[n]},e.processContent=function(t,e,u){},t}(),hD=["column-count","column-width","column-fill"],cD=/*#__PURE__*/function(){function t(t){this.validator=void 0,this.success=null,this.failure=null,this.code=0,this.validator=t}var e=t.prototype;return e.isSpecial=function(){return 0!=this.code},e.markAsStartGroup=function(){this.code=-1},e.isStartGroup=function(){return-1==this.code},e.markAsEndGroup=function(){this.code=-2},e.isEndGroup=function(){return-2==this.code},e.markAsStartAlternate=function(t){this.code=2*t+1},e.isStartAlternate=function(){return this.code>0&&this.code%2!=0},e.markAsEndAlternate=function(t){this.code=2*t+2},e.isEndAlternate=function(){return this.code>0&&this.code%2==0},e.getAlternate=function(){return Math.floor((this.code-1)/2)},t}(),dD=function(t,e){this.where=void 0,this.success=void 0,this.what=-1,this.where=t,this.success=e};!function(t){t[t.FOLLOW=1]="FOLLOW",t[t.OPTIONAL=2]="OPTIONAL",t[t.REPEATED=3]="REPEATED",t[t.ALTERNATE=4]="ALTERNATE"}(iD||(iD={}));var fD=/*#__PURE__*/function(){function t(){this.nodes=[],this.connections=[],this.match=[],this.nomatch=[],this.error=[],this.emptyHead=!0}var e=t.prototype;return e.connect=function(t,e){for(var u=0;u<t.length;u++)this.connections[t[u]].what=e;t.splice(0,t.length)},e.clone=function(){for(var e,u,n,i=new t,r=0;r<this.nodes.length;r++){var o=this.nodes[r],a=new cD(o.validator);a.code=o.code,i.nodes.push(a)}for(var s=0;s<this.connections.length;s++){var l=this.connections[s],D=new dD(l.where,l.success);D.what=l.what,i.connections.push(D)}return(e=i.match).push.apply(e,this.match),(u=i.nomatch).push.apply(u,this.nomatch),(n=i.error).push.apply(n,this.error),i},e.addSpecialToArr=function(t,e,u){var n=this.nodes.length,i=new cD(gD);u>=0?e?i.markAsStartAlternate(u):i.markAsEndAlternate(u):e?i.markAsStartGroup():i.markAsEndGroup(),this.nodes.push(i),this.connect(t,n);var r=new dD(n,!0),o=new dD(n,!1);t.push(this.connections.length),this.connections.push(o),t.push(this.connections.length),this.connections.push(r)},e.endSpecialGroup=function(){for(var t=[this.match,this.nomatch,this.error],e=0;e<t.length;e++)this.addSpecialToArr(t[e],!1,-1)},e.startSpecialGroup=function(){if(this.nodes.length)throw new Error("invalid call");this.addSpecialToArr(this.match,!0,-1)},e.endClause=function(t){this.addSpecialToArr(this.match,!1,t)},e.startClause=function(t){if(this.nodes.length)throw new Error("invalid call");var e=new cD(gD);e.markAsStartAlternate(t),this.nodes.push(e);var u=new dD(0,!0),n=new dD(0,!1);this.nomatch.push(this.connections.length),this.connections.push(n),this.match.push(this.connections.length),this.connections.push(u)},e.addPrimitive=function(t){var e=this.nodes.length;this.nodes.push(new cD(t));var u=new dD(e,!0),n=new dD(e,!1);this.connect(this.match,e),this.emptyHead?(this.nomatch.push(this.connections.length),this.emptyHead=!1):this.error.push(this.connections.length),this.connections.push(n),this.match.push(this.connections.length),this.connections.push(u)},e.isSimple=function(){return 1==this.nodes.length&&!this.nodes[0].isSpecial()},e.isPrimitive=function(){return this.isSimple()&&this.nodes[0].validator instanceof FD},e.addGroup=function(t,e){if(0!=t.nodes.length){var u=this.nodes.length;if(e==iD.ALTERNATE&&1==u&&t.isPrimitive()&&this.isPrimitive())this.nodes[0].validator=this.nodes[0].validator.combine(t.nodes[0].validator);else{for(var n=0;n<t.nodes.length;n++)this.nodes.push(t.nodes[n]);e==iD.ALTERNATE?(this.emptyHead=!0,this.connect(this.nomatch,u)):this.connect(this.match,u);for(var i=this.connections.length,r=0;r<t.connections.length;r++){var o=t.connections[r];o.where+=u,o.what>=0&&(o.what+=u),this.connections.push(o)}for(var a=0;a<t.match.length;a++)this.match.push(t.match[a]+i);if(e==iD.REPEATED&&this.connect(this.match,u),e==iD.OPTIONAL||e==iD.REPEATED)for(var s=0;s<t.nomatch.length;s++)this.match.push(t.nomatch[s]+i);else if(this.emptyHead){for(var l=0;l<t.nomatch.length;l++)this.nomatch.push(t.nomatch[l]+i);this.emptyHead=t.emptyHead}else for(var D=0;D<t.nomatch.length;D++)this.error.push(t.nomatch[D]+i);for(var h=0;h<t.error.length;h++)this.error.push(t.error[h]+i);t.nodes=null,t.connections=null}}},e.finish=function(t,e){var u=this.nodes.length;this.nodes.push(t),this.nodes.push(e),this.connect(this.match,u),this.connect(this.nomatch,u+1),this.connect(this.error,u+1);for(var n,i=R(this.connections);!(n=i()).done;){var r=n.value;r.success?this.nodes[r.where].success=this.nodes[r.what]:this.nodes[r.where].failure=this.nodes[r.what]}for(var o=0;o<u;o++)if(null==this.nodes[o].failure||null==this.nodes[o].success)throw new Error("Invalid validator state");return this.nodes[0]},t}(),pD=256,ED=512,CD=/*#__PURE__*/function(t){function e(){return t.call(this)||this}return N(e,t),e.prototype.validateForShorthand=function(t,e){var u=t[e].visit(this);return u?[u]:null},e}(ye),FD=/*#__PURE__*/function(t){function e(e,u,n){var i;return(i=t.call(this)||this).allowed=void 0,i.idents=void 0,i.units=void 0,i.allowed=e,i.idents=u,i.units=n,i}N(e,t);var u=e.prototype;return u.visitEmpty=function(t){return 1&this.allowed?t:null},u.visitSlash=function(t){return 2048&this.allowed?t:null},u.visitStr=function(t){return 2&this.allowed?t:null},u.visitIdent=function(t){return this.idents[t.name.toLowerCase()]||(4&this.allowed||64&this.allowed&&CSS.supports("color",t.name)?t:null)},u.visitNumeric=function(t){return 0!=t.num||this.allowed&ED?t.num<0&&!(this.allowed&pD)?null:this.units[t.unit]?t:null:"%"==t.unit&&1024&this.allowed?t:null},u.visitNum=function(t){return 0==t.num?this.allowed&ED?t:null:t.num<=0&&!(this.allowed&pD)?null:16&this.allowed?t:null},u.visitInt=function(t){return 0==t.num?this.allowed&ED?t:null:t.num<=0&&!(this.allowed&pD)?null:48&this.allowed?t:this.idents[""+t.num]||null},u.visitHexColor=function(t){return 64&this.allowed&&/^([0-9A-F]{3,4}|([0-9A-F]{2}){3,4})$/i.test(t.hex)?t:null},u.visitURL=function(t){return 128&this.allowed?t:null},u.visitURange=function(t){return 4096&this.allowed?t:null},u.visitSpaceList=function(t){return null},u.visitCommaList=function(t){return null},u.visitFunc=function(t){return 64&this.allowed&&CSS.supports("color",t.toString())||8192&this.allowed&&CSS.supports("background-image",t.toString())||"calc"===t.name&&1848&this.allowed?t:null},u.visitExpr=function(t){return 2046&this.allowed?t:null},u.combine=function(t){var u={},n={};for(var i in this.idents)u[i]=this.idents[i];for(var r in t.idents)u[r]=t.idents[r];for(var o in this.units)n[o]=this.units[o];for(var a in t.units)n[a]=t.units[a];return new e(this.allowed|t.allowed,u,n)},e}(CD),AD={},gD=new FD(0,AD,AD),vD=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this)||this).successTerminal=void 0,u.failureTerminal=void 0,u.first=void 0,u.successTerminal=new cD(null),u.failureTerminal=new cD(null),u.first=e.finish(u.successTerminal,u.failureTerminal),u}N(e,t);var u=e.prototype;return u.validateList=function(t,e,u){for(var n=e?[]:t,i=this.first,r=u,o=null,a=null;i!==this.successTerminal&&i!==this.failureTerminal;)if(r>=t.length)i=i.failure;else{var s=t[r],l=s;if(i.isSpecial()){var D=!0;i.isStartGroup()?(o?o.push(a):o=[a],a=[]):i.isEndGroup()?a=o.length>0?o.pop():null:i.isEndAlternate()?a[i.getAlternate()]="taken":D=null==a[i.getAlternate()],i=D?i.success:i.failure}else{if(0==r&&!e&&i.validator instanceof mD&&this instanceof mD){if(l=new Ge(t).visit(i.validator)){r=t.length,i=i.success;continue}}else if(0==r&&!e&&i.validator instanceof BD&&this instanceof mD){if(l=new We(t).visit(i.validator)){r=t.length,i=i.success;continue}}else l=s.visit(i.validator);if(!l){i=i.failure;continue}if(l!==s&&t===n){n=[];for(var h=0;h<r;h++)n[h]=t[h]}t!==n&&(n[r-u]=l),r++,i=i.success}}return i===this.successTerminal&&(e?n.length>0:r==t.length)?n:null},u.validateSingle=function(t){for(var e=null,u=this.first;u!==this.successTerminal&&u!==this.failureTerminal;)t?u.isSpecial()?u=u.success:(e=t.visit(u.validator))?(t=null,u=u.success):u=u.failure:u=u.failure;return u===this.successTerminal?e:null},u.visitEmpty=function(t){return this.validateSingle(t)},u.visitSlash=function(t){return this.validateSingle(t)},u.visitStr=function(t){return this.validateSingle(t)},u.visitIdent=function(t){return this.validateSingle(t)},u.visitNumeric=function(t){return this.validateSingle(t)},u.visitNum=function(t){return this.validateSingle(t)},u.visitInt=function(t){return this.validateSingle(t)},u.visitHexColor=function(t){return this.validateSingle(t)},u.visitURL=function(t){return this.validateSingle(t)},u.visitURange=function(t){return this.validateSingle(t)},u.visitSpaceList=function(t){return null},u.visitCommaList=function(t){return null},u.visitFunc=function(t){return this.validateSingle(t)},u.visitExpr=function(t){return null},e}(CD),mD=/*#__PURE__*/function(t){function e(e){return t.call(this,e)||this}N(e,t);var u=e.prototype;return u.visitSpaceList=function(t){var e=this.validateList(t.values,!1,0);return e===t.values?t:e?new Ge(e):null},u.visitCommaList=function(t){for(var e=this.first,u=!1;e;){if(e.validator instanceof BD){u=!0;break}e=e.failure}if(u){var n=this.validateList(t.values,!1,0);return n===t.values?t:n?new We(n):null}return null},u.validateForShorthand=function(t,e){return this.validateList(t,!0,e)},e}(vD),BD=/*#__PURE__*/function(t){function e(e){return t.call(this,e)||this}N(e,t);var u=e.prototype;return u.visitSpaceList=function(t){return this.validateSingle(t)},u.visitCommaList=function(t){var e=this.validateList(t.values,!1,0);return e===t.values?t:e?new We(e):null},u.validateForShorthand=function(t,e){for(var u,n=this.first;n!==this.failureTerminal;){if(u=n.validator.validateForShorthand(t,e))return u;n=n.failure}return null},e}(vD),wD=/*#__PURE__*/function(t){function e(e,u){var n;return(n=t.call(this,u)||this).name=void 0,n.name=e,n}N(e,t);var u=e.prototype;return u.validateSingle=function(t){return null},u.visitFunc=function(t){if(t.name.toLowerCase()!=this.name)return null;var e=this.validateList(t.values,!1,0);return e===t.values?t:e?new Xe(t.name,e):null},e}(vD),yD=/*#__PURE__*/function(){function t(){}var e=t.prototype;return e.tryParse=function(t,e,u){return e},e.success=function(t,e){},t}(),ND=/*#__PURE__*/function(t){function e(e,u){var n;return(n=t.call(this)||this).name=void 0,n.validator=void 0,n.name=u,n.validator=e.validators[n.name],n}N(e,t);var u=e.prototype;return u.tryParse=function(t,e,u){if(u.values[this.name])return e;var n=this.validator.validateForShorthand(t,e);if(n){var i=n.length,r=i>1?new Ge(n):n[0];return this.success(r,u),e+i}return e},u.success=function(t,e){e.values[this.name]=t},e}(yD),bD=/*#__PURE__*/function(t){function e(e,u){var n;return(n=t.call(this,e,u[0])||this).names=void 0,n.names=u,n}return N(e,t),e.prototype.success=function(t,e){for(var u=0;u<this.names.length;u++)e.values[this.names[u]]=t},e}(ND),SD=/*#__PURE__*/function(t){function e(e,u){var n;return(n=t.call(this)||this).nodes=void 0,n.slash=void 0,n.nodes=e,n.slash=u,n}return N(e,t),e.prototype.tryParse=function(t,e,u){var n=e;if(this.slash){if(t[e]!=Ie)return n;if(++e==t.length)return n}var i=this.nodes[0].tryParse(t,e,u);if(i==e)return n;e=i;for(var r=1;r<this.nodes.length&&e<t.length&&(i=this.nodes[r].tryParse(t,e,u))!=e;r++)e=i;return e},e}(yD),xD=/*#__PURE__*/function(t){function e(){for(var e,u=arguments.length,n=new Array(u),i=0;i<u;i++)n[i]=arguments[i];return(e=t.call.apply(t,[this].concat(n))||this).syntax=null,e.propList=null,e.error=!1,e.values={},e.validatorSet=null,e}N(e,t);var u=e.prototype;return u.setOwner=function(t){this.validatorSet=t},u.syntaxNodeForProperty=function(t){return new ND(this.validatorSet,t)},u.clone=function(){var t=new this.constructor;return t.syntax=this.syntax,t.propList=this.propList,t.validatorSet=this.validatorSet,t},u.init=function(t,e){this.syntax=t,this.propList=e},u.finish=function(t,e){if(!this.error){for(var u,n=R(this.propList);!(u=n()).done;){var i,r,o=u.value;e.simpleProperty(o,null!=(i=null!=(r=this.values[o])?r:this.validatorSet.defaultValues[o])?i:$e.initial,t)}return!0}return!1},u.propagateDefaultingValue=function(t,e,u){for(var n,i=R(this.propList);!(n=i()).done;)u.simpleProperty(n.value,t,e)},u.validateList=function(t){return this.error=!0,0},u.validateSingle=function(t){return this.validateList([t]),null},u.visitEmpty=function(t){return this.validateSingle(t)},u.visitStr=function(t){return this.validateSingle(t)},u.visitIdent=function(t){return this.validateSingle(t)},u.visitNumeric=function(t){return this.validateSingle(t)},u.visitNum=function(t){return this.validateSingle(t)},u.visitInt=function(t){return this.validateSingle(t)},u.visitHexColor=function(t){return this.validateSingle(t)},u.visitURL=function(t){return this.validateSingle(t)},u.visitSpaceList=function(t){return this.validateList(t.values),null},u.visitCommaList=function(t){return this.error=!0,null},u.visitFunc=function(t){return this.validateSingle(t)},u.visitExpr=function(t){return this.validateSingle(t)},e}(ye),TD=/*#__PURE__*/function(t){function e(){return t.call(this)||this}return N(e,t),e.prototype.validateList=function(t){for(var e=0,u=0;e<t.length;){var n=this.syntax[u].tryParse(t,e,this);if(n>e)e=n,u=0;else if(++u==this.syntax.length){this.error=!0;break}}return e},e}(xD),ID=/*#__PURE__*/function(t){function e(){return t.call(this)||this}N(e,t);var u=e.prototype;return u.validateList=function(t){if(t.length>this.syntax.length||0==t.length)return this.error=!0,0;for(var e=0;e<this.syntax.length;e++){for(var u=e;u>=t.length;)u=1==u?0:u-2;if(this.syntax[e].tryParse(t,u,this)!=u+1)return this.error=!0,0}return t.length},u.createSyntaxNode=function(){return new bD(this.validatorSet,this.propList)},e}(xD),PD=/*#__PURE__*/function(t){function e(){return t.call(this)||this}return N(e,t),e.prototype.validateList=function(t){for(var e=t.length,u=0;u<t.length;u++)if(t[u]===Ie){e=u;break}if(e>this.syntax.length||0==t.length)return this.error=!0,0;for(var n=0;n<this.syntax.length;n++){for(var i=n;i>=e;)i=1==i?0:i-2;var r=void 0;if(e+1<t.length)for(r=e+n+1;r>=t.length;)r-=r==e+2?1:2;else r=i;if(2!=this.syntax[n].tryParse([t[i],t[r]],0,this))return this.error=!0,0}return t.length},e}(xD),RD=/*#__PURE__*/function(t){function e(){return t.call(this)||this}N(e,t);var u=e.prototype;return u.mergeIn=function(t,e){for(var u,n=R(this.propList);!(u=n()).done;){var i,r,o=u.value,a=null!=(i=null!=(r=e[o])?r:this.validatorSet.defaultValues[o])?i:$e.initial,s=t[o];s||(t[o]=s=[]),s.push(a)}},u.visitCommaList=function(t){for(var e={},u=0;u<t.values.length;u++)if(this.values={},t.values[u]instanceof We?this.error=!0:(t.values[u].visit(this),this.mergeIn(e,this.values),this.values["background-color"]&&u!=t.values.length-1&&(this.error=!0)),this.error)return null;for(var n in this.values={},e)this.values[n]="background-color"==n?e[n].pop():new We(e[n]);return null},e}(TD),kD=/*#__PURE__*/function(t){function e(){return t.call(this)||this}N(e,t);var u=e.prototype;return u.init=function(e,u){t.prototype.init.call(this,e,u),this.propList.push("font-family","line-height","font-size","font-stretch","font-variant-ligatures","font-variant-caps","font-variant-numeric","font-variant-east-asian")},u.validateList=function(e){var u=t.prototype.validateList.call(this,e),n=this.values["font-variant_css2"];n&&(delete this.values["font-variant_css2"],this.values["font-variant-caps"]=n);var i=this.values["font-stretch_css3"];if(i&&(delete this.values["font-stretch_css3"],this.values["font-stretch"]=i),u+2>e.length)return this.error=!0,u;this.error=!1;var r=this.validatorSet.validators;if(!e[u].visit(r["font-size"]))return this.error=!0,u;if(this.values["font-size"]=e[u++],e[u]===Ie){if(2+ ++u>e.length)return this.error=!0,u;if(!e[u].visit(r["line-height"]))return this.error=!0,u;this.values["line-height"]=e[u++]}var o=u==e.length-1?e[u]:new Ge(e.slice(u,e.length));return o.visit(r["font-family"])?(this.values["font-family"]=o,e.length):(this.error=!0,u)},u.visitCommaList=function(t){if(t.values[0].visit(this),this.error)return null;for(var e=[this.values["font-family"]],u=1;u<t.values.length;u++)e.push(t.values[u]);var n=new We(e);return n.visit(this.validatorSet.validators["font-family"])?this.values["font-family"]=n:this.error=!0,null},u.visitIdent=function(t){var e=this.validatorSet.systemFonts[t.name];if(e)for(var u in e)this.values[u]=e[u];else this.error=!0;return null},e}(TD),LD=["unicode-bidi","direction","margin-block-start","margin-block-end","margin-inline-start","margin-inline-end","padding-block-start","padding-block-end","padding-inline-start","padding-inline-end","border-block-start-color","border-block-end-color","border-inline-start-color","border-inline-end-color","border-block-start-style","border-block-end-style","border-inline-start-style","border-inline-end-style","border-block-start-width","border-block-end-width","border-inline-start-width","border-inline-end-width","block-start","block-end","inline-start","inline-end","block-size","inline-size","max-block-size","max-inline-size","min-block-size","min-inline-size","behavior","bleed","conflicting-partitions","crop-offset","enabled","flow-consume","flow-from","flow-into","flow-linger","flow-options","flow-priority","font-display","font-size-adjust","font-stretch_css3","font-variant_css2","glyph-orientation-vertical","marks","min-page-height","min-page-width","repeat-on-break","required","required-partitions","ruby-align","shape-inside","snap-height","snap-width","template","text-decoration-skip","text-justify","text-zoom","unicode-range","utilization","wrap-flow"],OD={SIMPLE:TD,INSETS:ID,INSETS_SLASH:PD,COMMA:RD,FONT:kD,TEXT_SPACING:/*#__PURE__*/function(t){function e(){return t.apply(this,arguments)||this}return N(e,t),e.prototype.validateList=function(e){if(1===e.length&&e[0]instanceof ke)switch(e[0].name.toLowerCase()){case"normal":e=[this.validatorSet.defaultValues["text-autospace"],this.validatorSet.defaultValues["text-spacing-trim"]];break;case"auto":e=[$e.auto,$e.auto];break;case"none":e=[Le("no-autospace"),Le("space-all")]}return t.prototype.validateList.call(this,e)},e}(TD),ALL:/*#__PURE__*/function(t){function e(){return t.call(this)||this}N(e,t);var u=e.prototype;return u.init=function(e,u){for(var n in t.prototype.init.call(this,e,u),this.validatorSet.validators)LD.includes(n)||this.propList.push(n)},u.validateList=function(t){return this.error=!0,0},e}(TD)},_D=/*#__PURE__*/function(){function t(){this.validators={},this.prefixes={},this.defaultValues={},this.namedValidators={},this.systemFonts={},this.shorthands={},this.layoutProps={},this.backgroundProps={}}var e=t.prototype;return e.addReplacement=function(t,e){var u;if(e.type==Ou.NUMERIC)u=new Oe(e.num,e.text);else if(e.type==Ou.HASH)u=new Ue(e.text);else{if(e.type!=Ou.IDENT)throw new Error("unexpected replacement");u=Le(e.text)}if(t.isPrimitive()){var n=t.nodes[0].validator.idents;for(var i in n)n[i]=u;return t}throw new Error("unexpected replacement")},e.newGroup=function(t,e){var u,n=new fD;if("||"==t){for(var i=0;i<e.length;i++){var r=new fD;r.startClause(i),r.addGroup(e[i],iD.FOLLOW),r.endClause(i),n.addGroup(r,0==i?iD.FOLLOW:iD.ALTERNATE)}var o=new fD;return o.startSpecialGroup(),o.addGroup(n,iD.REPEATED),o.endSpecialGroup(),o}switch(t){case" ":u=iD.FOLLOW;break;case"|":case"||":u=iD.ALTERNATE;break;default:throw new Error("unexpected op")}for(var a=0;a<e.length;a++)n.addGroup(e[a],0==a?iD.FOLLOW:u);return n},e.addCounts=function(t,e,u){for(var n=new fD,i=0;i<e;i++)n.addGroup(t.clone(),iD.FOLLOW);if(u==Number.POSITIVE_INFINITY)n.addGroup(t,iD.REPEATED);else for(var r=e;r<u;r++)n.addGroup(t.clone(),iD.OPTIONAL);return n},e.primitive=function(t){var e=new fD;return e.addPrimitive(t),e},e.newFunc=function(t,e){var u;switch(t){case"COMMA":u=new BD(e);break;case"SPACE":u=new mD(e);break;default:u=new wD(t.toLowerCase(),e)}return this.primitive(u)},e.initBuiltInValidators=function(){this.namedValidators.COLOR=this.primitive(new FD(64,AD,AD)),this.namedValidators.IMAGE_FUNCTION=this.primitive(new FD(8192,AD,AD)),this.namedValidators.POS_INT=this.primitive(new FD(32,AD,AD)),this.namedValidators.POS_NUM=this.primitive(new FD(16,AD,AD)),this.namedValidators.POS_PERCENTAGE=this.primitive(new FD(8,AD,{"%":xe})),this.namedValidators.NEGATIVE=this.primitive(new FD(pD,AD,AD)),this.namedValidators.ZERO=this.primitive(new FD(ED,AD,AD)),this.namedValidators.ZERO_PERCENTAGE=this.primitive(new FD(1024,AD,AD)),this.namedValidators.POS_LENGTH=this.primitive(new FD(8,AD,{em:xe,ex:xe,ch:xe,rem:xe,lh:xe,rlh:xe,vw:xe,vh:xe,vi:xe,vb:xe,vmin:xe,vmax:xe,pvw:xe,pvh:xe,pvi:xe,pvb:xe,pvmin:xe,pvmax:xe,cm:xe,mm:xe,in:xe,px:xe,pt:xe,pc:xe,q:xe})),this.namedValidators.POS_ANGLE=this.primitive(new FD(8,AD,{deg:xe,grad:xe,rad:xe,turn:xe})),this.namedValidators.POS_TIME=this.primitive(new FD(8,AD,{s:xe,ms:xe})),this.namedValidators.FREQUENCY=this.primitive(new FD(8,AD,{Hz:xe,kHz:xe})),this.namedValidators.RESOLUTION=this.primitive(new FD(8,AD,{dpi:xe,dpcm:xe,dppx:xe})),this.namedValidators.URI=this.primitive(new FD(128,AD,AD)),this.namedValidators.URANGE=this.primitive(new FD(4096,AD,AD)),this.namedValidators.IDENT=this.primitive(new FD(4,AD,AD)),this.namedValidators.STRING=this.primitive(new FD(2,AD,AD)),this.namedValidators.SLASH=this.primitive(new FD(2048,AD,AD));var t={"font-family":Le("sans-serif")};this.systemFonts.caption=t,this.systemFonts.icon=t,this.systemFonts.menu=t,this.systemFonts["message-box"]=t,this.systemFonts["small-caption"]=t,this.systemFonts["status-bar"]=t},e.isBuiltIn=function(t){return!!t.match(/^[A-Z_0-9]+$/)},e.readNameAndPrefixes=function(t,e){var u=t.token();if(u.type==Ou.EOF)return null;var n={"":!0};if(u.type==Ou.O_BRK){do{if(t.consume(),(u=t.token()).type!=Ou.IDENT)throw new Error("Prefix name expected");n[u.text]=!0,t.consume(),u=t.token()}while(u.type==Ou.COMMA);if(u.type!=Ou.C_BRK)throw new Error("']' expected");t.consume(),u=t.token()}if(u.type!=Ou.IDENT)throw new Error("Property name expected");if(2==e?"SHORTHANDS"==u.text:"DEFAULTS"==u.text)return t.consume(),null;var i=u.text;if(t.consume(),2!=e){if(t.token().type!=Ou.EQ)throw new Error("'=' expected");this.isBuiltIn(i)||(this.prefixes[i]=n)}else if(t.token().type!=Ou.COLON)throw new Error("':' expected");return i},e.parseValidators=function(t){for(var e=this,u=function(){var u=e.readNameAndPrefixes(t,1);if(!u)return{v:void 0};for(var n,i=[],r=[],o="",a=!0,s=function(){if(0==i.length)throw new Error("No values");return 1==i.length?i[0]:e.newGroup(o,i)},l=function(t){if(a)throw new Error("'"+t+"': unexpected");if(o&&o!=t)throw new Error("mixed operators: '"+t+"' and '"+o+"'");o=t,a=!0},D=null;!D;){t.consume();var h=t.token();switch(h.type){case Ou.IDENT:if(a||l(" "),e.isBuiltIn(h.text)){var c=e.namedValidators[h.text];if(!c)throw new Error("'"+h.text+"' unexpected");i.push(c.clone())}else{var d={};d[h.text.toLowerCase()]=Le(h.text),i.push(e.primitive(new FD(0,d,AD)))}a=!1;break;case Ou.INT:var f={};f[""+h.num]=new Me(h.num),i.push(e.primitive(new FD(0,f,AD))),a=!1;break;case Ou.BAR:l("|");break;case Ou.BAR_BAR:l("||");break;case Ou.O_BRK:a||l(" "),r.push({vals:i,op:o,b:"["}),o="",i=[],a=!0;break;case Ou.FUNC:a||l(" "),r.push({vals:i,op:o,b:"(",fn:h.text}),o="",i=[],a=!0;break;case Ou.C_BRK:n=s();var p=r.pop();if("["!=p.b)throw new Error("']' unexpected");(i=p.vals).push(n),o=p.op,a=!1;break;case Ou.C_PAR:n=s();var E=r.pop();if("("!=E.b)throw new Error("')' unexpected");(i=E.vals).push(e.newFunc(E.fn,n)),o=E.op,a=!1;break;case Ou.COLON:if(a)throw new Error("':' unexpected");t.consume(),i.push(e.addReplacement(i.pop(),t.token()));break;case Ou.QMARK:if(a)throw new Error("'?' unexpected");i.push(e.addCounts(i.pop(),0,1));break;case Ou.STAR:if(a)throw new Error("'*' unexpected");i.push(e.addCounts(i.pop(),0,Number.POSITIVE_INFINITY));break;case Ou.PLUS:if(a)throw new Error("'+' unexpected");i.push(e.addCounts(i.pop(),1,Number.POSITIVE_INFINITY));break;case Ou.O_BRC:if(t.consume(),(h=t.token()).type!=Ou.INT)throw new Error("<int> expected");var C=h.num,F=C;if(t.consume(),(h=t.token()).type==Ou.COMMA){if(t.consume(),(h=t.token()).type!=Ou.INT)throw new Error("<int> expected");F=h.num,t.consume(),h=t.token()}if(h.type!=Ou.C_BRC)throw new Error("'}' expected");i.push(e.addCounts(i.pop(),C,F));break;case Ou.SEMICOL:if(D=s(),r.length>0)throw new Error("unclosed '"+r.pop().b+"'");break;default:throw new Error("unexpected token")}}t.consume(),e.isBuiltIn(u)?e.namedValidators[u]=D:e.validators[u]=D.isSimple()?D.nodes[0].validator:new mD(D)};;){var n=u();if("object"==typeof n)return n.v}},e.parseDefaults=function(t){for(;;){var e=this.readNameAndPrefixes(t,2);if(!e)return;for(var u=[];;){t.consume();var n=t.token();if(n.type==Ou.SEMICOL){t.consume();break}switch(n.type){case Ou.IDENT:u.push(Le(n.text));break;case Ou.NUM:u.push(new _e(n.num));break;case Ou.INT:u.push(new Me(n.num));break;case Ou.NUMERIC:u.push(new Oe(n.num,n.text));break;default:throw new Error("unexpected token")}}this.defaultValues[e]=u.length>1?new Ge(u):u[0]}},e.parseShorthands=function(t){for(;;){var e=this.readNameAndPrefixes(t,3);if(!e)return;var u=t.nthToken(1),n=void 0;u.type==Ou.IDENT&&OD[u.text]?(n=new OD[u.text],t.consume()):n=new TD,n.setOwner(this);for(var i=!1,r=[],o=!1,a=[],s=[];!i;)switch(t.consume(),(u=t.token()).type){case Ou.IDENT:if(this.validators[u.text])r.push(n.syntaxNodeForProperty(u.text)),u.text.includes("_")||s.push(u.text);else{if(!(this.shorthands[u.text]instanceof ID))throw new Error("'"+u.text+"' is neither a simple property nor an inset shorthand");var l=this.shorthands[u.text];r.push(l.createSyntaxNode()),s.push.apply(s,l.propList)}break;case Ou.SLASH:if(r.length>0||o)throw new Error("unexpected slash");o=!0;break;case Ou.O_BRK:a.push({slash:o,syntax:r}),r=[],o=!1;break;case Ou.C_BRK:var D=new SD(r,o),h=a.pop();o=h.slash,(r=h.syntax).push(D);break;case Ou.SEMICOL:i=!0,t.consume();break;default:throw new Error("unexpected token")}n.init(r,s),this.shorthands[e]=n}},e.parse=function(t){var e=new yn(t,null);this.parseValidators(e),this.parseDefaults(e),this.parseShorthands(e),this.backgroundProps=this.makePropSet(["background"]),this.layoutProps=this.makePropSet(["margin","border","padding","columns","column-gap","column-rule","column-fill"])},e.makePropSet=function(t){for(var e,u={},n=R(t);!(e=n()).done;)for(var i,r=e.value,o=this.shorthands[r],a=R(o?o.propList:[r]);!(i=a()).done;){var s,l=i.value;u[l]=null!=(s=this.defaultValues[l])?s:$e.initial}return u},e.validatePropertyAndHandleShorthand=function(t,e,u,n){if(ru(t))n.simpleProperty(t,e,u);else if(i=e,r=new UD,i.visit(r),r.varFound)n.simpleProperty(t,e,u);else{var i,r,o="",a=t,s=(t=t.toLowerCase()).match(/^-([a-z]+)-([-a-z0-9]+)$/);s&&(o=s[1],t=s[2]);var l=this.prefixes[t];if(l&&l[o]){var D=this.validators[t];if(D){var h=nu(e)||e.isExpr()?e:e.visit(D);if(h)n.simpleProperty(t,h,u);else{if(!o&&CSS.supports(t,e.toString()))return void n.simpleProperty(t,e,u);n.invalidPropertyValue(a,e)}}else{var c=this.shorthands[t].clone();nu(e)?c.propagateDefaultingValue(e,u,n):(e.visit(c),c.finish(u,n)||n.invalidPropertyValue(a,e))}}else CSS.supports(t,e.toString())?n.simpleProperty(a,e,u):n.unknownProperty(a,e)}},t}();function MD(){var t=new _D;return t.initBuiltInValidators(),t.parse(Xn),t}var UD=/*#__PURE__*/function(t){function e(){for(var e,u=arguments.length,n=new Array(u),i=0;i<u;i++)n[i]=arguments[i];return(e=t.call.apply(t,[this].concat(n))||this).varFound=!1,e}return N(e,t),e.prototype.visitFunc=function(t){return"var"===t.name?this.varFound=!0:this.varFound||this.visitValues(t.values),null},e}(ye),VD={"font-style":$e.auto,"font-stretch":$e.auto,"font-weight":$e.auto,"unicode-range":eu};function HD(t,e){var u={};for(var n in t)u[n]=uo(t,n).evaluate(e,n);return function(t){for(var e in VD)t[e]||(t[e]=VD[e])}(u),u}(new Date).valueOf();var zD=/*#__PURE__*/function(){function t(t){this.properties=void 0,this.fontTraitKey=void 0,this.src=void 0,this.blobURLs=[],this.blobs=[],this.family=void 0,this.properties=t,this.fontTraitKey=function(t){var e=new et;for(var u in VD)e.append(" "),e.append(t[u].toString());return e.toString()}(this.properties),this.src=this.properties.src?this.properties.src.toString():null;var e=this.properties["font-family"];this.family=e?e.stringValue():null}var e=t.prototype;return e.traitsEqual=function(t){return this.fontTraitKey==t.fontTraitKey},e.makeAtRule=function(t,e){var u=new et;for(var n in u.append("@font-face {\n font-family: "),u.append(this.family),u.append(";\n "),VD)u.append(n),u.append(": "),this.properties[n].appendTo(u,!0),u.append(";\n ");if(e){u.append('src: url("');var i=URL.createObjectURL(e);u.append(i),this.blobURLs.push(i),this.blobs.push(e),u.append('")')}else u.append("src: "),u.append(t);return u.append(";\n}\n"),u.toString()},t}(),GD=/*#__PURE__*/function(){function t(t){this.deobfuscator=void 0,this.familyMap={},this.deobfuscator=t}var e=t.prototype;return e.registerFamily=function(t,e){var u=t.family,n=this.familyMap[u],i=e.family;if(n){if(n!=i)throw new Error("E_FONT_FAMILY_INCONSISTENT "+t.family)}else this.familyMap[u]=i},e.filterFontFamily=function(t){if(t instanceof We){for(var e,u=[],n=R(t.values);!(e=n()).done;){var i=e.value,r=this.familyMap[i.stringValue()];r&&u.push(Le(r)),u.push(i)}return new We(u)}var o=this.familyMap[t.stringValue()];return o?new We([Le(o),t]):t},t}(),WD=/*#__PURE__*/function(){function t(t,e,u){this.head=void 0,this.body=void 0,this.srcURLMap={},this.familyPrefix=void 0,this.familyCounter=0,this.head=t,this.body=e,this.familyPrefix=u||"Fnt_"}var e=t.prototype;return e.getViewFontFamily=function(t,e){var u=t.family,n=e.familyMap[u];return n||(n=this.familyPrefix+ ++this.familyCounter,e.familyMap[u]=n,n)},e.initFont=function(t,e,u){var n=xn("initFont"),i=t.src,r={};for(var o in VD)r[o]=t.properties[o];var a=this.getViewFontFamily(t,u);r["font-family"]=Le(a);var s=new zD(r),l=this.head.ownerDocument.createElement("style");return l.textContent=s.makeAtRule(i,e),this.head.appendChild(l),D.debug("Load font:",i),n.finish(s),n.result()},e.loadFont=function(t,e){var u=this,n=t.src,i=t.family+";"+n,r=this.srcURLMap[i];return r?r.piggyback(function(u){var i=u;i.traitsEqual(t)?(e.registerFamily(t,i),D.debug("Found already-loaded font:",n)):D.warn("E_FONT_FACE_INCOMPATIBLE",t.src)}):(r=new Hn(function(){var i=xn("loadFont"),r=n.replace(/^url\("([^"]+)"\).*$/,"$1"),o=e.deobfuscator?e.deobfuscator(r):null;return o?Qn(r,Pn.BLOB).then(function(n){n.responseBlob?o(n.responseBlob).then(function(n){u.initFont(t,n,e).thenFinish(i)}):i.finish(null)}):u.initFont(t,null,e).thenFinish(i),i.result()},"loadFont "+n),this.srcURLMap[i]=r,r.start()),r},e.findOrLoadFonts=function(t,e){for(var u,n=this,i=[],r=R(t);!(u=r()).done;){var o=u.value;o.src&&o.family?i.push(this.loadFont(o,e)):D.warn("E_FONT_FACE_INVALID")}return zn(i).thenAsync(function(){return n.waitFontLoading()})},e.waitFontLoading=function(){var t=this.head.ownerDocument.fonts,e=0;if(t.forEach(function(t){"unloaded"===t.status&&(e++,t.load())}),0===e)return Tn(!0);var u=xn("waitFontLoading");return u.loop(function(){return u.sleep(20).thenAsync(function(){return Tn("loading"===t.status)})}).thenFinish(u),u.result()},t}(),XD=1,jD=/*#__PURE__*/function(){function t(t,e,u,n,i){this.name=void 0,this.pseudoName=void 0,this.classes=void 0,this.parent=void 0,this.specified={},this.children=[],this.pageMaster=null,this.index=0,this.key=void 0,this._scope=void 0,this.name=e,this.pseudoName=u,this.classes=n,this.parent=i,this._scope=t,this.key="p"+XD++,i&&(this.index=i.children.length,i.children.push(this))}var e=t.prototype;return e.createInstance=function(t){throw new Error("E_UNEXPECTED_CALL")},e.clone=function(t){throw new Error("E_UNEXPECTED_CALL")},e.copySpecified=function(t){var e=this.specified,u=t.specified;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(u[n]=e[n])},e.cloneChildren=function(t){for(var e=0;e<this.children.length;e++)this.children[e].clone({parent:t})},y(t,[{key:"scope",get:function(){return this._scope}}]),t}(),KD=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this,e,null,null,[],null)||this).specified.width=new Yr(Ze,0),u.specified.height=new Yr(Je,0),u}return N(e,t),e}(jD),YD=/*#__PURE__*/function(t){function e(e,u){var n;(n=t.call(this,e,function(t,e){var u=t.match(/^([^.]+)\.([^.]+)$/);if(u){var n=i.pageMaster.keyMap[u[1]];if(n){var r=this.lookupInstance(n);if(r)return e?r.resolveFunc(u[2]):r.resolveName(u[2])}}return null})||this).pageMaster=void 0,n.pageMaster=u;var i=I(n);return n}return N(e,t),e}(Rt),qD=/*#__PURE__*/function(t){function e(e,u,n,i,r,o,a){var s;return(s=t.call(this,e,u,n,i,r)||this).condition=void 0,s.specificity=void 0,s.keyMap={},s.condition=o,s.specificity=a,e instanceof YD||(s._scope=new YD(e,I(s))),s.pageMaster=I(s),s.specified.width=new Yr(Ze,0),s.specified.height=new Yr(Je,0),s.specified["wrap-flow"]=new Yr($e.auto,0),s.specified.position=new Yr($e.relative,0),s.specified.overflow=new Yr($e.visible,0),s}N(e,t);var u=e.prototype;return u.createInstance=function(t){return new hh(t,this)},u.clone=function(t){var u=new e(this.scope,this.name,t.pseudoName||this.pseudoName,this.classes,this.parent,this.condition,this.specificity);return this.copySpecified(u),this.cloneChildren(u),u},u.resetScope=function(){this.scope.pageMaster=this},e}(jD),$D=/*#__PURE__*/function(t){function e(e,u,n,i,r){var o;return(o=t.call(this,e,u,n,i,r)||this).pageMaster=r.pageMaster,u&&(o.pageMaster.keyMap[u]=o.key),o.specified["wrap-flow"]=new Yr($e.auto,0),o}N(e,t);var u=e.prototype;return u.createInstance=function(t){return new ch(t,this)},u.clone=function(t){var u=new e(t.parent.scope,this.name,this.pseudoName,this.classes,t.parent);return this.copySpecified(u),this.cloneChildren(u),u},e}(jD),QD=/*#__PURE__*/function(t){function e(e,u,n,i,r){var o;return(o=t.call(this,e,u,n,i,r)||this).pageMaster=r.pageMaster,u&&(o.pageMaster.keyMap[u]=o.key),o}N(e,t);var u=e.prototype;return u.createInstance=function(t){return new dh(t,this)},u.clone=function(t){var u=new e(t.parent.scope,this.name,this.pseudoName,this.classes,t.parent);return this.copySpecified(u),this.cloneChildren(u),u},e}(jD);function ZD(t,e,u){return!e||e===$e.auto||nu(e)?null:e.toExpr(t,u)}function JD(t,e,u){return!e||e===$e.auto||nu(e)?t.zero:e.toExpr(t,u)}function th(t,e,u){return!e||nu(e)?t.zero:e===$e.auto?null:e.toExpr(t,u)}function eh(t,e,u,n){return!e||u===$e.none||nu(e)?t.zero:e.toExpr(t,n)}function uh(t,e,u){return!e||nu(e)?u:e===$e._true?t._true:e===$e._false?t._false:e.toExpr(t,t.zero)}var nh=/*#__PURE__*/function(){function t(t,e){this.parentInstance=void 0,this.pageBox=void 0,this.cascaded={},this.style={},this.autoWidth=null,this.autoHeight=null,this.children=[],this.isAutoWidth=!1,this.isAutoHeight=!1,this.isTopDependentOnAutoHeight=!1,this.isRightDependentOnAutoWidth=!1,this.calculatedWidth=0,this.calculatedHeight=0,this.pageMasterInstance=null,this.namedValues={},this.namedFuncs={},this.vertical=!1,this.rtl=!1,this.suppressEmptyBoxGeneration=!1,this.parentInstance=t,this.pageBox=e,t&&t.children.push(this)}var e=t.prototype;return e.reset=function(){this.calculatedWidth=0,this.calculatedHeight=0},e.addNamedValues=function(t,e){var u=this.resolveName(t),n=this.resolveName(e);if(!u||!n)throw new Error("E_INTERNAL");return ve(this.pageBox.scope,u,n)},e.resolveName=function(t){var e=this.namedValues[t];if(e)return e;var u=this.style[t];switch(u&&(e=u.toExpr(this.pageBox.scope,this.pageBox.scope.zero)),t){case"margin-left-edge":e=this.resolveName("left");break;case"margin-top-edge":e=this.resolveName("top");break;case"margin-right-edge":e=this.addNamedValues("border-right-edge","margin-right");break;case"margin-bottom-edge":e=this.addNamedValues("border-bottom-edge","margin-bottom");break;case"border-left-edge":e=this.addNamedValues("margin-left-edge","margin-left");break;case"border-top-edge":e=this.addNamedValues("margin-top-edge","margin-top");break;case"border-right-edge":e=this.addNamedValues("padding-right-edge","border-right-width");break;case"border-bottom-edge":e=this.addNamedValues("padding-bottom-edge","border-bottom-width");break;case"padding-left-edge":e=this.addNamedValues("border-left-edge","border-left-width");break;case"padding-top-edge":e=this.addNamedValues("border-top-edge","border-top-width");break;case"padding-right-edge":e=this.addNamedValues("right-edge","padding-right");break;case"padding-bottom-edge":e=this.addNamedValues("bottom-edge","padding-bottom");break;case"left-edge":e=this.addNamedValues("padding-left-edge","padding-left");break;case"top-edge":e=this.addNamedValues("padding-top-edge","padding-top");break;case"right-edge":e=this.addNamedValues("left-edge","width");break;case"bottom-edge":e=this.addNamedValues("top-edge","height")}if(!e){var n;if("extent"==t)n=this.vertical?"width":"height";else if("measure"==t)n=this.vertical?"height":"width";else{var i=this.vertical?Wr:Xr;for(var r in n=t,i)n=n.replace(r,i[r])}n!=t&&(e=this.resolveName(n))}return e&&(this.namedValues[t]=e),e},e.resolveFunc=function(t){var e=this.namedFuncs[t];if(e)return e;if("columns"===t){var u=this.pageBox.scope,n=new Ae(u,0),i=this.resolveName("column-count"),r=this.resolveName("column-width"),o=this.resolveName("column-gap");e=me(u,Be(u,new fe(u,"min",[n,i]),ve(u,r,o)),o)}return e&&(this.namedFuncs[t]=e),e},e.initEnabled=function(){var t=this.pageBox.scope,e=this.style,u=uh(t,e.enabled,t._true),n=ZD(t,e.page,t.zero);if(n){var i=new he(t,"page-number");u=ge(t,u,new ne(t,n,i))}var r=ZD(t,e["min-page-width"],t.zero);r&&(u=ge(t,u,new ue(t,new he(t,"page-width"),r)));var o=ZD(t,e["min-page-height"],t.zero);o&&(u=ge(t,u,new ue(t,new he(t,"page-height"),o))),u=this.boxSpecificEnabled(u),e.enabled=new je(u)},e.boxSpecificEnabled=function(t){return t},e.initHorizontal=function(){var t=this.pageBox.scope,e=this.style,u=this.parentInstance?this.parentInstance.style.width.toExpr(t,null):null,n=ZD(t,e.left,u),i=ZD(t,e["margin-left"],u),r=eh(t,e["border-left-width"],e["border-left-style"],u),o=JD(t,e["padding-left"],u),a=ZD(t,e.width,u),s=ZD(t,e["max-width"],u),l=JD(t,e["padding-right"],u),D=eh(t,e["border-right-width"],e["border-right-style"],u),h=ZD(t,e["margin-right"],u),c=ZD(t,e.right,u),d=ve(t,r,o),f=ve(t,r,l);if(n&&c&&a){var p=me(t,u,ve(t,a,ve(t,ve(t,n,d),f)));i?h?c=me(t,p,h):h=me(t,p,ve(t,c,i)):(p=me(t,p,c),h?i=me(t,p,h):h=i=Be(t,p,new Ee(t,.5)))}else{i||(i=t.zero),h||(h=t.zero),n||c||a||(n=t.zero),n||a?n||c?a||c||(a=this.autoWidth,this.isAutoWidth=!0):n=t.zero:(a=this.autoWidth,this.isAutoWidth=!0);var E=me(t,u,ve(t,ve(t,i,d),ve(t,h,f)));this.isAutoWidth&&(s||(s=me(t,E,n||c)),this.vertical||!ZD(t,e["column-width"],null)&&!ZD(t,e["column-count"],null)||(a=s,this.isAutoWidth=!1)),n?a?c||(c=me(t,E,ve(t,n,a))):a=me(t,E,ve(t,n,c)):n=me(t,E,ve(t,c,a))}var C=JD(t,e["snap-width"]||(this.parentInstance?this.parentInstance.style["snap-width"]:null),u);e.left=new je(n),e["margin-left"]=new je(i),e["border-left-width"]=new je(r),e["padding-left"]=new je(o),e.width=new je(a),e["max-width"]=new je(s||a),e["padding-right"]=new je(l),e["border-right-width"]=new je(D),e["margin-right"]=new je(h),e.right=new je(c),e["snap-width"]=new je(C)},e.initVertical=function(){var t=this.pageBox.scope,e=this.style,u=this.parentInstance?this.parentInstance.style.width.toExpr(t,null):null,n=this.parentInstance?this.parentInstance.style.height.toExpr(t,null):null,i=ZD(t,e.top,n),r=ZD(t,e["margin-top"],u),o=eh(t,e["border-top-width"],e["border-top-style"],u),a=JD(t,e["padding-top"],u),s=ZD(t,e.height,n),l=ZD(t,e["max-height"],n),D=JD(t,e["padding-bottom"],u),h=eh(t,e["border-bottom-width"],e["border-bottom-style"],u),c=ZD(t,e["margin-bottom"],u),d=ZD(t,e.bottom,n),f=ve(t,o,a),p=ve(t,h,D);if(i&&d&&s){var E=me(t,n,ve(t,s,ve(t,ve(t,i,f),p)));r?c?d=me(t,E,r):c=me(t,E,ve(t,d,r)):(E=me(t,E,d),c?r=me(t,E,c):c=r=Be(t,E,new Ee(t,.5)))}else{r||(r=t.zero),c||(c=t.zero),i||d||s||(i=t.zero),i||s?i||d?s||d||(s=this.autoHeight,this.isAutoHeight=!0):i=t.zero:(s=this.autoHeight,this.isAutoHeight=!0);var C=me(t,n,ve(t,ve(t,r,f),ve(t,c,p)));this.isAutoHeight&&(l||(l=me(t,C,i||d)),this.vertical&&(ZD(t,e["column-width"],null)||ZD(t,e["column-count"],null))&&(s=l,this.isAutoHeight=!1)),i?s?d||(d=me(t,C,ve(t,i,s))):s=me(t,C,ve(t,d,i)):i=me(t,C,ve(t,d,s))}var F=JD(t,e["snap-height"]||(this.parentInstance?this.parentInstance.style["snap-height"]:null),u);e.top=new je(i),e["margin-top"]=new je(r),e["border-top-width"]=new je(o),e["padding-top"]=new je(a),e.height=new je(s),e["max-height"]=new je(l||s),e["padding-bottom"]=new je(D),e["border-bottom-width"]=new je(h),e["margin-bottom"]=new je(c),e.bottom=new je(d),e["snap-height"]=new je(F)},e.initColumns=function(){var t=this.pageBox.scope,e=this.style,u=ZD(t,e[this.vertical?"height":"width"],null),n=ZD(t,e["column-width"],u),i=ZD(t,e["column-count"],null),r=function(t,e,u){return!e||e===$e.normal||nu(e)?null:e.toExpr(t,null)}(t,e["column-gap"]);r||(r=new De(t,1,"em")),n&&!i&&(i=new fe(t,"floor",[we(t,ve(t,u,r),ve(t,n,r))]),i=new fe(t,"max",[t.one,i])),i||(i=t.one),n=me(t,we(t,ve(t,u,r),i),r),e["column-width"]=new je(n),e["column-count"]=new je(i),e["column-gap"]=new je(r)},e.depends=function(t,e,u){return this.style[t].toExpr(this.pageBox.scope,null).depend(e,u)},e.init=function(t){var e=this;t.registerInstance(this.pageBox.key,this);var u=this.pageBox.scope,n=this.style,i=this.parentInstance?this.parentInstance.getActiveRegions(t):null,r=Ta(this.cascaded,t,i,!1);this.vertical=Sa(r,t,!!this.parentInstance&&this.parentInstance.vertical),this.rtl=xa(r,t,!!this.parentInstance&&this.parentInstance.rtl),Ra(r,n,this.vertical,this.rtl,function(t,e){return e.value}),this.autoWidth=new de(u,function(){return e.calculatedWidth},"autoWidth"),this.autoHeight=new de(u,function(){return e.calculatedHeight},"autoHeight"),this.initHorizontal(),this.initVertical(),this.initColumns(),this.initEnabled()},e.getProp=function(t,e){var u,n,i=this.style[e];return!i&&eo(e)&&(i="font-size"===e&&t.isRelativeRootFontSize&&t.rootFontSize?new Oe(t.rootFontSize,"px"):null==(n=(null==(u=t.styler)?void 0:u.rootStyle)[e])?void 0:n.value),i&&(i=Oa(t,i,e)),i},e.getPropAsNumber=function(t,e){var u=this.style[e];if(u){var n,i,r=/\b(height|top|bottom)\b/.test(e)?null!=(n=t.pageAreaHeight)?n:t.pageHeight():null!=(i=t.pageAreaWidth)?i:t.pageWidth();u=Oa(t,u,e,r)}return Ye(u,t)},e.getSpecial=function(t,e){var u=ao(this.cascaded,e);if(u){for(var n=[],i=0;i<u.length;i++){var r=u[i].evaluate(t,"");r&&r!==xe&&n.push(r)}if(n.length)return n}return null},e.getActiveRegions=function(t){var e=this.getSpecial(t,"region-id");if(e){for(var u=[],n=0;n<e.length;n++)u[n]=e[n].toString();return u}return null},e.propagateProperty=function(t,e,u,n){this.propagatePropertyToElement(t,e.element,u,n)},e.propagatePropertyToElement=function(t,e,u,n){var i=this.getProp(t,u);i&&(i.isNumeric()&&Ot(i.unit)&&(i=qe(i,t)),"font-family"===u&&(i=n.filterFontFamily(i)),(u.startsWith("background")||"z-index"===u)&&e.parentElement.hasAttribute("data-vivliostyle-bleed-box")&&(e=e.parentElement),Z(e,u,i.toString()))},e.propagateDelayedProperty=function(t,e,u,n){var i=this.getProp(t,u);i&&n.push(new sr(e.element,u,i))},e.assignLeftPosition=function(t,e){var u=this.getPropAsNumber(t,"left"),n=this.getPropAsNumber(t,"margin-left"),i=this.getPropAsNumber(t,"padding-left"),r=this.getPropAsNumber(t,"border-left-width"),o=this.getPropAsNumber(t,"width");e.setHorizontalPosition(u,o),Z(e.element,"margin-left",n+"px"),Z(e.element,"padding-left",i+"px"),Z(e.element,"border-left-width",r+"px"),e.marginLeft=n,e.borderLeft=r,e.paddingLeft=i},e.assignRightPosition=function(t,e){var u=this.getPropAsNumber(t,"right"),n=this.getPropAsNumber(t,"snap-height"),i=this.getPropAsNumber(t,"margin-right"),r=this.getPropAsNumber(t,"padding-right"),o=this.getPropAsNumber(t,"border-right-width");if(Z(e.element,"margin-right",i+"px"),Z(e.element,"padding-right",r+"px"),Z(e.element,"border-right-width",o+"px"),e.marginRight=i,e.borderRight=o,this.vertical&&n>0){var a=u+e.getInsetRight(),s=a-Math.floor(a/n)*n;s>0&&(e.snapOffsetX=n-s,r+=e.snapOffsetX)}e.paddingRight=r,e.snapWidth=n},e.assignTopPosition=function(t,e){var u=this.getPropAsNumber(t,"snap-height"),n=this.getPropAsNumber(t,"top"),i=this.getPropAsNumber(t,"margin-top"),r=this.getPropAsNumber(t,"padding-top"),o=this.getPropAsNumber(t,"border-top-width");if(e.top=n,e.marginTop=i,e.borderTop=o,e.snapHeight=u,!this.vertical&&u>0){var a=n+e.getInsetTop(),s=a-Math.floor(a/u)*u;s>0&&(e.snapOffsetY=u-s,r+=e.snapOffsetY)}e.paddingTop=r,Z(e.element,"top",n+"px"),Z(e.element,"margin-top",i+"px"),Z(e.element,"padding-top",r+"px"),Z(e.element,"border-top-width",o+"px")},e.assignBottomPosition=function(t,e){var u=this.getPropAsNumber(t,"margin-bottom"),n=this.getPropAsNumber(t,"padding-bottom"),i=this.getPropAsNumber(t,"border-bottom-width"),r=this.getPropAsNumber(t,"height")-e.snapOffsetY;Z(e.element,"height",r+"px"),Z(e.element,"margin-bottom",u+"px"),Z(e.element,"padding-bottom",n+"px"),Z(e.element,"border-bottom-width",i+"px"),e.height=r-e.snapOffsetY,e.marginBottom=u,e.borderBottom=i,e.paddingBottom=n},e.assignBeforePosition=function(t,e){this.vertical?this.assignRightPosition(t,e):this.assignTopPosition(t,e)},e.assignAfterPosition=function(t,e){this.vertical?this.assignLeftPosition(t,e):this.assignBottomPosition(t,e)},e.assignStartEndPosition=function(t,e){this.vertical?(this.assignTopPosition(t,e),this.assignBottomPosition(t,e)):(this.assignRightPosition(t,e),this.assignLeftPosition(t,e))},e.sizeWithMaxHeight=function(t,e){Z(e.element,"border-top-width","0px");var u=this.getPropAsNumber(t,"max-height");this.isTopDependentOnAutoHeight?e.setVerticalPosition(0,u):(this.assignTopPosition(t,e),e.height=u-=e.snapOffsetY,Z(e.element,"height",u+"px"))},e.sizeWithMaxWidth=function(t,e){Z(e.element,"border-left-width","0px");var u=this.getPropAsNumber(t,"max-width");if(this.isRightDependentOnAutoWidth)e.setHorizontalPosition(0,u);else{this.assignRightPosition(t,e),e.width=u-=e.snapOffsetX;var n=this.getPropAsNumber(t,"right");Z(e.element,"right",n+"px"),Z(e.element,"width",u+"px")}},e.prepareContainer=function(t,e,u,n,i){this.parentInstance&&this.vertical==this.parentInstance.vertical||Z(e.element,"writing-mode",this.vertical?"vertical-rl":"horizontal-tb"),(this.vertical?this.isAutoWidth:this.isAutoHeight)?this.vertical?this.sizeWithMaxWidth(t,e):this.sizeWithMaxHeight(t,e):(this.assignBeforePosition(t,e),this.assignAfterPosition(t,e)),(this.vertical?this.isAutoHeight:this.isAutoWidth)?this.vertical?this.sizeWithMaxHeight(t,e):this.sizeWithMaxWidth(t,e):this.assignStartEndPosition(t,e);for(var r=0;r<ih.length;r++)this.propagateProperty(t,e,ih[r],n)},e.transferContentProps=function(t,e,u,n){for(var i=0;i<oh.length;i++)this.propagateProperty(t,e,oh[i],n)},e.transferSingleUriContentProps=function(t,e,u){for(var n,i,r,o,a,s,l=this,D=0;D<ah.length;D++){var h=ah[D];"width"===h&&(!(s=null==(o=null!=(a=l.cascaded.width)?a:l.cascaded[l.vertical?"block-size":"inline-size"])?void 0:o.value)||s===$e.auto||nu(s))||"height"===h&&(!(r=null==(n=null!=(i=l.cascaded.height)?i:l.cascaded[l.vertical?"inline-size":"block-size"])?void 0:n.value)||r===$e.auto||nu(r))||this.propagatePropertyToElement(t,e,h,u)}},e.finishContainer=function(t,e,u,n,i,r,o){this.vertical?this.calculatedWidth=e.computedBlockSize+e.snapOffsetX:this.calculatedHeight=e.computedBlockSize+e.snapOffsetY;var a=(this.vertical||!n)&&this.isAutoHeight,s=(!this.vertical||!n)&&this.isAutoWidth,l=null;if((s||a)&&(s&&Z(e.element,"width","auto"),a&&Z(e.element,"height","auto"),l=r.getElementClientRect(n?n.element:e.element),s&&(this.calculatedWidth=Math.ceil(l.right-l.left-e.paddingLeft-e.borderLeft-e.paddingRight-e.borderRight),this.vertical&&(this.calculatedWidth+=e.snapOffsetX)),a&&(this.calculatedHeight=l.bottom-l.top-e.paddingTop-e.borderTop-e.paddingBottom-e.borderBottom,this.vertical||(this.calculatedHeight+=e.snapOffsetY))),(this.vertical?this.isAutoHeight:this.isAutoWidth)&&this.assignStartEndPosition(t,e),(this.vertical?this.isAutoWidth:this.isAutoHeight)&&((this.vertical?this.isRightDependentOnAutoWidth:this.isTopDependentOnAutoHeight)&&this.assignBeforePosition(t,e),this.assignAfterPosition(t,e)),i>1){var D=this.getPropAsNumber(t,"column-rule-width"),h=this.getProp(t,"column-rule-style"),c=this.getProp(t,"column-rule-color");if(D>0&&h&&h!=$e.none&&c!=$e.transparent)for(var d=this.getPropAsNumber(t,"column-gap"),f=this.vertical?e.height:e.width,p=this.vertical?"border-top":"border-left",E=1;E<i;E++){var C=this.vertical?(f+d)*E/i-d/2+e.paddingTop-D/2:(f+d)*E/i-d/2+e.paddingLeft-D/2,F=this.vertical?e.width+e.paddingLeft+e.paddingRight:e.height+e.paddingTop+e.paddingBottom,A=e.element.ownerDocument.createElement("div");Z(A,"position","absolute"),Z(A,this.vertical?"left":"top","0px"),Z(A,this.vertical?"top":"left",C+"px"),Z(A,this.vertical?"height":"width","0px"),Z(A,this.vertical?"width":"height",F+"px"),Z(A,p,D+"px "+h.toString()+(c?" "+c.toString():"")),e.element.insertBefore(A,e.element.firstChild)}}for(var g=0;g<rh.length;g++)this.propagateProperty(t,e,rh[g],o);for(var v=0;v<sh.length;v++)this.propagateDelayedProperty(t,e,sh[v],u.delayedItems)},e.applyCascadeAndInit=function(t,e){var u=this.cascaded,n=this.pageBox.specified;for(var i in n)to(i)&&no(u,i,uo(n,i));if(this.pageBox.pseudoName==lh)for(var r in e)(r.match(/^background-/)||"writing-mode"==r)&&(u[r]=e[r]);if("layout-host"==this.pageBox.pseudoName)for(var o in e)o.match(/^background-/)||"writing-mode"==o||(u[o]=e[o]);t.pushRule(this.pageBox.classes,null,u);var a=u.content;a&&(u.content=a.filterValue(new na(t,null,t.counterResolver))),this.init(t.context);for(var s,l=R(this.pageBox.children);!(s=l()).done;)s.value.createInstance(this).applyCascadeAndInit(t,e);t.popRule()},e.resolveAutoSizing=function(t){this.isAutoWidth&&(this.isRightDependentOnAutoWidth=this.depends("right",this.autoWidth,t)||this.depends("margin-right",this.autoWidth,t)||this.depends("border-right-width",this.autoWidth,t)||this.depends("padding-right",this.autoWidth,t)),this.isAutoHeight&&(this.isTopDependentOnAutoHeight=this.depends("top",this.autoHeight,t)||this.depends("margin-top",this.autoHeight,t)||this.depends("border-top-width",this.autoHeight,t)||this.depends("padding-top",this.autoHeight,t));for(var e,u=R(this.children);!(e=u()).done;)e.value.resolveAutoSizing(t)},t}(),ih=["border-left-style","border-right-style","border-top-style","border-bottom-style","border-left-color","border-right-color","border-top-color","border-bottom-color","outline-style","outline-color","outline-width","overflow","visibility"],rh=["border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius","border-image-source","border-image-slice","border-image-width","border-image-outset","border-image-repeat","background-attachment","background-color","background-image","background-repeat","background-position","background-clip","background-origin","background-size","opacity","z-index","background-blend-mode","isolation","mix-blend-mode","filter"],oh=["color","font-family","font-size","font-style","font-weight","line-height","letter-spacing","text-align","text-decoration","text-indent","text-transform","white-space","word-spacing","font-feature-settings","font-kerning","font-size-adjust","font-variant-ligatures","font-variant-caps","font-variant-numeric","font-variant-east-asian","font-stretch","text-combine-upright","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-fill-color","text-orientation","text-shadow","text-stroke-color","text-stroke-width","text-underline-position"],ah=["width","height","image-resolution","object-fit","object-position"],sh=["transform","transform-origin"],lh="background-host",Dh=/*#__PURE__*/function(t){function e(e){return t.call(this,null,e)||this}return N(e,t),e.prototype.applyCascadeAndInit=function(e,u){t.prototype.applyCascadeAndInit.call(this,e,u),this.children.sort(function(t,e){return e.pageBox.specificity-t.pageBox.specificity||t.pageBox.index-e.pageBox.index})},e}(nh),hh=/*#__PURE__*/function(t){function e(e,u){var n;return(n=t.call(this,e,u)||this).pageMasterInstance=I(n),n}N(e,t);var u=e.prototype;return u.boxSpecificEnabled=function(t){var e=this.pageBox.pageMaster;return e.condition&&(t=ge(e.scope,t,e.condition)),t},u.adjustPageLayout=function(t,e,u){},e}(nh),ch=/*#__PURE__*/function(t){function e(e,u){var n;return(n=t.call(this,e,u)||this).pageMasterInstance=e.pageMasterInstance,n}return N(e,t),e}(nh),dh=/*#__PURE__*/function(t){function e(e,u){var n;return(n=t.call(this,e,u)||this).pageMasterInstance=e.pageMasterInstance,n}N(e,t);var u=e.prototype;return u.processPartitionList=function(t,e,u){var n=null;if(e instanceof ke&&(n=[e]),e instanceof We&&(n=e.values),n)for(var i=this.pageBox.scope,r=0;r<n.length;r++)if(n[r]instanceof ke){var o=It(n[r].name,"enabled"),a=new he(i,o);u&&(a=new Xt(i,a)),t=ge(i,t,a)}return t},u.boxSpecificEnabled=function(t){var e=this.pageBox.scope,u=this.style,n=uh(e,u.required,e._false)!==e._false;if(n||this.isAutoHeight){var i=function(t,e,u){return!e||nu(e)?new Ee(t,"body"):e.toExpr(t,t.zero)}(e,u["flow-from"]);t=ge(e,t,new fe(e,"has-content",[i]))}if(t=this.processPartitionList(t,u["required-partitions"],!1),t=this.processPartitionList(t,u["conflicting-partitions"],!0),n){var r=this.pageMasterInstance.style.enabled,o=r?r.toExpr(e,null):e._true;o=ge(e,o,t),this.pageMasterInstance.style.enabled=new je(o)}return t},u.prepareContainer=function(e,u,n,i,r){t.prototype.prepareContainer.call(this,e,u,n,i,r)},e}(nh),fh=/*#__PURE__*/function(t){function e(e,u,n,i){var r;return(r=t.call(this,e,u,!1)||this).target=void 0,r.validatorSet=void 0,r.target=n,r.validatorSet=i,r}N(e,t);var u=e.prototype;return u.property=function(t,e,u){this.validatorSet.validatePropertyAndHandleShorthand(t,e,u,this)},u.unknownProperty=function(t,e){this.report("E_INVALID_PROPERTY "+t+": "+e.toString())},u.invalidPropertyValue=function(t,e){this.report("E_INVALID_PROPERTY_VALUE "+t+": "+e.toString())},u.simpleProperty=function(t,e,u){this.target.specified[t]=new Yr(e,u?ii:ri)},e}(Di),ph=/*#__PURE__*/function(t){function e(e,u,n,i){return t.call(this,e,u,n,i)||this}return N(e,t),e}(fh),Eh=/*#__PURE__*/function(t){function e(e,u,n,i){var r;return r=t.call(this,e,u,n,i)||this,n.specified.width=new Yr(Qe,0),n.specified.height=new Yr(Qe,0),r}N(e,t);var u=e.prototype;return u.startPartitionRule=function(t,e,u){var n=new QD(this.scope,t,e,u,this.target),i=new ph(this.scope,this.owner,n,this.validatorSet);this.owner.pushHandler(i)},u.startPartitionGroupRule=function(t,u,n){var i=new $D(this.scope,t,u,n,this.target),r=new e(this.scope,this.owner,i,this.validatorSet);this.owner.pushHandler(r)},e}(fh),Ch=/*#__PURE__*/function(t){function e(e,u,n,i){return t.call(this,e,u,n,i)||this}N(e,t);var u=e.prototype;return u.startPartitionRule=function(t,e,u){var n=new QD(this.scope,t,e,u,this.target),i=new ph(this.scope,this.owner,n,this.validatorSet);this.owner.pushHandler(i)},u.startPartitionGroupRule=function(t,e,u){var n=new $D(this.scope,t,e,u,this.target),i=new Eh(this.scope,this.owner,n,this.validatorSet);this.owner.pushHandler(i)},e}(fh);function Fh(t){var e,u,n=null==(e=t["writing-mode"])?void 0:e.value,i=null==(u=t.direction)?void 0:u.value;return n===$e.vertical_lr||n!==$e.vertical_rl&&i!==$e.rtl?exports.PageProgression.LTR:exports.PageProgression.RTL}var Ah={a10:{width:new Oe(26,"mm"),height:new Oe(37,"mm")},a9:{width:new Oe(37,"mm"),height:new Oe(52,"mm")},a8:{width:new Oe(52,"mm"),height:new Oe(74,"mm")},a7:{width:new Oe(74,"mm"),height:new Oe(105,"mm")},a6:{width:new Oe(105,"mm"),height:new Oe(148,"mm")},a5:{width:new Oe(148,"mm"),height:new Oe(210,"mm")},a4:{width:new Oe(210,"mm"),height:new Oe(297,"mm")},a3:{width:new Oe(297,"mm"),height:new Oe(420,"mm")},a2:{width:new Oe(420,"mm"),height:new Oe(594,"mm")},a1:{width:new Oe(594,"mm"),height:new Oe(841,"mm")},a0:{width:new Oe(841,"mm"),height:new Oe(1189,"mm")},b10:{width:new Oe(31,"mm"),height:new Oe(44,"mm")},b9:{width:new Oe(44,"mm"),height:new Oe(62,"mm")},b8:{width:new Oe(62,"mm"),height:new Oe(88,"mm")},b7:{width:new Oe(88,"mm"),height:new Oe(125,"mm")},b6:{width:new Oe(125,"mm"),height:new Oe(176,"mm")},b5:{width:new Oe(176,"mm"),height:new Oe(250,"mm")},b4:{width:new Oe(250,"mm"),height:new Oe(353,"mm")},b3:{width:new Oe(353,"mm"),height:new Oe(500,"mm")},b2:{width:new Oe(500,"mm"),height:new Oe(707,"mm")},b1:{width:new Oe(707,"mm"),height:new Oe(1e3,"mm")},b0:{width:new Oe(1e3,"mm"),height:new Oe(1414,"mm")},c10:{width:new Oe(28,"mm"),height:new Oe(40,"mm")},c9:{width:new Oe(40,"mm"),height:new Oe(57,"mm")},c8:{width:new Oe(57,"mm"),height:new Oe(81,"mm")},c7:{width:new Oe(81,"mm"),height:new Oe(114,"mm")},c6:{width:new Oe(114,"mm"),height:new Oe(162,"mm")},c5:{width:new Oe(162,"mm"),height:new Oe(229,"mm")},c4:{width:new Oe(229,"mm"),height:new Oe(324,"mm")},c3:{width:new Oe(324,"mm"),height:new Oe(458,"mm")},c2:{width:new Oe(458,"mm"),height:new Oe(648,"mm")},c1:{width:new Oe(648,"mm"),height:new Oe(917,"mm")},c0:{width:new Oe(917,"mm"),height:new Oe(1297,"mm")},"jis-b10":{width:new Oe(32,"mm"),height:new Oe(45,"mm")},"jis-b9":{width:new Oe(45,"mm"),height:new Oe(64,"mm")},"jis-b8":{width:new Oe(64,"mm"),height:new Oe(91,"mm")},"jis-b7":{width:new Oe(91,"mm"),height:new Oe(128,"mm")},"jis-b6":{width:new Oe(128,"mm"),height:new Oe(182,"mm")},"jis-b5":{width:new Oe(182,"mm"),height:new Oe(257,"mm")},"jis-b4":{width:new Oe(257,"mm"),height:new Oe(364,"mm")},"jis-b3":{width:new Oe(364,"mm"),height:new Oe(515,"mm")},"jis-b2":{width:new Oe(515,"mm"),height:new Oe(728,"mm")},"jis-b1":{width:new Oe(728,"mm"),height:new Oe(1030,"mm")},"jis-b0":{width:new Oe(1030,"mm"),height:new Oe(1456,"mm")},letter:{width:new Oe(8.5,"in"),height:new Oe(11,"in")},legal:{width:new Oe(8.5,"in"),height:new Oe(14,"in")},ledger:{width:new Oe(11,"in"),height:new Oe(17,"in")}},gh=new Oe(.24,"pt");new Oe(3,"mm");var vh,mh,Bh=new Oe(10,"mm"),wh=new Oe(13,"mm");function yh(t){var e={width:Ze,height:Je,bleed:tu,bleedOffset:tu,cropOffset:tu},u=t.size;if(u&&u.value!==$e.auto){var n,i,r=u.value;if(r.isSpaceList()?(n=r.values[0],i=r.values[1]):(n=r,i=null),n.isNumeric())e.width=n,e.height=i||n;else{var o=n.name&&Ah[n.name.toLowerCase()];o&&(i&&i===$e.landscape?(e.width=o.height,e.height=o.width):(e.width=o.width,e.height=o.height))}}var a=t.marks,s=t.bleed,l=a&&!nu(a.value)?a.value:$e.none,D=s&&!nu(s.value)?s.value:$e.auto;D===$e.auto?l!==$e.none&&(l.isSpaceList()?l.values.some(function(t){return t===$e.crop}):l===$e.crop)&&(e.bleed=new Oe(6,"pt")):D.isNumeric()&&(e.bleed=D);var h=t["crop-offset"],c=h&&!nu(h.value)?h.value:$e.auto;return c===$e.auto?l!==$e.none&&(e.bleedOffset=wh):c.isNumeric()&&(e.cropOffset=c),e}function Nh(t,e){var u={},n=Math.max(0,t.bleed.num)*e.queryUnitSize(t.bleed.unit,!1),i=!t.cropOffset.num&&t.bleedOffset.num?t.bleedOffset.num*e.queryUnitSize(t.bleedOffset.unit,!1):Math.max(0,t.cropOffset.num*e.queryUnitSize(t.cropOffset.unit,!1)-n),r=n+i,o=t.width;u.pageWidth=o===Ze?e.pref.defaultPaperSize?e.pref.defaultPaperSize.width*e.queryUnitSize("px",!1):(e.pref.spreadView?Math.floor(e.viewportWidth/2)-e.pref.pageBorder:e.viewportWidth)-2*r:o.num*e.queryUnitSize(o.unit,!1);var a=t.height;return u.pageHeight=a===Je?e.pref.defaultPaperSize?e.pref.defaultPaperSize.height*e.queryUnitSize("px",!1):e.viewportHeight-2*r:a.num*e.queryUnitSize(a.unit,!1),u.bleed=n,u.bleedOffset=i,u.cropOffset=r,u}function bh(t,e,u){var n=t.createElementNS(H.SVG,"svg");return n.setAttribute("width",e),n.setAttribute("height",u),n.style.position="absolute",n}function Sh(t,e,u){var n=t.createElementNS(H.SVG,u=u||"polyline");return n.setAttribute("stroke","#010101"),n.setAttribute("stroke-width",e),n.setAttribute("fill","none"),n}!function(t){t.TOP_LEFT="top left",t.TOP_RIGHT="top right",t.BOTTOM_LEFT="bottom left",t.BOTTOM_RIGHT="bottom right"}(vh||(vh={})),function(t){t.TOP="top",t.BOTTOM="bottom",t.LEFT="left",t.RIGHT="right"}(mh||(mh={}));var xh,Th,Ih=(xh={width:!0,height:!0,"block-size":!0,"inline-size":!0,margin:!0,padding:!0,border:!0,outline:!0,"outline-width":!0,"outline-style":!0,"outline-color":!0},["left","right","top","bottom","before","after","start","end","block-start","block-end","inline-start","inline-end"].forEach(function(t){xh["margin-"+t]=!0,xh["padding-"+t]=!0,xh["border-"+t+"-width"]=!0,xh["border-"+t+"-style"]=!0,xh["border-"+t+"-color"]=!0}),xh);!function(t){t.START="start",t.CENTER="center",t.END="end"}(Th||(Th={}));var Ph,Rh={"top-left-corner":{order:1,isInTopRow:!0,isInBottomRow:!1,isInLeftColumn:!0,isInRightColumn:!1,positionAlongVariableDimension:null},"top-left":{order:2,isInTopRow:!0,isInBottomRow:!1,isInLeftColumn:!1,isInRightColumn:!1,positionAlongVariableDimension:Th.START},"top-center":{order:3,isInTopRow:!0,isInBottomRow:!1,isInLeftColumn:!1,isInRightColumn:!1,positionAlongVariableDimension:Th.CENTER},"top-right":{order:4,isInTopRow:!0,isInBottomRow:!1,isInLeftColumn:!1,isInRightColumn:!1,positionAlongVariableDimension:Th.END},"top-right-corner":{order:5,isInTopRow:!0,isInBottomRow:!1,isInLeftColumn:!1,isInRightColumn:!0,positionAlongVariableDimension:null},"right-top":{order:6,isInTopRow:!1,isInBottomRow:!1,isInLeftColumn:!1,isInRightColumn:!0,positionAlongVariableDimension:Th.START},"right-middle":{order:7,isInTopRow:!1,isInBottomRow:!1,isInLeftColumn:!1,isInRightColumn:!0,positionAlongVariableDimension:Th.CENTER},"right-bottom":{order:8,isInTopRow:!1,isInBottomRow:!1,isInLeftColumn:!1,isInRightColumn:!0,positionAlongVariableDimension:Th.END},"bottom-right-corner":{order:9,isInTopRow:!1,isInBottomRow:!0,isInLeftColumn:!1,isInRightColumn:!0,positionAlongVariableDimension:null},"bottom-right":{order:10,isInTopRow:!1,isInBottomRow:!0,isInLeftColumn:!1,isInRightColumn:!1,positionAlongVariableDimension:Th.END},"bottom-center":{order:11,isInTopRow:!1,isInBottomRow:!0,isInLeftColumn:!1,isInRightColumn:!1,positionAlongVariableDimension:Th.CENTER},"bottom-left":{order:12,isInTopRow:!1,isInBottomRow:!0,isInLeftColumn:!1,isInRightColumn:!1,positionAlongVariableDimension:Th.START},"bottom-left-corner":{order:13,isInTopRow:!1,isInBottomRow:!0,isInLeftColumn:!0,isInRightColumn:!1,positionAlongVariableDimension:null},"left-bottom":{order:14,isInTopRow:!1,isInBottomRow:!1,isInLeftColumn:!0,isInRightColumn:!1,positionAlongVariableDimension:Th.END},"left-middle":{order:15,isInTopRow:!1,isInBottomRow:!1,isInLeftColumn:!0,isInRightColumn:!1,positionAlongVariableDimension:Th.CENTER},"left-top":{order:16,isInTopRow:!1,isInBottomRow:!1,isInLeftColumn:!0,isInRightColumn:!1,positionAlongVariableDimension:Th.START}},kh=(Ph=Rh,Object.keys(Ph).sort(function(t,e){return Ph[t].order-Ph[e].order})),Lh="vivliostyle-page-rule-master",Oh="_marginBoxes",_h=/*#__PURE__*/function(t){function e(e,u,n){var i;(i=t.call(this,e,null,Lh,[],u,null,0)||this).bodyPartitionKey=void 0,i.pageMarginBoxes={};var r=yh(n),o=new Mh(i.scope,I(i),n,r);return i.bodyPartitionKey=o.key,i.createPageMarginBoxes(n),i.applySpecified(n,r),i}N(e,t);var u=e.prototype;return u.createPageMarginBoxes=function(t){var e=this,u=t[Oh];u&&kh.forEach(function(n){u[n]&&(e.pageMarginBoxes[n]=new Uh(e.scope,e,n,t))})},u.applySpecified=function(t,e){for(var u in this.specified.position=new Yr($e.relative,0),this.specified.width=new Yr(e.width,0),this.specified.height=new Yr(e.height,0),t)Ih[u]||"background-clip"===u||(this.specified[u]=t[u])},u.createInstance=function(t){return new Vh(t,this)},e}(qD),Mh=/*#__PURE__*/function(t){function e(e,u,n,i){var r;return(r=t.call(this,e,null,null,[],u)||this).pageSize=void 0,r.pageSize=i,r.specified["z-index"]=new Yr(new Me(0),0),r.applySpecified(n),r}N(e,t);var u=e.prototype;return u.applySpecified=function(t){for(var e in this.specified["flow-from"]=new Yr(Le("body"),0),this.specified.position=new Yr($e.absolute,0),this.specified.overflow=new Yr($e.visible,0),Ih)Ih.hasOwnProperty(e)&&(this.specified[e]=t[e])},u.createInstance=function(t){return new Wh(t,this)},e}(QD),Uh=/*#__PURE__*/function(t){function e(e,u,n,i){var r;return(r=t.call(this,e,null,null,[],u)||this).marginBoxName=void 0,r.marginBoxName=n,r.applySpecified(i),r}N(e,t);var u=e.prototype;return u.applySpecified=function(t){var e=t[Oh][this.marginBoxName];for(var u in t){var n=e[u];(Or[u]||n&&n.value===$e.inherit)&&(this.specified[u]=t[u])}for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var r=e[i];r&&r.value!==xe&&r.value!==$e.inherit&&r.value!==$e.unset&&r.value!==$e.revert&&(this.specified[i]=r)}},u.createInstance=function(t){return new Xh(t,this)},e}(QD),Vh=/*#__PURE__*/function(t){function e(e,u){var n;return(n=t.call(this,e,u)||this).pageAreaDimension=null,n.pageMarginBoxInstances={},n}N(e,t);var u=e.prototype;return u.applyCascadeAndInit=function(e,u){var n=this.cascaded;for(var i in u)if(Object.prototype.hasOwnProperty.call(u,i))switch(i){case"writing-mode":case"direction":n[i]=u[i]}t.prototype.applyCascadeAndInit.call(this,e,u)},u.initHorizontal=function(){var t=this.style;t.left=tu,t["margin-left"]=tu,t["border-left-width"]=tu,t["padding-left"]=tu,t["padding-right"]=tu,t["border-right-width"]=tu,t["margin-right"]=tu,t.right=tu},u.initVertical=function(){var t=this.style;t.top=tu,t["margin-top"]=tu,t["border-top-width"]=tu,t["padding-top"]=tu,t["padding-bottom"]=tu,t["border-bottom-width"]=tu,t["margin-bottom"]=tu,t.bottom=tu},u.setPageAreaDimension=function(t){this.pageAreaDimension=t;var e=this.style;e.width=new je(t.borderBoxWidth),e.height=new je(t.borderBoxHeight),e["padding-left"]=new je(t.marginLeft),e["padding-right"]=new je(t.marginRight),e["padding-top"]=new je(t.marginTop),e["padding-bottom"]=new je(t.marginBottom)},u.adjustPageLayout=function(t,e,u){var n=e.marginBoxes,i={start:this.pageAreaDimension.marginLeft,end:this.pageAreaDimension.marginRight,extent:this.pageAreaDimension.borderBoxWidth},r={start:this.pageAreaDimension.marginTop,end:this.pageAreaDimension.marginBottom,extent:this.pageAreaDimension.borderBoxHeight};this.sizeMarginBoxesAlongVariableDimension(n.top,!0,i,t,u),this.sizeMarginBoxesAlongVariableDimension(n.bottom,!0,i,t,u),this.sizeMarginBoxesAlongVariableDimension(n.left,!1,r,t,u),this.sizeMarginBoxesAlongVariableDimension(n.right,!1,r,t,u)},u.sizeMarginBoxesAlongVariableDimension=function(t,e,u,n,i){var r=Th.START,o=Th.CENTER,a=Th.END,s=this.pageBox.scope,l={},D={},h={};for(var c in t){var d=Rh[c];if(d){var f=t[c],p=this.pageMarginBoxInstances[c],E=new Hh(f,p.style,e,s,i);l[d.positionAlongVariableDimension]=f,D[d.positionAlongVariableDimension]=p,h[d.positionAlongVariableDimension]=E}}var C={start:u.start.evaluate(n),end:u.end.evaluate(n),extent:u.extent.evaluate(n)},F=this.getSizesOfMarginBoxesAlongVariableDimension(h,C.extent),A=!1,g={};Object.keys(l).forEach(function(t){var r=t,o=ZD(s,D[r].style[e?"max-width":"max-height"],u.extent);if(o){var a=o.evaluate(n);if(F[r]>a){var c=h[r]=new Gh(l[r],D[r].style,e,s,i,a);g[r]=c.getOuterSize(),A=!0}}}),A&&(F=this.getSizesOfMarginBoxesAlongVariableDimension(h,C.extent),A=!1,[r,o,a].forEach(function(t){F[t]=g[t]||F[t]}));var v={};Object.keys(l).forEach(function(t){var r=t,o=ZD(s,D[r].style[e?"min-width":"min-height"],u.extent);if(o){var a=o.evaluate(n);if(F[r]<a){var c=h[r]=new Gh(l[r],D[r].style,e,s,i,a);v[r]=c.getOuterSize(),A=!0}}}),A&&(F=this.getSizesOfMarginBoxesAlongVariableDimension(h,C.extent),[r,o,a].forEach(function(t){F[t]=v[t]||F[t]}));var m=C.start+C.extent,B=C.start+(C.start+C.extent);[r,o,a].forEach(function(t){var u=F[t];if(u){var n=l[t],i=0;switch(t){case r:i=e?n.left:n.top;break;case o:i=(B-u)/2;break;case a:i=m-u}e?n.setHorizontalPosition(i,u-n.getInsetLeft()-n.getInsetRight()):n.setVerticalPosition(i,u-n.getInsetTop()-n.getInsetBottom())}})},u.getSizesOfMarginBoxesAlongVariableDimension=function(t,e){var u=t[Th.START],n=t[Th.CENTER],i=t[Th.END],r={};if(n){var o=[u,i].filter(function(t){return t}),a=o.length?new zh(o):null,s=this.distributeAutoMarginBoxSizes(n,a,e);s.xSize&&(r[Th.CENTER]=s.xSize);var l=(e-(s.xSize||n.getOuterSize()))/2;u&&u.hasAutoSize()&&(r[Th.START]=l),i&&i.hasAutoSize()&&(r[Th.END]=l)}else{var D=this.distributeAutoMarginBoxSizes(u,i,e);D.xSize&&(r[Th.START]=D.xSize),D.ySize&&(r[Th.END]=D.ySize)}return r},u.distributeAutoMarginBoxSizes=function(t,e,u){var n={xSize:null,ySize:null};if(t&&e)if(t.hasAutoSize()&&e.hasAutoSize()){var i=t.getOuterMaxContentSize(),r=e.getOuterMaxContentSize();if(i>0&&r>0){var o=i+r;if(o<u)n.xSize=u*i/o;else{var a=t.getOuterMinContentSize(),s=a+e.getOuterMinContentSize();s<u?n.xSize=a+(u-s)*(i-a)/(o-s):s>0&&(n.xSize=u*a/s)}n.xSize>0&&(n.ySize=u-n.xSize)}else i>0?n.xSize=u:r>0&&(n.ySize=u)}else t.hasAutoSize()?n.xSize=Math.max(u-e.getOuterSize(),0):e.hasAutoSize()&&(n.ySize=Math.max(u-t.getOuterSize(),0));else t?t.hasAutoSize()&&(n.xSize=u):e&&e.hasAutoSize()&&(n.ySize=u);return n},u.prepareContainer=function(e,u,n,i,r){t.prototype.prepareContainer.call(this,e,u,n,i,r),u.element.setAttribute("data-vivliostyle-page-box",!0)},e}(hh),Hh=/*#__PURE__*/function(){function t(t,e,u,n,i){this.container=void 0,this.isHorizontal=void 0,this.clientLayout=void 0,this.hasAutoSize_=void 0,this.size=null,this.container=t,this.isHorizontal=u,this.clientLayout=i;var r=e[u?"width":"height"];this.hasAutoSize_=!r||r===$e.auto||nu(r)}var e=t.prototype;return e.hasAutoSize=function(){return this.hasAutoSize_},e.getSize=function(){return this.size||(this.size=ja(this.clientLayout,this.container.element,this.isHorizontal?[Wa.MAX_CONTENT_WIDTH,Wa.MIN_CONTENT_WIDTH]:[Wa.MAX_CONTENT_HEIGHT,Wa.MIN_CONTENT_HEIGHT])),this.size},e.getOuterMaxContentSize=function(){var t=this.getSize();return this.isHorizontal?this.container.getInsetLeft()+t[Wa.MAX_CONTENT_WIDTH]+this.container.getInsetRight():this.container.getInsetTop()+t[Wa.MAX_CONTENT_HEIGHT]+this.container.getInsetBottom()},e.getOuterMinContentSize=function(){var t=this.getSize();return this.isHorizontal?this.container.getInsetLeft()+t[Wa.MIN_CONTENT_WIDTH]+this.container.getInsetRight():this.container.getInsetTop()+t[Wa.MIN_CONTENT_HEIGHT]+this.container.getInsetBottom()},e.getOuterSize=function(){return this.isHorizontal?this.container.getInsetLeft()+this.container.width+this.container.getInsetRight():this.container.getInsetTop()+this.container.height+this.container.getInsetBottom()},t}(),zh=/*#__PURE__*/function(){function t(t){this.params=void 0,this.params=t}var e=t.prototype;return e.hasAutoSize=function(){return this.params.some(function(t){return t.hasAutoSize()})},e.getOuterMaxContentSize=function(){var t=this.params.map(function(t){return t.getOuterMaxContentSize()});return Math.max.apply(null,t)*t.length},e.getOuterMinContentSize=function(){var t=this.params.map(function(t){return t.getOuterMinContentSize()});return Math.max.apply(null,t)*t.length},e.getOuterSize=function(){var t=this.params.map(function(t){return t.getOuterSize()});return Math.max.apply(null,t)*t.length},t}(),Gh=/*#__PURE__*/function(t){function e(e,u,n,i,r,o){var a;return(a=t.call(this,e,u,n,i,r)||this).fixedSize=void 0,a.fixedSize=o,a}N(e,t);var u=e.prototype;return u.hasAutoSize=function(){return!1},u.getOuterMaxContentSize=function(){return this.getOuterSize()},u.getOuterMinContentSize=function(){return this.getOuterSize()},u.getOuterSize=function(){return this.isHorizontal?this.container.getInsetLeft()+this.fixedSize+this.container.getInsetRight():this.container.getInsetTop()+this.fixedSize+this.container.getInsetBottom()},e}(Hh),Wh=/*#__PURE__*/function(t){function e(e,u){var n;return(n=t.call(this,e,u)||this).borderBoxWidth=null,n.borderBoxHeight=null,n.marginTop=null,n.marginRight=null,n.marginBottom=null,n.marginLeft=null,n}N(e,t);var u=e.prototype;return u.applyCascadeAndInit=function(e,u){var n=this.cascaded;for(var i in u)Object.prototype.hasOwnProperty.call(u,i)&&(i.match(/^column.*$/)||i.match(/^background-/))&&(n[i]=u[i]);t.prototype.applyCascadeAndInit.call(this,e,u),this.parentInstance.setPageAreaDimension({borderBoxWidth:this.borderBoxWidth,borderBoxHeight:this.borderBoxHeight,marginTop:this.marginTop,marginRight:this.marginRight,marginBottom:this.marginBottom,marginLeft:this.marginLeft})},u.initHorizontal=function(){var t=this.resolvePageBoxDimensions({start:"left",end:"right",extent:"width"});this.borderBoxWidth=t.borderBoxExtent,this.marginLeft=t.marginStart,this.marginRight=t.marginEnd},u.initVertical=function(){var t=this.resolvePageBoxDimensions({start:"top",end:"bottom",extent:"height"});this.borderBoxHeight=t.borderBoxExtent,this.marginTop=t.marginStart,this.marginBottom=t.marginEnd},u.resolvePageBoxDimensions=function(t){var e=this.style,u=this.pageBox.scope,n=t.start,i=t.end,r=t.extent,o=this.pageBox.pageSize[r].toExpr(u,null),a=ZD(u,e[r],o),s=ZD(u,e["margin-"+n],o),l=ZD(u,e["margin-"+i],o),D=JD(u,e["padding-"+n],o),h=JD(u,e["padding-"+i],o),c=eh(u,e["border-"+n+"-width"],e["border-"+n+"-style"],o),d=eh(u,e["border-"+i+"-width"],e["border-"+i+"-style"],o),f=me(u,o,ve(u,ve(u,c,D),ve(u,d,h)));return a?(f=me(u,f,a),s||l?s?l=me(u,f,s):s=me(u,f,l):l=s=Be(u,f,new Ee(u,.5))):(s||(s=u.zero),l||(l=u.zero),a=me(u,f,ve(u,s,l))),this.hasBorderOrOutline()||s instanceof De&&s.num<0||l instanceof De&&l.num<0?(e[n]=new je(s),e[i]=new je(l),e["margin-"+n]=tu,e["margin-"+i]=tu,e["border-"+n+"-width"]=new je(c),e["border-"+i+"-width"]=new je(d)):(e[n]=tu,e[i]=tu,e["margin-"+n]=tu,e["margin-"+i]=tu,e["border-"+n+"-width"]=new je(s),e["border-"+i+"-width"]=new je(l),e["border-"+n+"-style"]=$e.solid,e["border-"+i+"-style"]=$e.solid,e["border-"+n+"-color"]=$e.transparent,e["border-"+i+"-color"]=$e.transparent,e["background-clip"]=$e.padding_box),e["padding-"+n]=new je(D),e["padding-"+i]=new je(h),e[r]=new je(a),e["max-"+r]=new je(a),{borderBoxExtent:me(u,o,ve(u,s,l)),marginStart:s,marginEnd:l}},u.hasBorderOrOutline=function(){var t=this,e=function(e){var u,n=null==(u=uo(t.cascaded,e))?void 0:u.value;return!!n&&n!==$e.none};return e("border-top-style")||e("border-bottom-style")||e("border-left-style")||e("border-right-style")||e("border-block-start-style")||e("border-block-end-style")||e("border-inline-start-style")||e("border-inline-end-style")||e("outline-style")},u.prepareContainer=function(e,u,n,i,r){t.prototype.prepareContainer.call(this,e,u,n,i,r),n.pageAreaElement=u.element,e.pageAreaWidth=parseFloat(n.pageAreaElement.style.width),e.pageAreaHeight=parseFloat(n.pageAreaElement.style.height)},e}(dh),Xh=/*#__PURE__*/function(t){function e(e,u){var n;(n=t.call(this,e,u)||this).boxInfo=void 0,n.suppressEmptyBoxGeneration=!0;var i=u.marginBoxName;return n.boxInfo=Rh[i],e.pageMarginBoxInstances[i]=I(n),n}N(e,t);var u=e.prototype;return u.prepareContainer=function(e,u,n,i,r){this.applyVerticalAlign(e,u.element),t.prototype.prepareContainer.call(this,e,u,n,i,r)},u.applyVerticalAlign=function(t,e){Z(e,"display","flex"),Z(e,"flex-flow",this.vertical?this.rtl?"row-reverse":"row":"column");var u=this.getProp(t,"vertical-align"),n=null;u===Le("middle")?n="center":u===Le("top")?n="flex-start":u===Le("bottom")&&(n="flex-end"),n&&Z(e,"justify-content",n);var i=this.getProp(t,"content");if(this.vertical||i instanceof Ve||i instanceof je&&i.expr instanceof de&&i.expr.str.startsWith("running-element-")){var r="center";(this.boxInfo.isInTopRow||this.boxInfo.isInBottomRow)&&(this.boxInfo.isInLeftColumn||this.boxInfo.positionAlongVariableDimension===Th.END?r=this.vertical||this.rtl?"start":"end":(this.boxInfo.isInRightColumn||this.boxInfo.positionAlongVariableDimension===Th.START)&&(r=this.vertical||this.rtl?"end":"start")),Z(e,"align-items",r)}},u.positionAlongVariableDimension=function(t,e){var u=this.style,n=this.pageBox.scope,i=t.start,r=t.end,o="left"===i,a=o?e.borderBoxWidth:e.borderBoxHeight,s=ZD(n,u[t.extent],a),l=o?e.marginLeft:e.marginTop;if(this.boxInfo.positionAlongVariableDimension===Th.START)u[i]=new je(l);else if(s){var D=JD(n,u["margin-"+i],a),h=JD(n,u["margin-"+r],a),c=JD(n,u["padding-"+i],a),d=JD(n,u["padding-"+r],a),f=eh(n,u["border-"+i+"-width"],u["border-"+i+"-style"],a),p=eh(n,u["border-"+r+"-width"],u["border-"+r+"-style"],a),E=ve(n,s,ve(n,ve(n,c,d),ve(n,ve(n,f,p),ve(n,D,h))));switch(this.boxInfo.positionAlongVariableDimension){case Th.CENTER:u[i]=new je(ve(n,l,we(n,me(n,a,E),new Ee(n,2))));break;case Th.END:u[i]=new je(me(n,ve(n,l,a),E))}}},u.positionAndSizeAlongFixedDimension=function(t,e){var u=this.style,n=this.pageBox.scope,i=t.inside,r=t.outside,o=t.extent,a=e["margin"+r.charAt(0).toUpperCase()+r.substring(1)],s=th(n,u["margin-"+i],a),l=th(n,u["margin-"+r],a),D=JD(n,u["padding-"+i],a),h=JD(n,u["padding-"+r],a),c=eh(n,u["border-"+i+"-width"],u["border-"+i+"-style"],a),d=eh(n,u["border-"+r+"-width"],u["border-"+r+"-style"],a),f=ZD(n,u[o],a),p=null;function E(t){if(p)return p;p={extent:f?f.evaluate(t):null,marginInside:s?s.evaluate(t):null,marginOutside:l?l.evaluate(t):null};var e=a.evaluate(t),u=0;return[c,D,h,d].forEach(function(e){e&&(u+=e.evaluate(t))}),(null===p.marginInside||null===p.marginOutside)&&u+p.extent+p.marginInside+p.marginOutside>e&&(null===p.marginInside&&(p.marginInside=0),null===p.marginOutside&&(p.marginOutside=0)),null!==p.extent&&null!==p.marginInside&&null!==p.marginOutside&&(p.marginOutside=null),null===p.extent&&null!==p.marginInside&&null!==p.marginOutside?p.extent=e-u-p.marginInside-p.marginOutside:null!==p.extent&&null===p.marginInside&&null!==p.marginOutside?p.marginInside=e-u-p.extent-p.marginOutside:null!==p.extent&&null!==p.marginInside&&null===p.marginOutside?p.marginOutside=e-u-p.extent-p.marginInside:null===p.extent?(p.marginInside=p.marginOutside=0,p.extent=e-u):p.marginInside=p.marginOutside=(e-u-p.extent)/2,p}u[o]=new je(new de(n,function(){var t=E(this).extent;return null===t?0:t},o)),u["margin-"+i]=new je(new de(n,function(){var t=E(this).marginInside;return null===t?0:t},"margin-"+i)),u["margin-"+r]=new je(new de(n,function(){var t=E(this).marginOutside;return null===t?0:t},"margin-"+r)),"left"===i?u.left=new je(ve(n,e.marginLeft,e.borderBoxWidth)):"top"===i&&(u.top=new je(ve(n,e.marginTop,e.borderBoxHeight)))},u.initHorizontal=function(){var t=this.parentInstance.pageAreaDimension;this.boxInfo.isInLeftColumn?this.positionAndSizeAlongFixedDimension({inside:"right",outside:"left",extent:"width"},t):this.boxInfo.isInRightColumn?this.positionAndSizeAlongFixedDimension({inside:"left",outside:"right",extent:"width"},t):this.positionAlongVariableDimension({start:"left",end:"right",extent:"width"},t)},u.initVertical=function(){var t=this.parentInstance.pageAreaDimension;this.boxInfo.isInTopRow?this.positionAndSizeAlongFixedDimension({inside:"bottom",outside:"top",extent:"height"},t):this.boxInfo.isInBottomRow?this.positionAndSizeAlongFixedDimension({inside:"top",outside:"bottom",extent:"height"},t):this.positionAlongVariableDimension({start:"top",end:"bottom",extent:"height"},t)},u.finishContainer=function(e,u,n,i,r,o,a){t.prototype.finishContainer.call(this,e,u,n,i,r,o,a);var s=n.marginBoxes,l=this.pageBox.marginBoxName,D=this.boxInfo;D.isInLeftColumn||D.isInRightColumn?D.isInTopRow||D.isInBottomRow||(D.isInLeftColumn?s.left[l]=u:D.isInRightColumn&&(s.right[l]=u)):D.isInTopRow?s.top[l]=u:D.isInBottomRow&&(s.bottom[l]=u)},e}(dh),jh=/*#__PURE__*/function(){function t(t,e,u,n,i){this.cascadeInstance=void 0,this.pageScope=void 0,this.rootPageBoxInstance=void 0,this.context=void 0,this.docElementStyle=void 0,this.pageMasterCache={},this.cascadeInstance=t,this.pageScope=e,this.rootPageBoxInstance=u,this.context=n,this.docElementStyle=i,this.definePageProgression()}var e=t.prototype;return e.definePageProgression=function(){var t=this.pageScope,e=this.context,u=e.isVersoFirstPage,n=new he(t,"page-number"),i=new ne(t,new le(t,n,new Ee(t,2)),u?t.one:t.zero);t.defineName("recto-page",new Xt(t,i)),t.defineName("verso-page",i),(e.pageProgression||Fh(this.docElementStyle))===exports.PageProgression.LTR?(t.defineName("left-page",i),t.defineName("right-page",new Xt(t,i))):(t.defineName("left-page",new Xt(t,i)),t.defineName("right-page",i))},e.getCascadedPageStyle=function(t){var e={};return this.cascadeInstance.pushRule([],t,e),this.cascadeInstance.popRule(),e},e.getPageRulePageMaster=function(t,e){var u=t.pageBox;if(0===Object.keys(e).length)return u.resetScope(),t;var n=this.makeCacheKey(e,u),i=this.pageMasterCache[n];return i||(i=u.pseudoName===lh?this.generatePageRuleMaster(e):this.generateCascadedPageMaster(e,u),this.pageMasterCache[n]=i),i.pageBox.resetScope(),i},e.makeCacheKey=function(t,e){var u=this.makeCascadeValueObjectKey(t);return e.key+"^"+u},e.makeCascadeValueObjectKey=function(t){var e=[];for(var u in t)if(Object.prototype.hasOwnProperty.call(t,u)){var n,i=t[u];n=i instanceof Yr?""+i.value:this.makeCascadeValueObjectKey(i),e.push(u+n+(i.priority||""))}return e.sort().join("^")},e.generatePageRuleMaster=function(t){var e=new _h(this.pageScope,this.rootPageBoxInstance.pageBox,t).createInstance(this.rootPageBoxInstance);return e.applyCascadeAndInit(this.cascadeInstance,this.docElementStyle),e.resolveAutoSizing(this.context),e},e.generateCascadedPageMaster=function(t,e){var u=e.clone({pseudoName:Lh}),n=u.specified,i=t.size;if(i&&!nu(i.value)){var r=yh(t),o=i.priority;Qr(n,"width",new Yr(r.width,o),this.context),Qr(n,"height",new Yr(r.height,o),this.context)}["counter-reset","counter-increment"].forEach(function(e){n[e]&&(t[e]=n[e])});var a=u.createInstance(this.rootPageBoxInstance);return a.applyCascadeAndInit(this.cascadeInstance,this.docElementStyle),a.resolveAutoSizing(this.context),a},t}(),Kh=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this)||this).pageType=void 0,u.pageType=e,u}N(e,t);var u=e.prototype;return u.apply=function(t){t.currentPageType===this.pageType&&this.chained.apply(t)},u.getPriority=function(){return 3},u.makePrimary=function(t){return this.chained&&t.insertInTable(t.pagetypes,this.pageType,this.chained),!0},e}(Ao),Yh=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this)||this).scope=void 0,u.scope=e,u}N(e,t);var u=e.prototype;return u.apply=function(t){1===new he(this.scope,"page-number").evaluate(t.context)&&this.chained.apply(t)},u.getPriority=function(){return 2},e}(Ao),qh=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this)||this).scope=void 0,u.scope=e,u}N(e,t);var u=e.prototype;return u.apply=function(t){new he(this.scope,"blank-page").evaluate(t.context)&&this.chained.apply(t)},u.getPriority=function(){return 2},e}(Ao),$h=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this)||this).scope=void 0,u.scope=e,u}N(e,t);var u=e.prototype;return u.apply=function(t){new he(this.scope,"left-page").evaluate(t.context)&&this.chained.apply(t)},u.getPriority=function(){return 1},e}(Ao),Qh=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this)||this).scope=void 0,u.scope=e,u}N(e,t);var u=e.prototype;return u.apply=function(t){new he(this.scope,"right-page").evaluate(t.context)&&this.chained.apply(t)},u.getPriority=function(){return 1},e}(Ao),Zh=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this)||this).scope=void 0,u.scope=e,u}N(e,t);var u=e.prototype;return u.apply=function(t){new he(this.scope,"recto-page").evaluate(t.context)&&this.chained.apply(t)},u.getPriority=function(){return 1},e}(Ao),Jh=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this)||this).scope=void 0,u.scope=e,u}N(e,t);var u=e.prototype;return u.apply=function(t){new he(this.scope,"verso-page").evaluate(t.context)&&this.chained.apply(t)},u.getPriority=function(){return 1},e}(Ao),tc=/*#__PURE__*/function(t){function e(e,u,n){var i;return(i=t.call(this,u,n)||this).scope=void 0,i.a=void 0,i.b=void 0,i.scope=e,i.a=u,i.b=n,i}N(e,t);var u=e.prototype;return u.apply=function(t){var e=t.context,u=e.layoutPositionAtPageStart.page;e.blankPageAtStart&&u--,u&&this.matchANPlusB(u)&&this.chained.apply(t)},u.getPriority=function(){return 2},e}(Ro),ec=/*#__PURE__*/function(t){function e(e,u){return t.call(this,e,u,null,null,null)||this}return N(e,t),e.prototype.apply=function(t){!function(t,e,u,n,i){lo(t,e,u,n,null,null,null);var r=u[Oh];if(r){var o=ro(e,Oh);for(var a in r)if(r.hasOwnProperty(a)){var s=o[a];s||(o[a]=s={}),lo(t,s,r[a],n,null,null,null)}}}(t.context,t.currentStyle,this.style,this.specificity)},e}(Fo),uc=/*#__PURE__*/function(t){function e(e,u,n,i,r){var o;return(o=t.call(this,e,u,null==n?void 0:n.condition,n,null,i,!1)||this).pageProps=void 0,o.currentPageSelectors=[],o.currentNamedPageSelector="",o.currentPseudoPageClassSelectors=[],o.pageProps=r,o}N(e,t);var u=e.prototype;return u.startPageRule=function(){this.startSelectorRule()},u.tagSelector=function(t,e){this.currentNamedPageSelector=e,e&&(this.chain.push(new Kh(e)),this.specificity+=65536)},u.pseudoclassSelector=function(t,e){if(t=t.toLowerCase(),e)if("nth"===t){var u=e[0],n=e[1];this.currentPseudoPageClassSelectors.push(":"+t+"("+u+"n"+(n<0?n:"+"+n)+")"),this.chain.push(new tc(this.scope,u,n)),this.specificity+=256}else this.reportAndSkip("E_INVALID_PAGE_SELECTOR :"+t+"("+e.join("")+")");else switch(this.currentPseudoPageClassSelectors.push(":"+t),t){case"first":this.chain.push(new Yh(this.scope)),this.specificity+=256;break;case"blank":this.chain.push(new qh(this.scope)),this.specificity+=256;break;case"left":this.chain.push(new $h(this.scope)),this.specificity+=1;break;case"right":this.chain.push(new Qh(this.scope)),this.specificity+=1;break;case"recto":this.chain.push(new Zh(this.scope)),this.specificity+=1;break;case"verso":this.chain.push(new Jh(this.scope)),this.specificity+=1;break;default:this.reportAndSkip("E_INVALID_PAGE_SELECTOR :"+t)}},u.finishSelector=function(){var t;t=this.currentNamedPageSelector||this.currentPseudoPageClassSelectors.length?[this.currentNamedPageSelector].concat(this.currentPseudoPageClassSelectors.sort()):null,this.currentPageSelectors.push({selectors:t,specificity:this.specificity}),this.currentNamedPageSelector="",this.currentPseudoPageClassSelectors=[]},u.nextSelector=function(){this.finishSelector(),t.prototype.nextSelector.call(this)},u.startRuleBody=function(){this.finishSelector(),t.prototype.startRuleBody.call(this)},u.simpleProperty=function(e,u,n){if("bleed"!==e&&"marks"!==e||this.currentPageSelectors.some(function(t){return null===t.selectors})){t.prototype.simpleProperty.call(this,e,u,n);var i=uo(this.elementStyle,e),r=this.pageProps;if("bleed"===e||"marks"===e)r[""]||(r[""]={}),Object.keys(r).forEach(function(t){no(r[t],e,i)});else if("size"===e){var o=r[""];this.currentPageSelectors.forEach(function(t){var u=new Yr(i.value,i.priority+t.specificity),n=t.selectors?t.selectors.join(""):"",a=r[n];a?Qr(a,e,u):(no(a=r[n]={},e,u),o&&["bleed","marks"].forEach(function(t){o[t]&&no(a,t,o[t])}))})}}},u.insertNonPrimary=function(t){this.cascade.insertInTable(this.cascade.pagetypes,"*",t)},u.makeApplyRuleAction=function(t){return new ec(this.elementStyle,t)},u.startPageMarginBoxRule=function(t){var e=ro(this.elementStyle,Oh),u=e[t];u||(e[t]=u={});var n=new nc(this.scope,this.owner,this.validatorSet,u);this.owner.pushHandler(n)},e}(Ea),nc=/*#__PURE__*/function(t){function e(e,u,n,i){var r;return(r=t.call(this,e,u,!1)||this).validatorSet=void 0,r.boxStyle=void 0,r.validatorSet=n,r.boxStyle=i,r}N(e,t);var u=e.prototype;return u.property=function(t,e,u){this.validatorSet.validatePropertyAndHandleShorthand(t,e,u,this)},u.invalidPropertyValue=function(t,e){this.report("E_INVALID_PROPERTY_VALUE "+t+": "+e.toString())},u.unknownProperty=function(t,e){this.report("E_INVALID_PROPERTY "+t+": "+e.toString())},u.simpleProperty=function(t,e,u){var n=u?this.getImportantSpecificity():this.getBaseSpecificity(),i=new Yr(e,n);no(this.boxStyle,t,i)},e}(Di),ic=!0,rc=[];function oc(t,e){return t===e||(t.src||e.src?t.src===e.src:t.textContent===e.textContent)}function ac(t){var e=Array.from(t.querySelectorAll("body > :not(script):not(link):not(style) ~ script"));return Array.from(t.querySelectorAll("head > script, body > script")).filter(function(t){return!e.includes(t)})}function sc(t,e,u){if(!ic)return Tn(!1);if((null==u||!u.inHead)&&(null==u||!u.atEnd)&&ac(t.ownerDocument).includes(t))return Tn(!1);var n=t.textContent,i=t.src,r="module"===t.type,o=(r||i)&&t.async,a=r&&!o||i&&t.defer,s=!(null!=u&&u.atEnd)&&((null==u?void 0:u.forceDefer)||a||o);if(Dc(e)||(e.onload=null),s)return rc.some(function(e){return oc(e,t)})||rc.push(t),Tn(!0);if(i.includes("/mathjax")){var l,h,c=e.document.head.querySelector("script[src*='MathJax.js']:not([data-vivliostyle-scripting])");if(c)if(i.includes("/mathjax@3"))e.document.head.removeChild(c),null!=(l=e.MathJax)&&null!=(h=l.version)&&h.startsWith("2.")&&delete e.MathJax;else if(i.includes("/MathJax.js"))return Tn(!0)}for(var d,f=R(e.document.head.getElementsByTagName("script"));!(d=f()).done;){var p=d.value;p.hasAttribute("data-vivliostyle-scripting")&&oc(p,t)&&e.document.head.removeChild(p)}var E=e.document.createElement("script");E.textContent=n,i&&(E.src=i),E.async=o,E.defer=a,E.setAttribute("data-vivliostyle-scripting","true");for(var C,F=R(t.attributes);!(C=F()).done;){var A=C.value;["src","async","defer"].includes(A.name)||E.setAttribute(A.name,A.value)}if(D.debug("script:",i),i){var g=ei(E);return e.document.head.appendChild(E),zn([g])}return e.document.head.appendChild(E),Tn(!0)}function lc(t,e){for(var u={},n=function t(e){var n,i=null==(n=e["font-family"])?void 0:n.value;if(i)if(i.values)for(var r,o=R(i.values);!(r=o()).done;)u[r.value.stringValue()]=!0;else u[i.stringValue()]=!0;var a=e._marginBoxes;if(a)for(var s=0,l=Object.values(a);s<l.length;s++)t(l[s])},i=function t(e){if(e instanceof Fo)n(e.style);else if(e instanceof po||Array.isArray(e))for(var u=0,i=Object.values(e);u<i.length;u++)t(i[u])},r=0,o=Object.values(e.cascade.code);r<o.length;r++)for(var a=o[r],s=0,l=Object.values(null!=a?a:{});s<l.length;s++)i(l[s]);for(var D,h=R(t.querySelectorAll("[style]"));!(D=h()).done;){var c,d=D.value;null!=(c=d.style)&&c.fontFamily&&(u[d.style.fontFamily]=!0)}return Object.keys(u).join(",")}function Dc(t){return!!ic&&(rc.length>0||!!t.document.head.querySelector("script[data-vivliostyle-scripting]"))}var hc=function(t,e,u){return t.replace(/[uU][rR][lL]\(\s*"((\\([^0-9a-fA-F]+|[0-9a-fA-F]+\s*)|[^"\r\n])+)"/gm,function(t,n){return'url("'+u.transformURL(n,e)+'"'}).replace(/[uU][rR][lL]\(\s*'((\\([^0-9a-fA-F]+|[0-9a-fA-F]+\s*)|[^'\r\n])+)'/gm,function(t,n){return"url('"+u.transformURL(n,e)+"'"}).replace(/[uU][rR][lL]\(\s*((\\([^0-9a-fA-F]+|[0-9a-fA-F]+\s*)|[^"'\r\n\)\s])+)/gm,function(t,n){return"url("+u.transformURL(n,e)})},cc={},dc=/*#__PURE__*/function(t){function e(e,u,n,i,r,o,a,s,l,D,h,c,d){var f;return(f=t.call(this)||this).flowName=void 0,f.context=void 0,f.viewport=void 0,f.styler=void 0,f.regionIds=void 0,f.xmldoc=void 0,f.docFaces=void 0,f.footnoteStyle=void 0,f.stylerProducer=void 0,f.page=void 0,f.customRenderer=void 0,f.fallbackMap=void 0,f.documentURLTransformer=void 0,f.document=void 0,f.exprContentListener=void 0,f.nodeContext=null,f.viewRoot=null,f.isFootnote=!1,f.sourceNode=null,f.offsetInNode=0,f.viewNode=null,f.flowName=e,f.context=u,f.viewport=n,f.styler=i,f.regionIds=r,f.xmldoc=o,f.docFaces=a,f.footnoteStyle=s,f.stylerProducer=l,f.page=D,f.customRenderer=h,f.fallbackMap=c,f.documentURLTransformer=d,f.document=n.document,f.exprContentListener=i.counterListener.getExprContentListener(),f}N(e,t);var u=e.prototype;return u.clone=function(){return new e(this.flowName,this.context,this.viewport,this.styler,this.regionIds,this.xmldoc,this.docFaces,this.footnoteStyle,this.stylerProducer,this.page,this.customRenderer,this.fallbackMap,this.documentURLTransformer)},u.createPseudoelementShadow=function(t,e,u,n,i,r,o,a){var s=this.getPseudoMap(u,this.regionIds,this.isFootnote,this.nodeContext,r);if(!s)return a;for(var l,D=[],h=Ys.createElementNS(H.SHADOW,"root"),c=h,d=R(qs);!(l=d()).done;){var f=l.value,p=void 0;if(f){if(!s[f])continue;if(!("footnote-marker"!=f||e&&this.isFootnote))continue;if(f.match(/^first-/)){var E=n.display;if(!E||E===$e.inline)continue;var C=t.firstElementChild;if(C&&pr(C.previousSibling)){var F=i.getStyle(C,!1);if(F){var A=uo(F,"display");if(null!=A&&A.value&&A.value!==$e.inline)continue}}}if("before"===f||"after"===f){var g=s[f].content;if(!g||!Lr(g.value))continue}D.push(f),Zs(p=Ys.createElementNS(H.XHTML,"span"),f)}else p=Ys.createElementNS(H.SHADOW,"content");c.appendChild(p),f.match(/^first-/)&&(c=p)}if(!D.length)return a;var v=new Js(t,u,i,r,this.exprContentListener);return new yr(t,h,null,o,a,wr.ROOTLESS,v)},u.getPseudoMap=function(t,e,u,n,i){var r=io(t,"_pseudos");if(!r)return null;var o={},a=function(){var t=o[s]={};Pa(t,r[s],i),ba(t,i,r[s]),Ia(r[s],e,u,function(e,u){Pa(t,u,i),Na(u,function(e){Pa(t,e,i)})})};for(var s in r)a();return o},u.createRefShadow=function(t,e,u,n,i){var r=this,o=xn("createRefShadow");return this.xmldoc.store.load(t).then(function(a){var s=a;if(s){var l=s.getElement(t);if(l){var D=r.stylerProducer.getStylerForDoc(s);i=new yr(u,l,s,n,i,e,D)}}o.finish(i)}),o.result()},u.createShadows=function(t,e,u,n,i,r,o){var a=this,s=xn("createShadows"),l=n.template;return(l instanceof Ve?this.createRefShadow(l.url,wr.ROOTLESS,t,o,null):Tn(null)).then(function(l){var D=null;if(t.namespaceURI==H.SHADOW&&"include"==t.localName){var h=t.getAttribute("href"),c=null;h?c=o?o.xmldoc:a.xmldoc:o&&(h=o.owner.namespaceURI==H.XHTML?o.owner.getAttribute("href"):o.owner.getAttributeNS(H.XLINK,"href"),c=o.parentShadow?o.parentShadow.xmldoc:a.xmldoc),h&&(h=W(h,c.url),D=a.createRefShadow(h,wr.ROOTED,t,o,l))}null==D&&(D=Tn(l));var d=null;D.then(function(e){if(n.display===$e.table_cell){var u=W("user-agent.xml#table-cell",z);d=a.createRefShadow(u,wr.ROOTLESS,t,o,e)}else d=Tn(e)}),d.then(function(l){l=a.createPseudoelementShadow(t,e,u,n,i,r,o,l),s.finish(l)})}),s.result()},u.setViewRoot=function(t,e){this.viewRoot=t,this.isFootnote=e},u.computeStyle=function(t,e,u,n){var i,r=this,o=this.context,a=Ta(u,o,this.regionIds,this.isFootnote),s=!(null!=(i=this.nodeContext)&&i.parent);s&&(!a["writing-mode"]&&this.styler.rootStyle["writing-mode"]&&(a["writing-mode"]=this.styler.rootStyle["writing-mode"]),!a.direction&&this.styler.rootStyle.direction&&(a.direction=this.styler.rootStyle.direction));var l=t;t=Sa(a,o,t);var D=!s&&t!==l;if(e=xa(a,o,e),Ra(a,n,t,e,function(e,u){var n;D&&(t?/^(min-|max-)?(height|inline-size)$/.test(e)&&(n=o.pageAreaHeight):/^(min-|max-)?(width|inline-size)$/.test(e)&&(n=o.pageAreaWidth));var i=u.evaluate(o,e,n,t);return"font-family"==e&&(i=r.docFaces.filterFontFamily(i)),i}),D){var h=n[t?"height":"width"];h&&h!==$e.auto||(n[t?"height":"width"]=$e.max_content)}if(ss(n.position))return n.position=$e.fixed,n.visibility=$e.hidden,t;var c=ls(n.display||$e.inline,n.position,n.float,this.sourceNode===this.xmldoc.root);return["display","position","float"].forEach(function(t){c[t]&&(n[t]=c[t])}),t},u.inheritFromSourceParent=function(t){for(var e=this.nodeContext.sourceNode,u=[],n=null,i=this.nodeContext.shadowContext,r=-1;e&&1==e.nodeType;){var o=i&&i.root==e;if(!o||i.type==wr.ROOTLESS){var a=(i?i.styler:this.styler).getStyle(e,!1);u.push(a),n=n||tt(e)}o?(e=i.owner,i=i.parentShadow):(e=e.parentNode,r++)}for(var s=this.context.queryUnitSize("em",0===r),l={"font-size":new Yr(new Oe(s,"px"),0)},D=new ho(l,this.context),h=u.length-1;h>=0;--h){var c=u[h],d=[];for(var f in c)eo(f)&&d.push(f);d.sort(iu);for(var p=void 0,E=void 0,C=0,F=d;C<F.length;C++){var A=F[C];D.setPropName(A);var g=uo(c,A),v=g;nu(g.value)||("font-size"===A&&h===u.length-1&&this.context.isRelativeRootFontSize&&this.context.rootFontSize?v=new Yr(new Oe(this.context.rootFontSize,"px"),g.priority):"line-height"===A&&h===u.length-1&&this.context.rootLineHeight&&g.value instanceof Oe&&("lh"===g.value.unit||"rlh"===g.value.unit)?v=new Yr(new Oe(this.context.rootLineHeight,"px"),g.priority):0===h&&g.value instanceof Oe&&"lh"===g.value.unit?v=new Yr(new Oe(g.value.num*this.getLineHeightUnitSize(A,p,E),"px"),g.priority):ru(A)||(v=g.filterValue(D)),"font-size"===A?p=v.value:"line-height"===A&&(E=v.value),l[A]=v)}}for(var m in t)eo(m)||(l[m]=t[m]);return{lang:n,elementStyle:l}},u.resolveURL=function(t){return t=W(t,this.xmldoc.url),this.fallbackMap[t]||t},u.inheritLangAttribute=function(){this.nodeContext.lang=tt(this.nodeContext.sourceNode)||this.nodeContext.parent&&this.nodeContext.parent.lang||this.nodeContext.lang},u.transferPolyfilledInheritedProps=function(t){var e=Mr().filter(function(e){return t[e]});if(e.length){var u=this.nodeContext.inheritedProps;if(this.nodeContext.parent)for(var n in u=this.nodeContext.inheritedProps={},this.nodeContext.parent.inheritedProps)u[n]=this.nodeContext.parent.inheritedProps[n];e.forEach(function(e){var n=t[e];if(n){if(nu(n))n===$e.initial&&(u[e]=void 0);else if(n instanceof Me)u[e]=n.num;else if(n instanceof ke)u[e]=n.name;else if(n instanceof Oe){var i=n;switch(i.unit){case"dpi":case"dpcm":case"dppx":u[e]=i.num*Lt[i.unit];break;default:u[e]=n}}else u[e]=n;["widows","orphans"].includes(e)||delete t[e]}})}},u.resolveFormattingContext=function(t,e,u,n,i,r){for(var o=f(exports.HOOKS.RESOLVE_FORMATTING_CONTEXT),a=0;a<o.length;a++){var s=o[a](t,e,u,n,i,r);if(s)return void(t.formattingContext=s)}},u.createElementView=function(t,e){var u,n,i=this,r=!0,o=xn("createElementView"),a=this.sourceNode,s=this.nodeContext.shadowContext?this.nodeContext.shadowContext.styler:this.styler,l=s.getStyle(a,!1);if(!this.nodeContext.shadowContext){var h=this.xmldoc.getElementOffset(a);_i.registerFragmentIndex(h,this.nodeContext.fragmentIndex,0)}var c={};if(!this.nodeContext.parent){var d=this.inheritFromSourceParent(l);l=d.elementStyle,this.nodeContext.lang=d.lang}var f=l.position,p=l.float,E=l["float-reference"],C=p&&!nu(p.value)&&p.value!==$e.none&&E&&!nu(E.value)?function(t){switch(t){case"inline":return Ka.INLINE;case"column":return Ka.COLUMN;case"region":return Ka.REGION;case"page":return Ka.PAGE;default:throw new Error("Unknown float-reference: "+t)}}(E.value.toString()):null;if(this.nodeContext.parent&&(ss(null==f?void 0:f.value)||C&&Ya(C))){var F=this.inheritFromSourceParent(l);l=F.elementStyle,this.nodeContext.lang=F.lang}this.nodeContext.vertical=this.computeStyle(this.nodeContext.vertical,"rtl"===this.nodeContext.direction,l,c),s.processContent(a,c,null!=(u=this.nodeContext.viewNode)?u:null==(n=this.nodeContext.parent)?void 0:n.viewNode),this.transferPolyfilledInheritedProps(c),this.inheritLangAttribute(),c.direction&&(this.nodeContext.direction=c.direction.toString());var A=c["flow-into"];if(A&&A.toString()!=this.flowName)return o.finish(!1),o.result();if(ic&&"script"===a.localName&&a.namespaceURI===H.XHTML)return sc(a,this.viewport.window).thenFinish(o),o.result();var g=c.display;if(nu(g))if(g===$e.initial||g===$e.unset)g=$e.inline;else if(g===$e.inherit){var v,m;g=(null==(v=this.nodeContext.parent)?void 0:v.display)&&Le(null==(m=this.nodeContext.parent)?void 0:m.display)}else g=null;if(g===$e.none)return o.finish(!1),o.result();var B=null==this.nodeContext.parent;return this.nodeContext.flexContainer=g===$e.flex,this.createShadows(a,B,l,c,s,this.context,this.nodeContext.shadowContext).then(function(e){i.nodeContext.nodeShadow=e;var u=c.position,n=c.float,h=c.clear,d=i.nodeContext.vertical?$e.vertical_rl:$e.horizontal_tb,f=i.nodeContext.parent?i.nodeContext.parent.vertical?$e.vertical_rl:$e.horizontal_tb:d,p=function(t){return"true"===t.getAttribute("data-vivliostyle-flow-root")}(a);i.nodeContext.establishesBFC=function(t,e,u,n,i,r,o){return i=i||r||$e.horizontal_tb,!!o||!!u&&u!==$e.none&&!nu(u)||as(e)||t===$e.inline_block||t===$e.table_cell||t===$e.table_caption||t==$e.flex||t==$e.grid||t==$e.flow_root||(t===$e.block||t===$e.list_item)&&!!n&&n!==$e.visible&&n!==$e.clip&&!nu(n)||!!r&&i!==r}(g,u,n,c.overflow,d,f,p),i.nodeContext.containingBlockForAbsolute=function(t){return t===$e.relative||t===$e.absolute||t===$e.fixed}(u),!i.nodeContext.isInsideBFC()||n===$e.footnote||C&&Ya(C)||(n=null,h=null);var E=n===$e.left||n===$e.right||n===$e.top||n===$e.bottom||n===$e.inline_start||n===$e.inline_end||n===$e.block_start||n===$e.block_end||n===$e.snap_block||n===$e.footnote;n&&(delete c.float,n===$e.footnote&&(i.isFootnote?(E=!1,c.display=$e.block):c.display=$e.inline)),h&&(h===$e.inherit&&i.nodeContext.parent&&i.nodeContext.parent.clearSide&&(h=Le(i.nodeContext.parent.clearSide)),h!==$e.left&&h!==$e.right&&h!==$e.top&&h!==$e.bottom&&h!==$e.both&&h!==$e.all&&h!==$e.same||(delete c.clear,c.display&&c.display!=$e.inline&&(i.nodeContext.clearSide=h.toString())));var F=g===$e.list_item&&c["ua-list-item-count"],A=c["break-inside"];(E||A&&!nu(A)&&A!==$e.auto)&&i.nodeContext.breakPenalty++,g&&g!==$e.inline&&hs(g)&&i.nodeContext.breakPenalty++,i.nodeContext.inline=!E&&!g||hs(g)||cs(g),i.nodeContext.display=g?g.toString():"inline",i.nodeContext.floatSide=E?n.toString():null,i.nodeContext.floatReference=C||Ka.INLINE;var v=c["float-min-wrap-block"];i.nodeContext.floatMinWrapBlock=v&&!nu(v)?v:null;var m=i.isInsideNonRootMultiColumn(),w=c["column-span"];if(i.nodeContext.columnSpan=m||!w||nu(w)?null:w,!i.nodeContext.inline){var y=c["break-after"];!y||nu(y)||m&&y===$e.column||(i.nodeContext.breakAfter=y.toString(),Wi[i.nodeContext.breakAfter]&&delete c["break-after"]);var N=c["break-before"];!N||nu(N)||m&&N===$e.column||(i.nodeContext.breakBefore=N.toString(),Wi[i.nodeContext.breakBefore]&&delete c["break-before"]);var b=c.page,S=b&&!nu(b)&&b.toString();S||i.nodeContext.parent||!i.nodeContext.shadowContext&&g!==$e.table_header_group&&g!==$e.table_footer_group||(S=i.styler.cascade.currentPageType),S&&"auto"!==S.toLowerCase()?i.nodeContext.pageType=S:S=i.nodeContext.pageType,i.styler.cascade.currentPageType===S||!S&&c.position===$e.fixed||(Ki(i.nodeContext.breakBefore)||(i.nodeContext.breakBefore="page"),i.styler.cascade.previousPageType=i.styler.cascade.currentPageType,i.styler.cascade.currentPageType=S)}i.nodeContext.verticalAlign=c["vertical-align"]&&c["vertical-align"].toString()||"baseline",i.nodeContext.captionSide=c["caption-side"]&&c["caption-side"].toString()||"top";var x=c["border-collapse"];if(!x||x===Le("separate")){var T,I,P=c["border-spacing"];P&&(P instanceof Ge?(T=P.values[0],I=P.values[1]):T=I=P,T.isNumeric()&&(i.nodeContext.inlineBorderSpacing=Ye(T,i.context)),I.isNumeric()&&(i.nodeContext.blockBorderSpacing=Ye(I,i.context)))}var R=c["footnote-policy"];i.nodeContext.footnotePolicy=R&&!nu(R)?R:null;var k=c["x-first-pseudo"];k&&(i.nodeContext.firstPseudo=new br(i.nodeContext.parent?i.nodeContext.parent.firstPseudo:null,k.num)),i.nodeContext.inline||i.processAfterIfcontinues(a,l,s,i.context);var L=c["white-space"];if(L){var O=fr(L.toString());null!==O&&(i.nodeContext.whitespace=O)}var _=c["hyphenate-character"];_&&_ instanceof Pe&&(i.nodeContext.hyphenateCharacter=_.str);var M=c["overflow-wrap"];c["word-break"]!==$e.break_all&&c["line-break"]!==$e.anywhere&&M!==$e.break_word&&M!==$e.anywhere||(i.nodeContext.breakWord=!0),i.resolveFormattingContext(i.nodeContext,t,g,u,n,B),i.nodeContext.parent&&i.nodeContext.parent.formattingContext&&(t=i.nodeContext.parent.formattingContext.isFirstTime(i.nodeContext,t)),i.nodeContext.inline||(i.nodeContext.repeatOnBreak=i.processRepeatOnBreak(c),i.findAndProcessRepeatingElements(a,s));var U,V,z=!1,G=[],W=a.namespaceURI,X=a.localName;if(W==H.XHTML)"html"==X||"body"==X||"script"==X||"link"==X||"meta"==X?X="div":"vide_"==X?X="video":"audi_"==X?X="audio":"object"==X&&(z=!!i.customRenderer),a.getAttribute($s)&&null!=(U=l.content)&&null!=(V=U.value)&&V.url&&(X="img");else if(W==H.epub)X="span",W=H.XHTML;else if(W==H.NCX)if(W=H.XHTML,"ncx"==X||"navPoint"==X)X="div";else if("navLabel"==X){X="span";var j=a.parentNode;if(j){for(var K=null,Y=j.firstChild;Y;Y=Y.nextSibling)if(1==Y.nodeType&&Y.namespaceURI==H.NCX&&"content"==Y.localName){K=Y.getAttribute("src");break}K&&(X="a",(a=a.ownerDocument.createElementNS(W,"a")).setAttribute("href",K))}}else X="span";else W==H.SHADOW?(W=H.XHTML,X=i.nodeContext.inline?"span":"div"):z=!!i.customRenderer;if(F)t?X="li":(X="div",c.display=g=$e.block);else if("body"==X||"li"==X)X="div";else if("q"==X)X="span";else if("a"==X){var q=c["hyperlink-processing"];q&&"normal"!=q.toString()&&(X="span")}c.behavior&&"none"!=c.behavior.toString()&&i.customRenderer&&(z=!0),a.dataset&&"true"===a.getAttribute("data-math-typeset")&&(z=!0),(z?i.customRenderer(a,i.nodeContext.parent?i.nodeContext.parent.viewNode:null,c):Tn(null)).then(function(e){if(e)z&&(r="true"==e.getAttribute("data-adapt-process-children"));else{if(c.display===$e.none)return void o.finish(!1);e=i.createElement(W,X)}var u;"a"==X&&e.addEventListener("click",i.page.hrefHandler,!1),"iframe"==e.localName&&e.namespaceURI==H.XHTML&&(u=e).addEventListener("load",function(){u.contentWindow.navigator.epubReadingSystem={name:"adapt",version:"0.1",layoutStyle:"paginated",hasFeature:function(t,e){return"mouse-events"===t}}},!1);for(var n=i.nodeContext.inheritedProps["image-resolution"],s=[],l=c.width,h=c.height,d=a.getAttribute("width"),f=a.getAttribute("height"),p=l===$e.auto||!l&&!d,E=h===$e.auto||!h&&!f,C=a.attributes,A=C.length,g=null,v=0;v<A;v++){var m=C[v],B=m.namespaceURI,w=m.localName,y=m.nodeValue;if(B){if("http://www.w3.org/2000/xmlns/"==B)continue;B==H.XLINK&&"href"==w&&(y=i.documentURLTransformer.transformURL(i.resolveURL(y),i.xmldoc.url))}else{if(!ic&&w.match(/^on/))continue;if("style"==w)continue;if(("id"==w||"name"==w)&&t){var N=i.documentURLTransformer.transformFragment(y,i.xmldoc.url);if(!ic||e.namespaceURI===H.SVG&&"svg"!==e.localName||e.ownerDocument.getElementById(y))e.setAttribute(w,N);else{e.setAttribute(w,y),e.setAttribute("data-vivliostyle-id",N);var b=e.ownerDocument.createElement("a");b.setAttribute(w,N),b.setAttribute(cr,"1"),b.style.position="absolute",e.appendChild(b)}i.page.registerElementWithId(e,N);continue}if("src"==w||"href"==w||"poster"==w)y=i.resolveURL(y),"href"===w&&(y=i.documentURLTransformer.transformURL(y,i.xmldoc.url));else if("srcset"==w)y=y.split(",").map(function(t){return i.resolveURL(t.trim())}).join(",");else if("data"===w&&z&&"object"===X&&e.hasAttribute("data"))continue;if("poster"===w&&"video"===X&&W===H.XHTML&&p&&E){var S=new Image,x=ei(S,y);G.push(x),s.push({image:S,element:e,fetcher:x})}}if(W==H.SVG&&/^[A-Z\-]+$/.test(w)&&(w=w.toLowerCase()),i.isSVGUrlAttribute(w)&&(y=hc(y,i.xmldoc.url,i.documentURLTransformer)),B){var T=cc[B];T&&(w=T+":"+w)}if("src"!=w||B||"img"!=X&&"input"!=X||W!=H.XHTML)if("href"==w&&"image"==X&&W==H.SVG&&B==H.XLINK)i.page.fetchers.push(ei(e,y));else if(B)e.setAttributeNS(B,w,y);else try{e.setAttribute(w,y)}catch(t){D.warn(t)}else g=y}if(g){var I="input"===X?new Image:e,P=ei(I,g);I!==e&&(e.src=g),p||E||function(){if(c.position===$e.fixed)return!0;for(var t=null==(e=i.nodeContext.parent)?void 0:e.viewNode;t&&t!==i.viewRoot;t=t.parentElement){var e,u;if("fixed"===(null==(u=t.style)?void 0:u.position))return!0}return!1}()?(p&&E&&n&&1!==n&&s.push({image:I,element:e,fetcher:P}),G.push(P)):i.page.fetchers.push(P)}delete c.content;var R=c["list-style-image"];if(R&&R instanceof Ve){var k=R.url;G.push(ei(new Image,k))}if(i.preprocessElementStyle(c),i.applyComputedStyles(e,c),i.nodeContext.inline)t||(zi(e,"inline-start"),Ui(e)&&zi(e,"clone"));else if(t){if(!as(c.position)){var L=c["margin-break"],O=i.getBreakTypeAt(i.nodeContext);(L===$e.discard&&null!==O||L!==$e.keep&&"auto"===O)&&Gi(e,"block-start")}}else zi(e,"block-start"),Ui(e)&&(zi(e,"clone"),Gi(e,"block-start"));F&&e.setAttribute("value",c["ua-list-item-count"].stringValue()),i.viewNode=e,G.length?zn(G).then(function(){n>0&&i.modifyElemDimensionWithImageResolution(s,n,c,i.nodeContext.vertical),o.finish(r)}):o.timeSlice().then(function(){o.finish(r)})})}),o.result()},u.isInsideNonRootMultiColumn=function(){for(var t=null==(e=this.nodeContext.parent)?void 0:e.viewNode;t;t=t.parentNode){var e,u=1===t.nodeType?t.style:null;if(!u)break;if(!isNaN(parseFloat(u.columnCount))||!isNaN(parseFloat(u.columnWidth)))return!0;if("absolute"===u.position)break}return!1},u.getBreakTypeAt=function(t){for(var e,u,n,i=t;i&&!i.after;i=i.parent){var r;if(Xi(i.breakBefore))return i.breakBefore;if(1===i.fragmentIndex&&!i.parent)return i.sourceNode===i.sourceNode.ownerDocument.documentElement?"page":null;var o=null==(r=i.parent)?void 0:r.viewNode;if(o){var a=this.viewport.window.getComputedStyle(o),s=parseFloat(a.paddingBlockStart),l=parseFloat(a.borderBlockStartWidth);if(s||l)return null;for(var D=null==o?void 0:o.firstChild;D&&(pr(D,i.parent.whitespace)||Fs(D));)D=D.nextSibling;if(D&&D!==i.viewNode)return null}}var h=null==(e=this.context)||null==(u=e.currentLayoutPosition)||null==(n=u.flowPositions[this.flowName])?void 0:n.startBreakType;return Xi(h)?h:"auto"},u.processAfterIfcontinues=function(t,e,u,n){var i=this.getPseudoMap(e,this.regionIds,this.isFootnote,this.nodeContext,n);if(i&&i["after-if-continues"]&&i["after-if-continues"].content){var r=new Js(t,e,u,n,this.exprContentListener);this.nodeContext.afterIfContinues=new el(t,r)}},u.isSVGUrlAttribute=function(t){return e.SVG_URL_ATTRIBUTES.includes(t.toLowerCase())},u.modifyElemDimensionWithImageResolution=function(t,e,u,n){var i=this;t.forEach(function(t){if("load"===t.fetcher.get().get()){var r=t.image,o=r.width/e,a=r.height/e,s=t.element;if(o>0&&a>0)if(u["box-sizing"]===$e.border_box&&(u["border-left-style"]!==$e.none&&(o+=Ye(u["border-left-width"],i.context)),u["border-right-style"]!==$e.none&&(o+=Ye(u["border-right-width"],i.context)),u["border-top-style"]!==$e.none&&(a+=Ye(u["border-top-width"],i.context)),u["border-bottom-style"]!==$e.none&&(a+=Ye(u["border-bottom-width"],i.context))),e>1){var l=u["max-width"]||$e.none,D=u["max-height"]||$e.none;if(l===$e.none&&D===$e.none)Z(s,"max-width",o+"px");else if(l!==$e.none&&D===$e.none)Z(s,"width",o+"px");else if(l===$e.none&&D!==$e.none)Z(s,"height",a+"px");else{l.isNumeric(),D.isNumeric();var h=D;"%"!==l.unit?Z(s,"max-width",Math.min(o,Ye(l,i.context))+"px"):"%"!==h.unit?Z(s,"max-height",Math.min(a,Ye(h,i.context))+"px"):n?Z(s,"height",a+"px"):Z(s,"width",o+"px")}}else if(e<1){var c=u["min-width"]||tu,d=u["min-height"]||tu;c.isNumeric(),c.isNumeric();var f=c,p=d;0===f.num&&0===p.num?Z(s,"min-width",o+"px"):0!==f.num&&0===p.num?Z(s,"width",o+"px"):0===f.num&&0!==p.num?Z(s,"height",a+"px"):"%"!==f.unit?Z(s,"min-width",Math.max(o,Ye(f,i.context))+"px"):"%"!==p.unit?Z(s,"min-height",Math.max(a,Ye(p,i.context))+"px"):n?Z(s,"height",a+"px"):Z(s,"width",o+"px")}}})},u.preprocessElementStyle=function(t){var e=this;f(exports.HOOKS.PREPROCESS_ELEMENT_STYLE).forEach(function(u){u(e.nodeContext,t)})},u.findAndProcessRepeatingElements=function(t,e){for(var u=t.firstChild;u;u=u.nextSibling)if(1===u.nodeType){var n={},i=e.getStyle(u,!1);if(this.computeStyle(this.nodeContext.vertical,"rtl"===this.nodeContext.direction,i,n),this.processRepeatOnBreak(n)){if(this.nodeContext.formattingContext instanceof El&&!this.nodeContext.belongsTo(this.nodeContext.formattingContext))return;var r=this.nodeContext.parent;return this.nodeContext.formattingContext=new El(r&&r.formattingContext,this.nodeContext.sourceNode),void this.nodeContext.formattingContext.initializeRepetitiveElements(this.nodeContext.vertical)}}},u.processRepeatOnBreak=function(t){var e=t["repeat-on-break"];return e!==$e.none&&((e===$e.auto||nu(e))&&(e=t.display===$e.table_header_group?$e.header:t.display===$e.table_footer_group?$e.footer:$e.none),e&&e!==$e.none)?e.toString():null},u.createTextNodeView=function(){var t=this,e=xn("createTextNodeView");return this.preprocessTextContent().then(function(){var u=t.offsetInNode||0,n=ir(t.nodeContext.preprocessedTextContent).substr(u);t.viewNode=document.createTextNode(n),e.finish(!0)}),e.result()},u.preprocessTextContent=function(){var t,e=this;if(null!=this.nodeContext.preprocessedTextContent)return Tn(!0);var u=t=this.sourceNode.textContent,n=xn("preprocessTextContent"),r=f(exports.HOOKS.PREPROCESS_TEXT_CONTENT),o=0;return n.loop(function(){return o>=r.length?Tn(!1):r[o++](e.nodeContext,u).thenAsync(function(t){return u=t,Tn(!0)})}).then(function(){e.nodeContext.preprocessedTextContent=i.default(t,u,0),n.finish(!0)}),n.result()},u.createNodeView=function(t,e){var u,n=this,i=xn("createNodeView"),r=!0;return 1==this.sourceNode.nodeType?u=this.createElementView(t,e):8==this.sourceNode.nodeType?(this.viewNode=null,u=Tn(!0)):u=this.createTextNodeView(),u.then(function(t){if(r=t,n.nodeContext.viewNode=n.viewNode,n.viewNode){var e,u=function(t,e){return 1===(null==t?void 0:t.nodeType)&&Qs(t)===e},o=n.nodeContext.parent,a=o?u(n.viewNode,"after")&&u(o.viewNode,"first-letter")&&null!=(e=o.viewNode)&&e.hasChildNodes()?o.parent.viewNode:o.viewNode:n.viewRoot;a&&(!n.nodeContext.inline||3===n.viewNode.nodeType&&pr(n.viewNode)||a.hasChildNodes()||!Vi(a).includes("block-start")||zi(a,"text-start"),a.appendChild(n.viewNode))}i.finish(r)}),i.result()},u.setCurrent=function(t,e,u){return this.nodeContext=t,t?(this.sourceNode=t.sourceNode,this.offsetInNode=t.offsetInNode):(this.sourceNode=null,this.offsetInNode=-1),this.viewNode=null,this.nodeContext?this.createNodeView(e,!!u):Tn(!0)},u.processShadowContent=function(t){if(null==t.shadowContext||"content"!=t.sourceNode.localName||t.sourceNode.namespaceURI!=H.SHADOW)return t;var e,u,n=t.boxOffset,i=t.shadowContext,r=t.parent,o=i.subShadow||i.parentShadow;i.subShadow?(e=i.root,(u=i.type)==wr.ROOTLESS&&(e=e.firstChild)):(e=i.owner.firstChild,u=wr.ROOTLESS);var a=t.sourceNode.nextSibling;if(a?(t.sourceNode=a,t.resetView()):t.shadowSibling?t=t.shadowSibling:e?t=null:(t=t.parent.modify()).after=!0,e){var s=new Sr(e,r,n);return s.shadowContext=o,s.shadowType=u,s.shadowSibling=t,s}return t.boxOffset=n,t},u.nextPositionInTree=function(t){var e=t.boxOffset+1;if(t.after){if(!t.parent)return null;if(t.shadowType!=wr.ROOTED){var u=t.sourceNode.nextSibling;if(u)return(t=t.modify()).boxOffset=e,t.sourceNode=u,t.resetView(),this.processShadowContent(t)}return t.shadowSibling?((t=t.shadowSibling.modify()).boxOffset=e,t):((t=t.parent.modify()).boxOffset=e,t.after=!0,t)}if(t.nodeShadow){var n=t.nodeShadow.root;if(t.nodeShadow.type==wr.ROOTLESS&&(n=n.firstChild),n){var i=new Sr(n,t,e);return i.shadowContext=t.nodeShadow,i.shadowType=t.nodeShadow.type,this.processShadowContent(i)}}var r=t.sourceNode.firstChild;return r?this.processShadowContent(new Sr(r,t,e)):(1!=t.sourceNode.nodeType&&(e+=ir(t.preprocessedTextContent).length-1-t.offsetInNode),(t=t.modify()).boxOffset=e,t.after=!0,t)},u.isTransclusion=function(t,e,u){var n=uo(e,"hyperlink-processing");if(!n)return!1;var i=n.evaluate(this.context,"hyperlink-processing");return!!i&&i.toString()==u},u.nextInTree=function(t,e){var u=this,n=this.nextPositionInTree(t);if(!n||n.after)return Tn(n);var i=xn("nextInTree");return this.setCurrent(n,!0,e).then(function(t){n.viewNode&&t||((n=n.modify()).after=!0,n.viewNode||(n.inline=!0)),u.dispatchEvent({type:"nextInTree",nodeContext:n}),i.finish(n)}),i.result()},u.addImageFetchers=function(t){if(t instanceof We)for(var e=t.values,u=0;u<e.length;u++)this.addImageFetchers(e[u]);else if(t instanceof Ve){var n=t.url;this.page.fetchers.push(ei(new Image,n))}},u.applyComputedStyles=function(t,e){var u,n,i,r=e["background-image"];r&&this.addImageFetchers(r);var o,a,s=e.position===$e.relative,l=null===(null==(u=this.nodeContext)?void 0:u.parent)&&null===(null==(n=this.sourceNode)?void 0:n.parentElement)&&!(null==(i=this.viewRoot)||!i.parentElement),D=Object.keys(e);D.sort(iu);for(var h=0,c=D;h<c.length;h++){var d=c[h];if(!pc[d]){var f=e[d];f&&(f!==xe||ru(d))&&((f=f.visit(new ku(this.xmldoc.url,this.documentURLTransformer)))instanceof Oe&&Ot(f.unit)&&(f="lh"===f.unit?new Oe(f.num*this.getLineHeightUnitSize(d,o,a),"px"):qe(f,this.context)),"font-size"===d?o=f:"line-height"===d&&(a=f),or[d]||s&&ar[d]?this.page.delayedItems.push(new sr(t,d,f)):l&&this.page.pageAreaElement&&eo(d)?Z(this.page.pageAreaElement.parentElement,d,f.toString()):Z(t,d,f.toString()))}}},u.getLineHeightUnitSize=function(t,e,u){var n,i,r=Lt.lh/Lt.em,o=1===(null==(n=this.nodeContext.parent)||null==(i=n.viewNode)?void 0:i.nodeType)?this.viewport.window.getComputedStyle(this.nodeContext.parent.viewNode):null,a=o?parseFloat(o.fontSize):this.context.fontSize(),s=o?"normal"===o.lineHeight?a*r:parseFloat(o.lineHeight):this.context.rootLineHeight;if("line-height"===t||"font-size"===t)return s;var l=null;if(u){if(u instanceof _e||u instanceof Oe&&("em"===u.unit||"%"===u.unit))l=u instanceof Oe&&"%"===u.unit?u.num/100:u.num;else if(u instanceof Oe)return u.num*this.context.queryUnitSize(u.unit,!1)}else for(var D=null==(h=this.nodeContext.parent)?void 0:h.viewNode;;D=D.parentNode){var h,c,d;if(!D||1!==D.nodeType){l=r;break}var f=null==(c=D)||null==(d=c.style)?void 0:d.lineHeight;if(f){/^[0-9.]+$/.test(f)&&(l=parseFloat(f)),"normal"===f&&(l=r);break}}return null!==l?e instanceof Oe?l*fo(e,a,this.context).num:l*a:s},u.applyPseudoelementStyle=function(t,e,u){if(!t.after){var n=(t.shadowContext?t.shadowContext.styler:this.styler).getStyle(this.sourceNode,!1),i=io(n,"_pseudos");if(i&&(n=i[e])){var r={};t.vertical=this.computeStyle(t.vertical,"rtl"===t.direction,n,r);var o=r.content;Lr(o)&&(o.visit(new kr(u,this.context,o,this.exprContentListener)),delete r.content),this.applyComputedStyles(u,r)}}},u.peelOff=function(t,e){var u=this,n=xn("peelOff"),i=t.firstPseudo,r=t.offsetInNode,o=t.after;if(e>0)t.viewNode.textContent=t.viewNode.textContent.substr(0,e),r+=e;else if(!o&&t.viewNode&&0==r){var a=t.viewNode.parentNode;a&&a.removeChild(t.viewNode)}for(var s=t.boxOffset+e,l=[];t.firstPseudo===i;)l.push(t),t=t.parent;var D=l.pop(),h=D.shadowSibling;return n.loop(function(){for(;l.length>0;){D=l.pop(),t=new Sr(D.sourceNode,t,s),0==l.length&&(t.offsetInNode=r,t.after=o),t.shadowType=D.shadowType,t.shadowContext=D.shadowContext,t.nodeShadow=D.nodeShadow,t.shadowSibling=D.shadowSibling?D.shadowSibling:h,h=null;var e=u.setCurrent(t,!1);if(e.isPending())return e}return Tn(!1)}).then(function(){n.finish(t)}),n.result()},u.createElement=function(t,e){return t==H.XHTML?this.document.createElement(e):this.document.createElementNS(t,e)},u.applyFootnoteStyle=function(t,e,u){var n={},i=io(this.footnoteStyle,"_pseudos");if(t=this.computeStyle(t,e,this.footnoteStyle,n),i&&i.before){var r={},o=this.createElement(H.XHTML,"span");Zs(o,"before"),u.appendChild(o),this.computeStyle(t,e,i.before,r),delete r.content,this.applyComputedStyles(o,r)}return delete n.content,this.applyComputedStyles(u,n),t},u.processFragmentedBlockEdge=function(t){var e,u=!t.inline&&t.after?t.parent:t,n=!1;if(t.inline&&t.after&&!t.shadowContext&&1===(null==(e=t.sourceNode.nextSibling)?void 0:e.nodeType)){var i,r=t.sourceNode.nextSibling,o=null==(i=uo(this.styler.getStyle(r,!1),"display"))?void 0:i.value.toString();n=o&&!hs(o)||"true"===r.getAttribute("data-math-typeset")&&/^\s*(\$\$|\\\[)/.test(r.textContent)}for(var a=0,s=u;s;s=s.parent){var l;if(1===(null==(l=s.viewNode)?void 0:l.nodeType)){var D=s.viewNode;if(D.style)if(s.inline){if(zi(D,"inline-end"),Ui(D)){var h=s.vertical?D.offsetWidth:D.offsetHeight;zi(D,"clone"),(s.vertical?D.offsetWidth:D.offsetHeight)>h&&this.fixClonedBoxDecorationOverflow(D)}}else{if(zi(D,"block-end"),!a++&&s!==u)if("justify"!==this.viewport.window.getComputedStyle(D).textAlign||n)zi(D,"text-end");else{var c=this.createChildAnonymousBlockIfNeeded(D);c?c!==D?Hi(c,["block-start","text-start","block-end","text-end","justify"]):(zi(D,"text-end"),zi(D,"justify")):zi(D,"text-end")}Ui(D)&&(zi(D,"clone"),Gi(D,"block-end"))}}}},u.fixClonedBoxDecorationOverflow=function(t){var e=this.viewport.window.getComputedStyle(t),u=-(parseFloat(e.paddingInlineEnd)+parseFloat(e.borderInlineEndWidth));isNaN(u)||(t.style.marginInlineEnd=u+"px")},u.createChildAnonymousBlockIfNeeded=function(t){for(var e=this,u=function t(u){var n=e.viewport.window.getComputedStyle(u),i=n.display,r=n.position,o=n.float;if("ruby"===u.localName)return!1;if("br"===u.localName)return!0;if(("inline"===i||"contents"===i)&&u.hasChildNodes()){var a=u.lastElementChild;if(a&&(!a.nextSibling||a.nextSibling===u.lastChild&&pr(a.nextSibling))){var s=t(a);if(s||null===s)return s}for(var l=null==a?void 0:a.previousElementSibling;l;l=l.previousElementSibling){var D=t(l);if(D||null===D)return null}return!1}if("none"===i||"absolute"===r||"fixed"===r||o&&"none"!==o||u.hasAttribute(cr)){var h=u.previousElementSibling;return!(!h||!(h.nextSibling===u||h.nextSibling===u.previousSibling&&pr(h.nextSibling)))&&t(h)}return!(!i||hs(i))},n=null,i=t.lastElementChild;i;i=i.previousElementSibling){var r=u(i);if(r){n=i;break}if(null===r)return null}if(!n)return t;if(n===t.lastElementChild&&(!n.nextSibling||n.nextSibling===t.lastChild&&pr(n.nextSibling)))return null;var o=t.ownerDocument.createElement("span");o.className="viv-anonymous-block";for(var a=n.nextSibling,s=null;a;a=s)s=a.nextSibling,o.appendChild(a);return t.appendChild(o),o},u.convertLengthToPx=function(t,e,u){var n=t.num,i=t.unit;if(function(t){switch(null==t?void 0:t.toLowerCase()){case"em":case"ex":case"rem":case"lh":case"rlh":return!0;default:return!1}}(i)){for(var r=e;r&&1!==r.nodeType;)r=r.parentNode;return co(t,parseFloat(u.getElementComputedStyle(r)["font-size"]),this.context).num}var o=this.context.queryUnitSize(i,!1);return o?n*o:t},u.isSameNodePositionStep=function(t,e){if(t.shadowContext){if(!e.shadowContext)return!1;var u=1===e.node.nodeType?e.node:e.node.parentElement;return t.shadowContext.owner===e.shadowContext.owner&&Qs(1===t.node.nodeType?t.node:t.node.parentElement)===Qs(u)}return t.node===e.node},u.isSameNodePosition=function(t,e){var u=this;return t.offsetInNode===e.offsetInNode&&t.after==e.after&&t.steps.length===e.steps.length&&t.steps.every(function(t,n){return u.isSameNodePositionStep(t,e.steps[n])})},u.isPseudoelement=function(t){return!!Qs(t)},e}(dt);dc.SVG_URL_ATTRIBUTES=["color-profile","clip-path","cursor","filter","marker","marker-start","marker-end","marker-mid","fill","stroke","mask"];var fc,pc={"float-min-wrap-block":!0,"float-reference":!0,"flow-into":!0,"flow-linger":!0,"flow-options":!0,"flow-priority":!0,"footnote-policy":!0,"margin-break":!0,page:!0},Ec=/*#__PURE__*/function(){function t(t){this.layoutBox=void 0,this.window=void 0,this.scaleRatio=1,this.layoutBox=t.layoutBox,this.window=t.window,t.pixelRatio>0&&CSS.supports("zoom","8")&&(this.scaleRatio=t.pixelRatio/t.window.devicePixelRatio)}var e=t.prototype;return e.scaleRect=function(t){return{left:t.left*this.scaleRatio,top:t.top*this.scaleRatio,right:t.right*this.scaleRatio,bottom:t.bottom*this.scaleRatio,width:t.width*this.scaleRatio,height:t.height*this.scaleRatio}},e.subtractOffsets=function(t,e){var u=e.left,n=e.top;return{left:t.left-u,top:t.top-n,right:t.right-u,bottom:t.bottom-n,width:t.width,height:t.height}},e.getRangeClientRects=function(t){var e=this,u=t.getClientRects(),n=this.layoutBox.getBoundingClientRect();return Array.from(u).map(function(t){return e.scaleRect(e.subtractOffsets(t,n))})},e.getElementClientRect=function(t){var e=t.getBoundingClientRect();if(0===e.left&&0===e.top&&0===e.right&&0===e.bottom)return e;var u=this.layoutBox.getBoundingClientRect();return this.scaleRect(this.subtractOffsets(e,u))},e.getElementComputedStyle=function(t){return this.window.getComputedStyle(t,null)},t}(),Cc=/*#__PURE__*/function(){function t(t,e,u,n,i,r){this.window=void 0,this.fontSize=void 0,this.pixelRatio=void 0,this.document=void 0,this.root=void 0,this.outerZoomBox=void 0,this.contentContainer=void 0,this.layoutBox=void 0,this.width=void 0,this.height=void 0,this.window=t,this.fontSize=e,this.pixelRatio=u,this.document=t.document,this.root=n||this.document.body,u>0&&CSS.supports("zoom","8")&&(Z(this.root,"--viv-outputPixelRatio",""+u),Z(this.root,"--viv-devicePixelRatio",""+t.devicePixelRatio));var o=this.root.firstElementChild;o||((o=this.document.createElement("div")).setAttribute("data-vivliostyle-outer-zoom-box","true"),this.root.appendChild(o));var a=o.firstElementChild;a||((a=this.document.createElement("div")).setAttribute("data-vivliostyle-spread-container","true"),o.appendChild(a));var s=o.nextElementSibling;s||((s=this.document.createElement("div")).setAttribute("data-vivliostyle-layout-box","true"),this.root.appendChild(s)),this.outerZoomBox=o,this.contentContainer=a,this.layoutBox=s,this.width=i||parseFloat(t.getComputedStyle(this.root).width)||this.root.offsetWidth||t.innerWidth,this.height=r||parseFloat(t.getComputedStyle(this.root).height)||this.root.offsetHeight||t.innerHeight;var l=!t.outerWidth&&!t.outerHeight||/Headless/.test(navigator.userAgent)||navigator.webdriver&&800===t.innerWidth&&600===t.innerHeight;(!this.width||!i&&l)&&(this.width=794),(!this.height||!r&&l)&&(this.height=1056)}var e=t.prototype;return e.resetZoom=function(){Z(this.outerZoomBox,"width",""),Z(this.outerZoomBox,"height",""),Z(this.contentContainer,"width",""),Z(this.contentContainer,"height",""),Z(this.contentContainer,"transform","")},e.zoom=function(t,e,u){Z(this.root,"--viv-outputScale",""+u),Z(this.outerZoomBox,"width",t*u+"px"),Z(this.outerZoomBox,"height",e*u+"px"),Z(this.contentContainer,"width",t+"px"),Z(this.contentContainer,"height",e+"px")},e.clear=function(){for(var t=this.root;t.lastChild;)t.removeChild(t.lastChild)},t}(),Fc=/*#__PURE__*/function(){function t(t,e,u){this.store=void 0,this.url=void 0,this.document=void 0,this.lang=null,this.totalOffset=-1,this.root=void 0,this.body=void 0,this.head=void 0,this.last=void 0,this.lastOffset=1,this.idMap=void 0,this.store=t,this.url=e,this.document=u,this.root=u.documentElement;var n=null,i=null;if(this.root.namespaceURI==H.XHTML){for(var r=this.root.firstChild;r;r=r.nextSibling)if(1==r.nodeType){var o=r;if(o.namespaceURI==H.XHTML)switch(o.localName){case"head":i=o;break;case"body":n=o}}this.lang=this.root.getAttribute("lang")}this.body=n,this.head=i,this.last=this.root,this.last.setAttribute(L,"0")}var e=t.prototype;return e.doc=function(){return new mc([this.document])},e.getElementOffset=function(t){var e=t.getAttribute(L);if(e)return parseInt(e,10);for(var u=this.lastOffset,n=this.last;n!=t;){var i=n.firstChild;if(!i)for(;!(i=n.nextSibling);)if(null==(n=n.parentNode))throw new Error("Internal error");n=i,1==i.nodeType?(i.setAttribute(L,u.toString()),++u):u+=i.textContent.length}return this.lastOffset=u,this.last=t,u-1},e.getNodeOffset=function(t,e,u){var n=0,i=t,r=null;if(1==i.nodeType){if(!u)return this.getElementOffset(i)}else{if(n=e,!(r=i.previousSibling))return n+=1,this.getElementOffset(i=i.parentNode)+n;i=r}for(;;){for(;i.lastChild;)i=i.lastChild;if(1==i.nodeType)break;if(n+=i.textContent.length,!(r=i.previousSibling)){i=i.parentNode;break}i=r}return n+=1,this.getElementOffset(i)+n},e.getTotalOffset=function(){return this.totalOffset<0&&(this.totalOffset=this.getNodeOffset(this.root,0,!0)),this.totalOffset},e.getNodeByOffset=function(t){for(var e,u=this,n=this.root,i=function(){if((e=u.getElementOffset(n))>=t)return{v:n};var i=n.children;if(!i)return"break";var r=lt(i.length,function(e){return u.getElementOffset(i[e])>t});if(0==r)return"break";n=i[r-1]};;){var r=i();if("break"===r)break;if("object"==typeof r)return r.v}for(var o=e+1,a=n,s=a.firstChild||a.nextSibling,l=null;;){if(s){if(1==s.nodeType)break;if(l=a=s,(o+=s.textContent.length)>t&&!/^\s*$/.test(s.textContent))break}else if(!(a=a.parentNode))break;s=a.nextSibling}return s&&l&&/^\s*$/.test(l.textContent)&&(l=s),l||n},e.buildIdMap=function(t){var e=t.getAttribute("id");e&&!this.idMap[e]&&(this.idMap[e]=t);var u=t.getAttributeNS(H.XML,"id");u&&!this.idMap[u]&&(this.idMap[u]=t);for(var n=t.firstElementChild;n;n=n.nextElementSibling)this.buildIdMap(n)},e.getElement=function(t){var e=t.match(/([^#]*)#(.+)$/);if(!e||e[1]&&e[1]!=this.url)return null;var u=e[2],n=this.document.getElementById(u);return!n&&this.document.getElementsByName&&(n=this.document.getElementsByName(u)[0]),n||(this.idMap||(this.idMap={},this.buildIdMap(this.document.documentElement)),n=this.idMap[u]),n},t}();function Ac(t,e,u){var n,i=u||new DOMParser;try{n=i.parseFromString(t,e)}catch(t){}if(!n)return null;var r=n.documentElement,o="parsererror";if(r.localName===o)return null;for(var a=r.firstElementChild;a;a=a.nextElementSibling)if(a.localName===o)return null;return n}function gc(t,e){var u=t.responseXML;if(!u){var n=new DOMParser,i=t.responseText;if(i){var r=function(t){var e=t.contentType;if(e){for(var u=Object.keys(fc),n=0;n<u.length;n++)if(fc[u[n]]===e)return e;if(e.match(/\+xml$/))return fc.APPLICATION_XML}var i=t.url.match(/\.([^./]+)$/);if(i)switch(i[1]){case"html":case"htm":return fc.TEXT_HTML;case"xhtml":case"xht":return fc.APPLICATION_XHTML_XML;case"svg":case"svgz":return fc.IMAGE_SVG_XML;case"opf":case"xml":return fc.APPLICATION_XML}return null}(t);if((u=Ac(i,r||fc.APPLICATION_XML,n))&&!r){var o=u.documentElement;"html"!==o.localName.toLowerCase()||o.namespaceURI?"svg"===o.localName.toLowerCase()&&u.contentType!==fc.IMAGE_SVG_XML&&(u=Ac(i,fc.IMAGE_SVG_XML,n)):u=Ac(i,fc.TEXT_HTML,n)}u||(u=Ac(i,fc.TEXT_HTML,n))}}return Tn(u?new Fc(e,t.url,u):null)}!function(t){t.TEXT_HTML="text/html",t.TEXT_XML="text/xml",t.APPLICATION_XML="application/xml",t.APPLICATION_XHTML_XML="application/xhtml+xml",t.IMAGE_SVG_XML="image/svg+xml"}(fc||(fc={}));var vc=new(/*#__PURE__*/function(){function t(t){this.fn=void 0,this.fn=t}var e=t.prototype;return e.check=function(t){return this.fn(t)},e.withAttribute=function(e,u){var n=this;return new t(function(t){return n.check(t)&&1==t.nodeType&&t.getAttribute(e)==u})},e.withChild=function(e,u){var n=this;return new t(function(t){if(!n.check(t))return!1;var i=new mc([t]);return i=i.child(e),u&&(i=i.predicate(u)),i.size()>0})},t}())(function(t){return!0}),mc=/*#__PURE__*/function(){function t(t){this.nodes=void 0,this.nodes=t}var e=t.prototype;return e.asArray=function(){return this.nodes},e.size=function(){return this.nodes.length},e.predicate=function(e){for(var u,n=[],i=R(this.nodes);!(u=i()).done;){var r=u.value;e.check(r)&&n.push(r)}return new t(n)},e.forEachNode=function(e){for(var u=[],n=function(t){u.push(t)},i=0;i<this.nodes.length;i++)e(this.nodes[i],n);return new t(u)},e.forEach=function(t){for(var e=[],u=0;u<this.nodes.length;u++)e.push(t(this.nodes[u]));return e},e.forEachNonNull=function(t){for(var e=[],u=0;u<this.nodes.length;u++){var n=t(this.nodes[u]);null!=n&&e.push(n)}return e},e.child=function(t){return this.forEachNode(function(e,u){for(var n=e.firstChild;n;n=n.nextSibling)1==n.nodeType&&n.localName==t&&u(n)})},e.childElements=function(){return this.forEachNode(function(t,e){for(var u=t.firstChild;u;u=u.nextSibling)1==u.nodeType&&e(u)})},e.attribute=function(t){return this.forEachNonNull(function(e){return 1==e.nodeType?e.getAttribute(t):null})},e.textContent=function(){return this.forEach(function(t){return t.textContent})},t}(),Bc=new Hn(function(){var t=xn("uaStylesheetBase"),e=MD(),u=W("user-agent-base.css",z),n=new Ea(null,null,null,null,null,e,!0);return n.startStylesheet(ui.USER_AGENT),pa=n.cascade,Ti(Yn,n,u,null,null).thenFinish(t),t.result()},"uaStylesheetBaseFetcher"),wc=/*#__PURE__*/function(){function t(t,e,u,n,i,r,o,a,s,l){this.store=void 0,this.rootScope=void 0,this.pageScope=void 0,this.cascade=void 0,this.rootBox=void 0,this.fontFaces=void 0,this.footnoteProps=void 0,this.flowProps=void 0,this.viewportProps=void 0,this.pageProps=void 0,this.fontDeobfuscator=void 0,this.validatorSet=void 0,this.store=t,this.rootScope=e,this.pageScope=u,this.cascade=n,this.rootBox=i,this.fontFaces=r,this.footnoteProps=o,this.flowProps=a,this.viewportProps=s,this.pageProps=l,this.fontDeobfuscator=t.fontDeobfuscator,this.validatorSet=t.validatorSet,this.pageScope.defineBuiltIn("has-content",function(t){var e=this,u=e.currentLayoutPosition,n=u.firstFlowChunkOfFlow(t);return e.matchPageSide(u.startSideOfFlow(t))&&u.hasContent(t,e.lookupOffset)&&!!n&&!e.flowChunkIsAfterParentFlowForcedBreak(n)}),this.pageScope.defineName("page-number",new de(this.pageScope,function(){return this.pageNumberOffset+this.currentLayoutPosition.page},"page-number")),this.pageScope.defineName("blank-page",new de(this.pageScope,function(){var t=this.currentLayoutPosition;return null==t?void 0:t.isBlankPage},"blank-page"))}return t.prototype.sizeViewport=function(t,e,u,n){if(this.viewportProps.length){var i=new _t(this.rootScope,t,e,u),r=function(t,e){for(var u={},n=0;n<e.length;n++)lo(t,u,e[n],0,null,null,null);return u}(i,this.viewportProps),o=r.width,a=r.height,s=r["text-zoom"],l=1;if(o&&a||s){var D=Lt.em;if((s?s.evaluate(i,"text-zoom"):null)===$e.scale&&(l=D/u,u=D,t*=l,e*=l),o&&a){var h=Ye(o.evaluate(i,"width"),i),c=Ye(a.evaluate(i,"height"),i);if(h>0&&c>0)return{width:n&&n.spreadView?2*(h+n.pageBorder):h,height:c,fontSize:u}}}}return{width:t,height:e,fontSize:u}},t}(),yc=/*#__PURE__*/function(t){function e(e,u,n,i,r,o,a,s,l,D,h,c,d){var f;for(var p in(f=t.call(this,e.rootScope,i.width,i.height,i.fontSize)||this).style=void 0,f.xmldoc=void 0,f.viewport=void 0,f.clientLayout=void 0,f.fontMapper=void 0,f.customRenderer=void 0,f.fallbackMap=void 0,f.pageNumberOffset=void 0,f.documentURLTransformer=void 0,f.counterStore=void 0,f.lang=void 0,f.primaryFlows={body:!0},f.rootPageBoxInstance=null,f.styler=null,f.stylerMap=null,f.currentLayoutPosition=null,f.layoutPositionAtPageStart=null,f.lookupOffset=0,f.faces=void 0,f.pageBoxInstances={},f.pageManager=null,f.rootPageFloatLayoutContext=void 0,f.pageBreaks={},f.pageProgression=null,f.isVersoFirstPage=!1,f.blankPageAtStart=!1,f.pageSheetSize={},f.pageSheetHeight=0,f.pageSheetWidth=0,f.style=e,f.xmldoc=u,f.viewport=i,f.clientLayout=r,f.fontMapper=o,f.customRenderer=a,f.fallbackMap=s,f.pageNumberOffset=l,f.documentURLTransformer=D,f.counterStore=h,f.lang=u.lang||n,f.faces=new GD(f.style.fontDeobfuscator),f.rootPageFloatLayoutContext=new Ja(null,null,null,null,null,null,null),f.pageProgression=c||null,f.isVersoFirstPage=!!d,e.flowProps){var E=uo(e.flowProps[p],"flow-consume");E&&(E.evaluate(I(f),"flow-consume")==$e.all?f.primaryFlows[p]=!0:delete f.primaryFlows[p])}return f}N(e,t);var u=e.prototype;return u.init=function(){var t=this,e=xn("StyleInstance.init"),u=this.counterStore.createCounterListener(this.xmldoc.url),n=this.counterStore.createCounterResolver(this.xmldoc.url,this.style.rootScope,this.style.pageScope);this.styler=new DD(this.xmldoc,this.style.cascade,this.style.rootScope,this,this.primaryFlows,this.style.validatorSet,u,n),n.setStyler(this.styler),this.styler.resetFlowChunkStream(this),this.stylerMap={},this.stylerMap[this.xmldoc.url]=this.styler;var i=this.styler.getTopContainerStyle();this.pageProgression||(this.pageProgression=Fh(i)),this.matchStartPageSide(this.styler.breakBeforeValues[0])||(0===this.pageNumberOffset?this.isVersoFirstPage=!0:this.blankPageAtStart=!0),this.rootPageBoxInstance=new Dh(this.style.rootBox);var r=this.style.cascade.createInstance(this,u,n,this.lang);this.styler.cascade.currentPageType=this.styler.cascade.firstPageType,this.rootPageBoxInstance.applyCascadeAndInit(r,i),this.rootPageBoxInstance.resolveAutoSizing(this),this.pageManager=new jh(r,this.style.pageScope,this.rootPageBoxInstance,this,i);for(var o,a=[],s=R(this.style.fontFaces);!(o=s()).done;){var l=o.value;if(!l.condition||l.condition.evaluate(this)){var h=HD(l.properties,this),c=new zD(h);a.push(c)}}this.fontMapper.findOrLoadFonts(a,this.faces).then(function(){(function(t,e,u){if(!ic)return Tn(!1);var n=ac(t);if(0===n.length)return Tn(!1);var i=n.some(function(t){return!(t.async||t.defer||"module"===t.type)}),r=i?function(t,e,u){var n,i=null!=(n=e.document.querySelector("[data-vivliostyle-textcontent]"))?n:e.document.createElement("div");return i.style.position="fixed",i.style.fontSize="0",i.setAttribute("data-vivliostyle-textcontent","true"),i.setAttribute("aria-hidden","true"),i.style.fontFamily=lc(t,u),i.textContent=t.documentElement.textContent,e.document.body.appendChild(i),i}(t,e,u):null,o=e.document.fonts,a=e.$,s=!1,l=xn("loadScripts");return l.loop(function(){if(0===n.length)return i?l.sleep(20).thenAsync(function(){var t,u;return"loading"===o.status||e.document.documentElement.classList.contains("wf-loading")||null!=(t=e.FontJSON)&&t.Font&&null!=(u=e.ret)&&u.readyState&&e.ret.readyState<4?Tn(!0):Tn(!1)}):Tn(!1);var t=n.shift();return sc(t,e,{inHead:!0,forceDefer:s}).thenAsync(function(){return s||e.$===a||(rc.push(t),s=!0),0===n.length&&i&&(D.debug("dispatchEvent: DOMContentLoaded (document)"),e.document.dispatchEvent(new Event("DOMContentLoaded"))),Tn(!0)})}).then(function(){r&&r.remove(),l.finish(!0)}),l.result()})(t.xmldoc.document,t.viewport.window,t.styler).thenFinish(e)});var d=this.style.pageProps;return d[""]||(d[""]={}),Object.keys(d).forEach(function(e){var u=d[e];t.styler.cascade.applyVarFilter([u],t.styler,null),t.styler.cascade.applyCalcFilter(u,t.styler.context);var n=Nh(yh(u),t);t.pageSheetSize[e]={width:n.pageWidth+2*n.cropOffset,height:n.pageHeight+2*n.cropOffset}}),e.result()},u.matchStartPageSide=function(t){var e=this.pageNumberOffset%2==(this.isVersoFirstPage?1:0),u=this.pageProgression==exports.PageProgression.LTR;switch(t){case"left":return e!==u;case"right":return e===u;case"recto":return e;case"verso":return!e;default:return!0}},u.getStylerForDoc=function(t){var e=this.stylerMap[t.url];if(!e){var u=this.style.store.getStyleForDoc(t),n=new _t(u.rootScope,this.pageWidth(),this.pageHeight(),this.initialFontSize),i=this.counterStore.createCounterListener(t.url),r=this.counterStore.createCounterResolver(t.url,u.rootScope,u.pageScope);e=new DD(t,u.cascade,u.rootScope,n,this.primaryFlows,u.validatorSet,i,r),this.stylerMap[t.url]=e}return e},u.registerInstance=function(t,e){this.pageBoxInstances[t]=e},u.lookupInstance=function(t){return this.pageBoxInstances[t]},u.encounteredFlowChunk=function(t,e){var u=this.currentLayoutPosition;if(u){u.flows[t.flowName]?e=u.flows[t.flowName]:u.flows[t.flowName]=e;var n=u.flowPositions[t.flowName];n||(n=new Ir,u.flowPositions[t.flowName]=n);var i=new xr({steps:[{node:t.element,shadowType:wr.NONE,shadowContext:null,nodeShadow:null,shadowSibling:null,formattingContext:null,fragmentIndex:0}],offsetInNode:0,after:!1,preprocessedTextContent:null}),r=new Tr(i,t);n.positions.push(r)}},u.evalSupportsTest=function(t,e,u){if(u)return"selector"===t&&this.evalSupportsSelector(e);if(!t)return!1;var n=!0,i=new(/*#__PURE__*/function(){function t(){}var e=t.prototype;return e.unknownProperty=function(t,e){n=!1},e.invalidPropertyValue=function(t,e){n=!1},e.simpleProperty=function(t,e,u){},t}()),r=Pi(this.style.rootScope,new yn(e,null),"");return!!r&&(this.xmldoc.store.validatorSet.validatePropertyAndHandleShorthand(t,r,!1,i),n)},u.evalSupportsSelector=function(t){var e=new bc(null),u=new yn(t+"{}",e);return!!new Si(hi,u,e,"").runParser(Number.POSITIVE_INFINITY,!1,!1,!1,!1)&&!e.cascadeParserHandler.invalid},u.getConsumedOffset=function(t){for(var e=Number.POSITIVE_INFINITY,u=0;u<t.positions.length;u++){for(var n=t.positions[u].chunkPosition.primary,i=n.steps[0].node,r=n.offsetInNode,o=n.after,a=0;i.ownerDocument!=this.xmldoc.document;)a++,i=n.steps[a].node,o=!1,r=0;var s=this.xmldoc.getNodeOffset(i,r,o);s<e&&(e=s)}return e},u.getPosition=function(t,e){if(!t)return 0;var u=Number.POSITIVE_INFINITY;for(var n in this.primaryFlows){var i=t.flowPositions[n];if(e||i&&0!=i.positions.length||!this.currentLayoutPosition||(this.styler.styleUntilFlowIsReached(n),i=this.currentLayoutPosition.flowPositions[n],t!=this.currentLayoutPosition&&i&&(i=i.clone(),t.flowPositions[n]=i)),i){var r=this.getConsumedOffset(i);r<u&&(u=r)}}return u},u.dumpLocation=function(t){for(var e in D.debug("Location - page",this.currentLayoutPosition.page),D.debug(" current:",t),D.debug(" lookup:",this.lookupOffset),this.currentLayoutPosition.flowPositions)for(var u,n=R(this.currentLayoutPosition.flowPositions[e].positions);!(u=n()).done;)D.debug(" Chunk",e+":",u.value.flowChunk.startOffset)},u.matchPageSide=function(t){switch(t){case"left":case"right":case"recto":case"verso":return new he(this.style.pageScope,t+"-page").evaluate(this);default:return!0}},u.updateStartSide=function(t){for(var e in t.flowPositions){var u=t.flowPositions[e];if(u&&u.positions.length>0){var n=u.positions[0].flowChunk;this.getConsumedOffset(u)===n.startOffset&&(u.startBreakType=nr(ur(u.startBreakType,u.positions[0].flowChunk.breakBefore)))}}},u.selectPageMaster=function(t){var e=this.currentLayoutPosition,u=this.getPosition(e);if(u==Number.POSITIVE_INFINITY)return null;for(var n,i=this.rootPageBoxInstance.children,r=0;r<i.length;r++)if((n=i[r]).pageBox.pseudoName!==Lh){var o=1;n.pageBox.pseudoName!==lh||this.actualPageWidth&&this.actualPageHeight||(o=Infinity);var a=n.getProp(this,"utilization");a&&a.isNum()&&(o=a.num);var s=this.queryUnitSize("em",!1),l=this.pageWidth()*this.pageHeight(),D=Math.ceil(o*l/(s*s));this.lookupOffset=this.styler.styleUntil(u,D),this.updateStartSide(e),this.layoutPositionAtPageStart=e.clone(),this.initLingering(),this.clearScope(this.style.pageScope);var h=n.getProp(this,"enabled");if(!h||h===$e._true){if(1===e.page&&this.blankPageAtStart){n.style={};var c=t.size;t={},c&&(t.size=c)}return this.pageManager.getPageRulePageMaster(n,t)}}throw new Error("No enabled page masters")},u.flowChunkIsAfterParentFlowForcedBreak=function(t){var e=this.layoutPositionAtPageStart.flows,u=e[t.flowName].parentFlowName;if(u){var n=t.startOffset,i=e[u].forcedBreakOffsets;if(!i.length||n<i[0])return!1;var r=lt(i.length,function(t){return i[t]>n})-1,o=i[r],a=this.layoutPositionAtPageStart.flowPositions[u],s=this.getConsumedOffset(a);return!(o<s)&&(s<o||!this.matchPageSide(a.startBreakType))}return!1},u.setFormattingContextToColumn=function(t,e){var u=this.currentLayoutPosition.flows[e];u.formattingContext||(u.formattingContext=new Ns(null)),t.flowRootFormattingContext=u.formattingContext},u.layoutDeferredPageFloats=function(t){var e=this,u=t.pageFloatLayoutContext,n=u.getDeferredPageFloatContinuations(),i=xn("layoutDeferredPageFloats"),r=!1,o=0;return i.loopWithFrame(function(i){if(o!==n.length){var a=n[o++],s=a.float;if(function(t){if(!e.pageAreaWidth&&!e.pageAreaHeight&&t.floatReference!==Ka.PAGE)return!1;var u=e.layoutPositionAtPageStart.flowPositions.body,n=u&&e.getConsumedOffset(u),i=e.xmldoc.getNodeOffset(t.nodePosition.steps[0].node,0,!1);return null!=i&&null!=n&&i>n}(s))i.breakLoop();else{var l=(new es).findByFloat(s),D=l.findPageFloatFragment(s,u);if(!D||!D.hasFloat(s))return u.isForbidden(s)||u.hasPrecedingFloatsDeferredToNext(s)?(u.deferPageFloat(a),void i.breakLoop()):void t.layoutPageFloatInner(a,l,null,D).then(function(t){if(t){var e=u.parent.isInvalidated();e?i.breakLoop():(u.isInvalidated()&&!e&&(r=!0,u.validate()),i.continueLoop())}else i.breakLoop()});i.continueLoop()}}else i.breakLoop()}).then(function(){r&&u.invalidate(),i.finish(!0)}),i.result()},u.getLastAfterPositionIfDeferredFloatsExists=function(t,e){var u;return t.pageFloatLayoutContext.getPageFloatContinuationsDeferredToNext().length>0&&t.lastAfterPosition?(e?(u=e.clone()).primary=t.lastAfterPosition:u=new xr(t.lastAfterPosition),u):null},u.layoutColumn=function(t,e){var u=this,n=this.currentLayoutPosition.flowPositions[e];if(!n||!this.matchPageSide(n.startBreakType))return Tn(!0);this.setFormattingContextToColumn(t,e),t.init(),this.primaryFlows[e]&&t.bands.length>0&&(t.forceNonfitting=!1);var i=xn("layoutColumn");return this.layoutDeferredPageFloats(t).then(function(){if(t.pageFloatLayoutContext.isInvalidated())i.finish(!0);else{var r=[],o=[],a=!0;i.loopWithFrame(function(i){if(t.pageFloatLayoutContext.hasContinuingFloatFragmentsInFlow(e))i.breakLoop();else{for(var s=function(){for(var e=0;o.includes(e);)e++;var s=n.positions[e];if(s.flowChunk.startOffset>u.lookupOffset||u.flowChunkIsAfterParentFlowForcedBreak(s.flowChunk))return"break";for(var l=e+1;l<n.positions.length;l++)if(!o.includes(l)){var D=n.positions[l];if(D.flowChunk.startOffset>u.lookupOffset||u.flowChunkIsAfterParentFlowForcedBreak(D.flowChunk))break;D.flowChunk.isBetter(s.flowChunk)&&(s=D,e=l)}var h=s.flowChunk,c=!0;return t.layout(s.chunkPosition,a,n.breakAfter).then(function(l){if(t.pageFloatLayoutContext.isInvalidated())i.breakLoop();else{if(a=!1,s.flowChunk.repeated&&(null===l||h.exclusive)&&r.push(e),h.exclusive)return o.push(e),void i.breakLoop();var D=!!l||!!t.pageBreakType,d=u.getLastAfterPositionIfDeferredFloatsExists(t,l);t.pageBreakType&&d?(s.chunkPosition=d,n.breakAfter=t.pageBreakType,t.pageBreakType=null):(o.push(e),(l||d)&&(s.chunkPosition=l||d,r.push(e)),n.startBreakType=nr(t.pageBreakType)),D?i.breakLoop():(t.forceNonfitting=!1,c?c=!1:i.continueLoop())}}),c?(c=!1,{v:void 0}):void 0};n.positions.length-o.length>0;){var l=s();if("break"===l)break;if("object"==typeof l)return l.v}i.breakLoop()}}).then(function(){if(!t.pageFloatLayoutContext.isInvalidated()){n.positions=n.positions.filter(function(t,e){return r.includes(e)||!o.includes(e)}),"column"===n.breakAfter&&(n.breakAfter=null),t.saveDistanceToBlockEndFloats();var e=t.pageFloatLayoutContext.getMaxReachedAfterEdge();t.updateMaxReachedAfterEdge(e)}i.finish(!0)})}}),i.result()},u.createLayoutConstraint=function(t){var e=this.counterStore.createLayoutConstraint(this.currentLayoutPosition.page-1);return new al([e].concat(t.getLayoutConstraints()))},u.createAndLayoutColumn=function(t,e,u,n,i,r,o,a,s,l,D,h,c,d){var f,p=this,E=t.vertical?t.isAutoWidth&&t.isRightDependentOnAutoWidth:t.isAutoHeight&&t.isTopDependentOnAutoHeight,C=i.element,F=new Ja(a,Ka.COLUMN,null,o,null,null,null),A=this.currentLayoutPosition.clone(),g=xn("createAndLayoutColumn");return g.loopWithFrame(function(t){var g=p.createLayoutConstraint(F);if(s>1){var v=p.viewport.document.createElement("div");if(Z(v,"position","absolute"),C.appendChild(v),(f=new ll(v,c,p.clientLayout,g,F)).forceNonfitting=d,f.vertical=i.vertical,f.rtl=i.rtl,f.snapHeight=i.snapHeight,f.snapWidth=i.snapWidth,i.vertical){var m=(i.rtl?s-r-1:r)*(D+l)+i.paddingTop,B=parseFloat(C.style.width);f.setHorizontalPosition(i.paddingLeft+B-i.width,i.width),f.setVerticalPosition(m,D)}else{var w=(i.rtl?s-r-1:r)*(D+l)+i.paddingLeft;f.setVerticalPosition(i.paddingTop,i.height),f.setHorizontalPosition(w,D)}f.originX=e,f.originY=u}else(f=new ll(C,c,p.clientLayout,g,F)).copyFrom(i);f.exclusions=E?[]:n.concat(),f.innerShape=h,F.setContainer(f),f.width>=0?p.layoutColumn(f,o).then(function(){F.isInvalidated()||F.finish(),f.pageFloatLayoutContext.isInvalidated()&&!a.isInvalidated()?(f.pageFloatLayoutContext.validate(),p.currentLayoutPosition=A.clone(),f.element!==C&&C.removeChild(f.element),t.continueLoop()):t.breakLoop()}):(F.finish(),t.breakLoop())}).then(function(){g.finish(f)}),g.result()},u.setPagePageFloatLayoutContextContainer=function(t,e,u){(e instanceof Wh||e instanceof hh&&!(e instanceof Vh))&&t.setContainer(u)},u.getRegionPageFloatLayoutContext=function(t,e,u,n){var i=e.getProp(this,"writing-mode")||null,r=e.getProp(this,"direction")||null;return new Ja(t,Ka.REGION,u,n,null,i,r)},u.layoutFlowColumnsWithBalancing=function(t,e,u,n,i,r,o,a,s){var l=this,D=this.currentLayoutPosition.clone(),h=this.getRegionPageFloatLayoutContext(r,e,o,a),c=!0,d=function(){return l.currentLayoutPosition=D.clone(),l.layoutFlowColumns(t,e,u,n,i,r,h,o,a,s,c).thenAsync(function(t){return Tn(t?{columns:t,position:l.currentLayoutPosition}:null)})};return d().thenAsync(function(t){if(!t)return Tn(null);if(s<=1)return Tn(t.columns);var u=e.getProp(l,"column-fill")||$e.balance,n=function(t,e,u,n,i,r,o){if(e===$e.auto)return null;var a=r[r.length-1];return 0===o.positions.length||a&&a.pageBreakType?new uD(u,n,i,t):e===$e.balance_all?new rD(u,n,i):null}(s,u,d,h,o,t.columns,l.currentLayoutPosition.flowPositions[a]);return n?(c=!1,r.lock(),h.lock(),n.balanceColumns(t).thenAsync(function(t){return r.unlock(),r.validate(),h.unlock(),l.currentLayoutPosition=t.position,Tn(t.columns)})):Tn(t.columns)})},u.layoutFlowColumns=function(t,e,u,n,i,r,o,a,s,l,D){var h=this,c=xn("layoutFlowColumns"),d=this.currentLayoutPosition.clone(),f=e.getPropAsNumber(this,"column-gap"),p=l>1?e.getPropAsNumber(this,"column-width"):a.width,E=e.getActiveRegions(this),C=Iu(e.getProp(this,"shape-inside"),0,0,a.width,a.height,this),F=new dc(s,this,this.viewport,this.styler,E,this.xmldoc,this.faces,this.style.footnoteProps,this,t,this.customRenderer,this.fallbackMap,this.documentURLTransformer),A=0,g=null,v=[];return c.loopWithFrame(function(t){h.createAndLayoutColumn(e,u,n,i,a,A++,s,o,l,f,p,C,F,D).then(function(e){return r.isInvalidated()?(v=null,void t.breakLoop()):(!(e.pageBreakType&&"column"!==e.pageBreakType)&&A!==l||o.isInvalidated()||o.finish(),o.isInvalidated()?(A=0,h.currentLayoutPosition=d.clone(),o.validate(),void(o.isLocked()?(v=null,t.breakLoop()):t.continueLoop())):(v[A-1]=g=e,g.pageBreakType&&"column"!=g.pageBreakType&&(A=l,"region"!=g.pageBreakType&&(h.pageBreaks[s]=!0)),void(A<l?t.continueLoop():t.breakLoop())))})}).then(function(){c.finish(v)}),c.result()},u.layoutContainer=function(t,e,u,n,i,r,o){var a=this;e.reset();var s=e.getProp(this,"enabled");if(s&&s!==$e._true)return Tn(!0);var l=xn("layoutContainer"),h=e.getProp(this,"wrap-flow")===$e.auto,c=e.getProp(this,"flow-from"),d=this.viewport.document.createElement("div"),f=e.getProp(this,"position");Z(d,"position",f?f.name:"absolute");var p=e instanceof Vh;e instanceof dh?u.appendChild(d):u.insertBefore(d,u.firstChild);var E,C=new Rr(d);C.vertical=e.vertical,C.rtl=e.rtl,C.exclusions=r,e.prepareContainer(this,C,t,this.faces,this.clientLayout),e instanceof Vh&&(C.width<=0||C.height<=0)&&D.warn("Negative or zero page area size"),C.originX=n,C.originY=i,n+=C.left+C.marginLeft+C.borderLeft,i+=C.top+C.marginTop+C.borderTop,this.setPagePageFloatLayoutContextContainer(o,e,C);var F,A,g,v,m=!1;if(c&&c.isIdent())if(this.pageBreaks[c.toString()])o.isInvalidated()||e.finishContainer(this,C,t,null,1,this.clientLayout,this.faces),E=Tn(!0);else{var B=xn("layoutContainer.inner"),w=c.toString(),y=e.getPropAsNumber(this,"column-count");this.layoutFlowColumnsWithBalancing(t,e,n,i,r,o,C,w,y).then(function(u){if(!o.isInvalidated()){var n=u[0];n.element===d&&(C=n),C.computedBlockSize=Math.max.apply(null,u.map(function(t){return t.computedBlockSize})),e.finishContainer(a,C,t,n,y,a.clientLayout,a.faces);var i=a.currentLayoutPosition.flowPositions[w];i&&"region"===i.breakAfter&&(i.breakAfter=null)}B.finish(!0)}),E=B.result()}else{var N=e.getProp(this,"content");if(N instanceof je&&N.expr instanceof de&&N.expr.str.startsWith("running-element-"))N.visit(new kr(d,this,N,this.counterStore.getExprContentListener()));else if(N&&Lr(N)){var b="span";N.url&&(b="img");var S=this.viewport.document.createElement(b);N.visit(new kr(S,this,N,this.counterStore.getExprContentListener())),d.appendChild(S),"img"==b&&e.transferSingleUriContentProps(this,S,this.faces),e.transferContentProps(this,C,t,this.faces),"span"==b&&(F=S,A=e.getProp(this,"text-autospace"),g=e.getProp(this,"text-spacing-trim"),v=e.getProp(this,"hanging-punctuation"),Ks.processGeneratedContent(F,A,g,v,this.lang,e.vertical))}else e.suppressEmptyBoxGeneration&&(u.removeChild(d),m=!0);m||e.finishContainer(this,C,t,null,1,this.clientLayout,this.faces),E=Tn(!0)}return E.then(function(){if(o.isInvalidated())l.finish(!0);else{if(!e.isAutoHeight||Math.floor(C.computedBlockSize)>0){if(!m&&!h){var s=e.getProp(a,"shape-outside"),D=C.getOuterShape(s,a);r.push(D)}}else if(0==e.children.length)return u.removeChild(d),void l.finish(!0);var c=p?0:e.children.length-1;l.loop(function(){for(;c>=0&&c<e.children.length;){var u=e.children[p?c++:c--],s=a.layoutContainer(t,u,d,n,i,r,o);if(s.isPending())return s.thenAsync(function(){return Tn(!o.isInvalidated())});if(o.isInvalidated())break}return Tn(!1)}).then(function(){l.finish(!0)})}}),l.result()},u.processLinger=function(){var t=this.currentLayoutPosition.page;for(var e in this.currentLayoutPosition.flowPositions)for(var u=this.currentLayoutPosition.flowPositions[e],n=u.positions.length-1;n>=0;n--){var i=u.positions[n];i.flowChunk.startPage>=0&&i.flowChunk.startPage+i.flowChunk.linger-1<=t&&u.positions.splice(n,1)}},u.initLingering=function(){var t=this.currentLayoutPosition.page;for(var e in this.currentLayoutPosition.flowPositions)for(var u=this.currentLayoutPosition.flowPositions[e],n=u.positions.length-1;n>=0;n--){var i=u.positions[n];i.flowChunk.startPage<0&&i.flowChunk.startOffset<this.lookupOffset&&(i.flowChunk.startPage=t)}},u.noMorePrimaryFlows=function(t){for(var e in this.primaryFlows){var u=t.flowPositions[e];if(u&&u.positions.length>0)return!1}return!0},u.layoutNextPage=function(t,e){var u=this,n=t.container===t.bleedBox;if(this.pageBreaks={},e?(this.currentLayoutPosition=e.clone(),this.styler.replayFlowElementsFromOffset(e.highestSeenOffset)):(this.currentLayoutPosition=new Pr,this.styler.replayFlowElementsFromOffset(-1)),this.lang&&t.bleedBox.setAttribute("lang",this.lang),(e=this.currentLayoutPosition).page>1e4)throw new Error("Too many pages generated (over 10000 pages)");e.page++;var i,r=e.startSideOfFlow("body");e.isBlankPage=Ki(r)&&this.matchPageSide(r),t.isBlankPage=e.isBlankPage,null==t.pageType&&(t.pageType=null!=(i=t.isBlankPage?this.styler.cascade.previousPageType:this.styler.cascade.currentPageType)?i:""),this.clearScope(this.style.pageScope),this.layoutPositionAtPageStart=e.clone();var o=n?{}:this.pageManager.getCascadedPageStyle(t.pageType);this.styler.cascade.applyVarFilter([o],this.styler,null),this.styler.cascade.applyCalcFilter(o,this.styler.context);var a=this.selectPageMaster(o);if(!a)return Tn(null);var s=0;if(!n){t.setAutoPageWidth(a.pageBox.specified.width.value===Ze),t.setAutoPageHeight(a.pageBox.specified.height.value===Je),this.counterStore.setCurrentPage(t),this.counterStore.updatePageCounters(o,this);var l=Nh(yh(o),this);this.setPageSizeAndBleed(l,t),function(t,e,u,n){var i=!1,r=!1,o=t.marks;if(o){var a=o.value;a instanceof Ge?a.values.forEach(function(t){t===$e.crop?i=!0:t===$e.cross&&(r=!0)}):a===$e.crop?i=!0:a===$e.cross&&(r=!0)}var s=e.bleed;if(i||r){var l=u.container,D=l.ownerDocument,h=Ye(gh,n),c=Math.max(0,e.bleedOffset-Ye(Bh,n)),d=e.bleedOffset-c;i&&Object.keys(vh).forEach(function(t){var e=function(t,e,u,n,i,r){var o=n;o<=i+2*Lt.mm&&(o=i+n/2);var a=Math.max(n,o),s=i+a+u/2,l=bh(t,s,s),D=[[0,i+n],[n,i+n],[n,i+n-o]],h=D.map(function(t){return[t[1],t[0]]});e!==vh.TOP_RIGHT&&e!==vh.BOTTOM_RIGHT||(D=D.map(function(t){return[i+a-t[0],t[1]]}),h=h.map(function(t){return[i+a-t[0],t[1]]})),e!==vh.BOTTOM_LEFT&&e!==vh.BOTTOM_RIGHT||(D=D.map(function(t){return[t[0],i+a-t[1]]}),h=h.map(function(t){return[t[0],i+a-t[1]]}));var c=Sh(t,u);c.setAttribute("points",D.map(function(t){return t.join(",")}).join(" ")),l.appendChild(c);var d=Sh(t,u);return d.setAttribute("points",h.map(function(t){return t.join(",")}).join(" ")),l.appendChild(d),e.split(" ").forEach(function(t){l.style[t]=r+"px"}),l}(D,vh[t],h,d,s,c);l.appendChild(e)}),r&&Object.keys(mh).forEach(function(t){var e=function(t,e,u,n,i){var r,o,a=2*n;e===mh.TOP||e===mh.BOTTOM?(r=a,o=n):(r=n,o=a);var s=bh(t,r,o),l=Sh(t,u);l.setAttribute("points","0,"+o/2+" "+r+","+o/2),s.appendChild(l);var D=Sh(t,u);D.setAttribute("points",r/2+",0 "+r/2+","+o),s.appendChild(D);var h,c=Sh(t,u,"circle");switch(c.setAttribute("cx",r/2),c.setAttribute("cy",o/2),c.setAttribute("r",n/4),s.appendChild(c),e){case mh.TOP:h=mh.BOTTOM;break;case mh.BOTTOM:h=mh.TOP;break;case mh.LEFT:h=mh.RIGHT;break;case mh.RIGHT:h=mh.LEFT}return Object.keys(mh).forEach(function(t){var u=mh[t];u===e?s.style[u]=i+"px":u!==h&&(s.style[u]="0",s.style["margin-"+u]="auto")}),s}(D,mh[t],h,d,c);l.appendChild(e)})}}(o,l,t,this),s=l.bleedOffset+l.bleed}var D=!n&&a.getProp(this,"writing-mode")||$e.horizontal_tb;this.pageVertical=D!=$e.horizontal_tb;var h=a.getProp(this,"direction")||$e.ltr,c=new Ja(this.rootPageFloatLayoutContext,Ka.PAGE,null,null,null,D,h),d=xn("layoutNextPage");return d.loopWithFrame(function(e){u.layoutContainer(t,a,t.bleedBox,s,s,[],c).then(function(){c.isInvalidated()||c.finish(),c.isInvalidated()?(u.currentLayoutPosition=u.layoutPositionAtPageStart.clone(),c.validate(),e.continueLoop()):e.breakLoop()})}).then(function(){if(a.adjustPageLayout(u,t,u.clientLayout),!n){var i=new he(a.pageBox.scope,"left-page");t.side=i.evaluate(u)?exports.PageSide.LEFT:exports.PageSide.RIGHT,u.processLinger(),e=u.currentLayoutPosition,Object.keys(e.flowPositions).forEach(function(t){var n=e.flowPositions[t],i=n.breakAfter;!i||"page"!==i&&u.matchPageSide(i)||(n.breakAfter=null)})}u.currentLayoutPosition=u.layoutPositionAtPageStart=null,e.highestSeenOffset=u.styler.getReachedOffset();var r=u.style.store.getTriggersForDoc(u.xmldoc);t.finish(r,u.clientLayout),u.noMorePrimaryFlows(e)&&(e=null),d.finish(e)}),d.result()},u.setPageSizeAndBleed=function(t,e){this.actualPageWidth=t.pageWidth,this.actualPageHeight=t.pageHeight,this.pageSheetWidth=t.pageWidth+2*t.cropOffset,this.pageSheetHeight=t.pageHeight+2*t.cropOffset,e.container.style.width=this.pageSheetWidth+"px",e.container.style.height=this.pageSheetHeight+"px",e.bleedBox.style.left=t.bleedOffset+"px",e.bleedBox.style.right=t.bleedOffset+"px",e.bleedBox.style.top=t.bleedOffset+"px",e.bleedBox.style.bottom=t.bleedOffset+"px",e.bleedBox.style.padding=t.bleed+"px"},e}(_t),Nc=/*#__PURE__*/function(t){function e(e,u,n,i){var r;return(r=t.call(this,e.rootScope,e,u,n,i,e.validatorSet,!n)||this).masterHandler=void 0,r.insideRegion=!1,r.masterHandler=e,r}N(e,t);var u=e.prototype;return u.startPageTemplateRule=function(){},u.startPageMasterRule=function(t,e,u){var n=new qD(this.masterHandler.pageScope,t,e,u,this.masterHandler.rootBox,this.condition,this.owner.getBaseSpecificity());this.masterHandler.pushHandler(new Ch(n.scope,this.masterHandler,n,this.validatorSet))},u.startWhenRule=function(t){var u=t.expr;null!=this.condition&&(u=ge(this.scope,this.condition,u)),this.masterHandler.pushHandler(new e(this.masterHandler,u,this,this.regionId))},u.startDefineRule=function(){this.masterHandler.pushHandler(new Ba(this.scope,this.owner))},u.startFontFaceRule=function(){var t={};this.masterHandler.fontFaces.push({properties:t,condition:this.condition}),this.masterHandler.pushHandler(new wa(this.scope,this.owner,null,t,this.masterHandler.validatorSet))},u.startFlowRule=function(t){var e=this.masterHandler.flowProps[t];e||(this.masterHandler.flowProps[t]=e={}),this.masterHandler.pushHandler(new wa(this.scope,this.owner,null,e,this.masterHandler.validatorSet))},u.startViewportRule=function(){var t={};this.masterHandler.viewportProps.push(t),this.masterHandler.pushHandler(new wa(this.scope,this.owner,this.condition,t,this.masterHandler.validatorSet))},u.startFootnoteRule=function(t){var e=this.masterHandler.footnoteProps;if(t){var u=ro(e,"_pseudos");(e=u[t])||(u[t]=e={})}this.masterHandler.pushHandler(new wa(this.scope,this.owner,null,e,this.masterHandler.validatorSet))},u.startRegionRule=function(){this.insideRegion=!0,this.startSelectorRule()},u.startPageRule=function(){var t=new uc(this.masterHandler.pageScope,this.masterHandler,this,this.validatorSet,this.masterHandler.pageProps);this.masterHandler.pushHandler(t),t.startPageRule()},u.startRuleBody=function(){if(Ea.prototype.startRuleBody.call(this),this.insideRegion){this.insideRegion=!1;var t="R"+this.masterHandler.regionCount++;this.special("region-id",Le(t)),this.endRule();var u=new e(this.masterHandler,this.condition,this,t);this.masterHandler.pushHandler(u),u.startRuleBody()}},e}(Ea),bc=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this)||this).validatorSet=void 0,u.rootScope=void 0,u.pageScope=void 0,u.rootBox=void 0,u.cascadeParserHandler=void 0,u.regionCount=0,u.fontFaces=[],u.footnoteProps={},u.flowProps={},u.viewportProps=[],u.pageProps={},u.validatorSet=e,u.rootScope=new Rt(null),u.pageScope=new Rt(u.rootScope),u.rootBox=new KD(u.rootScope),u.cascadeParserHandler=new Nc(I(u),null,null,null),u.slave=u.cascadeParserHandler,u}return N(e,t),e}(si);function Sc(t,e){return e.parseOPSResource(t)}var xc=/*#__PURE__*/function(t){function e(e){var u;return(u=t.call(this,Sc,Pn.DOCUMENT)||this).fontDeobfuscator=void 0,u.styleByKey={},u.styleFetcherByKey={},u.styleByDocURL={},u.triggersByDocURL={},u.validatorSet=null,u.styleSheets=[],u.triggerSingleDocumentPreprocessing=!1,u.fontDeobfuscator=e,u}N(e,t);var u=e.prototype;return u.init=function(t,e){var u=this;this.setStyleSheets(t,e);var n=xn("OPSDocStore.init");return this.validatorSet=MD(),Bc.get().then(function(){u.triggerSingleDocumentPreprocessing=!0,n.finish(!0)}),n.result()},u.getStyleForDoc=function(t){return this.styleByDocURL[t.url]},u.getTriggersForDoc=function(t){return this.triggersByDocURL[t.url]},u.setStyleSheets=function(t,e){this.clearStyleSheets(),t&&t.forEach(this.addAuthorStyleSheet,this),e&&e.forEach(this.addUserStyleSheet,this)},u.clearStyleSheets=function(){this.styleSheets.splice(0)},u.addAuthorStyleSheet=function(t){var e=t.url;e&&(e=W(X(e),U)),this.styleSheets.push({url:e,text:t.text,flavor:ui.AUTHOR,classes:null,media:null})},u.addUserStyleSheet=function(t){var e=t.url;e&&(e=W(X(e),U)),this.styleSheets.push({url:e,text:t.text,flavor:ui.USER,classes:null,media:null})},u.parseOPSResource=function(t){var e=this,u=xn("OPSDocStore.load"),n=t.url,i=n.endsWith("?viv-toc-box");return gc(t,this).then(function(t){if(t){if(e.triggerSingleDocumentPreprocessing)for(var r=f(exports.HOOKS.PREPROCESS_SINGLE_DOCUMENT),o=0;o<r.length;o++)try{r[o](t.document)}catch(t){D.warn("Error during single document preprocessing:",t)}for(var a=[],s=t.document.getElementsByTagNameNS(H.epub,"trigger"),l=0;l<s.length;l++){var h=s[l],c=h.getAttributeNS(H.EV,"observer"),d=h.getAttributeNS(H.EV,"event"),p=h.getAttribute("action"),E=h.getAttribute("ref");c&&d&&p&&E&&a.push({observer:c,event:d,action:p,ref:E})}e.triggersByDocURL[n]=a;var C=[];if(C.push({url:W("user-agent-page.css",z),text:Kn,flavor:ui.USER_AGENT,classes:null,media:null}),i)C.push({url:W("user-agent-toc.css",z),text:qn,flavor:ui.USER_AGENT,classes:null,media:null});else{for(var F,A=R(t.document.querySelectorAll("style, link, meta"));!(F=A()).done;){var g=F.value,v=g.localName;if(g.namespaceURI==H.XHTML)if("style"==v){var m=g.getAttribute("class"),B=g.getAttribute("media"),w=g.getAttribute("title");C.push({url:n,text:g.textContent,flavor:ui.AUTHOR,classes:w?m:null,media:B})}else if("link"==v){var y,N=g.getAttribute("href"),b=null==(y=g.getAttribute("rel"))?void 0:y.split(/\s+/),S=g.getAttribute("class"),x=g.getAttribute("media");if(N&&null!=b&&b.includes("stylesheet")&&(!b.includes("alternate")||S)){var T=W(N,n),I=g.getAttribute("title");C.push({url:T,text:null,classes:I?S:null,media:x,flavor:ui.AUTHOR})}}else"meta"==v&&"viewport"==g.getAttribute("name")&&C.push({url:n,text:e.processViewportMeta(g),flavor:ui.AUTHOR,classes:null,media:null})}for(var P=0;P<e.styleSheets.length;P++)C.push(e.styleSheets[P])}for(var k="",L=0;L<C.length;L++)k+=C[L].url,k+="^",C[L].text&&(k+=C[L].text),k+="^";var O=e.styleByKey[k];if(O)return e.styleByDocURL[n]=O,void u.finish(t);var _=e.styleFetcherByKey[k];_||(_=new Hn(function(){var t=xn("fetchStylesheet"),u=0,n=new bc(e.validatorSet);return t.loop(function(){if(u<C.length){var t=C[u++];return n.startStylesheet(t.flavor),null!==t.text?Ti(t.text,n,t.url,t.classes,t.media).thenReturn(!0):Ii(t.url,n,t.classes,t.media)}return Tn(!1)}).then(function(){var u=n.cascadeParserHandler.finish();O=new wc(e,n.rootScope,n.pageScope,u,n.rootBox,n.fontFaces,n.footnoteProps,n.flowProps,n.viewportProps,n.pageProps),e.styleByKey[k]=O,delete e.styleFetcherByKey[k],t.finish(O)}),t.result()},"FetchStylesheet "+n),e.styleFetcherByKey[k]=_,_.start()),_.get().then(function(i){e.styleByDocURL[n]=i,u.finish(t)})}else u.finish(null)}),u.result()},u.processViewportMeta=function(t){return""},e}(Jn),Tc="▸";function Ic(t){var e=Array.from(t.querySelectorAll("[role=doc-toc],nav[*|type=toc],nav[*|type=landmarks],nav[*|type=page-list]"));if(e.length>0)return e;for(var u,n=function(){var t=u.value;if(e.find(function(e){return e.contains(t)}))return"continue";var n=t;/^h[1-6]$/.test(n.localName)&&(n=n.previousElementSibling?n.nextElementSibling:n.parentElement),n&&n.querySelector("li a[href]")&&e.push(n)},i=R(t.querySelectorAll("nav,.toc,#toc,#table-of-contents,#contents,[role=directory]"));!(u=i()).done;)n();return e}var Pc=/*#__PURE__*/function(){function t(t,e,u,n,i,r,o,a,s,l){this.store=void 0,this.url=void 0,this.lang=void 0,this.clientLayout=void 0,this.fontMapper=void 0,this.rendererFactory=void 0,this.fallbackMap=void 0,this.documentURLTransformer=void 0,this.counterStore=void 0,this.pref=void 0,this.page=null,this.instance=null,this.store=t,this.url=e,this.lang=u,this.clientLayout=n,this.fontMapper=i,this.rendererFactory=o,this.fallbackMap=a,this.documentURLTransformer=s,this.counterStore=l,this.pref=yt(r),this.pref.spreadView=!1}var e=t.prototype;return e.setAutoHeight=function(t,e){if(0!=e--)for(var u=t.firstChild;u;u=u.nextSibling)if(1==u.nodeType){var n=u;"auto"!=J(n,"height","auto")&&(Z(n,"height","auto"),this.setAutoHeight(n,e)),"absolute"==J(n,"position","static")&&(Z(n,"position","relative"),this.setAutoHeight(n,e))}},e.makeCustomRenderer=function(t){var e=this.rendererFactory.makeCustomRenderer(t);return function(t,u,n){var i=n.behavior;if(i)switch(i.toString()){case"toc-node-anchor":n.color=$e.inherit,n["text-decoration"]=$e.none;break;case"toc-node":n.display=$e.block,n.margin=tu,n.padding=tu,n["padding-inline-start"]=new Oe(1.25,"em");break;case"toc-node-first-child":n.display=$e.inline_block,n.margin=new Oe(.2,"em"),n["vertical-align"]=$e.top,n.color=$e.inherit,n["text-decoration"]=$e.none;break;case"toc-container":n.padding=tu}if(!i||"toc-node"!=i.toString()&&"toc-container"!=i.toString())return e(t,u,n);var r=t.firstChild;r&&1!==r.nodeType&&pr(r)&&t.replaceChild(t.ownerDocument.createComment(r.textContent),r);var o=u.getAttribute("data-adapt-class");if("toc-node"==o){var a=u.firstChild;a.textContent!=Tc&&(a.textContent=Tc,Z(a,"cursor","pointer"),a.addEventListener("click",Rc,!1),a.setAttribute("role","button"),a.setAttribute("aria-expanded","false"),u.setAttribute("aria-expanded","false"),"0px"!==u.style.height&&(a.tabIndex=0))}var s=u.ownerDocument.createElement("div");if(s.setAttribute("data-adapt-process-children","true"),"toc-node"==i.toString()){var l=u.ownerDocument.createElement("div");if(l.textContent="▹",Z(l,"margin","0.2em 0 0 -1em"),Z(l,"margin-inline-start","-1em"),Z(l,"margin-inline-end","0"),Z(l,"display","inline-block"),Z(l,"width","1em"),Z(l,"text-align","center"),Z(l,"vertical-align","top"),Z(l,"cursor","default"),Z(l,"font-family","Menlo,sans-serif"),s.appendChild(l),Z(s,"overflow","hidden"),s.setAttribute("data-adapt-class","toc-node"),s.setAttribute("role","treeitem"),"toc-node"==o||"toc-container"==o){Z(s,"height","0px");var D=t.firstElementChild;D&&"a"===D.localName&&(D.tabIndex=-1)}else u.setAttribute("role","tree")}else"toc-node"==o&&(s.setAttribute("data-adapt-class","toc-container"),s.setAttribute("role","group"),s.setAttribute("aria-hidden","true"));return Tn(s)}},e.showTOC=function(t,e,u,n,i){var r=this;if(this.page)return Tn(this.page);var o=xn("showTOC"),a=new hr(t,t);this.page=a;var s=M(this.url)+"?viv-toc-box";return this.store.load(s).then(function(n){for(var s,l=R(Ic(n.document));!(s=l()).done;)s.value.setAttribute("role","doc-toc");var D=r.store.getStyleForDoc(n),h=D.sizeViewport(u,1e5,i);e=new Cc(e.window,h.fontSize,0,e.root,h.width,h.height);var c=r.makeCustomRenderer(n),d=new yc(D,n,r.lang,e,r.clientLayout,r.fontMapper,c,r.fallbackMap,0,r.documentURLTransformer,r.counterStore);r.instance=d,d.pref=r.pref,d.init().then(function(){d.layoutNextPage(a,null).then(function(){r.setAutoHeight(t,2),o.finish(a)})})}),o.result()},e.hideTOC=function(){this.page&&(this.page.container.style.visibility="hidden",this.page.container.setAttribute("aria-hidden","true"))},e.isTOCVisible=function(){return!!this.page&&"visible"===this.page.container.style.visibility},e.getTOC=function(){if(!this.page)return[];function t(t){if(!t)return[];var u=t.querySelectorAll(":scope > [role=treeitem] > a[href]");return Array.from(u).map(e)}function e(e){return{id:new URL(e.href).hash.match(/^#?(.*)$/)[1],title:e.innerText,children:t(e.parentElement.querySelector("[role=group]"))}}return t(this.page.container.querySelector("[role=tree]"))},t}();function Rc(t){var e=t.target,u=e.textContent==Tc;e.textContent=u?"▾":Tc;var n=e.parentNode;e.setAttribute("aria-expanded",u?"true":"false"),n.setAttribute("aria-expanded",u?"true":"false");for(var i=n.firstChild;i;){if(1===i.nodeType){var r=i,o=r.getAttribute("data-adapt-class");if("toc-container"===o){if(r.setAttribute("aria-hidden",u?"false":"true"),r.firstChild){i=r.firstChild;continue}}else if("toc-node"===o&&(r.style.height=u?"auto":"0px",r.children.length>=2&&(r.children[1].tabIndex=u?0:-1),r.children.length>=3&&(r.children[0].tabIndex=u?0:-1,!u))){var a=r.children[0];if("▾"==a.textContent){a.textContent=Tc,a.setAttribute("aria-expanded","false"),r.setAttribute("aria-expanded","false"),i=r.children[2];continue}}}for(;!i.nextSibling&&i.parentNode!==n;)i=i.parentNode;i=i.nextSibling}t.stopPropagation()}var kc=/*#__PURE__*/function(t){function e(){var e;return(e=t.call(this,null)||this).plainXMLStore=void 0,e.jsonStore=void 0,e.opfByURL={},e.primaryOPFByEPubURL={},e.deobfuscators={},e.documents={},e.fontDeobfuscator=e.makeDeobfuscatorFactory(),e.plainXMLStore=new Jn(gc,Pn.DOCUMENT),e.jsonStore=new Jn(ti,Pn.TEXT),e}N(e,t);var u=e.prototype;return u.makeDeobfuscatorFactory=function(){var t=this;return function(e){return t.deobfuscators[e]}},u.loadAsPlainXML=function(t,e,u){return this.plainXMLStore.load(t,e,u)},u.startLoadingAsPlainXML=function(t){this.plainXMLStore.fetch(t)},u.loadAsJSON=function(t,e,u){return this.jsonStore.load(t,e,u)},u.loadPubDoc=function(t){var e=this,u=xn("loadPubDoc");return Qn(t,null,"HEAD").then(function(n){if(n.status>=400)e.loadEPUBDoc(t).then(function(e){e?u.finish(e):(D.error("Failed to fetch a source document from "+t+" ("+n.status+(n.statusText?" "+n.statusText:"")+")"),u.finish(null))});else if(n.status||n.responseXML||n.responseText||n.responseBlob||n.contentType||/\/[^/.]+(?:[#?]|$)/.test(t)&&(t=t.replace(/([#?]|$)/,"/$1")),"application/oebps-package+xml"==n.contentType||/\.opf(?:[#?]|$)/.test(t)){var i=t.match(/^((?:.*\/)?)([^/]*)$/);e.loadOPF(i[1],i[2]).thenFinish(u)}else"application/ld+json"==n.contentType||"application/webpub+json"==n.contentType||"application/audiobook+json"==n.contentType||"application/json"==n.contentType||/\.json(?:ld)?(?:[#?]|$)/.test(t)?e.loadAsJSON(t,!0).then(function(n){if(!n)return e.reportLoadError(t),void u.finish(null);var i=new Xc(e,t);i.initWithWebPubManifest(n,void 0,t).then(function(){u.finish(i)})}):e.loadWebPub(t).then(function(n){n?u.finish(n):e.loadEPUBDoc(t).then(function(e){e?u.finish(e):(D.error("Failed to load "+t+"."),u.finish(null))})})}),u.result()},u.loadEPUBDoc=function(t){var e=this,u=xn("loadEPUBDoc");return t.endsWith("/")||(t+="/"),this.startLoadingAsPlainXML(t+"META-INF/encryption.xml"),this.loadAsPlainXML(t+"META-INF/container.xml").then(function(n){if(n)for(var i,r=R(n.doc().child("container").child("rootfiles").child("rootfile").attribute("full-path"));!(i=r()).done;){var o=i.value;if(o)return void e.loadOPF(t,o).thenFinish(u)}u.finish(null)}),u.result()},u.loadOPF=function(t,e){var u=this,n=t+e,i=this.opfByURL[n];if(i)return Tn(i);var r=xn("loadOPF");return this.loadAsPlainXML(n,!0,"Failed to fetch EPUB OPF "+n).then(function(e){e?u.loadAsPlainXML(t+"META-INF/encryption.xml").then(function(o){(i=new Xc(u,t)).initWithXMLDoc(e,o).then(function(){u.opfByURL[n]=i,u.primaryOPFByEPubURL[t]=i,r.finish(i)})}):u.reportLoadError(n)}),r.result()},u.loadWebPub=function(t){var e=this,u=xn("loadWebPub");return this.load(t).then(function(n){if(n)if(n.document.querySelector("a[href='META-INF/'],a[href$='/META-INF/']"))u.finish(null);else{var i=n.document,r=new Xc(e,t),o=i.querySelector("link[rel='publication'],link[rel='manifest'][type='application/webpub+json']");if(o){var a=o.getAttribute("href");if(/^#/.test(a)){var s=_(i.getElementById(a.substr(1)).textContent);r.initWithWebPubManifest(s,i).then(function(){u.finish(r)})}else{var l=W(o.getAttribute("href"),t);e.loadAsJSON(l,!0,"Failed to fetch Publication Manifest "+l).then(function(t){r.initWithWebPubManifest(t,i,l).then(function(){u.finish(r)})})}}else r.initWithWebPubManifest({},i).then(function(){r.xhtmlToc&&r.xhtmlToc.src===n.url&&0===Ic(i).length&&(r.xhtmlToc=null),u.finish(r)})}else e.reportLoadError(t)}),u.result()},u.addDocument=function(t,e){var u=xn("EPUBDocStore.load"),n=M(t);return(this.documents[n]=this.parseOPSResource({status:200,statusText:"",url:n,contentType:e.contentType,responseText:null,responseXML:e,responseBlob:null})).thenFinish(u),u.result()},u.reportLoadError=function(t){var e,u=this,n=function(t){return t.replace(/([^:/?#]|^)[/?#].*/,"$1")};t.startsWith("data:")?D.error("Failed to load "+t+". Invalid data."):t.startsWith("http:")&&U.startsWith("https:")?D.error("Failed to load "+t+'. Mixed Content ("http:" content on "https:" context) is not allowed.'):(e=n(t))===n(U)||Object.keys(u.resources).find(function(t){return u.resources[t]&&n(t)===e})||/\.(xhtml|xht|xml|opf)$/i.test(t)?D.error("Failed to load "+t+". The target resource is invalid."):D.error("Failed to load "+t+". This may be caused by the server not allowing cross-origin resource sharing (CORS).")},u.load=function(e){var u=this,n=M(e),i=this.documents[n];if(i)return i.isPending()?i:Tn(i.get());var r=xn("EPUBDocStore.load");return(i=t.prototype.load.call(this,n,!0,"Failed to fetch a source document from "+n)).then(function(t){t?r.finish(t):u.reportLoadError(n)}),r.result()},u.processViewportMeta=function(t){var e=t.getAttribute("content");if(!e)return"";for(var u,n={};null!=(u=e.match(/^,?\s*([-A-Za-z_.][-A-Za-z_0-9.]*)\s*=\s*([-+A-Za-z_0-9.]*)\s*/));)e=e.substr(u[0].length),n[u[1]]=u[2];var i=n.width-0,r=n.height-0;return i&&r?"@-epubx-viewport{width:"+i+"px;height:"+r+"px;}"+(Object.values(this.primaryOPFByEPubURL).find(function(t){return t.prePaginated})?"@page{size:"+i+"px "+r+"px;margin:0;}":"@page{margin:0;}"):""},e}(xc),Lc=/*#__PURE__*/function(){function t(){this.id=null,this.src="",this.mediaType=null,this.title=null,this.itemRefElement=null,this.spineIndex=-1,this.compressedSize=0,this.compressed=null,this.epage=0,this.epageCount=0,this.startPage=null,this.skipPagesBefore=null,this.itemProperties=void 0,this.itemProperties=O}var e=t.prototype;return e.initWithElement=function(t,e){this.id=t.getAttribute("id"),this.src=W(t.getAttribute("href"),e),this.mediaType=t.getAttribute("media-type");var u=t.getAttribute("properties");u&&(this.itemProperties=function(t){for(var e={},u=0;u<t.length;u++)e[t[u]]=!0;return e}(u.split(/\s+/)))},e.initWithParam=function(t){this.spineIndex=t.index,this.id="item"+(t.index+1),this.src=t.url,this.startPage=t.startPage,this.skipPagesBefore=t.skipPagesBefore},t}();function Oc(t){return t.id}var _c={dcterms:"http://purl.org/dc/terms/",marc:"http://id.loc.gov/vocabulary/",media:"http://www.idpf.org/epub/vocab/overlays/#",rendition:"http://www.idpf.org/vocab/rendition/#",onix:"http://www.editeur.org/ONIX/book/codelists/current.html#",xsd:"http://www.w3.org/2001/XMLSchema#",opf:"http://www.idpf.org/2007/opf"},Mc="http://idpf.org/epub/vocab/package/meta/#",Uc={language:_c.dcterms+"language",title:_c.dcterms+"title",creator:_c.dcterms+"creator",layout:_c.rendition+"layout",titleType:Mc+"title-type",displaySeq:Mc+"display-seq",alternateScript:Mc+"alternate-script",role:Mc+"role"};function Vc(t,e){var u={};return function(n,i){var r,o,a,s,l,D=n.r||u,h=i.r||u;if(t==Uc.title&&(a="main"==(null==(s=D[Uc.titleType])?void 0:s[0].v))!=("main"==(null==(l=h[Uc.titleType])?void 0:l[0].v)))return a?-1:1;var c=parseInt(null==(r=D[Uc.displaySeq])?void 0:r[0].v,10);isNaN(c)&&(c=Number.MAX_VALUE);var d,f,p=parseInt(null==(o=h[Uc.displaySeq])?void 0:o[0].v,10);return isNaN(p)&&(p=Number.MAX_VALUE),c!=p?c-p:t!=Uc.language&&e&&(a=(null==(d=D[Uc.language]||D[Uc.alternateScript])?void 0:d[0].v)==e)!=((null==(f=h[Uc.language]||h[Uc.alternateScript])?void 0:f[0].v)==e)?a?-1:1:n.o-i.o}}function Hc(){var t=window.MathJax;return t?t.Hub:null}var zc,Gc={"application/xhtml+xml":!0,"image/jpeg":!0,"image/png":!0,"image/svg+xml":!0,"image/gif":!0,"audio/mp3":!0},Wc="viv-id-",Xc=/*#__PURE__*/function(){function t(t,e){this.store=void 0,this.pubURL=void 0,this.opfXML=null,this.encXML=null,this.items=null,this.spine=null,this.itemMap=null,this.itemMapByPath=null,this.uid=null,this.bindings={},this.lang=null,this.epageCount=0,this.prePaginated=!1,this.epageIsRenderedPage=!0,this.epageCountCallback=null,this.metadata={},this.ncxToc=null,this.xhtmlToc=null,this.cover=null,this.fallbackMap={},this.pageProgression=null,this.documentURLTransformer=void 0,this.store=t,this.pubURL=e,this.documentURLTransformer=this.createDocumentURLTransformer(),Hc()&&(Ur[H.MATHML]=!0)}var e=t.prototype;return e.createDocumentURLTransformer=function(){var t=this,e=/*#__PURE__*/function(){function e(){}var u=e.prototype;return u.transformFragment=function(t,e){return Wc+at(e+(t?"#"+t:""),":")},u.transformURL=function(e,u){var n=e.match(/^([^#]*)#?(.*)$/);if(n){var i=n[1]||u,r=decodeURIComponent(n[2]);if(i&&t.spine.some(function(t){return t.src===i}))return"#"+this.transformFragment(r,i)}return e},u.restoreURL=function(t){"#"===t.charAt(0)&&(t=t.substring(1)),0===t.indexOf(Wc)&&(t=t.substring(7));var e=function(t,e){e="string"==typeof e?e:"\\u";var u=new RegExp(st(e)+"[0-9a-fA-F]{4}","g");return t.replace(u,function(t){return function(t,e){return 0===t.indexOf(e="string"==typeof e?e:"\\u")?String.fromCharCode(parseInt(t.substring(e.length),16)):t}(t,e)})}(t,":").match(/^([^#]*)#?(.*)$/);return e?[e[1],e[2]]:[]},e}();return new e},e.getMetadata=function(){return this.metadata},e.getPathFromURL=function(t){if(t.startsWith("data:"))return t===this.pubURL?"":t;if(this.pubURL){var e=W("",this.pubURL);return t===e||t+"/"===e?"":("/"!=e.charAt(e.length-1)&&(e+="/"),t.substr(0,e.length)==e?decodeURIComponent(t.substr(e.length)):null)}return t},e.initWithXMLDoc=function(t,e){var u=this;this.opfXML=t,this.encXML=e;var n=t.doc().child("package"),i=n.attribute("unique-identifier")[0];if(i){var r=t.getElement(t.url+"#"+i);r&&(this.uid=r.textContent.replace(/[ \n\r\t]/g,""))}var a={};for(var s in this.items=n.child("manifest").child("item").asArray().map(function(e){var n=new Lc,i=e;n.initWithElement(i,t.url);var r=i.getAttribute("fallback");return r&&!Gc[n.mediaType]&&(a[n.src]=r),!u.xhtmlToc&&n.itemProperties.nav&&(u.xhtmlToc=n),!u.cover&&n.itemProperties["cover-image"]&&(u.cover=n),n}),this.itemMap=ht(this.items,Oc),this.itemMapByPath=ht(this.items,function(t){return u.getPathFromURL(t.src)}),a)for(var l=s;;){var D=this.itemMap[a[l]];if(!D)break;if(Gc[D.mediaType]){this.fallbackMap[s]=D.src;break}l=D.src}this.spine=n.child("spine").child("itemref").asArray().map(function(t,e){var n=t,i=n.getAttribute("idref"),r=u.itemMap[i];return r&&(r.itemRefElement=n,r.spineIndex=e),r});var h=n.child("spine").attribute("toc")[0];h&&(this.ncxToc=this.itemMap[h]);var c=n.child("spine").attribute("page-progression-direction")[0];c&&(this.pageProgression=o(c));for(var d=e?e.doc().child("encryption").child("EncryptedData").predicate(vc.withChild("EncryptionMethod",vc.withAttribute("Algorithm","http://www.idpf.org/2008/embedding"))).child("CipherData").child("CipherReference").attribute("URI"):[],f=n.child("bindings").child("mediaType").asArray(),p=0;p<f.length;p++){var E=f[p].getAttribute("handler"),C=f[p].getAttribute("media-type");C&&E&&this.itemMap[E]&&(this.bindings[C]=this.itemMap[E].src)}if(this.metadata=function(t,e){var u;if(e){for(var n in u={},_c)u[n]=_c[n];for(var i;null!=(i=e.match(/^\s*([A-Z_a-z\u007F-\uFFFF][-.A-Z_a-z0-9\u007F-\uFFFF]*):\s*(\S+)/));)e=e.substr(i[0].length),u[i[1]]=i[2]}else u=_c;var r=function(t){if(t){var e=t.match(/^\s*(([^:]*):)?(\S+)\s*$/);if(e){var n=e[2]?u[e[2]]:Mc;if(n)return n+e[3]}}return null},o=1,a=t.childElements().forEachNonNull(function(t){if("meta"==t.localName){var e=r(t.getAttribute("property"));if(e)return{name:e,value:t.textContent,id:t.getAttribute("id"),order:o++,refines:t.getAttribute("refines"),lang:null,scheme:r(t.getAttribute("scheme")),role:null}}else if(t.namespaceURI==H.DC)return{name:_c.dcterms+t.localName,order:o++,lang:t.getAttribute("xml:lang"),value:t.textContent,id:t.getAttribute("id"),refines:null,scheme:null,role:t.getAttribute("role")||t.getAttribute("opf:role")};return null}),s=ct(a,function(t){return t.refines}),l=function t(e){return function(e,u){var n={};for(var i in e)n[i]=e[i].map(function(e){var u={v:e.value,o:e.order};e.scheme&&(u.s=e.scheme);var n=s["#"+e.id]||[];if(n.length||e.lang||e.role){e.lang&&n.push({name:Uc.language,value:e.lang,lang:null,id:null,refines:e.id,scheme:null,order:e.order,role:null}),e.role&&n.push({name:Uc.role,value:e.role,lang:null,id:null,refines:e.id,scheme:null,order:e.order,role:null});var i=ct(n,function(t){return t.name});u.r=t(i)}return u});return n}(e)}(ct(a,function(t){return t.refines?null:t.name})),D=null;return l[Uc.language]&&(D=l[Uc.language][0].v),function t(e){for(var u in e){var n=e[u];n.sort(Vc(u,D));for(var i=0;i<n.length;i++){var r=n[i].r;r&&t(r)}}}(l),l}(n.child("metadata"),n.attribute("prefix")[0]),this.metadata[Uc.language]&&(this.lang=this.metadata[Uc.language][0].v),this.metadata[Uc.layout]&&(this.prePaginated="pre-paginated"===this.metadata[Uc.layout][0].v),d.length>0&&this.uid)for(var F=function(t){return function(e){var u=xn("deobfuscator");return function(t,e){var u=xn("makeDigest"),n=u.suspend();return window.crypto.subtle.digest("SHA-1",(new TextEncoder).encode(e)).then(function(t){n.schedule(new Uint8Array(t))}),u.result()}(0,t).then(function(t){var n=e.slice(0,1040),i=e.slice(1040,e.size);(function(t){var e=xn("readBlob"),u=new FileReader,n=e.suspend(u);return u.addEventListener("load",function(){n.schedule(u.result)},!1),u.readAsArrayBuffer(t),e.result()})(n).then(function(e){for(var n=new DataView(e),r=0;r<n.byteLength;r++){var o=n.getUint8(r);n.setUint8(r,o^=t[r%20])}u.finish(Zn([n,i]))})}),u.result()}}(this.uid),A=0;A<d.length;A++)this.store.deobfuscators[this.pubURL+d[A]]=F;return this.prePaginated&&this.assignAutoPages(),Tn(!0)},e.assignAutoPages=function(){for(var t,e=0,u=R(this.spine);!(t=u()).done;){var n=t.value,i=this.prePaginated?1:Math.ceil(n.compressedSize/1024);n.epage=e,n.epageCount=i,e+=i}this.epageCount=e,this.epageCountCallback&&this.epageCountCallback(this.epageCount)},e.setEPageCountMode=function(t){this.epageIsRenderedPage=t||this.prePaginated},e.countEPages=function(t){var e=this;if(this.epageCountCallback=t,this.epageIsRenderedPage)return this.prePaginated&&0==this.epageCount&&this.assignAutoPages(),Tn(!0);var u=0,n=0,i=xn("countEPages");return i.loopWithFrame(function(t){if(n!==e.spine.length){var i=e.spine[n++];i.epage=u,e.store.load(i.src).then(function(n){var r=1800,o=n.lang||e.lang;o&&o.match(/^(ja|ko|zh)/)&&(r/=3),i.epageCount=Math.ceil(n.getTotalOffset()/r),e.epageCount=u+=i.epageCount,e.epageCountCallback&&e.epageCountCallback(e.epageCount),t.continueLoop()})}else t.breakLoop()}).thenFinish(i),i.result()},e.initWithChapters=function(t,e){var u=this;this.itemMap={},this.itemMapByPath={},this.items=[],this.spine=this.items;var n=this.opfXML=new Fc(null,"",(new DOMParser).parseFromString("<spine></spine>","text/xml"));return t.forEach(function(t){var e=new Lc;e.initWithParam(t);var i=n.document.createElement("itemref");i.setAttribute("idref",e.id),n.root.appendChild(i),e.itemRefElement=i,u.itemMap[e.id]=e;var r=u.getPathFromURL(t.url);null==r&&(r=t.url),u.itemMapByPath[r]=e,u.items.push(e)}),e?this.store.addDocument(t[0].url,e):Tn(null)},e.initWithWebPubManifest=function(t,e,u){var n,i,r,o,a=this;t.readingProgression&&(this.pageProgression=t.readingProgression),void 0===this.metadata&&(this.metadata={});var s=t.name||(null==(n=t.metadata)?void 0:n.title)||(null==e?void 0:e.title);s&&(this.metadata[Uc.title]=(Array.isArray(s)?s:[s]).map(function(t){var e;return{v:null!=(e=t.value)?e:t}}));var l=t.author||t.creator||(null==(i=t.metadata)?void 0:i.author)||Array.from(null!=(r=null==e?void 0:e.querySelectorAll("meta[name='author'], meta[name='DC.Creator']"))?r:[]).map(function(t){return t.content});l&&0!==l.length&&(this.metadata[Uc.creator]=(Array.isArray(l)?l:[l]).map(function(t){var e;return{v:null!=(e=t.name)?e:t}}));var D=t.inLanguage||(null==(o=t.metadata)?void 0:o.language)||(null==e?void 0:e.documentElement.lang)||(null==e?void 0:e.documentElement.getAttribute("xml:lang"));D&&(this.metadata[Uc.language]=(Array.isArray(D)?D:[D]).map(function(t){return{v:t}}));var h=this.getPathFromURL(this.pubURL);if(!t.readingOrder&&e&&null!==h){t.readingOrder=[encodeURI(h)];for(var c,d=R(function(t){for(var e,u=[],n=R(Ic(t));!(e=n()).done;)for(var i,r=R(e.value.querySelectorAll("li a[href]"));!(i=r()).done;)u.push(i.value);return u}(e));!(c=d()).done;){var f=c.value.getAttribute("href");if(!/^(https?:)?\/\//.test(f)&&!/\.(jpe?g|png|gif|pdf|svg|mml)([#?]|$)/.test(f)){var p=M(W(f,this.pubURL)),E=this.getPathFromURL(p),C=null!==E?encodeURI(E):p;-1==t.readingOrder.indexOf(C)&&t.readingOrder.push(C)}}}var F=[],A=0,g=-1;[t.readingOrder,t.resources].forEach(function(e){e instanceof Array&&e.forEach(function(n){var i="string"==typeof n?n:n.url||n.href,r="string"==typeof n?"":n.encodingFormat||n.href&&n.type||"";if(e===t.readingOrder||"text/html"===r||"application/xhtml+xml"===r||!r&&"stylesheet"!==n.rel&&/(^|\/)([^/]+\.(x?html|htm|xht)|[^/.]*)([#?]|$)/.test(i)){var o=u?u.replace(/\/[^/]+$/,"/"):a.pubURL,s={url:W(X(i),o),index:A++,startPage:null,skipPagesBefore:null};"contents"===n.rel&&-1===g&&(g=s.index),F.push(s)}})});var v=xn("initWithWebPubManifest");return this.initWithChapters(F).then(function(){var e,n;-1!==g&&(a.xhtmlToc=a.items[g]),a.xhtmlToc||(a.xhtmlToc=u?null==(n=a.items)?void 0:n[0]:a.itemMapByPath[h]);var i=null==(e=t.readingOrder)?void 0:e.length;i&&i<a.items.length&&a.items.splice(i),v.finish(!0)}),v.result()},e.getCFI=function(t,e){var u=this.spine[t],n=xn("getCFI");return this.store.load(u.src).then(function(t){var i=t.getNodeByOffset(e),r=null;if(i){var o=t.getNodeOffset(i,0,!1),a=e-o,s=new wt;s.prependPathFromNode(i,a,!1,null),u.itemRefElement&&s.prependPathFromNode(u.itemRefElement,0,!1,null),r=s.toString()}n.finish(r)}),n.result()},e.resolveFragment=function(t){var e=this;return In("resolveFragment",function(u){if(t){var n,i=new wt;if(i.fromString(t),e.opfXML){var r=i.navigate(e.opfXML.document);if(1!=r.node.nodeType||r.after||!r.ref)return void u.finish(null);var o=r.node,a=o.getAttribute("idref");if("itemref"!=o.localName||!a||!e.itemMap[a])return void u.finish(null);n=e.itemMap[a],i=r.ref}else n=e.spine[0];e.store.load(n.src).then(function(t){var e=i.navigate(t.document),r=t.getNodeOffset(e.node,e.offset,e.after);u.finish({spineIndex:n.spineIndex,offsetInItem:r,pageIndex:-1})})}else u.finish(null)},function(e,u){D.warn(u,"Cannot resolve fragment:",t),e.finish(null)})},e.resolveEPage=function(t){var e=this;return In("resolveEPage",function(u){if(t<=0)u.finish({spineIndex:0,offsetInItem:0,pageIndex:-1});else if(e.epageIsRenderedPage){var n=e.spine.findIndex(function(e){return 0==e.epage&&0==e.epageCount||e.epage<=t&&e.epage+e.epageCount>t});-1==n&&(n=e.spine.length-1);var i=e.spine[n];i&&0!=i.epageCount||(i=e.spine[--n]);var r=Math.floor(t-i.epage);u.finish({spineIndex:n,offsetInItem:-1,pageIndex:r})}else{var o=lt(e.spine.length,function(u){var n=e.spine[u];return n.epage+n.epageCount>t});o==e.spine.length&&o--;var a=e.spine[o];e.store.load(a.src).then(function(e){(t-=a.epage)>a.epageCount&&(t=a.epageCount);var n=0;if(t>0){var i=e.getTotalOffset();(n=Math.round(i*t/a.epageCount))==i&&n--}u.finish({spineIndex:o,offsetInItem:n,pageIndex:-1})})}},function(e,u){D.warn(u,"Cannot resolve epage:",t),e.finish(null)})},e.getEPageFromPosition=function(t){var e=this.spine[t.spineIndex];if(this.epageIsRenderedPage)return Tn(e.epage+t.pageIndex);if(t.offsetInItem<=0)return Tn(e.epage);var u=xn("getEPage");return this.store.load(e.src).then(function(n){var i=n.getTotalOffset(),r=Math.min(i,t.offsetInItem);u.finish(e.epage+r*e.epageCount/i)}),u.result()},t}(),jc=function(t,e){return{page:t,position:{spineIndex:t.spineIndex,pageIndex:e,offsetInItem:t.offset}}},Kc=/*#__PURE__*/function(){function t(t,e,u,n,i){this.opf=void 0,this.viewport=void 0,this.fontMapper=void 0,this.pageSheetSizeReporter=void 0,this.spineItems=[],this.spineItemLoadingContinuations=[],this.pref=void 0,this.clientLayout=void 0,this.counterStore=void 0,this.tocAutohide=!1,this.tocVisible=!1,this.tocView=void 0,this.opf=t,this.viewport=e,this.fontMapper=u,this.pageSheetSizeReporter=i,this.pref=yt(n),this.clientLayout=new Ec(e),this.counterStore=new Vu(t.documentURLTransformer)}var e=t.prototype;return e.getPage=function(t){var e=this.spineItems[t.spineIndex];return e?e.pages[t.pageIndex]:null},e.getCurrentPageProgression=function(t){if(this.opf.pageProgression)return this.opf.pageProgression;var e=this.spineItems[t?t.spineIndex:0];return e?e.instance.pageProgression:null},e.finishPageContainer=function(t,e,u){e.container.style.display="none",e.container.style.visibility="visible",e.container.style.position="",e.container.style.top="",e.container.style.left="",e.container.setAttribute("data-vivliostyle-page-side",e.side);var n=t.pages[u];if(e.isFirstPage=0==t.item.spineIndex&&0==u,t.pages[u]=e,this.opf.epageIsRenderedPage){if(0==u&&t.item.spineIndex>0){var i=this.opf.spine[t.item.spineIndex-1];t.item.epage=i.epage+i.epageCount}t.item.epageCount=t.pages.length,this.opf.epageCount=this.opf.spine.reduce(function(t,e){return t+e.epageCount},0),this.opf.epageCountCallback&&this.opf.epageCountCallback(this.opf.epageCount)}if(n)t.instance.viewport.contentContainer.replaceChild(e.container,n.container),n.dispatchEvent({type:"replaced",target:null,currentTarget:null,preventDefault:null,newPage:e});else{var r=null;if(u>0)r=t.pages[u-1].container.nextElementSibling;else for(var o=t.item.spineIndex+1;o<this.spineItems.length;o++){var a=this.spineItems[o];if(a&&a.pages[0]){r=a.pages[0].container;break}}t.instance.viewport.contentContainer.insertBefore(e.container,r)}this.pageSheetSizeReporter({width:t.instance.pageSheetWidth,height:t.instance.pageSheetHeight},t.instance.pageSheetSize,t.item.spineIndex,t.instance.pageNumberOffset+u)},e.renderSinglePage=function(t,e){var u=this,n=xn("renderSinglePage"),i=t.pages[e?e.page:0],r=this.makePage(t,e);return i&&(r.pageType=i.pageType),t.instance.layoutNextPage(r,e).then(function(i){var o=(e=i)?e.page-1:t.layoutPositions.length-1;u.finishPageContainer(t,r,o),u.counterStore.finishPage(r.spineIndex,o);var a=null;if(e){var s=t.layoutPositions[e.page];t.layoutPositions[e.page]=e,s&&t.pages[e.page]&&(e.isSamePosition(s)||(a=u.renderSinglePage(t,e)))}a||(a=Tn(!0)),a.then(function(){var i=u.counterStore.getUnresolvedRefsToPage(r),a=0;n.loopWithFrame(function(t){if(++a>i.length)t.breakLoop();else{var e=i[a-1];e.refs=e.refs.filter(function(t){return!t.isResolved()}),0!==e.refs.length?u.getPageViewItem(e.spineIndex).then(function(n){n?(u.counterStore.pushPageCounters(e.pageCounters),u.counterStore.pushReferencesToSolve(e.refs),u.renderSinglePage(n,n.layoutPositions[e.pageIndex]).then(function(e){u.counterStore.popPageCounters(),u.counterStore.popReferencesToSolve();var n=e.pageAndPosition.position;n.spineIndex===r.spineIndex&&n.pageIndex===o&&(r=e.pageAndPosition.page),t.continueLoop()})):t.continueLoop()}):t.continueLoop()}}).then(function(){r.container.parentElement||(r=t.pages[o]),r.isLastPage=!e&&t.item.spineIndex===u.opf.spine.length-1,r.isLastPage&&u.counterStore.finishLastPage(u.viewport),r.container.setAttribute("data-vivliostyle-page-index",o),r.container.setAttribute("data-vivliostyle-spine-index",r.spineIndex),n.finish({pageAndPosition:jc(r,o),nextLayoutPosition:e})})})}),n.result()},e.normalizeSeekPosition=function(t,e){var u=t.pageIndex,n=-1;if(u<0){n=t.offsetInItem;var i=lt(e.layoutPositions.length,function(t){return e.instance.getPosition(e.layoutPositions[t],!0)>n});u=i===e.layoutPositions.length?e.complete?e.layoutPositions.length-1:Number.POSITIVE_INFINITY:i-1}else u===Number.POSITIVE_INFINITY&&-1!==t.offsetInItem&&(n=t.offsetInItem);return{spineIndex:t.spineIndex,pageIndex:u,offsetInItem:n}},e.findPage=function(t,e){var u=this,n=xn("findPage");return this.getPageViewItem(t.spineIndex).then(function(i){if(i){var r,o=null;n.loopWithFrame(function(a){var s=u.normalizeSeekPosition(t,i);(o=i.pages[r=s.pageIndex])?a.breakLoop():i.complete?(o=i.pages[r=i.layoutPositions.length-1],a.breakLoop()):e?u.renderPage(s).then(function(t){t&&(o=t.page,r=t.position.pageIndex),a.breakLoop()}):n.sleep(100).then(function(){a.continueLoop()})}).then(function(){n.finish(jc(o,r))})}else n.finish(null)}),n.result()},e.renderPage=function(t){var e=this,u=xn("renderPage");return this.getPageViewItem(t.spineIndex).then(function(n){if(n){var i=e.normalizeSeekPosition(t,n),r=i.pageIndex,o=i.offsetInItem,a=n.pages[r];a?u.finish(jc(a,r)):u.loopWithFrame(function(t){if(r<n.layoutPositions.length)t.breakLoop();else{if(n.complete)return r=n.layoutPositions.length-1,void t.breakLoop();var u=n.layoutPositions[n.layoutPositions.length-1];e.renderSinglePage(n,u).then(function(e){var i=e.pageAndPosition.page;if(u=e.nextLayoutPosition){if(o>=0&&n.instance.getPosition(u)>o)return a=i,r=n.layoutPositions.length-2,void t.breakLoop();t.continueLoop()}else a=i,r=e.pageAndPosition.position.pageIndex,n.complete=!0,t.breakLoop()})}}).then(function(){var t=n.layoutPositions[r];(a=a||n.pages[r])?u.finish(jc(a,r)):e.renderSinglePage(n,t).then(function(t){t.nextLayoutPosition||(n.complete=!0),u.finish(t.pageAndPosition)})})}else u.finish(null)}),u.result()},e.renderAllPages=function(){return this.renderPagesUpto({spineIndex:this.opf.spine.length-1,pageIndex:Number.POSITIVE_INFINITY,offsetInItem:-1},!1)},e.renderPagesUpto=function(t,e){var u=this,n=xn("renderPagesUpto");t||(t={spineIndex:0,pageIndex:0,offsetInItem:0});var i,r=t.spineIndex,o=t.pageIndex,a=0;return e&&(a=r),n.loopWithFrame(function(e){u.renderPage({spineIndex:a,pageIndex:a===r?o:Number.POSITIVE_INFINITY,offsetInItem:a===r?t.offsetInItem:-1}).then(function(t){i=t,++a>r?e.breakLoop():e.continueLoop()})}).then(function(){n.finish(i)}),n.result()},e.firstPage=function(t,e){return this.findPage({spineIndex:0,pageIndex:0,offsetInItem:-1},e)},e.lastPage=function(t,e){return this.findPage({spineIndex:this.opf.spine.length-1,pageIndex:Number.POSITIVE_INFINITY,offsetInItem:-1},e)},e.nextPage=function(t,e){var u=this,n=t.spineIndex,i=t.pageIndex,r=xn("nextPage");return this.getPageViewItem(n).then(function(t){if(t){if(t.complete&&i==t.layoutPositions.length-1){if(n>=u.opf.spine.length-1)return void r.finish(null);n++,i=0;var o=u.spineItems[n],a=o&&o.pages[0],s=t.pages[t.pages.length-1];a&&s&&a.side==s.side&&(o.pages.forEach(function(t){t.container&&t.container.remove()}),u.spineItems[n]=null,u.spineItemLoadingContinuations[n]=null)}else i++;u.findPage({spineIndex:n,pageIndex:i,offsetInItem:-1},e).thenFinish(r)}else r.finish(null)}),r.result()},e.previousPage=function(t,e){var u=t.spineIndex,n=t.pageIndex;if(0==n){if(0==u)return Tn(null);u--,n=Number.POSITIVE_INFINITY}else n--;return this.findPage({spineIndex:u,pageIndex:n,offsetInItem:-1},e)},e.isRectoPage=function(t,e){var u=t.side===exports.PageSide.LEFT,n=this.getCurrentPageProgression(e)===exports.PageProgression.LTR;return!u&&n||u&&!n},e.getSpread=function(t,e){var u=this,n=this.getPage(t);if(!n)return Tn({left:null,right:null});var i=xn("getSpread"),r=n.side===exports.PageSide.LEFT;return(this.isRectoPage(n,t)?this.previousPage(t,e):this.nextPage(t,e)).then(function(e){var n=u.getPage(t),o=e&&e.page;o&&o.side===n.side&&(o=null),i.finish(r?{left:n,right:o}:{left:o,right:n})}),i.result()},e.nextSpread=function(t,e){var u=this,n=this.getPage(t);if(!n)return Tn(null);var i=this.isRectoPage(n,t),r=this.nextPage(t,e);return i?r:r.thenAsync(function(t){if(t){if(t.page.side===n.side)return r;var i=u.nextPage(t.position,e);return i.thenAsync(function(t){return t?i:r})}return Tn(null)})},e.previousSpread=function(t,e){var u=this,n=this.getPage(t);if(!n)return Tn(null);var i=this.isRectoPage(n,t),r=this.previousPage(t,e),o=n.container.previousElementSibling;return i?r.thenAsync(function(t){return t?t.page.side===n.side||t.page.container!==o?r:u.previousPage(t.position,e):Tn(null)}):r},e.navigateToEPage=function(t,e,u){var n=this,i=xn("navigateToEPage");return this.opf.resolveEPage(t).then(function(t){t?n.findPage(t,u).thenFinish(i):i.finish(null)}),i.result()},e.navigateToFragment=function(t,e,u){var n=this,i=xn("navigateToCFI");return this.opf.resolveFragment(t).then(function(t){t?n.findPage(t,u).thenFinish(i):i.finish(null)}),i.result()},e.navigateTo=function(t,e,u){var n=this;D.debug("Navigate to",t);var i=this.opf.getPathFromURL(M(t));if(!i){if(this.opf.opfXML&&t.match(/^#epubcfi\(/))i=this.opf.getPathFromURL(this.opf.opfXML.url);else if("#"===t.charAt(0)){var r=this.opf.documentURLTransformer.restoreURL(t);this.opf.opfXML?null==(i=this.opf.getPathFromURL(r[0]))&&(i=r[0]):i=r[0],t=r[0]+(r[1]?"#"+r[1]:"")}if(null==i)return Tn(null)}var o=this.opf.itemMapByPath[i];if(!o){if(this.opf.opfXML&&i==this.opf.getPathFromURL(this.opf.opfXML.url)){var a=t.indexOf("#");if(a>=0)return this.navigateToFragment(t.substr(a+1),e,u)}return Tn(null)}var s=xn("navigateTo");return this.getPageViewItem(o.spineIndex).then(function(e){if(e){var i=e.xmldoc.getElement(t);n.findPage({spineIndex:o.spineIndex,pageIndex:-1,offsetInItem:i?e.xmldoc.getElementOffset(i):0},u).thenFinish(s)}else s.finish(null)}),s.result()},e.makePage=function(t,e){var u=t.instance.viewport,n=u.document.createElement("div");n.setAttribute("data-vivliostyle-page-container","true"),n.setAttribute("role","region"),n.style.position="absolute",n.style.top="0",n.style.left="0",exports.isDebug||(n.style.visibility="hidden"),u.layoutBox.appendChild(n);var i=u.document.createElement("div");i.setAttribute("data-vivliostyle-bleed-box","true"),n.appendChild(i);var r=new hr(n,i);if(r.spineIndex=t.item.spineIndex,r.position=e,r.offset=t.instance.getPosition(e),0===r.offset&&(!t.instance.blankPageAtStart||0!==t.pages.length)){var o=this.opf.documentURLTransformer.transformFragment("",t.item.src);i.setAttribute("id",o),r.registerElementWithId(i,o)}if(u!==this.viewport){var a=St(this.viewport.width,this.viewport.height,u.width,u.height),s=Pi(null,new yn(a,null),"");r.delayedItems.push(new sr(n,"transform",s))}return r},e.makeObjectView=function(t,e,u,n){var i=e.getAttribute("data"),r=null;if(i){i=W(i,t.url);var o=e.getAttribute("media-type");if(!o){var a=this.opf.getPathFromURL(i);if(a){var s=this.opf.itemMapByPath[a];s&&(o=s.mediaType)}}if(o){var l=this.opf.bindings[o];if(l){(r=this.viewport.document.createElement("iframe")).style.border="none";var D=rt(i),h=rt(o),c=new et;c.append(l),c.append("?src="),c.append(D),c.append("&type="),c.append(h);for(var d=e.firstChild;d;d=d.nextSibling)if(1==d.nodeType){var f=d;if("param"==f.localName&&f.namespaceURI==H.XHTML){var p=f.getAttribute("name"),E=f.getAttribute("value");p&&E&&(c.append("&"),c.append(encodeURIComponent(p)),c.append("="),c.append(encodeURIComponent(E)))}}r.setAttribute("src",c.toString());var C=e.getAttribute("width");C&&r.setAttribute("width",C);var F=e.getAttribute("height");F&&r.setAttribute("height",F)}}}return r||(r=this.viewport.document.createElement("object"),i&&r.setAttribute("data",i),r.setAttribute("data-adapt-process-children","true")),Tn(r)},e.makeMathJaxView=function(t,e,u,n){var i=Hc();if(i){var r=u.ownerDocument,o=r.createElement("span");u.appendChild(o);var a=r.importNode(e,!0);this.resolveURLsInMathML(a,t),o.appendChild(a);var s=i.queue;s.Push(["Typeset",i,o]);var l=xn("makeMathJaxView"),D=l.suspend();return s.Push(function(){D.schedule(o)}),l.result()}return Tn(null)},e.resolveURLsInMathML=function(t,e){if(null!=t){if(1===t.nodeType&&"mglyph"===t.tagName)for(var u=0,n=Array.from(t.attributes);u<n.length;u++){var i=n[u];if("src"===i.name){var r=W(i.nodeValue,e.url);i.namespaceURI?t.setAttributeNS(i.namespaceURI,i.name,r):t.setAttribute(i.name,r)}}t.firstChild&&this.resolveURLsInMathML(t.firstChild,e),t.nextSibling&&this.resolveURLsInMathML(t.nextSibling,e)}},e.makeCustomRenderer=function(t){var e=this;return function(u,n,i){return"object"==u.localName&&u.namespaceURI==H.XHTML?e.makeObjectView(t,u,n,i):u.namespaceURI==H.MATHML||u.dataset&&"true"==u.dataset.mathTypeset?e.makeMathJaxView(t,u,n,i):Tn(null)}},e.getPageViewItem=function(t){var e=this;if(-1===t||t>=this.opf.spine.length)return Tn(null);var u=this.spineItems[t];if(u)return Tn(u);var n=xn("getPageViewItem"),i=this.spineItemLoadingContinuations[t];if(i){var r=n.suspend();return i.push(r),n.result()}i=this.spineItemLoadingContinuations[t]=[];var o=this.opf.spine[t],a=this.opf.store;return a.load(o.src).then(function(r){var s,l=o.itemRefElement.getAttribute("properties");l&&r.root.setAttribute("data-vivliostyle-epub-spine-properties",l),o.title=r.document.title;var D=a.getStyleForDoc(r),h=e.makeCustomRenderer(r),c=e.viewport,d=D.sizeViewport(c.width,c.height,c.fontSize,e.pref);d.width==c.width&&d.height==c.height&&d.fontSize==c.fontSize||(c=new Cc(c.window,d.fontSize,c.pixelRatio,c.root,d.width,d.height));var f,p,E=null==(s=e.spineItems[0])?void 0:s.instance.isVersoFirstPage,C=e.spineItems[t-1];if(null!==o.startPage)p=f=o.startPage-1;else{if(!(t>0)||C&&C.complete){f=C?C.instance.pageNumberOffset+C.pages.length:0;var F=e.counterStore.currentPageCounters.page;p=F&&F.length?F[F.length-1]:f}else f=o.epage||t,e.opf.prePaginated||f%2!=(E?1:0)||f++,p=f;null!==o.skipPagesBefore&&(f+=o.skipPagesBefore,p+=o.skipPagesBefore)}e.counterStore.forceSetPageCounter(p);var A=new yc(D,r,e.opf.lang,c,e.clientLayout,e.fontMapper,h,e.opf.fallbackMap,f,e.opf.documentURLTransformer,e.counterStore,e.opf.pageProgression,E);A.pref=e.pref;var g=e.opf.metadata&&e.opf.metadata[Uc.title];A.pubTitle=g&&g[0]&&g[0].v||"",A.docTitle=o.title||"",A.init().then(function(){!e.opf.pageProgression&&A.pageProgression&&(e.opf.pageProgression=A.pageProgression),e.spineItems[t]=u={item:o,xmldoc:r,instance:A,layoutPositions:[null],pages:[],complete:!1},n.finish(u),i.forEach(function(t){t.schedule(u)})})}),n.result()},e.removeRenderedPages=function(){for(var t,e=R(this.spineItems);!(t=e()).done;){var u=t.value;u&&u.pages.splice(0)}this.viewport.clear()},e.hasAutoSizedPages=function(){for(var t,e=R(this.spineItems);!(t=e()).done;){var u=t.value;if(u)for(var n,i=R(u.pages);!(n=i()).done;){var r=n.value;if(r.isAutoPageWidth&&r.isAutoPageHeight)return!0}}return!1},e.hasPages=function(){return this.spineItems.some(function(t){return t&&t.pages.length>0})},e.showTOC=function(t){var e=this.opf,u=e.xhtmlToc||e.ncxToc;if(this.tocAutohide=t,!u)return Tn(null);if(this.tocVisible=!0,this.tocView&&this.tocView.page)return this.tocView.page.container.style.visibility="visible",this.tocView.page.container.setAttribute("aria-hidden","false"),Tn(this.tocView.page);var n=xn("showTOC");this.tocView||(this.tocView=new Pc(e.store,u.src,e.lang,this.clientLayout,this.fontMapper,this.pref,this,e.fallbackMap,e.documentURLTransformer,this.counterStore));var i=this.viewport,r=Math.min(350,Math.round(.67*i.width)-16),o=i.height-6,a=i.document.createElement("div");return i.root.appendChild(a),exports.isDebug||(a.style.visibility="hidden"),a.style.width=r+10+"px",a.style.maxHeight=o+"px",a.setAttribute("data-vivliostyle-toc-box","true"),a.setAttribute("role","navigation"),this.tocView.showTOC(a,i,r,o,this.viewport.fontSize).then(function(t){a.style.visibility="visible",a.setAttribute("aria-hidden","false"),n.finish(t)}),n.result()},e.hideTOC=function(){this.tocVisible=!1,this.tocView&&this.tocView.hideTOC()},e.isTOCVisible=function(){return this.tocVisible&&!!this.tocView&&this.tocView.isTOCVisible()},t}(),Yc="data-vivliostyle-viewer-status";!function(t){t.SINGLE_PAGE="singlePage",t.SPREAD="spread",t.AUTO_SPREAD="autoSpread"}(zc||(zc={}));var qc,$c=/*#__PURE__*/function(){function t(t,e,u,n){var i=this;this.window=void 0,this.viewportElement=void 0,this.instanceId=void 0,this.callbackFn=void 0,this.fontMapper=void 0,this.kick=void 0,this.sendCommand=void 0,this.resizeListener=void 0,this.hyperlinkListener=void 0,this.pageRuleStyleElement=void 0,this.pageSheetSizeAlreadySet=!1,this.renderTask=null,this.actions=void 0,this.readyState=void 0,this.packageURL=void 0,this.opf=void 0,this.touchActive=void 0,this.touchX=void 0,this.touchY=void 0,this.needResize=void 0,this.resized=void 0,this.needRefresh=void 0,this.viewportSize=void 0,this.currentPage=void 0,this.currentSpread=void 0,this.pagePosition=void 0,this.fontSize=void 0,this.zoom=void 0,this.fitToScreen=void 0,this.pageViewMode=void 0,this.waitForLoading=void 0,this.renderAllPages=void 0,this.pref=void 0,this.pageSizes=void 0,this.pixelRatio=void 0,this.pixelRatioLimit=void 0,this.viewport=void 0,this.opfView=void 0,this.window=t,this.viewportElement=e,this.instanceId=u,this.callbackFn=n;var r=e.ownerDocument,o=function(t,e){var u=r.getElementById(t);return u||((u=r.createElement("style")).id=t,e&&(u.textContent=e),r.head.appendChild(u)),u};o("vivliostyle-viewport-screen-css",Gn),o("vivliostyle-viewport-css",Wn),o("vivliostyle-polyfill-css",$n),e.setAttribute("data-vivliostyle-viewer-viewport",!0),exports.isDebug&&e.setAttribute("data-vivliostyle-debug",!0),e.setAttribute(Yc,"loading"),this.fontMapper=new WD(r.head,e),this.init(),this.kick=function(){},this.sendCommand=function(){},this.resizeListener=function(){i.needResize=!0,i.resized=!0,i.kick()},this.pageReplacedListener=this.pageReplacedListener.bind(this),this.hyperlinkListener=function(t){},this.pageRuleStyleElement=o("vivliostyle-page-rules"),this.actions={loadPublication:this.loadPublication,loadXML:this.loadXML,configure:this.configure,moveTo:this.moveTo,toc:this.showTOC},this.addLogListeners()}var e=t.prototype;return e.init=function(){this.readyState=exports.ReadyState.LOADING,this.packageURL=[],this.opf=null,this.touchActive=!1,this.touchX=0,this.touchY=0,this.needResize=!1,this.resized=!1,this.needRefresh=!1,this.viewportSize=null,this.currentPage=null,this.currentSpread=null,this.pagePosition=null,this.fontSize=16,this.zoom=1,this.fitToScreen=!1,this.pageViewMode=zc.SINGLE_PAGE,this.waitForLoading=!1,this.renderAllPages=!0,this.pref={fontFamily:"serif",lineHeight:1.25,margin:8,hyphenate:!1,columnWidth:25,horizontal:!1,nightMode:!1,spreadView:!1,pageBorder:1,enabledMediaTypes:{vivliostyle:!0,print:!0},defaultPaperSize:void 0},this.pageSizes=[],this.pixelRatioLimit=/Chrome/.test(navigator.userAgent)?16:0,this.pixelRatio=Math.min(8,this.pixelRatioLimit)},e.addLogListeners=function(){var t=this,e=n;D.addListener(e.DEBUG,function(e){t.callback({t:"debug",content:e})}),D.addListener(e.INFO,function(e){t.callback({t:"info",content:e})}),D.addListener(e.WARN,function(e){t.callback({t:"warn",content:e})}),D.addListener(e.ERROR,function(e){t.callback({t:"error",content:e})})},e.callback=function(t){t.i=this.instanceId,this.callbackFn(t)},e.setReadyState=function(t){this.readyState!==t&&(this.readyState=t,this.viewportElement.setAttribute(Yc,t),this.callback({t:"readystatechange"}))},e.loadPublication=function(t){var e=this;m.registerStartTiming("beforeRender"),this.setReadyState(exports.ReadyState.LOADING);var u=t.url,n=t.fragment,i=t.authorStyleSheet,r=t.userStyleSheet;this.viewport=null;var o=xn("loadPublication");return this.configure(t).then(function(){var t=new kc;t.init(i,r).then(function(){var i=W(X(u),e.window.location.href);e.packageURL=[i],t.loadPubDoc(i).then(function(t){t?(e.opf=t,e.render(n).then(function(){o.finish(!0)})):o.finish(!1)})})}),o.result()},e.loadXML=function(t){var e=this;m.registerStartTiming("beforeRender"),this.setReadyState(exports.ReadyState.LOADING);var u=t.url,n=t.document,i=t.fragment,r=t.authorStyleSheet,o=t.userStyleSheet;this.viewport=null;var a=xn("loadXML");return this.configure(t).then(function(){var t=new kc;t.init(r,o).then(function(){var r=u.map(function(t,u){return{url:W(X(t.url),e.window.location.href),index:u,startPage:t.startPage,skipPagesBefore:t.skipPagesBefore}});e.packageURL=r.map(function(t){return t.url}),e.opf=new Xc(t,""),e.opf.initWithChapters(r,n).then(function(){e.render(i).then(function(){a.finish(!0)})})})}),a.result()},e.render=function(t){var e=this;return this.cancelRenderingTask(),(t?this.opf.resolveFragment(t).thenAsync(function(t){return e.pagePosition=t,Tn(!0)}):Tn(!0)).thenAsync(function(){return m.registerEndTiming("beforeRender"),e.resize()})},e.resolveLength=function(t){var e,u=parseFloat(t);if("string"==typeof t&&(e=t.match(/[a-z]+$/))){var n=e[0];if("em"===n||"rem"===n)return u*this.fontSize;if("ex"===n)return u*Lt.ex*this.fontSize/Lt.em;var i=Lt[n];if(i)return u*i}return u},e.configure=function(t){if("boolean"==typeof t.autoresize&&(t.autoresize?(this.viewportSize=null,this.window.addEventListener("resize",this.resizeListener,!1),this.needResize=!0):this.window.removeEventListener("resize",this.resizeListener,!1)),"number"==typeof t.fontSize){var e=t.fontSize;e>=5&&e<=72&&this.fontSize!=e&&(this.fontSize=e,this.needResize=!0)}if("object"==typeof t.viewport&&t.viewport){var u=t.viewport,n={marginLeft:this.resolveLength(u["margin-left"])||0,marginRight:this.resolveLength(u["margin-right"])||0,marginTop:this.resolveLength(u["margin-top"])||0,marginBottom:this.resolveLength(u["margin-bottom"])||0,width:this.resolveLength(u.width)||0,height:this.resolveLength(u.height)||0};(n.width>=200||n.height>=200)&&(this.window.removeEventListener("resize",this.resizeListener,!1),this.viewportSize=n,this.needResize=!0)}if("boolean"==typeof t.hyphenate&&(this.pref.hyphenate=t.hyphenate,this.needResize=!0),"boolean"==typeof t.horizontal&&(this.pref.horizontal=t.horizontal,this.needResize=!0),"boolean"==typeof t.nightMode&&(this.pref.nightMode=t.nightMode,this.needResize=!0),"number"==typeof t.lineHeight&&(this.pref.lineHeight=t.lineHeight,this.needResize=!0),"number"==typeof t.columnWidth&&(this.pref.columnWidth=t.columnWidth,this.needResize=!0),"string"==typeof t.fontFamily&&(this.pref.fontFamily=t.fontFamily,this.needResize=!0),"boolean"==typeof t.load&&(this.waitForLoading=t.load),"boolean"==typeof t.renderAllPages&&(this.renderAllPages=t.renderAllPages),"string"==typeof t.userAgentRootURL&&(V(t.userAgentRootURL.replace(/resources\/?$/,"")),G(t.userAgentRootURL)),"string"==typeof t.rootURL&&(V(t.rootURL),G(U+"resources/")),"string"==typeof t.pageViewMode&&t.pageViewMode!==this.pageViewMode&&(this.pageViewMode=t.pageViewMode,this.needResize=!0),"number"==typeof t.pageBorder&&t.pageBorder!==this.pref.pageBorder&&(this.viewport=null,this.pref.pageBorder=t.pageBorder,this.needResize=!0),"number"==typeof t.zoom&&t.zoom!==this.zoom&&(this.zoom=t.zoom,this.needRefresh=!0),"boolean"==typeof t.fitToScreen&&t.fitToScreen!==this.fitToScreen&&(this.fitToScreen=t.fitToScreen,this.needRefresh=!0),"object"==typeof t.defaultPaperSize&&"number"==typeof t.defaultPaperSize.width&&"number"==typeof t.defaultPaperSize.height&&(this.viewport=null,this.pref.defaultPaperSize=t.defaultPaperSize,this.needResize=!0),"boolean"==typeof t.allowScripts&&t.allowScripts!==ic&&(ic=t.allowScripts,this.needResize=!0),"number"==typeof t.pixelRatio){var i=Math.min(t.pixelRatio,this.pixelRatioLimit);i!==this.pixelRatio&&(this.pixelRatio=i,this.needResize=!0)}return this.configurePlugins(t),Tn(!0)},e.configurePlugins=function(t){var e=this;f(exports.HOOKS.CONFIGURATION).forEach(function(u){var n=u(t);e.needResize=n.needResize||e.needResize,e.needRefresh=n.needRefresh||e.needRefresh})},e.pageReplacedListener=function(t){var e=this.currentPage,u=this.currentSpread,n=t.target;u?u.left!==n&&u.right!==n||this.showCurrent(t.newPage):e===t.target&&this.showCurrent(t.newPage)},e.forCurrentPages=function(t){var e=[];this.currentPage&&e.push(this.currentPage),this.currentSpread&&(e.push(this.currentSpread.left),e.push(this.currentSpread.right)),e.forEach(function(e){e&&t(e)})},e.removePageListeners=function(){var t=this;this.forCurrentPages(function(e){e.removeEventListener("hyperlink",t.hyperlinkListener,!1),e.removeEventListener("replaced",t.pageReplacedListener,!1)})},e.hidePages=function(){this.removePageListeners(),this.forCurrentPages(function(t){Z(t.container,"display","none")}),this.currentPage=null,this.currentSpread=null},e.showSinglePage=function(t){t.addEventListener("hyperlink",this.hyperlinkListener,!1),t.addEventListener("replaced",this.pageReplacedListener,!1),Z(t.container,"visibility","visible"),Z(t.container,"display","block")},e.showPage=function(t){this.hidePages(),this.currentPage=t,t.container.style.marginLeft="",t.container.style.marginRight="",this.showSinglePage(t)},e.showSpread=function(t){if(this.hidePages(),this.currentSpread=t,t.left&&t.right){var e=parseFloat(t.left.container.style.width),u=parseFloat(t.right.container.style.width);e&&u&&e!==u&&(e<u?t.left.container.style.marginLeft=u-e+"px":t.right.container.style.marginRight=e-u+"px")}t.left&&(this.showSinglePage(t.left),t.right?t.left.container.removeAttribute("data-vivliostyle-unpaired-page"):t.left.container.setAttribute("data-vivliostyle-unpaired-page",!0)),t.right&&(this.showSinglePage(t.right),t.left?t.right.container.removeAttribute("data-vivliostyle-unpaired-page"):t.right.container.setAttribute("data-vivliostyle-unpaired-page",!0))},e.reportPosition=function(){var t=this,e=xn("reportPosition");return this.opf.getCFI(this.pagePosition.spineIndex,this.pagePosition.offsetInItem).then(function(u){var n=t.currentPage;(t.waitForLoading&&n.fetchers.length>0?zn(n.fetchers):Tn(!0)).then(function(){t.sendLocationNotification(n,u).thenFinish(e)})}),e.result()},e.createViewport=function(){var t=this.viewportElement;if(this.viewportSize){var e=this.viewportSize;return t.style.marginLeft=e.marginLeft+"px",t.style.marginRight=e.marginRight+"px",t.style.marginTop=e.marginTop+"px",t.style.marginBottom=e.marginBottom+"px",new Cc(this.window,this.fontSize,this.pixelRatio,t,e.width,e.height)}return new Cc(this.window,this.fontSize,this.pixelRatio,t)},e.resolveSpreadView=function(t,e){switch(this.pageViewMode){case zc.SINGLE_PAGE:return!1;case zc.SPREAD:return!0;default:return(t.width-this.pref.pageBorder)/t.height>=(e?2*e.width/e.height:1.45)&&(!!e||t.width>800)}},e.updateSpreadView=function(t){this.pref.spreadView=t,this.viewportElement.setAttribute("data-vivliostyle-spread-view",t.toString())},e.sizeIsGood=function(){var t,e=this.createViewport(),u=(null==(t=this.opfView)?void 0:t.hasPages())&&!this.opfView.hasAutoSizedPages(),n=this.resolveSpreadView(e,this.resized&&u?this.pageSizes[0]:null);this.resized=!1;var i=this.pref.spreadView!==n;return this.updateSpreadView(n),!(this.pixelRatio&&this.opfView&&this.pixelRatio/this.window.devicePixelRatio!==this.opfView.clientLayout.scaleRatio||this.viewportSize||!this.viewport||this.viewport.fontSize!=this.fontSize||(i||e.width!=this.viewport.width||e.height!=this.viewport.height)&&(i||e.width!=this.viewport.width||e.height==this.viewport.height||!/Android|iPhone|iPad|iPod/.test(navigator.userAgent))&&(!u||(this.viewport.width=e.width,this.viewport.height=e.height,this.needRefresh=!0,0)))},e.setPageSize=function(t,e,u,n){this.pageSizes[n]=t,this.setPageSizePageRules(e,u,n),0!==n||this.pageViewMode!==zc.AUTO_SPREAD||this.opfView.hasAutoSizedPages()||this.updateSpreadView(this.resolveSpreadView(this.viewport,t))},e.setPageSizePageRules=function(t,e,u){var n,i;if(this.pageRuleStyleElement&&(!this.pageSheetSizeAlreadySet||this.pageSizes[u].width!==(null==(n=this.pageSizes[u-1])?void 0:n.width)||this.pageSizes[u].height!==(null==(i=this.pageSizes[u-1])?void 0:i.height))){var r=function(t){return Math.ceil(.75*t)},o=Math.max.apply(Math,this.pageSizes.map(function(t){return t.width})),a=Math.max.apply(Math,this.pageSizes.map(function(t){return t.height})),s=r(o),l=r(a);this.pageRuleStyleElement.textContent="@page {size: "+s+"pt "+l+"pt; margin: 0 "+-(s*((this.pixelRatio||1)-1)+2)+"pt "+-(l*((this.pixelRatio||1)-1)+2)+"pt 0;}",this.pageSheetSizeAlreadySet=!0}},e.removePageSizePageRules=function(){this.pageRuleStyleElement&&(this.pageRuleStyleElement.textContent="",this.pageSheetSizeAlreadySet=!1)},e.reset=function(){var t=!1,e=!1;this.opfView&&(t=this.opfView.tocVisible,e=this.opfView.tocAutohide,this.opfView.removeRenderedPages()),this.pageSizes=[],this.removePageSizePageRules(),this.viewport=this.createViewport(),this.viewport.resetZoom(),this.opfView=new Kc(this.opf,this.viewport,this.fontMapper,this.pref,this.setPageSize.bind(this)),t&&this.sendCommand({a:"toc",v:"show",autohide:e})},e.showCurrent=function(t,e){var u=this;return this.needRefresh=!1,this.removePageListeners(),this.pref.spreadView?this.opfView.getSpread(this.pagePosition,e).thenAsync(function(e){return e.left||e.right?(u.showSpread(e),u.setSpreadZoom(e),u.currentPage=t.side===exports.PageSide.LEFT?e.left:e.right,Tn(null)):Tn(null)}):(this.showPage(t),this.setPageZoom(t),this.currentPage=t,Tn(null))},e.setPageZoom=function(t){var e=this.getAdjustedZoomFactor(t.dimensions);this.viewport.zoom(t.dimensions.width,t.dimensions.height,e)},e.setSpreadZoom=function(t){var e=this.getSpreadDimensions(t);this.viewport.zoom(e.width,e.height,this.getAdjustedZoomFactor(e))},e.getAdjustedZoomFactor=function(t){return this.fitToScreen?this.calculateZoomFactorToFitInsideViewPort(t):this.zoom},e.getSpreadDimensions=function(t){var e=0,u=0;return t.left&&(e+=t.left.dimensions.width,u=t.left.dimensions.height),t.right&&(e+=t.right.dimensions.width,u=Math.max(u,t.right.dimensions.height)),t.left&&t.right&&(e+=2*this.pref.pageBorder,e+=Math.abs(t.left.dimensions.width-t.right.dimensions.width)),{width:e,height:u}},e.queryZoomFactor=function(t){if(!this.currentPage)throw new Error("no page exists.");var e;if(t===qc.FIT_INSIDE_VIEWPORT)return e=this.pref.spreadView?this.getSpreadDimensions(this.currentSpread):this.currentPage.dimensions,this.calculateZoomFactorToFitInsideViewPort(e);throw new Error("unknown zoom type: "+t)},e.calculateZoomFactorToFitInsideViewPort=function(t){return this.viewport?Math.min(this.viewport.width/t.width,this.viewport.height/t.height):this.zoom},e.cancelRenderingTask=function(){this.renderTask&&this.renderTask.interrupt(new Qc),this.renderTask=null},e.resize=function(){var t=this;if(this.needResize=!1,this.needRefresh=!1,this.sizeIsGood())return Tn(!0);this.setReadyState(exports.ReadyState.LOADING),this.cancelRenderingTask();var e=Sn().getScheduler().run(function(){return In("resize",function(u){t.opf?(t.renderTask=e,m.registerStartTiming("render (resize)"),t.reset(),t.pagePosition&&(0==t.pagePosition.pageIndex&&0==t.pagePosition.offsetInItem||(t.pagePosition.pageIndex=-1)),t.opf.setEPageCountMode(t.renderAllPages),t.opfView.renderPagesUpto(t.pagePosition,!t.renderAllPages).then(function(n){n?(t.pagePosition=n.position,t.showCurrent(n.page,!0).then(function(){t.setReadyState(exports.ReadyState.INTERACTIVE),t.opf.countEPages(function(e){var u={t:"nav",epageCount:e,first:t.currentPage.isFirstPage,last:t.currentPage.isLastPage,metadata:t.opf.metadata,docTitle:t.opf.spine[t.pagePosition.spineIndex].title};(t.currentPage.isFirstPage||0==t.pagePosition.pageIndex&&t.opf.spine[t.pagePosition.spineIndex].epage)&&(u.epage=t.opf.spine[t.pagePosition.spineIndex].epage),t.callback(u)}).then(function(){t.reportPosition().then(function(n){(t.renderAllPages?t.opfView.renderAllPages():Tn(null)).then(function(){t.renderTask===e&&(t.renderTask=null),m.registerEndTiming("render (resize)"),ic&&Dc(t.window)?function(t){if(!ic)return Tn(!1);var e=xn("loadScripts");return e.loop(function(){return 0===rc.length?Tn(!1):sc(rc.shift(),t,{atEnd:!0}).thenReturn(rc.length>0)}).then(function(){D.debug("dispatchEvent: DOMContentLoaded (window)"),t.dispatchEvent(new Event("DOMContentLoaded")),D.debug("dispatchEvent: load (window)"),t.dispatchEvent(new Event("load")),e.finish(!0)}),e.result()}(t.window).then(function(){t.renderAllPages&&t.setReadyState(exports.ReadyState.COMPLETE),t.callback({t:"loaded"}),u.finish(n)}):(t.renderAllPages&&t.setReadyState(exports.ReadyState.COMPLETE),t.callback({t:"loaded"}),u.finish(n))})})})})):u.finish(!1)})):u.finish(!1)},function(t,e){if(!(e instanceof Qc))throw e;m.registerEndTiming("render (resize)"),D.debug(e.message)})});return Tn(!0)},e.sendLocationNotification=function(t,e){var u=this,n=xn("sendLocationNotification"),i={t:"nav",first:t.isFirstPage,last:t.isLastPage,metadata:this.opf.metadata,docTitle:this.opf.spine[t.spineIndex].title};return this.opf.getEPageFromPosition(this.pagePosition).then(function(t){i.epage=t,i.epageCount=u.opf.epageCount,e&&(i.cfi=e),u.callback(i),n.finish(!0)}),n.result()},e.getCurrentPageProgression=function(){return this.opfView?this.opfView.getCurrentPageProgression(this.pagePosition):null},e.moveTo=function(t){var e,u,n=this;if(this.readyState!==exports.ReadyState.COMPLETE&&"next"!==t.where&&this.setReadyState(exports.ReadyState.LOADING),"string"==typeof t.where){var i;switch(t.where){case"next":i=this.pref.spreadView?this.opfView.nextSpread:this.opfView.nextPage;break;case"previous":i=this.pref.spreadView?this.opfView.previousSpread:this.opfView.previousPage;break;case"last":i=this.opfView.lastPage;break;case"first":i=this.opfView.firstPage;break;default:return Tn(!0)}i&&(u=function(){return i.call(n.opfView,n.pagePosition,!n.renderAllPages)})}else if("number"==typeof t.epage){var r=t.epage;u=function(){return n.opfView.navigateToEPage(r,n.pagePosition,!n.renderAllPages)}}else if("string"==typeof t.url){var o=t.url;u=function(){return n.opfView.navigateTo(o,n.pagePosition,!n.renderAllPages)}}else{if("number"!=typeof(null==(e=t.position)?void 0:e.spineIndex))return Tn(!0);var a=t.position;u=function(){return n.opfView.findPage(a,!n.renderAllPages)}}if(!this.opfView)return Tn(!0);var s=xn("moveTo");return u.call(this.opfView).then(function(t){var e;if(t){n.pagePosition=t.position;var u=xn("moveTo.showCurrent");e=u.result(),n.showCurrent(t.page,!n.renderAllPages).then(function(){n.reportPosition().thenFinish(u)})}else e=Tn(!0);e.then(function(t){n.readyState===exports.ReadyState.LOADING&&n.setReadyState(exports.ReadyState.INTERACTIVE),s.finish(t)})}),s.result()},e.showTOC=function(t){var e=this,u=!!t.autohide,n=t.v,i=this.opfView.isTOCVisible(),r=u!=this.opfView.tocAutohide&&"hide"!=n;if(i){if("show"==n&&!r)return Tn(!0)}else if("hide"==n)return Tn(!0);if(i&&"show"!=n)return this.opfView.hideTOC(),Tn(!0);var o=xn("showTOC");return this.opfView.showTOC(u).then(function(t){t&&(r&&(t.listeners={}),u&&t.addEventListener("hyperlink",function(){e.opfView.hideTOC()},!1),t.addEventListener("hyperlink",e.hyperlinkListener,!1)),o.finish(!0)}),o.result()},e.runCommand=function(t){var e=this,u=t.a||"";return In("runCommand",function(n){var i=e.actions[u];i?i.call(e,t).then(function(){e.callback({t:"done",a:u}),n.finish(!0)}):(D.error("No such action:",u),n.finish(!0))},function(t,e){D.error(e,"Error during action:",u),t.finish(!0)})},e.initEmbed=function(t){var e,u=this,n=Zc(t),i=null,r=this;e=function(){var t=xn("commandLoop"),e=Sn().getScheduler();return r.hyperlinkListener=function(t){var u=t,n="#"===u.href.charAt(0)||r.packageURL.some(function(t){return u.href.substr(0,t.length)==t});if(n){t.preventDefault();var i={t:"hyperlink",href:u.href,internal:n};e.run(function(){return r.callback(i),Tn(!0)})}},t.loopWithFrame(function(t){if(r.needResize)r.resize().then(function(){t.continueLoop()});else if(r.needRefresh)r.currentPage&&r.showCurrent(r.currentPage,!u.renderAllPages).then(function(){t.continueLoop()});else if(n){var e=n;n=null,r.runCommand(e).then(function(){t.continueLoop()})}else{var o=xn("waitForCommand");i=o.suspend(u),o.result().then(function(){t.continueLoop()})}}).thenFinish(t),t.result()},(Nn?Nn.getScheduler():bn||new kn(new Rn)).run(e,void 0),r.kick=function(){var t=i;t&&(i=null,t.schedule(!0))},r.sendCommand=function(t){return!n&&(n=Zc(t),r.kick(),!0)},this.window.adapt_command=r.sendCommand},t}();(qc||(qc={})).FIT_INSIDE_VIEWPORT="fit inside viewport";var Qc=/*#__PURE__*/function(t){function e(){var u;return(u=t.call(this)||this).name="RenderingCanceledError",u.message="Page rendering has been canceled",u.stack=void 0,Object.setPrototypeOf(I(u),e.prototype),u.stack=(new Error).stack,u}return N(e,t),e}(/*#__PURE__*/T(Error));function Zc(t){return"string"==typeof t?_(t):t}var Jc=exports.PageProgression;function td(t){var e={};return Object.keys(t).forEach(function(u){var n=t[u];switch(u){case"autoResize":e.autoresize=n;break;case"pageBorderWidth":e.pageBorder=n;break;default:e[u]=n}}),e}var ed,ud=/*#__PURE__*/function(){function t(t,e){this.settings=void 0,this.initialized=!1,this.adaptViewer_=void 0,this.options=void 0,this.eventTarget=void 0,this.readyState=void 0,this.settings=t,r(t.debug),this.adaptViewer_=new $c(t.window||window,t.viewportElement,"main",this.dispatcher.bind(this)),this.options={autoResize:!0,fontSize:16,pageBorderWidth:1,renderAllPages:!0,pageViewMode:zc.AUTO_SPREAD,zoom:1,fitToScreen:!1,defaultPaperSize:void 0,allowScripts:!0,pixelRatio:8},e&&this.setOptions(e),this.eventTarget=new dt,Object.defineProperty(this,"readyState",{get:function(){return this.adaptViewer_.readyState}})}var e=t.prototype;return e.setOptions=function(t){var e=Object.assign({a:"configure"},td(t));this.adaptViewer_.sendCommand(e),Object.assign(this.options,t)},e.dispatcher=function(t){var e={type:t.t},u=t;Object.keys(u).forEach(function(t){"t"!==t&&(e[t]=u[t])}),this.eventTarget.dispatchEvent(e)},e.addListener=function(t,e){this.eventTarget.addEventListener(t,e,!1)},e.removeListener=function(t,e){this.eventTarget.removeEventListener(t,e,!1)},e.loadDocument=function(t,e,u){t||this.eventTarget.dispatchEvent({type:"error",content:"No URL specified"}),this.loadDocumentOrPublication(t,null,e,u)},e.loadPublication=function(t,e,u){t||this.eventTarget.dispatchEvent({type:"error",content:"No URL specified"}),this.loadDocumentOrPublication(null,t,e,u)},e.loadDocumentOrPublication=function(t,e,u,n){var i=u||{};function r(t){return t?t.map(function(t){return{url:t.url||null,text:t.text||null}}):void 0}var o=r(i.authorStyleSheet),a=r(i.userStyleSheet);n&&Object.assign(this.options,n);var s=Object.assign({a:t?"loadXML":"loadPublication",userAgentRootURL:this.settings.userAgentRootURL,url:nd(t)||e,document:i.documentObject,fragment:i.fragment,authorStyleSheet:o,userStyleSheet:a},td(this.options));this.initialized?this.adaptViewer_.sendCommand(s):(this.initialized=!0,this.adaptViewer_.initEmbed(s))},e.getCurrentPageProgression=function(){return this.adaptViewer_.getCurrentPageProgression()},e.resolveNavigation=function(t){switch(t){case exports.Navigation.LEFT:return this.getCurrentPageProgression()===Jc.LTR?exports.Navigation.PREVIOUS:exports.Navigation.NEXT;case exports.Navigation.RIGHT:return this.getCurrentPageProgression()===Jc.LTR?exports.Navigation.NEXT:exports.Navigation.PREVIOUS;default:return t}},e.navigateToPage=function(t,e){t===exports.Navigation.EPAGE?this.adaptViewer_.sendCommand({a:"moveTo",epage:e}):this.adaptViewer_.sendCommand({a:"moveTo",where:this.resolveNavigation(t)})},e.navigateToInternalUrl=function(t){this.adaptViewer_.sendCommand({a:"moveTo",url:t})},e.navigateToPosition=function(t){var e,u;this.adaptViewer_.sendCommand({a:"moveTo",position:{spineIndex:t.spineIndex,pageIndex:null!=(e=t.pageIndex)?e:-1,offsetInItem:null!=(u=t.offsetInItem)?u:-1}})},e.isTOCVisible=function(){return this.adaptViewer_.opfView&&this.adaptViewer_.opfView.opf&&(this.adaptViewer_.opfView.opf.xhtmlToc||this.adaptViewer_.opfView.opf.ncxToc)?!!this.adaptViewer_.opfView.isTOCVisible():null},e.showTOC=function(t,e){this.adaptViewer_.sendCommand({a:"toc",v:null==t?"toggle":t?"show":"hide",autohide:e})},e.queryZoomFactor=function(t){return this.adaptViewer_.queryZoomFactor(t)},e.getPageSizes=function(){return this.adaptViewer_.pageSizes},e.getTOC=function(){var t,e;return null==(t=this.adaptViewer_.opfView)||null==(e=t.tocView)?void 0:e.getTOC()},e.getMetadata=function(){return this.adaptViewer_.opf.getMetadata()},e.getCover=function(){return this.adaptViewer_.opf.cover},t}();function nd(t){function e(t){return"number"==typeof t?t:null}function u(t){return"string"==typeof t?{url:t,startPage:null,skipPagesBefore:null}:{url:t.url,startPage:e(t.startPage),skipPagesBefore:e(t.skipPagesBefore)}}return Array.isArray(t)?t.map(u):t?[u(t)]:null}exports.Navigation=void 0,(ed=exports.Navigation||(exports.Navigation={})).PREVIOUS="previous",ed.NEXT="next",ed.LEFT="left",ed.RIGHT="right",ed.FIRST="first",ed.LAST="last",ed.EPAGE="epage";var id=qc,rd=zc;m.forceRegisterEndTiming("load_vivliostyle");var od=/*#__PURE__*/function(){function t(t,e){var u=e.title,n=void 0===u?"":u,i=e.printCallback,r=void 0===i?function(t){return t.print()}:i,o=e.hideIframe,a=void 0===o||o,s=e.removeIframe,l=void 0===s||s;this.htmlDoc=void 0,this.title=void 0,this.printCallback=void 0,this.hideIframe=void 0,this.removeIframe=void 0,this.iframe=void 0,this.iframeWin=void 0,this.window=void 0,this.htmlDoc=t,this.title=n,this.printCallback=r,this.hideIframe=a,this.removeIframe=l}var e=t.prototype;return e.init=function(){this.iframe=document.createElement("iframe"),this.hideIframe&&(this.iframe.style.width="0",this.iframe.style.height="0",this.iframe.style.borderWidth="0"),this.window=window,this.window.printInstance=this,this.iframe.srcdoc="\n <!DOCTYPE html>\n <html data-vivliostyle-paginated=\"true\">\n <head>\n <meta charset='utf-8'/>\n <meta name='viewport' content='width=device-width, initial-scale=1.0'/>\n <title>"+this.title+"</title>\n <style>\n html[data-vivliostyle-paginated] {\n width: 100%;\n height: 100%;\n }\n html[data-vivliostyle-paginated] body,\n html[data-vivliostyle-paginated] [data-vivliostyle-viewer-viewport] {\n width: 100% !important;\n height: 100% !important;\n }\n html[data-vivliostyle-paginated],\n html[data-vivliostyle-paginated] body {\n margin: 0;\n padding: 0;\n }\n </style>\n <style id='vivliostyle-page-rules'></style>\n </head>\n <body onload='parent.printInstance.runInIframe(window)'>\n <div id=\"vivliostyle-viewer-viewport\"></div>\n </body>\n </html>",document.body.appendChild(this.iframe)},e.runInIframe=function(t){var e=this;return this.iframeWin=t,this.preparePrint().then(function(){return e.browserPrint()}).then(function(){return e.cleanUp()})},e.preparePrint=function(){this.iframeWin.document.title=this.title;var t=new Blob([this.htmlDoc],{type:"text/html"}),e=URL.createObjectURL(t),u=new ud({viewportElement:this.iframeWin.document.body.firstElementChild,window:this.iframeWin,debug:!0});return new Promise(function(t){u.addListener("readystatechange",function(){"complete"===u.readyState&&t()}),u.loadDocument({url:e})})},e.browserPrint=function(){this.printCallback(this.iframeWin)},e.cleanUp=function(){delete this.window.printInstance,this.removeIframe&&this.iframe.parentElement.removeChild(this.iframe)},t}();exports.CoreViewer=ud,exports.PageViewMode=rd,exports.Profiler=E,exports.UserAgentBaseCss=Yn,exports.UserAgentPageCss=Kn,exports.UserAgentTocCss=qn,exports.UserAgentXml=jn,exports.ValidationTxt=Xn,exports.VivliostylePolyfillCss=$n,exports.VivliostyleViewportCss=Wn,exports.VivliostyleViewportScreenCss=Gn,exports.ZoomType=id,exports.getHooksForName=f,exports.pageProgressionOf=o,exports.plugin=p,exports.printHTML=function(t,e){new od(t,e).init()},exports.profile=B,exports.profiler=m,exports.registerHook=c,exports.removeHook=d,exports.setDebug=r;
2//# sourceMappingURL=vivliostyle.js.map