/*! * * # Bibi Extension: Zine (℠) * * * © Satoru Matsushima - https://bibi.epub.link or https://github.com/satorumurmur/bibi * * Open source under the MIT License - https://github.com/satorumurmur/bibi/blob/master/LICENSE * * * Depends on: * - JS-YAML : © Vitaly Puzrin - https://nodeca.github.io/js-yaml / Licensed under the MIT License - https://github.com/nodeca/js-yaml/blob/master/LICENSE * */!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=28)}({12:function(e,t,n){var r,i,o,a;function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}a=function(){return function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[a]={exports:{}};t[a][0].call(u.exports,(function(e){return i(t[a][1][e]||e)}),u,u.exports,e,t,n,r)}return n[a].exports}for(var o=!1,a=0;a=e.flowLevel;switch(function(e,t,n,r,i){var o,a,s,c,u=!1,l=!1,p=-1!==r,f=-1,d=g(c=e.charCodeAt(0))&&65279!==c&&!y(c)&&45!==c&&63!==c&&58!==c&&44!==c&&91!==c&&93!==c&&123!==c&&125!==c&&35!==c&&38!==c&&42!==c&&33!==c&&124!==c&&61!==c&&62!==c&&39!==c&&34!==c&&37!==c&&64!==c&&96!==c&&!y(e.charCodeAt(e.length-1));if(t)for(o=0;o"+A(t,e.indent)+w(h(function(e,t){for(var n,r,i=/(\n+)([^\n]*)/g,o=function(){var n=-1!==(n=e.indexOf("\n"))?n:e.length;return i.lastIndex=n,C(e.slice(0,n),t)}(),a="\n"===e[0]||" "===e[0];r=i.exec(e);){var s=r[1],c=r[2];n=" "===c[0],o+=s+(a||n||""===c?"":"\n")+C(c,t),a=n}return o}(t,a),o));case 5:return'"'+function(e){for(var t,n,r,i="",o=0;ot&&o tag resolver accepts not "'+a+'" style');r=o.represent[a](t,a)}e.dump=r}return 1}}function j(e,t){var n=new d(t=t||{});return n.noRefs||function(e,t){var n,r,i=[],o=[];for(function e(t,n,r){var i,o,a;if(null!==t&&"object"==s(t))if(-1!==(o=n.indexOf(t)))-1===r.indexOf(o)&&r.push(o);else if(n.push(t),Array.isArray(t))for(o=0,a=t.length;on);var l,p,f="[object Object]"===u||"[object Array]"===u;if(f&&(p=-1!==(l=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||p||2!==t.indent&&0 "+t.dump)}return 1}(n,0,e,!0,!0)?n.dump+"\n":""}t.exports.dump=j,t.exports.safeDump=function(e,t){return j(e,r.extend({schema:a},t))}},{"./common":2,"./exception":4,"./schema/default_full":9,"./schema/default_safe":10}],4:[function(e,t,n){"use strict";function r(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}((r.prototype=Object.create(Error.prototype)).constructor=r).prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t},t.exports=r},{}],5:[function(e,t,n){"use strict";var r=e("./common"),i=e("./exception"),o=e("./mark"),a=e("./schema/default_safe"),c=e("./schema/default_full"),u=Object.prototype.hasOwnProperty,l=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,p=/[\x85\u2028\u2029]/,f=/[,\[\]\{\}]/,d=/^(?:!|!!|![a-z\-]+!)$/i,h=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function m(e){return Object.prototype.toString.call(e)}function y(e){return 10===e||13===e}function g(e){return 9===e||32===e}function b(e){return 9===e||32===e||10===e||13===e}function v(e){return 44===e||91===e||93===e||123===e||125===e}function x(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}for(var A=new Array(256),w=new Array(256),C=0;C<256;C++)A[C]=x(C)?1:0,w[C]=x(C);function k(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||c,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function j(e,t){return new i(t,new o(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function S(e,t){throw j(e,t)}function O(e,t){e.onWarning&&e.onWarning.call(null,j(e,t))}var E={YAML:function(e,t,n){var r,i,o;null!==e.version&&S(e,"duplication of %YAML directive"),1!==n.length&&S(e,"YAML directive accepts exactly one argument"),null===(r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&S(e,"ill-formed argument of the YAML directive"),i=parseInt(r[1],10),o=parseInt(r[2],10),1!==i&&S(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&O(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var r,i;2!==n.length&&S(e,"TAG directive accepts exactly two arguments"),r=n[0],i=n[1],d.test(r)||S(e,"ill-formed tag handle (first argument) of the TAG directive"),u.call(e.tagMap,r)&&S(e,'there is a previously declared suffix for "'+r+'" tag handle'),h.test(i)||S(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[r]=i}};function I(e,t,n,r){var i,o,a,s;if(t>10),56320+(s-65536&1023)),e.position++}else S(e,"unknown escape sequence");n=r=e.position}else y(p)?(I(e,n,r,!0),L(e,M(e,!1,t)),n=r=e.position):e.position===e.lineStart&&T(e)?S(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}S(e,"unexpected end of the stream within a double quoted scalar")}}function U(e,t){var n,r,i=e.tag,o=e.anchor,a=[],s=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),r=e.input.charCodeAt(e.position);0!==r&&45===r&&b(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,M(e,!0,-1)&&e.lineIndent<=t)a.push(null),r=e.input.charCodeAt(e.position);else if(n=e.line,P(e,t,3,!1,!0),a.push(e.result),M(e,!0,-1),r=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==r)S(e,"bad indentation of a sequence entry");else if(e.lineIndentt?w=1:e.lineIndent===t?w=0:e.lineIndentt?w=1:e.lineIndent===t?w=0:e.lineIndentt)&&(P(e,t,4,!0,i)&&(m?d=e.result:h=e.result),m||(N(e,l,p,f,d,h,o,a),f=d=h=null),M(e,!0,-1),s=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==s)S(e,"bad indentation of a mapping entry");else if(e.lineIndentl&&(l=e.lineIndent),y(d))p++;else{if(e.lineIndent=t){a=!0,f=e.input.charCodeAt(e.position);continue}e.position=o,e.line=s,e.lineStart=c,e.lineIndent=u;break}}a&&(I(e,i,o,!1),L(e,e.line-s),i=o=e.position,a=!1),g(f)||(o=e.position+1),f=e.input.charCodeAt(++e.position)}if(I(e,i,o,!1),e.result)return 1;e.kind=l,e.result=p}}(e,x,1===n)&&(k=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===w&&(k=c&&U(e,A))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&S(e,'unacceptable node kind for ! tag; it should be "scalar", not "'+e.kind+'"'),l=0,p=e.implicitTypes.length;l tag; it should be "'+m.kind+'", not "'+e.kind+'"'),m.resolve(e.result)?(e.result=m.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):S(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):S(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||k}function Y(e,t){t=t||{},0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var n=new k(e,t),r=e.indexOf("\0");for(-1!==r&&(n.position=r,S(n,"null byte is not allowed in input")),n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.positiont/2-1){n=" ... ",i+=5;break}for(o="",a=this.position;at/2-1){o=" ... ",a-=5;break}return s=this.buffer.slice(i,a),r.repeat(" ",e)+n+s+o+"\n"+r.repeat(" ",e+this.position-i+n.length)+"^"},i.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(n+=":\n"+t),n},t.exports=i},{"./common":2}],7:[function(e,t,n){"use strict";var r=e("./common"),i=e("./exception"),o=e("./type");function a(e,t,n){var r=[];return e.include.forEach((function(e){n=a(e,t,n)})),e[t].forEach((function(e){n.forEach((function(t,n){t.tag===e.tag&&t.kind===e.kind&&r.push(n)})),n.push(e)})),n.filter((function(e,t){return-1===r.indexOf(t)}))}function s(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach((function(e){if(e.loadKind&&"scalar"!==e.loadKind)throw new i("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")})),this.compiledImplicit=a(this,"implicit",[]),this.compiledExplicit=a(this,"explicit",[]),this.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{}};function r(e){n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e>16&255),c.push(s>>8&255),c.push(255&s)),s=s<<6|a.indexOf(n.charAt(u));return 0==(t=i%4*6)?(c.push(s>>16&255),c.push(s>>8&255),c.push(255&s)):18==t?(c.push(s>>10&255),c.push(s>>2&255)):12==t&&c.push(s>>4&255),r?r.from?r.from(c):new r(c):c},predicate:function(e){return r&&r.isBuffer(e)},represent:function(e){for(var t,n="",r=0,i=e.length,a=o,s=0;s>18&63],n+=a[r>>12&63],n+=a[r>>6&63],n+=a[63&r]),r=(r<<8)+e[s];return 0==(t=i%3)?(n+=a[r>>18&63],n+=a[r>>12&63],n+=a[r>>6&63],n+=a[63&r]):2==t?(n+=a[r>>10&63],n+=a[r>>4&63],n+=a[r<<2&63],n+=a[64]):1==t&&(n+=a[r>>2&63],n+=a[r<<4&63],n+=a[64],n+=a[64]),n}})},{"../type":13}],15:[function(e,t,n){"use strict";var r=e("../type");t.exports=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},{"../type":13}],16:[function(e,t,n){"use strict";var r=e("../common"),i=e("../type"),o=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),a=/^[-+]?[0-9]+e/;t.exports=new i("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!o.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n=e.replace(/_/g,"").toLowerCase(),r="-"===n[0]?-1:1,i=[];return 0<="+-".indexOf(n[0])&&(n=n.slice(1)),".inf"===n?1==r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===n?NaN:0<=n.indexOf(":")?(n.split(":").forEach((function(e){i.unshift(parseFloat(e,10))})),n=0,t=1,i.forEach((function(e){n+=e*t,t*=60})),r*n):r*parseFloat(n,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||r.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(e))return"-0.0";return n=e.toString(10),a.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"})},{"../common":2,"../type":13}],17:[function(e,t,n){"use strict";var r=e("../common"),i=e("../type");t.exports=new i("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,r,i,o=e.length,a=0,s=!1;if(!o)return!1;if("-"!==(t=e[a])&&"+"!==t||(t=e[++a]),"0"===t){if(a+1===o)return!0;if("b"===(t=e[++a])){for(a++;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n