geoportal-access-lib
Version:
French Geoportal resources access library
30 lines • 177 kB
JavaScript
/*!
* @brief Geoportal resources access library
*
* This software is released under the licence CeCILL-B (Free BSD compatible)
* @see http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt
* @see http://www.cecill.info/licences/Licence_CeCILL-B_V1-fr.txt
* @see http://www.cecill.info/
*
* copyright CeCILL-B
* copyright IGN
* @author IGN
* @version 3.4.6
* @date 19/12/2024
*
*/
/*!
* @overview es6-promise - a tiny implementation of Promises/A+.
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
* @version v4.2.4
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("node-fetch")):"function"==typeof define&&define.amd?define("Gp",["require"],t):"object"==typeof exports?exports.Gp=t(require("node-fetch")):e.Gp=t(e[void 0])}(this,(function(e){return function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=9)}([function(e,t,r){"use strict";function o(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.getOwnPropertyDescriptors&&(e=t.create(null,t.getOwnPropertyDescriptors(e))),t&&"function"==typeof t.freeze?t.freeze(e):e}function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var i=o({allowfullscreen:!0,async:!0,autofocus:!0,autoplay:!0,checked:!0,controls:!0,default:!0,defer:!0,disabled:!0,formnovalidate:!0,hidden:!0,ismap:!0,itemscope:!0,loop:!0,multiple:!0,muted:!0,nomodule:!0,novalidate:!0,open:!0,playsinline:!0,readonly:!0,required:!0,reversed:!0,selected:!0});var s=o({area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});var a=o({script:!1,style:!1,textarea:!0,title:!0});function c(e){return e===l.HTML}var l=o({HTML:"text/html",XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),u=Object.keys(l).map((function(e){return l[e]}));var p=o({HTML:"http://www.w3.org/1999/xhtml",SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});t.assign=function(e,t){if(null===e||"object"!=typeof e)throw new TypeError("target is not an object");for(var r in t)n(t,r)&&(e[r]=t[r]);return e},t.find=function(e,t,r){if(void 0===r&&(r=Array.prototype),e&&"function"==typeof r.find)return r.find.call(e,t);for(var o=0;o<e.length;o++)if(n(e,o)){var i=e[o];if(t.call(void 0,i,o,e))return i}},t.freeze=o,t.HTML_BOOLEAN_ATTRIBUTES=i,t.HTML_RAW_TEXT_ELEMENTS=a,t.HTML_VOID_ELEMENTS=s,t.hasDefaultHTMLNamespace=function(e){return c(e)||e===l.XML_XHTML_APPLICATION},t.hasOwn=n,t.isHTMLBooleanAttribute=function(e){return n(i,e.toLowerCase())},t.isHTMLRawTextElement=function(e){var t=e.toLowerCase();return n(a,t)&&!a[t]},t.isHTMLEscapableRawTextElement=function(e){var t=e.toLowerCase();return n(a,t)&&a[t]},t.isHTMLMimeType=c,t.isHTMLVoidElement=function(e){return n(s,e.toLowerCase())},t.isValidMimeType=function(e){return u.indexOf(e)>-1},t.MIME_TYPE=l,t.NAMESPACE=p},function(e){e.exports=JSON.parse('{"name":"geoportal-access-lib","version":"3.4.6","date":"19/12/2024","description":"French Geoportal resources access library","module":"src/Gp.js","main":"dist/GpServices-src.js","homepage":"https://github.com/IGNF/geoportal-access-lib#readme","scripts":{"clean":"echo \\"Warning: no yet implemented!\\" && exit 0","setup":"npm install","cover":"nyc --reporter=lcov --reporter=text npm run test","eslint":"eslint src/","build":"webpack --mode=none","build:prod":"webpack --mode=production","build:dev":"webpack --mode=development","test":"npx instant-mocha --mode=development --reporter mochawesome --reporter-options reportDir=test-report,reportFilename=index --webpack-config ./test/webpack/webpack.test.js --glob \\"test_*.js\\" test/spec/","test:serve":"webpack-dev-server --hot --config ./test/webpack/webpack.test.serve.js","test:serve:docker":"webpack-dev-server --hot --config ./test/webpack/webpack.test.serve.docker.js","test:end-to-end:serve":"webpack-dev-server --hot --config ./test/webpack/webpack.end-to-end.serve.js","test:end-to-end:serve:docker":"webpack-dev-server --hot --config ./test/webpack/webpack.end-to-end.serve.docker.js","sample":"npm run sample:serve","sample:serve":"webpack-dev-server --mode=none --open-page samples/index-src.html --https --content-base . --output-public-path \'/dist/\' --port 9001 --open","sample:serve:prod":"webpack-dev-server --mode=production --open-page samples/index-prod.html --content-base . --output-public-path \'/dist/\' --port 9001 --open","sample:serve:dev":"webpack-dev-server --mode=development --open-page samples/index-map.html --content-base . --output-public-path \'/dist/\' --port 9001 --open","doc":"npm run doc:serve","doc:serve":"webpack-dev-server --content-base jsdoc --port 9001 --open"},"engines":{"node":">=20"},"nyc":{"include":["src/**/*.js"],"instrument":false,"sourceMap":false},"repository":{"type":"git","url":"https://github.com/IGNF/geoportal-access-lib.git"},"keywords":["geoplateforme","geoportail","webservice","javascript","es6"],"author":"IGNF","license":"CECILL-B","dependencies":{"@xmldom/xmldom":"^0.9.6","es6-promise":"^4.2.4","node-fetch":"^2.6.1"},"devDependencies":{"@babel/core":"^7.12.10","@babel/plugin-transform-template-literals":"^7.12.1","@babel/preset-env":"^7.12.11","babel-loader":"^8.2.2","chai":"^4.1.2","clean-webpack-plugin":"^4.0.0","copy-webpack-plugin":"^5.1.2","eslint":"^7.18.0","eslint-config-standard":"^16.0.2","eslint-loader":"^4.0.2","eslint-plugin-import":"^2.22.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^5.0.0","glob":"^7.1.2","handlebars-layouts":"^3.1.4","handlebars-webpack-plugin":"^1.4.1","html-webpack-plugin":"^4.5.2","instant-mocha":"^1.5.3","istanbul-instrumenter-loader":"^3.0.1","jsdoc-webpack-plugin":"^0.3.0","loglevel":"^1.6.1","mocha":"^8.4.0","mocha-loader":"^5.1.5","mochawesome":"^6.2.1","nyc":"^15.1.0","path":"^0.12.7","replace-bundle-webpack-plugin":"^1.0.0","sinon":"^9.2.4","sinon-es6":"0.0.3","speed-measure-webpack-plugin":"^1.4.2","string-template":"^1.0.0","terser-webpack-plugin":"^4.2.3","webpack":"^4.47.0","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.2","webpack-node-externals":"^2.5.2","webpack-shell-plugin":"^0.5.0"},"bundleDependencies":[]}')},function(e,t,r){"use strict";function o(e,t){e.prototype=Object.create(Error.prototype,{constructor:{value:e},name:{value:e.name,enumerable:!0,writable:t}})}var n=r(0).freeze({Error:"Error",IndexSizeError:"IndexSizeError",DomstringSizeError:"DomstringSizeError",HierarchyRequestError:"HierarchyRequestError",WrongDocumentError:"WrongDocumentError",InvalidCharacterError:"InvalidCharacterError",NoDataAllowedError:"NoDataAllowedError",NoModificationAllowedError:"NoModificationAllowedError",NotFoundError:"NotFoundError",NotSupportedError:"NotSupportedError",InUseAttributeError:"InUseAttributeError",InvalidStateError:"InvalidStateError",SyntaxError:"SyntaxError",InvalidModificationError:"InvalidModificationError",NamespaceError:"NamespaceError",InvalidAccessError:"InvalidAccessError",ValidationError:"ValidationError",TypeMismatchError:"TypeMismatchError",SecurityError:"SecurityError",NetworkError:"NetworkError",AbortError:"AbortError",URLMismatchError:"URLMismatchError",QuotaExceededError:"QuotaExceededError",TimeoutError:"TimeoutError",InvalidNodeTypeError:"InvalidNodeTypeError",DataCloneError:"DataCloneError",EncodingError:"EncodingError",NotReadableError:"NotReadableError",UnknownError:"UnknownError",ConstraintError:"ConstraintError",DataError:"DataError",TransactionInactiveError:"TransactionInactiveError",ReadOnlyError:"ReadOnlyError",VersionError:"VersionError",OperationError:"OperationError",NotAllowedError:"NotAllowedError",OptOutError:"OptOutError"}),i=Object.keys(n);function s(e){return"number"==typeof e&&e>=1&&e<=25}function a(e,t){var r;s(e)?(this.name=i[e],this.message=t||""):(this.message=e,this.name="string"==typeof(r=t)&&r.substring(r.length-n.Error.length)===n.Error?t:n.Error),Error.captureStackTrace&&Error.captureStackTrace(this,a)}o(a,!0),Object.defineProperties(a.prototype,{code:{enumerable:!0,get:function(){var e=i.indexOf(this.name);return s(e)?e:0}}});for(var c={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ERR:24,DATA_CLONE_ERR:25},l=Object.entries(c),u=0;u<l.length;u++){a[l[u][0]]=l[u][1]}function p(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,p)}o(p),t.DOMException=a,t.DOMExceptionName=n,t.ExceptionCode=c,t.ParseError=p},function(e,t,r){var o,n;!function(){"use strict";o=function(){var e=function(){},t="undefined",r=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),o=["trace","debug","info","warn","error"],n={},i=null;function s(e,t){var r=e[t];if("function"==typeof r.bind)return r.bind(e);try{return Function.prototype.bind.call(r,e)}catch(t){return function(){return Function.prototype.apply.apply(r,[e,arguments])}}}function a(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function c(o){return"debug"===o&&(o="log"),typeof console!==t&&("trace"===o&&r?a:void 0!==console[o]?s(console,o):void 0!==console.log?s(console,"log"):e)}function l(){for(var r=this.getLevel(),n=0;n<o.length;n++){var i=o[n];this[i]=n<r?e:this.methodFactory(i,r,this.name)}if(this.log=this.debug,typeof console===t&&r<this.levels.SILENT)return"No console available for logging"}function u(e){return function(){typeof console!==t&&(l.call(this),this[e].apply(this,arguments))}}function p(e,t,r){return c(e)||u.apply(this,arguments)}function h(e,r){var s,a,c,u=this,h="loglevel";function f(e){var r=(o[e]||"silent").toUpperCase();if(typeof window!==t&&h){try{return void(window.localStorage[h]=r)}catch(e){}try{window.document.cookie=encodeURIComponent(h)+"="+r+";"}catch(e){}}}function d(){var e;if(typeof window!==t&&h){try{e=window.localStorage[h]}catch(e){}if(typeof e===t)try{var r=window.document.cookie,o=encodeURIComponent(h),n=r.indexOf(o+"=");-1!==n&&(e=/^([^;]+)/.exec(r.slice(n+o.length+1))[1])}catch(e){}return void 0===u.levels[e]&&(e=void 0),e}}function g(){if(typeof window!==t&&h){try{window.localStorage.removeItem(h)}catch(e){}try{window.document.cookie=encodeURIComponent(h)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}function m(e){var t=e;if("string"==typeof t&&void 0!==u.levels[t.toUpperCase()]&&(t=u.levels[t.toUpperCase()]),"number"==typeof t&&t>=0&&t<=u.levels.SILENT)return t;throw new TypeError("log.setLevel() called with invalid level: "+e)}"string"==typeof e?h+=":"+e:"symbol"==typeof e&&(h=void 0),u.name=e,u.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},u.methodFactory=r||p,u.getLevel=function(){return null!=c?c:null!=a?a:s},u.setLevel=function(e,t){return c=m(e),!1!==t&&f(c),l.call(u)},u.setDefaultLevel=function(e){a=m(e),d()||u.setLevel(e,!1)},u.resetLevel=function(){c=null,g(),l.call(u)},u.enableAll=function(e){u.setLevel(u.levels.TRACE,e)},u.disableAll=function(e){u.setLevel(u.levels.SILENT,e)},u.rebuild=function(){if(i!==u&&(s=m(i.getLevel())),l.call(u),i===u)for(var e in n)n[e].rebuild()},s=m(i?i.getLevel():"WARN");var E=d();null!=E&&(c=m(E)),l.call(u)}(i=new h).getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=n[e];return t||(t=n[e]=new h(e,i.methodFactory)),t};var f=typeof window!==t?window.log:void 0;return i.noConflict=function(){return typeof window!==t&&window.log===i&&(window.log=f),i},i.getLoggers=function(){return n},i.default=i,i},void 0===(n="function"==typeof o?o.call(t,r,t,e):o)||(e.exports=n)}()},function(t,r){t.exports=e},function(e,t,r){"use strict";var o=r(0);t.assign=o.assign,t.hasDefaultHTMLNamespace=o.hasDefaultHTMLNamespace,t.isHTMLMimeType=o.isHTMLMimeType,t.isValidMimeType=o.isValidMimeType,t.MIME_TYPE=o.MIME_TYPE,t.NAMESPACE=o.NAMESPACE;var n=r(2);t.DOMException=n.DOMException,t.DOMExceptionName=n.DOMExceptionName,t.ExceptionCode=n.ExceptionCode,t.ParseError=n.ParseError;var i=r(6);t.Attr=i.Attr,t.CDATASection=i.CDATASection,t.CharacterData=i.CharacterData,t.Comment=i.Comment,t.Document=i.Document,t.DocumentFragment=i.DocumentFragment,t.DocumentType=i.DocumentType,t.DOMImplementation=i.DOMImplementation,t.Element=i.Element,t.Entity=i.Entity,t.EntityReference=i.EntityReference,t.LiveNodeList=i.LiveNodeList,t.NamedNodeMap=i.NamedNodeMap,t.Node=i.Node,t.NodeList=i.NodeList,t.Notation=i.Notation,t.ProcessingInstruction=i.ProcessingInstruction,t.Text=i.Text,t.XMLSerializer=i.XMLSerializer;var s=r(12);t.DOMParser=s.DOMParser,t.onErrorStopParsing=s.onErrorStopParsing,t.onWarningStopParsing=s.onWarningStopParsing},function(e,t,r){"use strict";var o=r(0),n=o.find,i=o.hasDefaultHTMLNamespace,s=o.hasOwn,a=o.isHTMLMimeType,c=o.isHTMLRawTextElement,l=o.isHTMLVoidElement,u=o.MIME_TYPE,p=o.NAMESPACE,h=Symbol(),f=r(2),d=f.DOMException,g=f.DOMExceptionName,m=r(7);function E(e){if(e!==h)throw new TypeError("Illegal constructor")}function y(e){return""!==e}function v(e,t){return s(e,t)||(e[t]=!0),e}function w(e){if(!e)return[];var t=function(e){return e?e.split(/[\t\n\f\r ]+/).filter(y):[]}(e);return Object.keys(t.reduce(v,{}))}function b(e){if(!m.QName_exact.test(e))throw new d(d.INVALID_CHARACTER_ERR,'invalid character in qualified name "'+e+'"')}function S(e,t){b(t),e=e||null;var r=null,n=t;if(t.indexOf(":")>=0){var i=t.split(":");r=i[0],n=i[1]}if(null!==r&&null===e)throw new d(d.NAMESPACE_ERR,"prefix is non-null and namespace is null");if("xml"===r&&e!==o.NAMESPACE.XML)throw new d(d.NAMESPACE_ERR,'prefix is "xml" and namespace is not the XML namespace');if(("xmlns"===r||"xmlns"===t)&&e!==o.NAMESPACE.XMLNS)throw new d(d.NAMESPACE_ERR,'either qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace');if(e===o.NAMESPACE.XMLNS&&"xmlns"!==r&&"xmlns"!==t)throw new d(d.NAMESPACE_ERR,'namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"');return[e,r,n]}function T(e,t){for(var r in e)s(e,r)&&(t[r]=e[r])}function R(e,t){var r=e.prototype;if(!(r instanceof t)){function o(){}o.prototype=t.prototype,T(r,o=new o),e.prototype=r=o}r.constructor!=e&&("function"!=typeof e&&console.error("unknown Class:"+e),r.constructor=e)}var N={},_=N.ELEMENT_NODE=1,O=N.ATTRIBUTE_NODE=2,A=N.TEXT_NODE=3,x=N.CDATA_SECTION_NODE=4,C=N.ENTITY_REFERENCE_NODE=5,I=N.ENTITY_NODE=6,M=N.PROCESSING_INSTRUCTION_NODE=7,D=N.COMMENT_NODE=8,P=N.DOCUMENT_NODE=9,L=N.DOCUMENT_TYPE_NODE=10,k=N.DOCUMENT_FRAGMENT_NODE=11,q=N.NOTATION_NODE=12,U=o.freeze({DOCUMENT_POSITION_DISCONNECTED:1,DOCUMENT_POSITION_PRECEDING:2,DOCUMENT_POSITION_FOLLOWING:4,DOCUMENT_POSITION_CONTAINS:8,DOCUMENT_POSITION_CONTAINED_BY:16,DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:32});function F(e){for(var t=[];e.parentNode||e.ownerElement;)e=e.parentNode||e.ownerElement,t.unshift(e);return t}function V(e,t){if(t.length<e.length)return V(t,e);var r=null;for(var o in e){if(e[o]!==t[o])return r;r=e[o]}return r}function G(e){return e.guid||(e.guid=Math.random()),e.guid}function j(){}function H(e,t){this._node=e,this._refresh=t,Y(this)}function Y(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var r=e._refresh(e._node);if(Ie(e,"length",r.length),!e.$$length||r.length<e.$$length)for(var o=r.length;o in e;o++)s(e,o)&&delete e[o];T(r,e),e._inc=t}}function X(){}function z(e,t){for(var r=0;r<e.length;){if(e[r]===t)return r;r++}}function B(e,t,r,o){if(o?t[z(t,o)]=r:(t[t.length]=r,t.length++),e){r.ownerElement=e;var n=e.ownerDocument;n&&(o&&ee(n,e,o),function(e,t,r){e&&e._inc++;var o=r.namespaceURI;o===p.XMLNS&&(t._nsMap[r.prefix?r.localName:""]=r.value)}(n,e,r))}}function W(e,t,r){var o=z(t,r);if(o>=0){for(var n=t.length-1;o<=n;)t[o]=t[++o];if(t.length=n,e){var i=e.ownerDocument;i&&ee(i,e,r),r.ownerElement=null}}}function J(){}function Q(e){E(e)}function K(e){return("<"==e?"<":">"==e&&">")||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function Z(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(Z(e,t))return!0}while(e=e.nextSibling)}function $(e,t){E(e);var r=t||{};this.ownerDocument=this,this.contentType=r.contentType||u.XML_APPLICATION,this.type=a(this.contentType)?"html":"xml"}function ee(e,t,r,o){e&&e._inc++,r.namespaceURI===p.XMLNS&&delete t._nsMap[r.prefix?r.localName:""]}function te(e,t,r){if(e&&e._inc){e._inc++;var o=t.childNodes;if(r&&!r.nextSibling)o[o.length++]=r;else{for(var n=t.firstChild,i=0;n;)o[i++]=n,n=n.nextSibling;o.length=i,delete o[o.length]}}}function re(e,t){if(e!==t.parentNode)throw new d(d.NOT_FOUND_ERR,"child's parent is not parent");var r=t.previousSibling,o=t.nextSibling;return r?r.nextSibling=o:e.firstChild=o,o?o.previousSibling=r:e.lastChild=r,te(e.ownerDocument,e),t.parentNode=null,t.previousSibling=null,t.nextSibling=null,t}function oe(e){return e&&e.nodeType===Q.DOCUMENT_TYPE_NODE}function ne(e){return e&&e.nodeType===Q.ELEMENT_NODE}function ie(e){return e&&e.nodeType===Q.TEXT_NODE}function se(e,t){var r=e.childNodes||[];if(n(r,ne)||oe(t))return!1;var o=n(r,oe);return!(t&&o&&r.indexOf(o)>r.indexOf(t))}function ae(e,t){var r=e.childNodes||[];if(n(r,(function(e){return ne(e)&&e!==t})))return!1;var o=n(r,oe);return!(t&&o&&r.indexOf(o)>r.indexOf(t))}function ce(e,t,r){if(!function(e){return e&&(e.nodeType===Q.DOCUMENT_NODE||e.nodeType===Q.DOCUMENT_FRAGMENT_NODE||e.nodeType===Q.ELEMENT_NODE)}(e))throw new d(d.HIERARCHY_REQUEST_ERR,"Unexpected parent node type "+e.nodeType);if(r&&r.parentNode!==e)throw new d(d.NOT_FOUND_ERR,"child not in parent");if(!function(e){return e&&(e.nodeType===Q.CDATA_SECTION_NODE||e.nodeType===Q.COMMENT_NODE||e.nodeType===Q.DOCUMENT_FRAGMENT_NODE||e.nodeType===Q.DOCUMENT_TYPE_NODE||e.nodeType===Q.ELEMENT_NODE||e.nodeType===Q.PROCESSING_INSTRUCTION_NODE||e.nodeType===Q.TEXT_NODE)}(t)||oe(t)&&e.nodeType!==Q.DOCUMENT_NODE)throw new d(d.HIERARCHY_REQUEST_ERR,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)}function le(e,t,r){var o=e.childNodes||[],i=t.childNodes||[];if(t.nodeType===Q.DOCUMENT_FRAGMENT_NODE){var s=i.filter(ne);if(s.length>1||n(i,ie))throw new d(d.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(1===s.length&&!se(e,r))throw new d(d.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(ne(t)&&!se(e,r))throw new d(d.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(oe(t)){if(n(o,oe))throw new d(d.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var a=n(o,ne);if(r&&o.indexOf(a)<o.indexOf(r))throw new d(d.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element");if(!r&&a)throw new d(d.HIERARCHY_REQUEST_ERR,"Doctype can not be appended since element is present")}}function ue(e,t,r){var o=e.childNodes||[],i=t.childNodes||[];if(t.nodeType===Q.DOCUMENT_FRAGMENT_NODE){var s=i.filter(ne);if(s.length>1||n(i,ie))throw new d(d.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(1===s.length&&!ae(e,r))throw new d(d.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(ne(t)&&!ae(e,r))throw new d(d.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(oe(t)){function c(e){return oe(e)&&e!==r}if(n(o,c))throw new d(d.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var a=n(o,ne);if(r&&o.indexOf(a)<o.indexOf(r))throw new d(d.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element")}}function pe(e,t,r,o){ce(e,t,r),e.nodeType===Q.DOCUMENT_NODE&&(o||le)(e,t,r);var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===k){var i=t.firstChild;if(null==i)return t;var s=t.lastChild}else i=s=t;var a=r?r.previousSibling:e.lastChild;i.previousSibling=a,s.nextSibling=r,a?a.nextSibling=i:e.firstChild=i,null==r?e.lastChild=s:r.previousSibling=s;do{i.parentNode=e}while(i!==s&&(i=i.nextSibling));return te(e.ownerDocument||e,e,t),t.nodeType==k&&(t.firstChild=t.lastChild=null),t}function he(e){E(e),this._nsMap=Object.create(null)}function fe(e){E(e),this.namespaceURI=null,this.prefix=null,this.ownerElement=null}function de(e){E(e)}function ge(e){E(e)}function me(e){E(e)}function Ee(e){E(e)}function ye(e){E(e)}function ve(e){E(e)}function we(e){E(e)}function be(e){E(e)}function Se(e){E(e)}function Te(e){E(e)}function Re(){}function Ne(e){var t=[],r=this.nodeType===P&&this.documentElement||this,o=r.prefix,n=r.namespaceURI;if(n&&null==o&&null==(o=r.lookupPrefix(n)))var i=[{namespace:n,prefix:null}];return Ae(this,t,e,i),t.join("")}function _e(e,t,r){var o=e.prefix||"",n=e.namespaceURI;if(!n)return!1;if("xml"===o&&n===p.XML||n===p.XMLNS)return!1;for(var i=r.length;i--;){var s=r[i];if(s.prefix===o)return s.namespace!==n}return!0}function Oe(e,t,r){e.push(" ",t,'="',r.replace(/[<>&"\t\n\r]/g,K),'"')}function Ae(e,t,r,o){o||(o=[]);var n="html"===(e.nodeType===P?e:e.ownerDocument).type;if(r){if(!(e=r(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case _:var i=e.attributes,s=i.length,a=e.firstChild,u=e.tagName,h=u;if(!n&&!e.prefix&&e.namespaceURI){for(var f,d=0;d<i.length;d++)if("xmlns"===i.item(d).name){f=i.item(d).value;break}if(!f)for(var g=o.length-1;g>=0;g--){if(""===(E=o[g]).prefix&&E.namespace===e.namespaceURI){f=E.namespace;break}}if(f!==e.namespaceURI)for(g=o.length-1;g>=0;g--){var E;if((E=o[g]).namespace===e.namespaceURI){E.prefix&&(h=E.prefix+":"+u);break}}}t.push("<",h);for(var y=0;y<s;y++){"xmlns"==(v=i.item(y)).prefix?o.push({prefix:v.localName,namespace:v.value}):"xmlns"==v.nodeName&&o.push({prefix:"",namespace:v.value})}for(y=0;y<s;y++){var v,w,b;if(_e(v=i.item(y),0,o))Oe(t,(w=v.prefix||"")?"xmlns:"+w:"xmlns",b=v.namespaceURI),o.push({prefix:w,namespace:b});Ae(v,t,r,o)}if(u===h&&_e(e,0,o))Oe(t,(w=e.prefix||"")?"xmlns:"+w:"xmlns",b=e.namespaceURI),o.push({prefix:w,namespace:b});var S=!a;if(S&&(n||e.namespaceURI===p.HTML)&&(S=l(u)),S)t.push("/>");else{if(t.push(">"),n&&c(u))for(;a;)a.data?t.push(a.data):Ae(a,t,r,o.slice()),a=a.nextSibling;else for(;a;)Ae(a,t,r,o.slice()),a=a.nextSibling;t.push("</",h,">")}return;case P:case k:for(a=e.firstChild;a;)Ae(a,t,r,o.slice()),a=a.nextSibling;return;case O:return Oe(t,e.name,e.value);case A:return t.push(e.data.replace(/[<&>]/g,K));case x:return t.push(m.CDATA_START,e.data,m.CDATA_END);case D:return t.push(m.COMMENT_START,e.data,m.COMMENT_END);case L:var T=e.publicId,R=e.systemId;return t.push(m.DOCTYPE_DECL_START," ",e.name),T?(t.push(" ",m.PUBLIC," ",T),R&&"."!==R&&t.push(" ",R)):R&&"."!==R&&t.push(" ",m.SYSTEM," ",R),e.internalSubset&&t.push(" [",e.internalSubset,"]"),void t.push(">");case M:return t.push("<?",e.target," ",e.data,"?>");case C:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function xe(e,t,r){var o;switch(t.nodeType){case _:(o=t.cloneNode(!1)).ownerDocument=e;case k:break;case O:r=!0}if(o||(o=t.cloneNode(!1)),o.ownerDocument=e,o.parentNode=null,r)for(var n=t.firstChild;n;)o.appendChild(xe(e,n,r)),n=n.nextSibling;return o}function Ce(e,t,r){var o=new t.constructor(h);for(var n in t)if(s(t,n)){var i=t[n];"object"!=typeof i&&i!=o[n]&&(o[n]=i)}switch(t.childNodes&&(o.childNodes=new j),o.ownerDocument=e,o.nodeType){case _:var a=t.attributes,c=o.attributes=new X,l=a.length;c._ownerElement=o;for(var u=0;u<l;u++)o.setAttributeNode(Ce(e,a.item(u),!0));break;case O:r=!0}if(r)for(var p=t.firstChild;p;)o.appendChild(Ce(e,p,r)),p=p.nextSibling;return o}function Ie(e,t,r){e[t]=r}j.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e){for(var t=[],r=0;r<this.length;r++)Ae(this[r],t,e);return t.join("")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},j.prototype[Symbol.iterator]=function(){var e=this,t=0;return{next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0}},return:function(){return{done:!0}}}},H.prototype.item=function(e){return Y(this),this[e]||null},R(H,j),X.prototype={length:0,item:j.prototype.item,getNamedItem:function(e){this._ownerElement&&this._ownerElement._isInHTMLDocumentAndNamespace()&&(e=e.toLowerCase());for(var t=0;t<this.length;){var r=this[t];if(r.nodeName===e)return r;t++}return null},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!==this._ownerElement)throw new d(d.INUSE_ATTRIBUTE_ERR);var r=this.getNamedItemNS(e.namespaceURI,e.localName);return r===e?e:(B(this._ownerElement,this,e,r),r)},setNamedItemNS:function(e){return this.setNamedItem(e)},removeNamedItem:function(e){var t=this.getNamedItem(e);if(!t)throw new d(d.NOT_FOUND_ERR,e);return W(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var r=this.getNamedItemNS(e,t);if(!r)throw new d(d.NOT_FOUND_ERR,e?e+" : "+t:t);return W(this._ownerElement,this,r),r},getNamedItemNS:function(e,t){e||(e=null);for(var r=0;r<this.length;){var o=this[r];if(o.localName===t&&o.namespaceURI===e)return o;r++}return null}},X.prototype[Symbol.iterator]=function(){var e=this,t=0;return{next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0}},return:function(){return{done:!0}}}},J.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,r){var o=u.XML_APPLICATION;e===p.HTML?o=u.XML_XHTML_APPLICATION:e===p.SVG&&(o=u.XML_SVG_IMAGE);var n=new $(h,{contentType:o});if(n.implementation=this,n.childNodes=new j,n.doctype=r||null,r&&n.appendChild(r),t){var i=n.createElementNS(e,t);n.appendChild(i)}return n},createDocumentType:function(e,t,r,o){b(e);var n=new ye(h);return n.name=e,n.nodeName=e,n.publicId=t||"",n.systemId=r||"",n.internalSubset=o||"",n.childNodes=new j,n},createHTMLDocument:function(e){var t=new $(h,{contentType:u.HTML});if(t.implementation=this,t.childNodes=new j,!1!==e){t.doctype=this.createDocumentType("html"),t.doctype.ownerDocument=t,t.appendChild(t.doctype);var r=t.createElement("html");t.appendChild(r);var o=t.createElement("head");if(r.appendChild(o),"string"==typeof e){var n=t.createElement("title");n.appendChild(t.createTextNode(e)),o.appendChild(n)}r.appendChild(t.createElement("body"))}return t}},Q.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,parentNode:null,get parentElement(){return this.parentNode&&this.parentNode.nodeType===this.ELEMENT_NODE?this.parentNode:null},childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,baseURI:"about:blank",get isConnected(){var e=this.getRootNode();return e&&e.nodeType===e.DOCUMENT_NODE},contains:function(e){if(!e)return!1;var t=e;do{if(this===t)return!0;t=e.parentNode}while(t);return!1},getRootNode:function(e){var t=this;do{if(!t.parentNode)return t;t=t.parentNode}while(t)},isEqualNode:function(e){if(!e)return!1;if(this.nodeType!==e.nodeType)return!1;switch(this.nodeType){case this.DOCUMENT_TYPE_NODE:if(this.name!==e.name)return!1;if(this.publicId!==e.publicId)return!1;if(this.systemId!==e.systemId)return!1;break;case this.ELEMENT_NODE:if(this.namespaceURI!==e.namespaceURI)return!1;if(this.prefix!==e.prefix)return!1;if(this.localName!==e.localName)return!1;if(this.attributes.length!==e.attributes.length)return!1;for(var t=0;t<this.attributes.length;t++){var r=this.attributes.item(t);if(!r.isEqualNode(e.getAttributeNodeNS(r.namespaceURI,r.localName)))return!1}break;case this.ATTRIBUTE_NODE:if(this.namespaceURI!==e.namespaceURI)return!1;if(this.localName!==e.localName)return!1;if(this.value!==e.value)return!1;break;case this.PROCESSING_INSTRUCTION_NODE:if(this.target!==e.target||this.data!==e.data)return!1;break;case this.TEXT_NODE:case this.COMMENT_NODE:if(this.data!==e.data)return!1}if(this.childNodes.length!==e.childNodes.length)return!1;for(t=0;t<this.childNodes.length;t++)if(!this.childNodes[t].isEqualNode(e.childNodes[t]))return!1;return!0},isSameNode:function(e){return this===e},insertBefore:function(e,t){return pe(this,e,t)},replaceChild:function(e,t){pe(this,e,t,ue),t&&this.removeChild(t)},removeChild:function(e){return re(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return Ce(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==A&&e.nodeType==A?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},lookupPrefix:function(e){for(var t=this;t;){var r=t._nsMap;if(r)for(var o in r)if(s(r,o)&&r[o]===e)return o;t=t.nodeType==O?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var r=t._nsMap;if(r&&s(r,e))return r[e];t=t.nodeType==O?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)},compareDocumentPosition:function(e){if(this===e)return 0;var t=e,r=this,o=null,n=null;if(t instanceof fe&&(t=(o=t).ownerElement),r instanceof fe&&(r=(n=r).ownerElement,o&&t&&r===t))for(var i,s=0;i=r.attributes[s];s++){if(i===o)return U.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+U.DOCUMENT_POSITION_PRECEDING;if(i===n)return U.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+U.DOCUMENT_POSITION_FOLLOWING}if(!t||!r||r.ownerDocument!==t.ownerDocument)return U.DOCUMENT_POSITION_DISCONNECTED+U.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+(G(r.ownerDocument)>G(t.ownerDocument)?U.DOCUMENT_POSITION_FOLLOWING:U.DOCUMENT_POSITION_PRECEDING);var a=F(t),c=F(r);if(!o&&c.indexOf(t)>=0||n&&t===r)return U.DOCUMENT_POSITION_CONTAINS+U.DOCUMENT_POSITION_PRECEDING;if(!n&&a.indexOf(r)>=0||o&&t===r)return U.DOCUMENT_POSITION_CONTAINED_BY+U.DOCUMENT_POSITION_FOLLOWING;var l=V(c,a);for(var u in l.childNodes){var p=l.childNodes[u];if(p===r)return U.DOCUMENT_POSITION_FOLLOWING;if(p===t)return U.DOCUMENT_POSITION_PRECEDING;if(c.indexOf(p)>=0)return U.DOCUMENT_POSITION_FOLLOWING;if(a.indexOf(p)>=0)return U.DOCUMENT_POSITION_PRECEDING}return 0}},T(N,Q),T(N,Q.prototype),T(U,Q),T(U,Q.prototype),$.prototype={implementation:null,nodeName:"#document",nodeType:P,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType===k){for(var r=e.firstChild;r;){var o=r.nextSibling;this.insertBefore(r,t),r=o}return e}return pe(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===_&&(this.documentElement=e),e},removeChild:function(e){var t=re(this,e);return t===this.documentElement&&(this.documentElement=null),t},replaceChild:function(e,t){pe(this,e,t,ue),e.ownerDocument=this,t&&this.removeChild(t),ne(e)&&(this.documentElement=e)},importNode:function(e,t){return xe(this,e,t)},getElementById:function(e){var t=null;return Z(this.documentElement,(function(r){if(r.nodeType==_&&r.getAttribute("id")==e)return t=r,!0})),t},createElement:function(e){var t=new he(h);return t.ownerDocument=this,"html"===this.type&&(e=e.toLowerCase()),i(this.contentType)&&(t.namespaceURI=p.HTML),t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new j,(t.attributes=new X)._ownerElement=t,t},createDocumentFragment:function(){var e=new Se(h);return e.ownerDocument=this,e.childNodes=new j,e},createTextNode:function(e){var t=new ge(h);return t.ownerDocument=this,t.childNodes=new j,t.appendData(e),t},createComment:function(e){var t=new me(h);return t.ownerDocument=this,t.childNodes=new j,t.appendData(e),t},createCDATASection:function(e){var t=new Ee(h);return t.ownerDocument=this,t.childNodes=new j,t.appendData(e),t},createProcessingInstruction:function(e,t){var r=new Te(h);return r.ownerDocument=this,r.childNodes=new j,r.nodeName=r.target=e,r.nodeValue=r.data=t,r},createAttribute:function(e){if(!m.QName_exact.test(e))throw new d(d.INVALID_CHARACTER_ERR,'invalid character in name "'+e+'"');return"html"===this.type&&(e=e.toLowerCase()),this._createAttribute(e)},_createAttribute:function(e){var t=new fe(h);return t.ownerDocument=this,t.childNodes=new j,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){if(!m.Name.test(e))throw new d(d.INVALID_CHARACTER_ERR,'not a valid xml name "'+e+'"');if("html"===this.type)throw new d("document is an html document",g.NotSupportedError);var t=new be(h);return t.ownerDocument=this,t.childNodes=new j,t.nodeName=e,t},createElementNS:function(e,t){var r=S(e,t),o=new he(h),n=o.attributes=new X;return o.childNodes=new j,o.ownerDocument=this,o.nodeName=t,o.tagName=t,o.namespaceURI=r[0],o.prefix=r[1],o.localName=r[2],n._ownerElement=o,o},createAttributeNS:function(e,t){var r=S(e,t),o=new fe(h);return o.ownerDocument=this,o.childNodes=new j,o.nodeName=t,o.name=t,o.specified=!0,o.namespaceURI=r[0],o.prefix=r[1],o.localName=r[2],o}},R($,Q),he.prototype={nodeType:_,attributes:null,getQualifiedName:function(){return this.prefix?this.prefix+":"+this.localName:this.localName},_isInHTMLDocumentAndNamespace:function(){return"html"===this.ownerDocument.type&&this.namespaceURI===p.HTML},hasAttribute:function(e){return!!this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t?t.value:null},getAttributeNode:function(e){return this._isInHTMLDocumentAndNamespace()&&(e=e.toLowerCase()),this.attributes.getNamedItem(e)},setAttribute:function(e,t){this._isInHTMLDocumentAndNamespace()&&(e=e.toLowerCase());var r=this.getAttributeNode(e);r?r.value=r.nodeValue=""+t:((r=this.ownerDocument._createAttribute(e)).value=r.nodeValue=""+t,this.setAttributeNode(r))},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);r&&this.removeAttributeNode(r)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);return r?r.value:null},setAttributeNS:function(e,t,r){var o=S(e,t)[2],n=this.getAttributeNodeNS(e,o);n?n.value=n.nodeValue=""+r:((n=this.ownerDocument.createAttributeNS(e,t)).value=n.nodeValue=""+r,this.setAttributeNode(n))},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByClassName:function(e){var t=w(e);return new H(this,(function(r){var o=[];return t.length>0&&Z(r,(function(n){if(n!==r&&n.nodeType===_){var i=n.getAttribute("class");if(i){var s=e===i;if(!s){var a=w(i);s=t.every((c=a,function(e){return c&&-1!==c.indexOf(e)}))}s&&o.push(n)}}var c})),o}))},getElementsByTagName:function(e){var t="html"===(this.nodeType===P?this:this.ownerDocument).type,r=e.toLowerCase();return new H(this,(function(o){var n=[];return Z(o,(function(i){i!==o&&i.nodeType===_&&(("*"===e||i.getQualifiedName()===(t&&i.namespaceURI===p.HTML?r:e))&&n.push(i))})),n}))},getElementsByTagNameNS:function(e,t){return new H(this,(function(r){var o=[];return Z(r,(function(n){n===r||n.nodeType!==_||"*"!==e&&n.namespaceURI!==e||"*"!==t&&n.localName!=t||o.push(n)})),o}))}},$.prototype.getElementsByClassName=he.prototype.getElementsByClassName,$.prototype.getElementsByTagName=he.prototype.getElementsByTagName,$.prototype.getElementsByTagNameNS=he.prototype.getElementsByTagNameNS,R(he,Q),fe.prototype.nodeType=O,R(fe,Q),de.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,r){r=this.data.substring(0,e)+r+this.data.substring(e+t),this.nodeValue=this.data=r,this.length=r.length}},R(de,Q),ge.prototype={nodeName:"#text",nodeType:A,splitText:function(e){var t=this.data,r=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var o=this.ownerDocument.createTextNode(r);return this.parentNode&&this.parentNode.insertBefore(o,this.nextSibling),o}},R(ge,de),me.prototype={nodeName:"#comment",nodeType:D},R(me,de),Ee.prototype={nodeName:"#cdata-section",nodeType:x},R(Ee,ge),ye.prototype.nodeType=L,R(ye,Q),ve.prototype.nodeType=q,R(ve,Q),we.prototype.nodeType=I,R(we,Q),be.prototype.nodeType=C,R(be,Q),Se.prototype.nodeName="#document-fragment",Se.prototype.nodeType=k,R(Se,Q),Te.prototype.nodeType=M,R(Te,de),Re.prototype.serializeToString=function(e,t){return Ne.call(e,t)},Q.prototype.toString=Ne;try{if(Object.defineProperty){function Me(e){switch(e.nodeType){case _:case k:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(Me(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(H.prototype,"length",{get:function(){return Y(this),this.$$length}}),Object.defineProperty(Q.prototype,"textContent",{get:function(){return Me(this)},set:function(e){switch(this.nodeType){case _:case k:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Ie=function(e,t,r){e["$$"+t]=r}}}catch(De){}t._updateLiveList=Y,t.Attr=fe,t.CDATASection=Ee,t.CharacterData=de,t.Comment=me,t.Document=$,t.DocumentFragment=Se,t.DocumentType=ye,t.DOMImplementation=J,t.Element=he,t.Entity=we,t.EntityReference=be,t.LiveNodeList=H,t.NamedNodeMap=X,t.Node=Q,t.NodeList=j,t.Notation=ve,t.Text=ge,t.ProcessingInstruction=Te,t.XMLSerializer=Re},function(e,t,r){"use strict";function o(e){try{"function"!=typeof e&&(e=RegExp);var t=new e("𝌆","u").exec("𝌆");return!!t&&2===t[0].length}catch(e){}return!1}var n=o();function i(e){if("["!==e.source[0])throw new Error(e+" can not be used with chars");return e.source.slice(1,e.source.lastIndexOf("]"))}function s(e,t){if("["!==e.source[0])throw new Error("/"+e.source+"/ can not be used with chars_without");if(!t||"string"!=typeof t)throw new Error(JSON.stringify(t)+" is not a valid search");if(-1===e.source.indexOf(t))throw new Error('"'+t+'" is not is /'+e.source+"/");if("-"===t&&1!==e.source.indexOf(t))throw new Error('"'+t+'" is not at the first postion of /'+e.source+"/");return new RegExp(e.source.replace(t,""),n?"u":"")}function a(e){var t=this;return new RegExp(Array.prototype.slice.call(arguments).map((function(e){var r="string"==typeof e;if(r&&void 0===t&&"|"===e)throw new Error("use regg instead of reg to wrap expressions with `|`!");return r?e:e.source})).join(""),n?"mu":"m")}function c(e){if(0===arguments.length)throw new Error("no parameters provided");return a.apply(c,["(?:"].concat(Array.prototype.slice.call(arguments),[")"]))}var l=/[-\x09\x0A\x0D\x20-\x2C\x2E-\uD7FF\uE000-\uFFFD]/;n&&(l=a("[",i(l),"\\u{10000}-\\u{10FFFF}","]"));var u=/[\x20\x09\x0D\x0A]/,p=i(u),h=a(u,"+"),f=a(u,"*"),d=/[:_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;n&&(d=a("[",i(d),"\\u{10000}-\\u{10FFFF}","]"));var g=a("[",i(d),i(/[-.0-9\xB7]/),i(/[\u0300-\u036F\u203F-\u2040]/),"]"),m=a(d,g,"*"),E=a(g,"+"),y=a("&",m,";"),v=c(/&#[0-9]+;|&#x[0-9a-fA-F]+;/),w=c(y,"|",v),b=a("%",m,";"),S=c(a('"',c(/[^%&"]/,"|",b,"|",w),"*",'"'),"|",a("'",c(/[^%&']/,"|",b,"|",w),"*","'")),T=c('"',c(/[^<&"]/,"|",w),"*",'"',"|","'",c(/[^<&']/,"|",w),"*","'"),R=a(s(d,":"),s(g,":"),"*"),N=a(R,c(":",R),"?"),_=a("^",N,"$"),O=a("(",N,")"),A=c(/"[^"]*"|'[^']*'/),x=a(/^<\?/,"(",m,")",c(h,"(",l,"*?)"),"?",/\?>/),C=/[\x20\x0D\x0Aa-zA-Z0-9-'()+,./:=?;!*#@$_%]/,I=c('"',C,'*"',"|","'",s(C,"'"),"*'"),M="\x3c!--",D=a(M,c(s(l,"-"),"|",a("-",s(l,"-"))),"*","--\x3e"),P="#PCDATA",L=c(a(/\(/,f,P,c(f,/\|/,f,N),"*",f,/\)\*/),"|",a(/\(/,f,P,f,/\)/)),k=c("EMPTY","|","ANY","|",L,"|",a(/\([^>]+\)/,/[?*+]?/)),q=a("<!ELEMENT",h,c(N,"|",b),h,c(k,"|",b),f,">"),U=a("NOTATION",h,/\(/,f,m,c(f,/\|/,f,m),"*",f,/\)/),F=a(/\(/,f,E,c(f,/\|/,f,E),"*",f,/\)/),V=c(U,"|",F),G=c(/CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS/,"|",V),j=c(/#REQUIRED|#IMPLIED/,"|",c(c("#FIXED",h),"?",T)),H=a("<!ATTLIST",h,m,c(h,m,h,G,h,j),"*",f,">"),Y="SYSTEM",X="PUBLIC",z=c(c(Y,h,A),"|",c(X,h,I,h,A)),B=a("^",c(c(Y,h,"(?<SystemLiteralOnly>",A,")"),"|",c(X,h,"(?<PubidLiteral>",I,")",h,"(?<SystemLiteral>",A,")"))),W=c(h,"NDATA",h,m),J="<!ENTITY",Q=a(J,h,m,h,c(S,"|",c(z,W,"?")),f,">"),K=c(S,"|",z),Z=c(Q,"|",a(J,h,"%",h,m,h,K,f,">")),$=a(X,h,I),ee=a("<!NOTATION",h,m,h,c(z,"|",$),f,">"),te=a(f,"=",f),re=/1[.]\d+/,oe=a(h,"version",te,c("'",re,"'","|",'"',re,'"')),ne=/[A-Za-z][-A-Za-z0-9._]*/,ie=a(/^<\?xml/,oe,c(h,"encoding",te,c('"',ne,'"',"|","'",ne,"'")),"?",c(h,"standalone",te,c("'",c("yes","|","no"),"'","|",'"',c("yes","|","no"),'"')),"?",f,/\?>/),se=a(l,"*?",/\]\]>/),ae=a(/<!\[CDATA\[/,se);t.chars=i,t.chars_without=s,t.detectUnicodeSupport=o,t.reg=a,t.regg=c,t.AttlistDecl=H,t.CDATA_START="<![CDATA[",t.CDATA_END="]]>",t.CDSect=ae,t.Char=l,t.Comment=D,t.COMMENT_START=M,t.COMMENT_END="--\x3e",t.DOCTYPE_DECL_START="<!DOCTYPE",t.elementdecl=q,t.EntityDecl=Z,t.EntityValue=S,t.ExternalID=z,t.ExternalID_match=B,t.Name=m,t.NotationDecl=ee,t.Reference=w,t.PEReference=b,t.PI=x,t.PUBLIC=X,t.PubidLiteral=I,t.QName=N,t.QName_exact=_,t.QName_group=O,t.S=h,t.SChar_s=p,t.S_OPT=f,t.SYSTEM=Y,t.SystemLiteral=A,t.UNICODE_REPLACEMENT_CHARACTER="�",t.UNICODE_SUPPORT=n,t.XMLDecl=ie},function(e,t,r){(function(t,r){
/*!
* @overview es6-promise - a tiny implementation of Promises/A+.
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
* @version v4.2.8+1e68dce6
*/var o;o=function(){"use strict";function e(e){return"function"==typeof e}var o=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},n=0,i=void 0,s=void 0,a=function(e,t){d[n]=e,d[n+1]=t,2===(n+=2)&&(s?s(g):w())},c="undefined"!=typeof window?window:void 0,l=c||{},u=l.MutationObserver||l.WebKitMutationObserver,p="undefined"==typeof self&&void 0!==t&&"[object process]"==={}.toString.call(t),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function f(){var e=setTimeout;return function(){return e(g,1)}}var d=new Array(1e3);function g(){for(var e=0;e<n;e+=2)(0,d[e])(d[e+1]),d[e]=void 0,d[e+1]=void 0;n=0}var m,E,y,v,w=void 0;function b(e,t){var r=this,o=new this.constructor(R);void 0===o[T]&&q(o);var n=r._state;if(n){var i=arguments[n-1];a((function(){return L(n,o,i,r._result)}))}else D(r,o,e,t);return o}function S(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(R);return x(t,e),t}p?w=function(){return t.nextTick(g)}:u?(E=0,y=new u(g),v=document.createTextNode(""),y.observe(v,{characterData:!0}),w=function(){v.data=E=++E%2}):h?((m=new MessageChannel).port1.onmessage=g,w=function(){return m.port2.postMessage(0)}):w=void 0===c?function(){try{var e=Function("return this")().require("vertx");return void 0!==(i=e.runOnLoop||e.runOnContext)?function(){i(g)}:f()}catch(e){return f()}}():f();var T=Math.random().toString(36).substring(2);function R(){}var N=void 0,_=1,O=2;function A(t,r,o){r.constructor===t.constructor&&o===b&&r.constructor.resolve===S?function(e,t){t._state===_?I(e,t._result):t._state===O?M(e,t._result):D(t,void 0,(function(t){return x(e,t)}),(function(t){return M(e,t)}))}(t,r):void 0===o?I(t,r):e(o)?function(e,t,r){a((function(e){var o=!1,n=function(e,t,r,o){try{e.call(t,r,o)}catch(e){return e}}(r,t,(function(r){o||(o=!0,t!==r?x(e,r):I(e,r))}),(function(t){o||(o=!0,M(e,t))}),e._label);!o&&n&&(o=!0,M(e,n))}),e)}(t,r,o):I(t,r)}function x(e,t){if(e===t)M(e,new TypeError("You cannot resolve a promise with itself"));else if(n=typeof(o=t),null===o||"object"!==n&&"function"!==n)I(e,t);else{var r=void 0;try{r=t.then}catch(t){return void M(e,t)}A(e,t,r)}var o,n}function C(e){e._onerror&&e._onerror(e._result),P(e)}function I(e,t){e._state===N&&(e._result=t,e._state=_,0!==e._subscribers.length&&a(P,e))}function M(e,t){e._state===N&&(e._state=O,e._result=t,a(C,e))}function D(e,t,r,o){var n=e._subscribers,i=n.length;e._onerror=null,n[i]=t,n[i+_]=r,n[i+O]=o,0===i&&e._state&&a(P,e)}function P(e){var t=e._subscribers,r=e._state;if(0!==t.length){for(var o=void 0,n=void 0,i=e._result,s=0;s<t.length;s+=3)o=t[s],n=t[s+r],o?L(r,o,n,i):n(i);e._subscribers.length=0}}function L(t,r,o,n){var i=e(o),s=void 0,a=void 0,c=!0;if(i){try{s=o(n)}catch(e){c=!1,a=e}if(r===s)return void M(r,new TypeError("A promises callback cannot return that same promise."))}else s=n;r._state!==N||(i&&c?x(r,s):!1===c?M(r,a):t===_?I(r,s):t===O&&M(r,s))}var k=0;function q(e){e[T]=k++,e._state=void 0,e._result=void 0,e._subscribers=[]}var U=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(R),this.promise[T]||q(this.promise),o(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?I(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&I(this.promise,this._result))):M(this.promise,new Error("Array Methods must be provided an Array"))}return e.prototype._enumerate=function(e){for(var t=0;this._state===N&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var r=this._instanceConstructor,o=r.resolve;if(o===S){var n=void 0,i=void 0,s=!1;try{n=e.then}catch(e){s=!0,i=e}if(n===b&&e._state!==N)this._settledAt(e._state,t,e._result);else if("function"!=typeof n)this._remaining--,this._result[t]=e;else if(r===F){var a=new r(R);s?M(a,i):A(a,e,n),this._willSettleAt(a,t)}else this._willSettleAt(new r((function(t){return t(e)})),t)}else this._willSettleAt(o(e),t)},e.prototype._settledAt=function(e,t,r){var o=this.promise;o._state===N&&(this._remaining--,e===O?M(o,r):this._result[t]=r),0===this._remaining&&I(o,this._result)},e.prototype._willSettleAt=function(e,t){var r=this;D(e,void 0,(function(e){return r._settledAt(_,t,e)}),(function(e){return r._settledAt(O,t,e)}))},e}(),F=function(){function t(e){this[T]=k++,this._result=this._state=void 0,this._subscribers=[],R!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof t?function(e,t){try{t((function(t){x(e,t)}),(function(t){M(e,t)}))}catch(t){M(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return t.prototype.catch=function(e){return this.then(null,e)},t.prototype.finally=function(t){var r=this,o=r.constructor;return e(t)?r.then((function(e){return o.resolve(t()).then((function(){return e}))}),(function(e){return o.resolve(t()).then((function(){throw e}))})):r.then(t,t)},t}();return F.prototype.then=b,F.all=function(e){return new U(this,e).promise},F.race=function(e){var t=this;return o(e)?new t((function(r,o){for(var n=e.length,i=0;i<n;i++)t.resolve(e[i]).then(r,o)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))},F.resolve=S,F.reject=function(e){var t=new this(R);return M(t,e),t},F._setScheduler=function(e){s=e},F._setAsap=function(e){a=e},F._asap=a,F.polyfill=function(){var e=void 0;if(void 0!==r)e=r;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var o=null;try{o=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===o&&!t.cast)return}e.Promise=F},F.Promise=F,F},e.exports=o()}).call(this,r(10),r(11))},function(e,t,r){e.exports=r(15)},function(e,t){var r,o,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{o="function"==typeof clearTimeout?clearTimeout:s}catch(e){o=s}}();var c,l=[],u=!1,p=-1;function h(){u&&c&&(u=!1,c.length?l=c.concat(l):p=-1,l.length&&f())}function f(){if(!u){var e=a(h);u=!0;for(var t=l.length;t;){for(c=l,l=[];++p<t;)c&&c[p].run();p=-1,t=l.length}c=null,u=!1,function(e){if(o===clearTimeout)return clearTimeout(e);if((o===s||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{return o(e)}catch(t){try{return o.call(null,e)}catch(