From d314bd9246b617d77be215cfb97548ab31edfe43 Mon Sep 17 00:00:00 2001 From: fbma Date: Mon, 10 May 2021 13:19:48 +0200 Subject: [PATCH] v1.1.1 --- .gitignore | 2 ++ dist/api.json | 7 ++++--- dist/wmc.ol.min.css | 2 +- dist/wmc.ol.min.js | 2 +- dist/wmc.ol.min.js.map | 2 +- package.json | 2 +- src/api.json | 7 ++++--- test/dev.html | 6 +++--- test/prod.html | 6 +++--- 9 files changed, 20 insertions(+), 16 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5931ebc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +node_modules +/src/index.js diff --git a/dist/api.json b/dist/api.json index 88e6f7c..5282407 100644 --- a/dist/api.json +++ b/dist/api.json @@ -15,12 +15,13 @@ "name": "Wmc", "description": "Plugin para poder guardar la sesión de trabajo mediante un fichero de contexto de mapa (WMC)", "text": "Permite recuperar o compartir, una sesión de trabajo en contexto de mapa en cualquier momento", - "version": "1.1.0", - "date": "Junio, 2020", + "version": "1.1.1", + "date": "Mayo, 2021", "author": "", "org": "Instituto de Estadística y Cartografía. Junta de Andalucía", "tags": "mapea,plugin", "icon": "./facade/assets/icons/icons.svg", - "centralized": true + "centralized": true, + "compatibility": ["5","6"] } } diff --git a/dist/wmc.ol.min.css b/dist/wmc.ol.min.css index dcff7d4..0fa8522 100644 --- a/dist/wmc.ol.min.css +++ b/dist/wmc.ol.min.css @@ -1 +1 @@ -.m-wmc-container{color:#404040;width:100%}.m-wmc-container .dnone{display:none}.m-wmc-container>div.title{line-height:40px;text-align:center;height:39px;border-bottom:1px solid rgba(0,0,0,.13);font-size:15px;background-color:#fff!important;color:#000}.m-wmc-container div.form>div{margin-bottom:10px}.m-wmc-container input{max-width:100%}.m-wmc-container>div.tabs-border{border-bottom:1px solid #ddd}.m-wmc-container input.tabs{display:none}.m-wmc-container input.tabs+label{display:inline-block;margin:0 0 -1px;padding:10px;font-weight:600;text-align:center;color:#bbb;border:1px solid transparent}.m-wmc-container input.tabs+label:hover{color:#888;cursor:pointer}.m-wmc-container input.tabs:checked+label{color:#555;border-bottom:1px solid #ddd;border-top:1px solid #ddd;border-color:#00897b #ddd #fff;border-style:solid;border-width:2px 1px 1px}.m-wmc-container>#tab-wcm-1:checked~#content-wmc-1,.m-wmc-container>#tab-wcm-2:checked~#content-wmc-2{display:block}.m-wmc-container div.content-tab{display:none}.m-wmc-container div.form{width:90%;margin:10px auto}.m-wmc-container div.form input[type=file],.m-wmc-container div.form input[type=text]{width:100%;border:1px solid #ccc;border-radius:4px;margin:0;color:initial}.m-wmc-container div.form input:disabled{background-color:#ebebe4}.m-wmc-container div.button{width:100%;margin:0 auto;text-align:center;display:table;background-color:hsla(0,0%,91%,.76)}.m-wmc-container div.button>button{border-radius:4px;border:1px solid rgba(0,0,0,.4);font-size:15px;line-height:25px;opacity:.75;-webkit-transition:opacity .25s ease 0s;transition:opacity .25s ease 0s;color:#404040}.m-wmc-container div.button>button:hover:enabled{opacity:1}.m-wmc-container div.button>button:focus:enabled{outline:none}.m-wmc-container div.button>button:before{font-size:21px;margin-right:10px}.m-wmc-container div.button>button{width:60%;margin:10px 5%;padding:5px;background-color:#fff;font-family:Muli,"sans-serif"!important;cursor:pointer}.m-wmc-container div.button>button:disabled{cursor:not-allowed}@-moz-document url-prefix(){.m-wmc-container div.button>button.print{margin:10px 4% 10px 5%}}.m-wmc-container div.button>button i{font-size:20px;vertical-align:text-bottom}.m-control>button{color:#404040}.m-areas>div.m-area>div.m-panel.m-wmc{order:1;border-top-right-radius:0}.m-areas>div.m-area>div.m-panel.m-wmc.opened{border-top-left-radius:0}.m-areas>div.m-area>div.m-panel.m-wmc.collapsed{order:1;border-top-right-radius:20px}.m-areas>div.m-area>div.m-panel.m-wmc>button.m-panel-btn{background-color:#00897b;position:absolute;left:auto;color:#fff;z-index:999999;box-shadow:0 2px 4px rgba(0,0,0,.2),0 -1px 0 rgba(0,0,0,.02)}.m-areas>div.m-area>div.m-panel.m-wmc.opened>button.m-panel-btn{left:-40px}@media only screen and (max-width:768px){.m-areas>div.m-area>div.m-panel.m-wmc.opened>button.m-panel-btn{background-color:transparent;position:absolute;right:0;left:auto;color:#fff;z-index:999999;box-shadow:none}}.m-areas>div.m-area>div.m-panel.m-wmc.collapsed>button.m-panel-btn{color:#00897b;position:inherit;right:0;box-shadow:none}.m-areas>div.m-area>div.m-panel.m-wmc{max-height:100vh}.m-areas>div.m-area>div.m-panel.m-wmc,.m-areas>div.m-area>div.m-panel.m-wmc.collapsed{-webkit-transition:max-height .33s ease-in-out 0s;transition:max-height .33s ease-in-out 0s}.m-areas>div.m-area>div.m-panel.m-wmc.collapsed{max-height:40px}.m-areas>div.m-area>div.m-panel.m-wmc>div.m-panel-controls{-webkit-transition:max-width .5s ease 0s,opacity .44s ease 0s;transition:max-width .5s ease 0s,opacity .44s ease 0s;background:#fff;width:100%}.m-wmc-container>.results-panel>div.results{-webkit-transition:max-height .33s ease-in-out 0s;transition:max-height .33s ease-in-out 0s}.m-areas>div.m-area>div.m-panel.m-wmc.opened{width:440px}@media only screen and (max-width:768px){.m-areas>div.m-area>div.m-panel.m-wmc.opened{width:100vw;height:100vh;position:fixed;top:0;left:0;margin:0;z-index:10000;overflow:auto}} \ No newline at end of file +.m-wmc-container{color:#404040;width:100%}.m-wmc-container .dnone{display:none}.m-wmc-container>div.title{line-height:40px;text-align:center;height:39px;border-bottom:1px solid rgba(0,0,0,.13);font-size:15px;background-color:#fff!important;color:#000}.m-wmc-container div.form>div{margin-bottom:10px}.m-wmc-container input{max-width:100%}.m-wmc-container>div.tabs-border{border-bottom:1px solid #ddd}.m-wmc-container input.tabs{display:none}.m-wmc-container input.tabs+label{display:inline-block;margin:0 0 -1px;padding:10px;font-weight:600;text-align:center;color:#bbb;border:1px solid transparent}.m-wmc-container input.tabs+label:hover{color:#888;cursor:pointer}.m-wmc-container input.tabs:checked+label{color:#555;border-bottom:1px solid #ddd;border-top:1px solid #ddd;border-color:#00897b #ddd #fff;border-style:solid;border-width:2px 1px 1px}.m-wmc-container>#tab-wcm-1:checked~#content-wmc-1,.m-wmc-container>#tab-wcm-2:checked~#content-wmc-2{display:block}.m-wmc-container div.content-tab{display:none}.m-wmc-container div.form{width:90%;margin:10px auto}.m-wmc-container div.form input[type=file],.m-wmc-container div.form input[type=text]{width:100%;border:1px solid #ccc;border-radius:4px;margin:0;color:initial}.m-wmc-container div.form input:disabled{background-color:#ebebe4}.m-wmc-container div.button{width:100%;margin:0 auto;text-align:center;display:table;background-color:hsla(0,0%,91%,.7607843137254902)}.m-wmc-container div.button>button{border-radius:4px;border:1px solid rgba(0,0,0,.4);font-size:15px;line-height:25px;opacity:.75;-webkit-transition:opacity .25s ease 0s;transition:opacity .25s ease 0s;color:#404040}.m-wmc-container div.button>button:hover:enabled{opacity:1}.m-wmc-container div.button>button:focus:enabled{outline:none}.m-wmc-container div.button>button:before{font-size:21px;margin-right:10px}.m-wmc-container div.button>button{width:60%;margin:10px 5%;padding:5px;background-color:#fff;font-family:Muli,"sans-serif"!important;cursor:pointer}.m-wmc-container div.button>button:disabled{cursor:not-allowed}@-moz-document url-prefix(){.m-wmc-container div.button>button.print{margin:10px 4% 10px 5%}}.m-wmc-container div.button>button i{font-size:20px;vertical-align:text-bottom}.m-control>button{color:#404040}.m-areas>div.m-area>div.m-panel.m-wmc{order:1;border-top-right-radius:0}.m-areas>div.m-area>div.m-panel.m-wmc.opened{border-top-left-radius:0}.m-areas>div.m-area>div.m-panel.m-wmc.collapsed{order:1;border-top-right-radius:20px}.m-areas>div.m-area>div.m-panel.m-wmc>button.m-panel-btn{background-color:#00897b;position:absolute;left:auto;color:#fff;z-index:999999;box-shadow:0 2px 4px rgba(0,0,0,.2),0 -1px 0 rgba(0,0,0,.02)}.m-areas>div.m-area>div.m-panel.m-wmc.opened>button.m-panel-btn{left:-40px}@media only screen and (max-width:768px){.m-areas>div.m-area>div.m-panel.m-wmc.opened>button.m-panel-btn{background-color:transparent;position:absolute;right:0;left:auto;color:#fff;z-index:999999;box-shadow:none}}.m-areas>div.m-area>div.m-panel.m-wmc.collapsed>button.m-panel-btn{color:#00897b;position:inherit;right:0;box-shadow:none}.m-areas>div.m-area>div.m-panel.m-wmc{max-height:100vh}.m-areas>div.m-area>div.m-panel.m-wmc,.m-areas>div.m-area>div.m-panel.m-wmc.collapsed{-webkit-transition:max-height .33s ease-in-out 0s;transition:max-height .33s ease-in-out 0s}.m-areas>div.m-area>div.m-panel.m-wmc.collapsed{max-height:40px}.m-areas>div.m-area>div.m-panel.m-wmc>div.m-panel-controls{-webkit-transition:max-width .5s ease 0s,opacity .44s ease 0s;transition:max-width .5s ease 0s,opacity .44s ease 0s;background:#fff;width:100%}.m-wmc-container>.results-panel>div.results{-webkit-transition:max-height .33s ease-in-out 0s;transition:max-height .33s ease-in-out 0s}.m-areas>div.m-area>div.m-panel.m-wmc.opened{width:440px}@media only screen and (max-width:768px){.m-areas>div.m-area>div.m-panel.m-wmc.opened{width:100vw;height:100vh;position:fixed;top:0;left:0;margin:0;z-index:10000;overflow:auto}} \ No newline at end of file diff --git a/dist/wmc.ol.min.js b/dist/wmc.ol.min.js index 678889e..d0fbd73 100644 --- a/dist/wmc.ol.min.js +++ b/dist/wmc.ol.min.js @@ -1,2 +1,2 @@ -!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=36)}([function(t,e){(function(){t.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(this)},function(t,e,n){(function(){var e,r,i,o,s,a,l,h,u,c,d,p,f,m,y,g,w={}.hasOwnProperty,b=[].splice;({isObject:g,isFunction:y,isEmpty:m,getValue:f}=n(2)),h=null,i=null,o=null,s=null,a=null,d=null,p=null,c=null,l=null,r=null,u=null,e=null,t.exports=function(){class t{constructor(t){this.parent=t,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,h||(h=n(5),i=n(7),o=n(8),s=n(9),a=n(10),d=n(15),p=n(16),c=n(17),l=n(22),r=n(0),u=n(32),n(6),e=n(33))}setParent(t){var e,n,r,i,o;for(this.parent=t,t&&(this.options=t.options,this.stringify=t.stringify),o=[],n=0,r=(i=this.children).length;n":(null!=(n=this.parent)?n.name:void 0)?"node: <"+t+">, parent: <"+this.parent.name+">":"node: <"+t+">":""}ele(t,e,n){return this.element(t,e,n)}nod(t,e,n){return this.node(t,e,n)}txt(t){return this.text(t)}dat(t){return this.cdata(t)}com(t){return this.comment(t)}ins(t,e){return this.instruction(t,e)}doc(){return this.document()}dec(t,e,n){return this.declaration(t,e,n)}e(t,e,n){return this.element(t,e,n)}n(t,e,n){return this.node(t,e,n)}t(t){return this.text(t)}d(t){return this.cdata(t)}c(t){return this.comment(t)}r(t){return this.raw(t)}i(t,e){return this.instruction(t,e)}u(){return this.up()}importXMLBuilder(t){return this.importDocument(t)}attribute(t,e){throw new Error("attribute() applies to element nodes only.")}att(t,e){return this.attribute(t,e)}a(t,e){return this.attribute(t,e)}removeAttribute(t){throw new Error("attribute() applies to element nodes only.")}replaceChild(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())}removeChild(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}appendChild(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}hasChildNodes(){return 0!==this.children.length}cloneNode(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}normalize(){throw new Error("This DOM method is not implemented."+this.debugInfo())}isSupported(t,e){return!0}hasAttributes(){return 0!==this.attribs.length}compareDocumentPosition(t){var n;return this,this===t?0:this.document()!==t.document()?(n=e.Disconnected|e.ImplementationSpecific,Math.random()<.5?n|=e.Preceding:n|=e.Following,n):this.isAncestor(t)?e.Contains|e.Preceding:this.isDescendant(t)?e.Contains|e.Following:this.isPreceding(t)?e.Preceding:e.Following}isSameNode(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}lookupPrefix(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}isDefaultNamespace(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}lookupNamespaceURI(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}isEqualNode(t){var e,n,r;if(t.nodeType!==this.nodeType)return!1;if(t.children.length!==this.children.length)return!1;for(e=n=0,r=this.children.length-1;0<=r?n<=r:n>=r;e=0<=r?++n:--n)if(!this.children[e].isEqualNode(t.children[e]))return!1;return!0}getFeature(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())}setUserData(t,e,n){throw new Error("This DOM method is not implemented."+this.debugInfo())}getUserData(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}contains(t){return!!t&&(t===this||this.isDescendant(t))}isDescendant(t){var e,n,r,i;for(n=0,r=(i=this.children).length;nn}treePosition(t){var e,n;return n=0,e=!1,this.foreachTreeNode(this.document(),function(r){if(n++,!e&&r===t)return e=!0}),e?n:-1}foreachTreeNode(t,e){var n,r,i,o,s;for(t||(t=this.document()),r=0,i=(o=t.children).length;r=r;e=0<=r?++n:--n)if(!this.attribs[e].isEqualNode(t.attribs[e]))return!1;return!0}}return Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(t.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(t.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(t.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(t.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(t.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(t.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(t.prototype,"attributes",{get:function(){return this.attributeMap&&this.attributeMap.nodes||(this.attributeMap=new i(this.attribs)),this.attributeMap}}),t}.call(this)}).call(this)},function(t,e){(function(){t.exports=function(){class t{constructor(t){this.nodes=t}clone(){return this.nodes=null}getNamedItem(t){return this.nodes[t]}setNamedItem(t){var e;return e=this.nodes[t.nodeName],this.nodes[t.nodeName]=t,e||null}removeNamedItem(t){var e;return e=this.nodes[t],delete this.nodes[t],e||null}item(t){return this.nodes[Object.keys(this.nodes)[t]]||null}getNamedItemNS(t,e){throw new Error("This DOM method is not implemented.")}setNamedItemNS(t){throw new Error("This DOM method is not implemented.")}removeNamedItemNS(t,e){throw new Error("This DOM method is not implemented.")}}return Object.defineProperty(t.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),t}.call(this)}).call(this)},function(t,e,n){(function(){var e,r;e=n(0),r=n(3),t.exports=class extends r{constructor(t,n){if(super(t),null==n)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=e.CData,this.value=this.stringify.cdata(n)}clone(){return Object.create(this)}toString(t){return this.options.writer.cdata(this,this.options.writer.filterOptions(t))}}}).call(this)},function(t,e,n){(function(){var e,r;e=n(0),r=n(3),t.exports=class extends r{constructor(t,n){if(super(t),null==n)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=e.Comment,this.value=this.stringify.comment(n)}clone(){return Object.create(this)}toString(t){return this.options.writer.comment(this,this.options.writer.filterOptions(t))}}}).call(this)},function(t,e,n){(function(){var e,r,i;({isObject:i}=n(2)),r=n(1),e=n(0),t.exports=class extends r{constructor(t,n,r,o){super(t),i(n)&&({version:n,encoding:r,standalone:o}=n),n||(n="1.0"),this.type=e.Declaration,this.version=this.stringify.xmlVersion(n),null!=r&&(this.encoding=this.stringify.xmlEncoding(r)),null!=o&&(this.standalone=this.stringify.xmlStandalone(o))}toString(t){return this.options.writer.declaration(this,this.options.writer.filterOptions(t))}}}).call(this)},function(t,e,n){(function(){var e,r,i,o,s,a,l,h;({isObject:h}=n(2)),l=n(1),e=n(0),r=n(11),o=n(12),i=n(13),s=n(14),a=n(6),t.exports=function(){class t extends l{constructor(t,n,r){var i,o,s,a;if(super(t),this.type=e.DocType,t.children)for(o=0,s=(a=t.children).length;o":"attribute: {"+t+"}, parent: <"+this.parent.name+">"}isEqualNode(t){return t.namespaceURI===this.namespaceURI&&(t.prefix===this.prefix&&(t.localName===this.localName&&t.value===this.value))}}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(t.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(t.prototype,"textContent",{get:function(){return this.value},set:function(t){return this.value=t||""}}),Object.defineProperty(t.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(t.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(t.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(t.prototype,"specified",{get:function(){return!0}}),t}.call(this)}).call(this)},function(t,e,n){(function(){var e,r;r=n(1),e=n(0),t.exports=class extends r{constructor(t){super(t),this.type=e.Dummy}clone(){return Object.create(this)}toString(t){return""}}}).call(this)},function(t,e){(function(){var e={}.hasOwnProperty;t.exports=function(){class t{constructor(t){var n,r,i;for(n in this.assertLegalChar=this.assertLegalChar.bind(this),this.assertLegalName=this.assertLegalName.bind(this),t||(t={}),this.options=t,this.options.version||(this.options.version="1.0"),r=t.stringify||{})e.call(r,n)&&(i=r[n],this[n]=i)}name(t){return this.options.noValidation?t:this.assertLegalName(""+t||"")}text(t){return this.options.noValidation?t:this.assertLegalChar(this.textEscape(""+t||""))}cdata(t){return this.options.noValidation?t:(t=(t=""+t||"").replace("]]>","]]]]>"),this.assertLegalChar(t))}comment(t){if(this.options.noValidation)return t;if((t=""+t||"").match(/--/))throw new Error("Comment text cannot contain double-hypen: "+t);return this.assertLegalChar(t)}raw(t){return this.options.noValidation?t:""+t||""}attValue(t){return this.options.noValidation?t:this.assertLegalChar(this.attEscape(t=""+t||""))}insTarget(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")}insValue(t){if(this.options.noValidation)return t;if((t=""+t||"").match(/\?>/))throw new Error("Invalid processing instruction value: "+t);return this.assertLegalChar(t)}xmlVersion(t){if(this.options.noValidation)return t;if(!(t=""+t||"").match(/1\.[0-9]+/))throw new Error("Invalid version number: "+t);return t}xmlEncoding(t){if(this.options.noValidation)return t;if(!(t=""+t||"").match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+t);return this.assertLegalChar(t)}xmlStandalone(t){return this.options.noValidation?t:t?"yes":"no"}dtdPubID(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")}dtdSysID(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")}dtdElementValue(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")}dtdAttType(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")}dtdAttDefault(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")}dtdEntityValue(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")}dtdNData(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")}assertLegalChar(t){var e,n;if(this.options.noValidation)return t;if(e="","1.0"===this.options.version){if(e=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,n=t.match(e))throw new Error(`Invalid character in string: ${t} at index ${n.index}`)}else if("1.1"===this.options.version&&(e=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,n=t.match(e)))throw new Error(`Invalid character in string: ${t} at index ${n.index}`);return t}assertLegalName(t){var e;if(this.options.noValidation)return t;if(this.assertLegalChar(t),e=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!t.match(e))throw new Error("Invalid character in name");return t}textEscape(t){var e;return this.options.noValidation?t:(e=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,t.replace(e,"&").replace(//g,">").replace(/\r/g," "))}attEscape(t){var e;return this.options.noValidation?t:(e=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,t.replace(e,"&").replace(/0?new Array(r).join(e.indent):""}endline(t,e,n){return!e.pretty||e.suppressPrettyCount?"":e.newline}attribute(t,e,n){var r;return this.openAttribute(t,e,n),r=e.pretty&&e.width>0?t.name+'="'+t.value+'"':" "+t.name+'="'+t.value+'"',this.closeAttribute(t,e,n),r}cdata(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n)+""+this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i}comment(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n)+"\x3c!-- ",e.state=r.InsideTag,i+=t.value,e.state=r.CloseTag,i+=" --\x3e"+this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i}declaration(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n)+"",i+=this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i}docType(t,e,n){var i,o,s,a,l;if(n||(n=0),this.openNode(t,e,n),e.state=r.OpenTag,a=this.indent(t,e,n),a+="0){for(a+=" [",a+=this.endline(t,e,n),e.state=r.InsideTag,o=0,s=(l=t.children).length;o",a+=this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),a}element(t,n,i){var s,a,l,h,u,c,d,p,f,m,y,g,w,b,v,O,D,x;if(i||(i=0),y=!1,this.openNode(t,n,i),n.state=r.OpenTag,g=this.indent(t,n,i)+"<"+t.name,n.pretty&&n.width>0)for(m in d=g.length,b=t.attribs)o.call(b,m)&&(s=b[m],d+(w=this.attribute(s,n,i)).length>n.width?(x=this.indent(t,n,i+1)+w,g+=this.endline(t,n,i)+x,d=x.length):(g+=x=" "+w,d+=x.length));else for(m in v=t.attribs)o.call(v,m)&&(s=v[m],g+=this.attribute(s,n,i));if(h=0===(l=t.children.length)?null:t.children[0],0===l||t.children.every(function(t){return(t.type===e.Text||t.type===e.Raw)&&""===t.value}))n.allowEmpty?(g+=">",n.state=r.CloseTag,g+=""+this.endline(t,n,i)):(n.state=r.CloseTag,g+=n.spaceBeforeSlash+"/>"+this.endline(t,n,i));else if(!n.pretty||1!==l||h.type!==e.Text&&h.type!==e.Raw||null==h.value){if(n.dontPrettyTextNodes)for(u=0,p=(O=t.children).length;u"+this.endline(t,n,i),n.state=r.InsideTag,c=0,f=(D=t.children).length;c",y&&n.suppressPrettyCount--,g+=this.endline(t,n,i),n.state=r.None}else g+=">",n.state=r.InsideTag,n.suppressPrettyCount++,y=!0,g+=this.writeChildNode(h,n,i+1),n.suppressPrettyCount--,y=!1,n.state=r.CloseTag,g+=""+this.endline(t,n,i);return this.closeNode(t,n,i),g}writeChildNode(t,n,r){switch(t.type){case e.CData:return this.cdata(t,n,r);case e.Comment:return this.comment(t,n,r);case e.Element:return this.element(t,n,r);case e.Raw:return this.raw(t,n,r);case e.Text:return this.text(t,n,r);case e.ProcessingInstruction:return this.processingInstruction(t,n,r);case e.Dummy:return"";case e.Declaration:return this.declaration(t,n,r);case e.DocType:return this.docType(t,n,r);case e.AttributeDeclaration:return this.dtdAttList(t,n,r);case e.ElementDeclaration:return this.dtdElement(t,n,r);case e.EntityDeclaration:return this.dtdEntity(t,n,r);case e.NotationDeclaration:return this.dtdNotation(t,n,r);default:throw new Error("Unknown XML node type: "+t.constructor.name)}}processingInstruction(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n)+"",i+=this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i}raw(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n),e.state=r.InsideTag,i+=t.value,e.state=r.CloseTag,i+=this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i}text(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n),e.state=r.InsideTag,i+=t.value,e.state=r.CloseTag,i+=this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i}dtdAttList(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n)+""+this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i}dtdElement(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n)+""+this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i}dtdEntity(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n)+""+this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i}dtdNotation(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n)+""+this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i}openNode(t,e,n){}closeNode(t,e,n){}openAttribute(t,e,n){}closeAttribute(t,e,n){}}}).call(this)},function(t,e,n){(function(){var e,r,i,o,s,a,l,h,u;({assign:h,isFunction:u}=n(2)),i=n(19),o=n(20),s=n(34),l=n(18),a=n(35),e=n(0),r=n(4),t.exports.create=function(t,e,n,r){var i,s;if(null==t)throw new Error("Root element needs a name.");return r=h({},e,n,r),s=(i=new o(r)).element(t),r.headless||(i.declaration(r),null==r.pubID&&null==r.sysID||i.dtd(r)),s},t.exports.begin=function(t,e,n){return u(t)&&([e,n]=[t,e],t={}),e?new s(t,e,n):new o(t)},t.exports.stringWriter=function(t){return new l(t)},t.exports.streamWriter=function(t,e){return new a(t,e)},t.exports.implementation=new i,t.exports.nodeType=e,t.exports.writerState=r}).call(this)},function(t,e){t.exports='
\n \x3c!-- TITLE --\x3e\n
Gestión de la sesión
\n\n \n \n\n \n \n
\n\n \x3c!-- FORM --\x3e\n
\n
\n
\n Carga un WMC v1.1.0 como fichero o desde una url\n
\n
\n \n \n
\n \x3c!-- file --\x3e\n
\n \n \n
\n
\n \n \n
\n
\n \x3c!-- buttons --\x3e\n
\n \n
\n
\n\n
\n
\n
\n Guarda un WMC v1.1.0 como fichero\n
\n \x3c!-- Nombre fichero --\x3e\n
\n \n \n
\n
\n \x3c!-- buttons --\x3e\n
\n \n
\n
\n\n
'},function(t){t.exports=JSON.parse('{"url":{"name":"wmc","separator":"*"},"constructor":"M.plugin.Wmc","parameters":[],"files":{"ol":{"scripts":["wmc.ol.min.js"],"styles":["wmc.ol.min.css"]}},"metadata":{"name":"Wmc","description":"Plugin para poder guardar la sesión de trabajo mediante un fichero de contexto de mapa (WMC)","text":"Permite recuperar o compartir, una sesión de trabajo en contexto de mapa en cualquier momento","version":"1.1.0","date":"Junio, 2020","author":"","org":"Instituto de Estadística y Cartografía. Junta de Andalucía","tags":"mapea,plugin","icon":"./facade/assets/icons/icons.svg","centralized":true}}')},function(t,e,n){},function(t,e,n){(function(){var e,r;e=n(30),r=n(31),t.exports=function(){class t{constructor(){this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new e,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=Object.create(this.defaultParams)}getParameter(t){return this.params.hasOwnProperty(t)?this.params[t]:null}canSetParameter(t,e){return!0}setParameter(t,e){return null!=e?this.params[t]=e:delete this.params[t]}}return Object.defineProperty(t.prototype,"parameterNames",{get:function(){return new r(Object.keys(this.defaultParams))}}),t}.call(this)}).call(this)},function(t,e){(function(){t.exports=class{constructor(){}handleError(t){throw new Error(t)}}}).call(this)},function(t,e){(function(){t.exports=function(){class t{constructor(t){this.arr=t||[]}item(t){return this.arr[t]||null}contains(t){return-1!==this.arr.indexOf(t)}}return Object.defineProperty(t.prototype,"length",{get:function(){return this.arr.length}}),t}.call(this)}).call(this)},function(t,e){(function(){t.exports=function(){class t{constructor(t){this.nodes=t}clone(){return this.nodes=null}item(t){return this.nodes[t]||null}}return Object.defineProperty(t.prototype,"length",{get:function(){return this.nodes.length||0}}),t}.call(this)}).call(this)},function(t,e){(function(){t.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(this)},function(t,e,n){(function(){var e,r,i,o,s,a,l,h,u,c,d,p,f,m,y,g,w,b,v,O,D,x,E={}.hasOwnProperty;({isObject:D,isFunction:O,isPlainObject:x,getValue:v}=n(2)),e=n(0),p=n(20),f=n(5),o=n(7),s=n(8),y=n(15),b=n(16),m=n(17),c=n(9),d=n(10),a=n(11),h=n(12),l=n(13),u=n(14),i=n(21),w=n(23),g=n(18),r=n(4),t.exports=class{constructor(t,n,r){var i;this.name="?xml",this.type=e.Document,t||(t={}),i={},t.writer?x(t.writer)&&(i=t.writer,t.writer=new g):t.writer=new g,this.options=t,this.writer=t.writer,this.writerOptions=this.writer.filterOptions(i),this.stringify=new w(t),this.onDataCallback=n||function(){},this.onEndCallback=r||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}createChildNode(t){var n,r,i,o,s,a,l,h;switch(t.type){case e.CData:this.cdata(t.value);break;case e.Comment:this.comment(t.value);break;case e.Element:for(r in i={},l=t.attribs)E.call(l,r)&&(n=l[r],i[r]=n.value);this.node(t.name,i);break;case e.Dummy:this.dummy();break;case e.Raw:this.raw(t.value);break;case e.Text:this.text(t.value);break;case e.ProcessingInstruction:this.instruction(t.target,t.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+t.constructor.name)}for(s=0,a=(h=t.children).length;s=0;)this.up();return this.onEnd()}openCurrent(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)}openNode(t){var n,i,o,s;if(!t.isOpen){if(this.root||0!==this.currentLevel||t.type!==e.Element||(this.root=t),i="",t.type===e.Element){for(o in this.writerOptions.state=r.OpenTag,i=this.writer.indent(t,this.writerOptions,this.currentLevel)+"<"+t.name,s=t.attribs)E.call(s,o)&&(n=s[o],i+=this.writer.attribute(n,this.writerOptions,this.currentLevel));i+=(t.children?">":"/>")+this.writer.endline(t,this.writerOptions,this.currentLevel),this.writerOptions.state=r.InsideTag}else this.writerOptions.state=r.OpenTag,i=this.writer.indent(t,this.writerOptions,this.currentLevel)+""),i+=this.writer.endline(t,this.writerOptions,this.currentLevel);return this.onData(i,this.currentLevel),t.isOpen=!0}}closeNode(t){var n;if(!t.isClosed)return n="",this.writerOptions.state=r.CloseTag,n=t.type===e.Element?this.writer.indent(t,this.writerOptions,this.currentLevel)+""+this.writer.endline(t,this.writerOptions,this.currentLevel):this.writer.indent(t,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(t,this.writerOptions,this.currentLevel),this.writerOptions.state=r.None,this.onData(n,this.currentLevel),t.isClosed=!0}onData(t,e){return this.documentStarted=!0,this.onDataCallback(t,e+1)}onEnd(){return this.documentCompleted=!0,this.onEndCallback()}debugInfo(t){return null==t?"":"node: <"+t+">"}ele(){return this.element(...arguments)}nod(t,e,n){return this.node(t,e,n)}txt(t){return this.text(t)}dat(t){return this.cdata(t)}com(t){return this.comment(t)}ins(t,e){return this.instruction(t,e)}dec(t,e,n){return this.declaration(t,e,n)}dtd(t,e,n){return this.doctype(t,e,n)}e(t,e,n){return this.element(t,e,n)}n(t,e,n){return this.node(t,e,n)}t(t){return this.text(t)}d(t){return this.cdata(t)}c(t){return this.comment(t)}r(t){return this.raw(t)}i(t,e){return this.instruction(t,e)}att(){return this.currentNode&&this.currentNode.type===e.DocType?this.attList(...arguments):this.attribute(...arguments)}a(){return this.currentNode&&this.currentNode.type===e.DocType?this.attList(...arguments):this.attribute(...arguments)}ent(t,e){return this.entity(t,e)}pent(t,e){return this.pEntity(t,e)}not(t,e){return this.notation(t,e)}}}).call(this)},function(t,e,n){(function(){var e,r,i,o={}.hasOwnProperty;e=n(0),i=n(24),r=n(4),t.exports=class extends i{constructor(t,e){super(e),this.stream=t}endline(t,e,n){return t.isLastRootNode&&e.state===r.CloseTag?"":super.endline(t,e,n)}document(t,e){var n,r,i,o,s,a,l,h,u;for(r=i=0,s=(l=t.children).length;i0){for(this.stream.write(" ["),this.stream.write(this.endline(t,e,n)),e.state=r.InsideTag,o=0,s=(a=t.children).length;o"),this.stream.write(this.endline(t,e,n)),e.state=r.None,this.closeNode(t,e,n)}element(t,n,i){var s,a,l,h,u,c,d,p,f,m,y,g,w,b;if(i||(i=0),this.openNode(t,n,i),n.state=r.OpenTag,f=this.indent(t,n,i)+"<"+t.name,n.pretty&&n.width>0)for(p in c=f.length,y=t.attribs)o.call(y,p)&&(s=y[p],c+(m=this.attribute(s,n,i)).length>n.width?(b=this.indent(t,n,i+1)+m,f+=this.endline(t,n,i)+b,c=b.length):(f+=b=" "+m,c+=b.length));else for(p in g=t.attribs)o.call(g,p)&&(s=g[p],f+=this.attribute(s,n,i));if(this.stream.write(f),h=0===(l=t.children.length)?null:t.children[0],0===l||t.children.every(function(t){return(t.type===e.Text||t.type===e.Raw)&&""===t.value}))n.allowEmpty?(this.stream.write(">"),n.state=r.CloseTag,this.stream.write("")):(n.state=r.CloseTag,this.stream.write(n.spaceBeforeSlash+"/>"));else if(!n.pretty||1!==l||h.type!==e.Text&&h.type!==e.Raw||null==h.value){for(this.stream.write(">"+this.endline(t,n,i)),n.state=r.InsideTag,u=0,d=(w=t.children).length;u")}else this.stream.write(">"),n.state=r.InsideTag,n.suppressPrettyCount++,!0,this.writeChildNode(h,n,i+1),n.suppressPrettyCount--,!1,n.state=r.CloseTag,this.stream.write("");return this.stream.write(this.endline(t,n,i)),n.state=r.None,this.closeNode(t,n,i)}processingInstruction(t,e,n){return this.stream.write(super.processingInstruction(t,e,n))}raw(t,e,n){return this.stream.write(super.raw(t,e,n))}text(t,e,n){return this.stream.write(super.text(t,e,n))}dtdAttList(t,e,n){return this.stream.write(super.dtdAttList(t,e,n))}dtdElement(t,e,n){return this.stream.write(super.dtdElement(t,e,n))}dtdEntity(t,e,n){return this.stream.write(super.dtdEntity(t,e,n))}dtdNotation(t,e,n){return this.stream.write(super.dtdNotation(t,e,n))}}}).call(this)},function(t,e,n){"use strict";n.r(e);n(28);var r=n(25);function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=v(this,O(e).call(this,"http://prueba.es"))).url=null,M.utils.isUndefined(w)&&M.exception("La implementación usada no puede crear controles WMCLayerImpl");var r=new w(n);return t.setImpl(r),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&D(t,e)}(e,M.layer.WMC),e}();function E(t){return(E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function T(t,e){for(var n=0;n input");this.loadBtn_=t.querySelector(".button > button.load"),this.saveBtn_=t.querySelector(".button > button.save"),this.inputUrl_=t.querySelector(".form div.url > input"),this.inputsTabs_=t.querySelectorAll('input[name="tabs-wmc"]'),this.selectedTab_=t.querySelector('input[name="tabs-wmc"]:checked').dataset.tab,this.inputWMCLoadName_=t.querySelector(".form div.load-name > input"),this.inputWMCSaveName_=t.querySelector(".form div.save-name > input"),n.addEventListener("change",function(t){return e.changeFile(t,n.files[0])}),this.loadBtn_.addEventListener("click",function(t){return e.loadWMC()}),this.saveBtn_.addEventListener("click",function(t){return e.saveWMC()}),this.inputUrl_.addEventListener("input",function(t){return e.checkButtons()}),this.inputWMCLoadName_.addEventListener("input",function(t){return e.checkButtons()}),this.inputWMCSaveName_.addEventListener("input",function(t){return e.checkButtons()}),this.inputsTabs_.forEach(function(t){t.addEventListener("change",function(t){return e.changeTab(t)})})}},{key:"createView",value:function(t){var e=this;return this.facadeMap_=t,new Promise(function(t,n){var r=M.template.compileSync(d.a);e.addEvents(r),t(r)})}},{key:"equals",value:function(t){return t instanceof e}},{key:"getQuerySelectorScapeCSS",value:function(t,e){return t.querySelector(CSS.escape(e))}},{key:"changeTab",value:function(t){var e=(t||window.event).target;this.selectedTab_=e.dataset.tab,this.checkButtons()}},{key:"checkButtons",value:function(){"loadWMC"===this.selectedTab_?(this.loadBtn_.disabled=M.utils.isNullOrEmpty(this.file_)&&M.utils.isNullOrEmpty(this.inputUrl_.value)||M.utils.isNullOrEmpty(this.inputWMCLoadName_.value),this.inputUrl_.disabled=!M.utils.isNullOrEmpty(this.file_)):this.saveBtn_.disabled=M.utils.isNullOrEmpty(this.inputWMCSaveName_.value)}},{key:"changeFile",value:function(t,e){this.file_=e,this.inputWMCLoadName_.value=this.file_.name.replace(/\.[^\/.]+$/,""),this.checkButtons(),M.utils.isNullOrEmpty(e)||e.size>20971520&&(M.dialog.info("El fichero seleccionado sobrepasa el máximo de 20 MB permitido"),this.file_=null,this.checkButtons())}},{key:"changeName",value:function(t){var e=(t||window.event).target;this.loadBtn_.disabled=""===e.value.trim()}},{key:"saveWMC",value:function(){try{if("Blob"in window){var t="".concat(this.inputWMCSaveName_.value,".xml"),e=this.getImpl().getViewContext(),n=r.create({ViewContext:e},{stringify:{convertAttKey:"$"},encoding:"utf-8"}).end(),i=new Blob([n],{type:"text/plain;charset=utf-8"});if("msSaveOrOpenBlob"in navigator)navigator.msSaveOrOpenBlob(i,t);else{var o=document.createElement("a");o.download=t,o.innerHTML="Download File","webkitURL"in window?o.href=window.URL.createObjectURL(i):(o.href=window.URL.createObjectURL(i),o.onclick=this.destroyClickedElement,o.style.display="none",document.body.appendChild(o)),o.click()}}else M.dialog.info("Tu navegador no soporta la descarga de ficheros Blob HML5")}catch(t){M.dialog.error("Error al guardar el contexto del mapa")}}},{key:"loadWMC",value:function(){var t,e=this;if(this.file_){var n=new FileReader;n.addEventListener("load",function(r){var i;"undefined"!=typeof DOMParser&&(i=(new DOMParser).parseFromString(n.result,"text/xml")),t={documentXML:i},e.addToMap(t)}),n.readAsText(this.file_)}else t={url:this.inputUrl_.value},this.addToMap(t)}},{key:"addToMap",value:function(t){var e=this;try{var n=new x(t);n.name=this.inputWMCLoadName_.value,n.url=t.url;var r=this.facadeMap_.getWMC(n);0===r.length?(this.facadeMap_.getImpl().addWMC([n]),this.facadeMap_.fire(M.evt.ADDED_LAYER,[n]),this.facadeMap_.fire(M.evt.ADDED_WMC,[n]),n.getImpl().loadContext(t.documentXML).then(function(t){n.getImpl().loadContextParameters(t);var r=e.facadeMap_.getControls("wmcselector").length>0;e.facadeMap_.getWMC().length>1&&!r&&e.facadeMap_.addControls(new M.control.WMCSelector),n.select()})):r[0].select()}catch(t){M.dialog.error("Error al cargar el fichero. Compruebe que se trata del fichero correcto")}}},{key:"destroyClickedElement_",value:function(t){document.body.removeChild(t.target)}}])&&T(n.prototype,i),o&&T(n,o),e}(),S=n(27);function j(t){return(j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function L(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=_(this,A(e).call(this,n))).map_=null,t.control_=null,t.panel_=null,t.params_={},M.utils.isNullOrEmpty(n.params)||(t.params_=n.params),t.options_={},M.utils.isNullOrEmpty(n.options)||(t.options_=n.options),t.metadata_=S.metadata,t}var n,r,i;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&F(t,e)}(e,M.Plugin),n=e,(r=[{key:"addTo",value:function(t){var e=this;this.map_=t,this.control_=new P,this.panel_=new M.ui.Panel("panelWmc",{collapsible:!0,className:"m-wmc",collapsedButtonClass:"g-cartografia-opciones",position:M.ui.position.TR,tooltip:"Gestión de WMC"}),this.panel_.on(M.evt.ADDED_TO_MAP,function(t){M.utils.enableTouchScroll(t)}),this.panel_.addControls(this.control_),this.map_.addPanels(this.panel_),this.control_.on(M.evt.ADDED_TO_MAP,function(){e.fire(M.evt.ADDED_TO_MAP)})}},{key:"destroy",value:function(){this.map_.removeControls([this.control_]);var t=[null,null,null,null];this.map_=t[0],this.control_=t[1],this.panel_=t[2],this.options_=t[3]}},{key:"equals",value:function(t){var n=!1;return t instanceof e&&(n=!0),n}},{key:"getMetadata",value:function(){return this.metadata_}},{key:"name",get:function(){return"wmc"}}])&&L(n.prototype,r),i&&L(n,i),e}();window.M.plugin||(window.M.plugin={}),window.M.control||(window.M.control={}),window.M.impl||(window.M.impl={}),window.M.impl.control||(window.M.impl.control={}),window.M.plugin.Wmc=k,window.M.control.WmcControl=P,window.M.impl.control.WmcControl=u,window.M.impl.control.WmcLayer=w}]); +!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=36)}([function(t,e){(function(){t.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(this)},function(t,e,n){(function(){var e,r,i,o,s,a,l,u,h,c,d,p,f,m,y,g,w={}.hasOwnProperty,b=[].splice;({isObject:g,isFunction:y,isEmpty:m,getValue:f}=n(2)),u=null,i=null,o=null,s=null,a=null,d=null,p=null,c=null,l=null,r=null,h=null,e=null,t.exports=function(){class t{constructor(t){this.parent=t,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,u||(u=n(5),i=n(7),o=n(8),s=n(9),a=n(10),d=n(15),p=n(16),c=n(17),l=n(22),r=n(0),h=n(32),n(6),e=n(33))}setParent(t){var e,n,r,i,o;for(this.parent=t,t&&(this.options=t.options,this.stringify=t.stringify),o=[],n=0,r=(i=this.children).length;n":(null!=(n=this.parent)?n.name:void 0)?"node: <"+t+">, parent: <"+this.parent.name+">":"node: <"+t+">":""}ele(t,e,n){return this.element(t,e,n)}nod(t,e,n){return this.node(t,e,n)}txt(t){return this.text(t)}dat(t){return this.cdata(t)}com(t){return this.comment(t)}ins(t,e){return this.instruction(t,e)}doc(){return this.document()}dec(t,e,n){return this.declaration(t,e,n)}e(t,e,n){return this.element(t,e,n)}n(t,e,n){return this.node(t,e,n)}t(t){return this.text(t)}d(t){return this.cdata(t)}c(t){return this.comment(t)}r(t){return this.raw(t)}i(t,e){return this.instruction(t,e)}u(){return this.up()}importXMLBuilder(t){return this.importDocument(t)}attribute(t,e){throw new Error("attribute() applies to element nodes only.")}att(t,e){return this.attribute(t,e)}a(t,e){return this.attribute(t,e)}removeAttribute(t){throw new Error("attribute() applies to element nodes only.")}replaceChild(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())}removeChild(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}appendChild(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}hasChildNodes(){return 0!==this.children.length}cloneNode(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}normalize(){throw new Error("This DOM method is not implemented."+this.debugInfo())}isSupported(t,e){return!0}hasAttributes(){return 0!==this.attribs.length}compareDocumentPosition(t){var n;return this,this===t?0:this.document()!==t.document()?(n=e.Disconnected|e.ImplementationSpecific,Math.random()<.5?n|=e.Preceding:n|=e.Following,n):this.isAncestor(t)?e.Contains|e.Preceding:this.isDescendant(t)?e.Contains|e.Following:this.isPreceding(t)?e.Preceding:e.Following}isSameNode(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}lookupPrefix(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}isDefaultNamespace(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}lookupNamespaceURI(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}isEqualNode(t){var e,n,r;if(t.nodeType!==this.nodeType)return!1;if(t.children.length!==this.children.length)return!1;for(e=n=0,r=this.children.length-1;0<=r?n<=r:n>=r;e=0<=r?++n:--n)if(!this.children[e].isEqualNode(t.children[e]))return!1;return!0}getFeature(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())}setUserData(t,e,n){throw new Error("This DOM method is not implemented."+this.debugInfo())}getUserData(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}contains(t){return!!t&&(t===this||this.isDescendant(t))}isDescendant(t){var e,n,r,i;for(n=0,r=(i=this.children).length;nn}treePosition(t){var e,n;return n=0,e=!1,this.foreachTreeNode(this.document(),(function(r){if(n++,!e&&r===t)return e=!0})),e?n:-1}foreachTreeNode(t,e){var n,r,i,o,s;for(t||(t=this.document()),r=0,i=(o=t.children).length;r=r;e=0<=r?++n:--n)if(!this.attribs[e].isEqualNode(t.attribs[e]))return!1;return!0}}return Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(t.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(t.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(t.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(t.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(t.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(t.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(t.prototype,"attributes",{get:function(){return this.attributeMap&&this.attributeMap.nodes||(this.attributeMap=new i(this.attribs)),this.attributeMap}}),t}.call(this)}).call(this)},function(t,e){(function(){t.exports=function(){class t{constructor(t){this.nodes=t}clone(){return this.nodes=null}getNamedItem(t){return this.nodes[t]}setNamedItem(t){var e;return e=this.nodes[t.nodeName],this.nodes[t.nodeName]=t,e||null}removeNamedItem(t){var e;return e=this.nodes[t],delete this.nodes[t],e||null}item(t){return this.nodes[Object.keys(this.nodes)[t]]||null}getNamedItemNS(t,e){throw new Error("This DOM method is not implemented.")}setNamedItemNS(t){throw new Error("This DOM method is not implemented.")}removeNamedItemNS(t,e){throw new Error("This DOM method is not implemented.")}}return Object.defineProperty(t.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),t}.call(this)}).call(this)},function(t,e,n){(function(){var e,r;e=n(0),r=n(3),t.exports=class extends r{constructor(t,n){if(super(t),null==n)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=e.CData,this.value=this.stringify.cdata(n)}clone(){return Object.create(this)}toString(t){return this.options.writer.cdata(this,this.options.writer.filterOptions(t))}}}).call(this)},function(t,e,n){(function(){var e,r;e=n(0),r=n(3),t.exports=class extends r{constructor(t,n){if(super(t),null==n)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=e.Comment,this.value=this.stringify.comment(n)}clone(){return Object.create(this)}toString(t){return this.options.writer.comment(this,this.options.writer.filterOptions(t))}}}).call(this)},function(t,e,n){(function(){var e,r,i;({isObject:i}=n(2)),r=n(1),e=n(0),t.exports=class extends r{constructor(t,n,r,o){super(t),i(n)&&({version:n,encoding:r,standalone:o}=n),n||(n="1.0"),this.type=e.Declaration,this.version=this.stringify.xmlVersion(n),null!=r&&(this.encoding=this.stringify.xmlEncoding(r)),null!=o&&(this.standalone=this.stringify.xmlStandalone(o))}toString(t){return this.options.writer.declaration(this,this.options.writer.filterOptions(t))}}}).call(this)},function(t,e,n){(function(){var e,r,i,o,s,a,l,u;({isObject:u}=n(2)),l=n(1),e=n(0),r=n(11),o=n(12),i=n(13),s=n(14),a=n(6),t.exports=function(){class t extends l{constructor(t,n,r){var i,o,s,a;if(super(t),this.type=e.DocType,t.children)for(o=0,s=(a=t.children).length;o":"attribute: {"+t+"}, parent: <"+this.parent.name+">"}isEqualNode(t){return t.namespaceURI===this.namespaceURI&&(t.prefix===this.prefix&&(t.localName===this.localName&&t.value===this.value))}}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(t.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(t.prototype,"textContent",{get:function(){return this.value},set:function(t){return this.value=t||""}}),Object.defineProperty(t.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(t.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(t.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(t.prototype,"specified",{get:function(){return!0}}),t}.call(this)}).call(this)},function(t,e,n){(function(){var e,r;r=n(1),e=n(0),t.exports=class extends r{constructor(t){super(t),this.type=e.Dummy}clone(){return Object.create(this)}toString(t){return""}}}).call(this)},function(t,e){(function(){var e={}.hasOwnProperty;t.exports=function(){class t{constructor(t){var n,r,i;for(n in this.assertLegalChar=this.assertLegalChar.bind(this),this.assertLegalName=this.assertLegalName.bind(this),t||(t={}),this.options=t,this.options.version||(this.options.version="1.0"),r=t.stringify||{})e.call(r,n)&&(i=r[n],this[n]=i)}name(t){return this.options.noValidation?t:this.assertLegalName(""+t||"")}text(t){return this.options.noValidation?t:this.assertLegalChar(this.textEscape(""+t||""))}cdata(t){return this.options.noValidation?t:(t=(t=""+t||"").replace("]]>","]]]]>"),this.assertLegalChar(t))}comment(t){if(this.options.noValidation)return t;if((t=""+t||"").match(/--/))throw new Error("Comment text cannot contain double-hypen: "+t);return this.assertLegalChar(t)}raw(t){return this.options.noValidation?t:""+t||""}attValue(t){return this.options.noValidation?t:this.assertLegalChar(this.attEscape(t=""+t||""))}insTarget(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")}insValue(t){if(this.options.noValidation)return t;if((t=""+t||"").match(/\?>/))throw new Error("Invalid processing instruction value: "+t);return this.assertLegalChar(t)}xmlVersion(t){if(this.options.noValidation)return t;if(!(t=""+t||"").match(/1\.[0-9]+/))throw new Error("Invalid version number: "+t);return t}xmlEncoding(t){if(this.options.noValidation)return t;if(!(t=""+t||"").match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+t);return this.assertLegalChar(t)}xmlStandalone(t){return this.options.noValidation?t:t?"yes":"no"}dtdPubID(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")}dtdSysID(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")}dtdElementValue(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")}dtdAttType(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")}dtdAttDefault(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")}dtdEntityValue(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")}dtdNData(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")}assertLegalChar(t){var e,n;if(this.options.noValidation)return t;if(e="","1.0"===this.options.version){if(e=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,n=t.match(e))throw new Error(`Invalid character in string: ${t} at index ${n.index}`)}else if("1.1"===this.options.version&&(e=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,n=t.match(e)))throw new Error(`Invalid character in string: ${t} at index ${n.index}`);return t}assertLegalName(t){var e;if(this.options.noValidation)return t;if(this.assertLegalChar(t),e=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!t.match(e))throw new Error("Invalid character in name");return t}textEscape(t){var e;return this.options.noValidation?t:(e=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,t.replace(e,"&").replace(//g,">").replace(/\r/g," "))}attEscape(t){var e;return this.options.noValidation?t:(e=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,t.replace(e,"&").replace(/0?new Array(r).join(e.indent):""}endline(t,e,n){return!e.pretty||e.suppressPrettyCount?"":e.newline}attribute(t,e,n){var r;return this.openAttribute(t,e,n),r=e.pretty&&e.width>0?t.name+'="'+t.value+'"':" "+t.name+'="'+t.value+'"',this.closeAttribute(t,e,n),r}cdata(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n)+""+this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i}comment(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n)+"\x3c!-- ",e.state=r.InsideTag,i+=t.value,e.state=r.CloseTag,i+=" --\x3e"+this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i}declaration(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n)+"",i+=this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i}docType(t,e,n){var i,o,s,a,l;if(n||(n=0),this.openNode(t,e,n),e.state=r.OpenTag,a=this.indent(t,e,n),a+="0){for(a+=" [",a+=this.endline(t,e,n),e.state=r.InsideTag,o=0,s=(l=t.children).length;o",a+=this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),a}element(t,n,i){var s,a,l,u,h,c,d,p,f,m,y,g,w,b,v,O,D,x;if(i||(i=0),y=!1,this.openNode(t,n,i),n.state=r.OpenTag,g=this.indent(t,n,i)+"<"+t.name,n.pretty&&n.width>0)for(m in d=g.length,b=t.attribs)o.call(b,m)&&(s=b[m],d+(w=this.attribute(s,n,i)).length>n.width?(x=this.indent(t,n,i+1)+w,g+=this.endline(t,n,i)+x,d=x.length):(g+=x=" "+w,d+=x.length));else for(m in v=t.attribs)o.call(v,m)&&(s=v[m],g+=this.attribute(s,n,i));if(u=0===(l=t.children.length)?null:t.children[0],0===l||t.children.every((function(t){return(t.type===e.Text||t.type===e.Raw)&&""===t.value})))n.allowEmpty?(g+=">",n.state=r.CloseTag,g+=""+this.endline(t,n,i)):(n.state=r.CloseTag,g+=n.spaceBeforeSlash+"/>"+this.endline(t,n,i));else if(!n.pretty||1!==l||u.type!==e.Text&&u.type!==e.Raw||null==u.value){if(n.dontPrettyTextNodes)for(h=0,p=(O=t.children).length;h"+this.endline(t,n,i),n.state=r.InsideTag,c=0,f=(D=t.children).length;c",y&&n.suppressPrettyCount--,g+=this.endline(t,n,i),n.state=r.None}else g+=">",n.state=r.InsideTag,n.suppressPrettyCount++,y=!0,g+=this.writeChildNode(u,n,i+1),n.suppressPrettyCount--,y=!1,n.state=r.CloseTag,g+=""+this.endline(t,n,i);return this.closeNode(t,n,i),g}writeChildNode(t,n,r){switch(t.type){case e.CData:return this.cdata(t,n,r);case e.Comment:return this.comment(t,n,r);case e.Element:return this.element(t,n,r);case e.Raw:return this.raw(t,n,r);case e.Text:return this.text(t,n,r);case e.ProcessingInstruction:return this.processingInstruction(t,n,r);case e.Dummy:return"";case e.Declaration:return this.declaration(t,n,r);case e.DocType:return this.docType(t,n,r);case e.AttributeDeclaration:return this.dtdAttList(t,n,r);case e.ElementDeclaration:return this.dtdElement(t,n,r);case e.EntityDeclaration:return this.dtdEntity(t,n,r);case e.NotationDeclaration:return this.dtdNotation(t,n,r);default:throw new Error("Unknown XML node type: "+t.constructor.name)}}processingInstruction(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n)+"",i+=this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i}raw(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n),e.state=r.InsideTag,i+=t.value,e.state=r.CloseTag,i+=this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i}text(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n),e.state=r.InsideTag,i+=t.value,e.state=r.CloseTag,i+=this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i}dtdAttList(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n)+""+this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i}dtdElement(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n)+""+this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i}dtdEntity(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n)+""+this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i}dtdNotation(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n)+""+this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i}openNode(t,e,n){}closeNode(t,e,n){}openAttribute(t,e,n){}closeAttribute(t,e,n){}}}).call(this)},function(t,e,n){(function(){var e,r,i,o,s,a,l,u,h;({assign:u,isFunction:h}=n(2)),i=n(19),o=n(20),s=n(34),l=n(18),a=n(35),e=n(0),r=n(4),t.exports.create=function(t,e,n,r){var i,s;if(null==t)throw new Error("Root element needs a name.");return r=u({},e,n,r),s=(i=new o(r)).element(t),r.headless||(i.declaration(r),null==r.pubID&&null==r.sysID||i.dtd(r)),s},t.exports.begin=function(t,e,n){return h(t)&&([e,n]=[t,e],t={}),e?new s(t,e,n):new o(t)},t.exports.stringWriter=function(t){return new l(t)},t.exports.streamWriter=function(t,e){return new a(t,e)},t.exports.implementation=new i,t.exports.nodeType=e,t.exports.writerState=r}).call(this)},function(t,e){t.exports='
\n \x3c!-- TITLE --\x3e\n
Gestión de la sesión
\n\n \n \n\n \n \n
\n\n \x3c!-- FORM --\x3e\n
\n
\n
\n Carga un WMC v1.1.0 como fichero o desde una url\n
\n
\n \n \n
\n \x3c!-- file --\x3e\n
\n \n \n
\n
\n \n \n
\n
\n \x3c!-- buttons --\x3e\n
\n \n
\n
\n\n
\n
\n
\n Guarda un WMC v1.1.0 como fichero\n
\n \x3c!-- Nombre fichero --\x3e\n
\n \n \n
\n
\n \x3c!-- buttons --\x3e\n
\n \n
\n
\n\n
'},function(t){t.exports=JSON.parse('{"url":{"name":"wmc","separator":"*"},"constructor":"M.plugin.Wmc","parameters":[],"files":{"ol":{"scripts":["wmc.ol.min.js"],"styles":["wmc.ol.min.css"]}},"metadata":{"name":"Wmc","description":"Plugin para poder guardar la sesión de trabajo mediante un fichero de contexto de mapa (WMC)","text":"Permite recuperar o compartir, una sesión de trabajo en contexto de mapa en cualquier momento","version":"1.1.1","date":"Mayo, 2021","author":"","org":"Instituto de Estadística y Cartografía. Junta de Andalucía","tags":"mapea,plugin","icon":"./facade/assets/icons/icons.svg","centralized":true,"compatibility":["5","6"]}}')},function(t,e,n){},function(t,e,n){(function(){var e,r;e=n(30),r=n(31),t.exports=function(){class t{constructor(){this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new e,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=Object.create(this.defaultParams)}getParameter(t){return this.params.hasOwnProperty(t)?this.params[t]:null}canSetParameter(t,e){return!0}setParameter(t,e){return null!=e?this.params[t]=e:delete this.params[t]}}return Object.defineProperty(t.prototype,"parameterNames",{get:function(){return new r(Object.keys(this.defaultParams))}}),t}.call(this)}).call(this)},function(t,e){(function(){t.exports=class{constructor(){}handleError(t){throw new Error(t)}}}).call(this)},function(t,e){(function(){t.exports=function(){class t{constructor(t){this.arr=t||[]}item(t){return this.arr[t]||null}contains(t){return-1!==this.arr.indexOf(t)}}return Object.defineProperty(t.prototype,"length",{get:function(){return this.arr.length}}),t}.call(this)}).call(this)},function(t,e){(function(){t.exports=function(){class t{constructor(t){this.nodes=t}clone(){return this.nodes=null}item(t){return this.nodes[t]||null}}return Object.defineProperty(t.prototype,"length",{get:function(){return this.nodes.length||0}}),t}.call(this)}).call(this)},function(t,e){(function(){t.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(this)},function(t,e,n){(function(){var e,r,i,o,s,a,l,u,h,c,d,p,f,m,y,g,w,b,v,O,D,x,E={}.hasOwnProperty;({isObject:D,isFunction:O,isPlainObject:x,getValue:v}=n(2)),e=n(0),p=n(20),f=n(5),o=n(7),s=n(8),y=n(15),b=n(16),m=n(17),c=n(9),d=n(10),a=n(11),u=n(12),l=n(13),h=n(14),i=n(21),w=n(23),g=n(18),r=n(4),t.exports=class{constructor(t,n,r){var i;this.name="?xml",this.type=e.Document,t||(t={}),i={},t.writer?x(t.writer)&&(i=t.writer,t.writer=new g):t.writer=new g,this.options=t,this.writer=t.writer,this.writerOptions=this.writer.filterOptions(i),this.stringify=new w(t),this.onDataCallback=n||function(){},this.onEndCallback=r||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}createChildNode(t){var n,r,i,o,s,a,l,u;switch(t.type){case e.CData:this.cdata(t.value);break;case e.Comment:this.comment(t.value);break;case e.Element:for(r in i={},l=t.attribs)E.call(l,r)&&(n=l[r],i[r]=n.value);this.node(t.name,i);break;case e.Dummy:this.dummy();break;case e.Raw:this.raw(t.value);break;case e.Text:this.text(t.value);break;case e.ProcessingInstruction:this.instruction(t.target,t.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+t.constructor.name)}for(s=0,a=(u=t.children).length;s=0;)this.up();return this.onEnd()}openCurrent(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)}openNode(t){var n,i,o,s;if(!t.isOpen){if(this.root||0!==this.currentLevel||t.type!==e.Element||(this.root=t),i="",t.type===e.Element){for(o in this.writerOptions.state=r.OpenTag,i=this.writer.indent(t,this.writerOptions,this.currentLevel)+"<"+t.name,s=t.attribs)E.call(s,o)&&(n=s[o],i+=this.writer.attribute(n,this.writerOptions,this.currentLevel));i+=(t.children?">":"/>")+this.writer.endline(t,this.writerOptions,this.currentLevel),this.writerOptions.state=r.InsideTag}else this.writerOptions.state=r.OpenTag,i=this.writer.indent(t,this.writerOptions,this.currentLevel)+""),i+=this.writer.endline(t,this.writerOptions,this.currentLevel);return this.onData(i,this.currentLevel),t.isOpen=!0}}closeNode(t){var n;if(!t.isClosed)return n="",this.writerOptions.state=r.CloseTag,n=t.type===e.Element?this.writer.indent(t,this.writerOptions,this.currentLevel)+""+this.writer.endline(t,this.writerOptions,this.currentLevel):this.writer.indent(t,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(t,this.writerOptions,this.currentLevel),this.writerOptions.state=r.None,this.onData(n,this.currentLevel),t.isClosed=!0}onData(t,e){return this.documentStarted=!0,this.onDataCallback(t,e+1)}onEnd(){return this.documentCompleted=!0,this.onEndCallback()}debugInfo(t){return null==t?"":"node: <"+t+">"}ele(){return this.element(...arguments)}nod(t,e,n){return this.node(t,e,n)}txt(t){return this.text(t)}dat(t){return this.cdata(t)}com(t){return this.comment(t)}ins(t,e){return this.instruction(t,e)}dec(t,e,n){return this.declaration(t,e,n)}dtd(t,e,n){return this.doctype(t,e,n)}e(t,e,n){return this.element(t,e,n)}n(t,e,n){return this.node(t,e,n)}t(t){return this.text(t)}d(t){return this.cdata(t)}c(t){return this.comment(t)}r(t){return this.raw(t)}i(t,e){return this.instruction(t,e)}att(){return this.currentNode&&this.currentNode.type===e.DocType?this.attList(...arguments):this.attribute(...arguments)}a(){return this.currentNode&&this.currentNode.type===e.DocType?this.attList(...arguments):this.attribute(...arguments)}ent(t,e){return this.entity(t,e)}pent(t,e){return this.pEntity(t,e)}not(t,e){return this.notation(t,e)}}}).call(this)},function(t,e,n){(function(){var e,r,i,o={}.hasOwnProperty;e=n(0),i=n(24),r=n(4),t.exports=class extends i{constructor(t,e){super(e),this.stream=t}endline(t,e,n){return t.isLastRootNode&&e.state===r.CloseTag?"":super.endline(t,e,n)}document(t,e){var n,r,i,o,s,a,l,u,h;for(r=i=0,s=(l=t.children).length;i0){for(this.stream.write(" ["),this.stream.write(this.endline(t,e,n)),e.state=r.InsideTag,o=0,s=(a=t.children).length;o"),this.stream.write(this.endline(t,e,n)),e.state=r.None,this.closeNode(t,e,n)}element(t,n,i){var s,a,l,u,h,c,d,p,f,m,y,g,w,b;if(i||(i=0),this.openNode(t,n,i),n.state=r.OpenTag,f=this.indent(t,n,i)+"<"+t.name,n.pretty&&n.width>0)for(p in c=f.length,y=t.attribs)o.call(y,p)&&(s=y[p],c+(m=this.attribute(s,n,i)).length>n.width?(b=this.indent(t,n,i+1)+m,f+=this.endline(t,n,i)+b,c=b.length):(f+=b=" "+m,c+=b.length));else for(p in g=t.attribs)o.call(g,p)&&(s=g[p],f+=this.attribute(s,n,i));if(this.stream.write(f),u=0===(l=t.children.length)?null:t.children[0],0===l||t.children.every((function(t){return(t.type===e.Text||t.type===e.Raw)&&""===t.value})))n.allowEmpty?(this.stream.write(">"),n.state=r.CloseTag,this.stream.write("")):(n.state=r.CloseTag,this.stream.write(n.spaceBeforeSlash+"/>"));else if(!n.pretty||1!==l||u.type!==e.Text&&u.type!==e.Raw||null==u.value){for(this.stream.write(">"+this.endline(t,n,i)),n.state=r.InsideTag,h=0,d=(w=t.children).length;h")}else this.stream.write(">"),n.state=r.InsideTag,n.suppressPrettyCount++,!0,this.writeChildNode(u,n,i+1),n.suppressPrettyCount--,!1,n.state=r.CloseTag,this.stream.write("");return this.stream.write(this.endline(t,n,i)),n.state=r.None,this.closeNode(t,n,i)}processingInstruction(t,e,n){return this.stream.write(super.processingInstruction(t,e,n))}raw(t,e,n){return this.stream.write(super.raw(t,e,n))}text(t,e,n){return this.stream.write(super.text(t,e,n))}dtdAttList(t,e,n){return this.stream.write(super.dtdAttList(t,e,n))}dtdElement(t,e,n){return this.stream.write(super.dtdElement(t,e,n))}dtdEntity(t,e,n){return this.stream.write(super.dtdEntity(t,e,n))}dtdNotation(t,e,n){return this.stream.write(super.dtdNotation(t,e,n))}}}).call(this)},function(t,e,n){"use strict";n.r(e);n(28);var r=n(25);function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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 o,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:{};T(this,n),(t=e.call(this,"http://prueba.es")).url=null,M.utils.isUndefined(x)&&M.exception("La implementación usada no puede crear controles WMCLayerImpl");var i=new x(r);return t.setImpl(i),t}return n}();function j(t){return(j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function L(t,e){for(var n=0;n input");this.loadBtn_=t.querySelector(".button > button.load"),this.saveBtn_=t.querySelector(".button > button.save"),this.inputUrl_=t.querySelector(".form div.url > input"),this.inputsTabs_=t.querySelectorAll('input[name="tabs-wmc"]'),this.selectedTab_=t.querySelector('input[name="tabs-wmc"]:checked').dataset.tab,this.inputWMCLoadName_=t.querySelector(".form div.load-name > input"),this.inputWMCSaveName_=t.querySelector(".form div.save-name > input"),n.addEventListener("change",(function(t){return e.changeFile(t,n.files[0])})),this.loadBtn_.addEventListener("click",(function(t){return e.loadWMC()})),this.saveBtn_.addEventListener("click",(function(t){return e.saveWMC()})),this.inputUrl_.addEventListener("input",(function(t){return e.checkButtons()})),this.inputWMCLoadName_.addEventListener("input",(function(t){return e.checkButtons()})),this.inputWMCSaveName_.addEventListener("input",(function(t){return e.checkButtons()})),this.inputsTabs_.forEach((function(t){t.addEventListener("change",(function(t){return e.changeTab(t)}))}))}},{key:"createView",value:function(t){var e=this;return this.facadeMap_=t,new Promise((function(t,n){var r=M.template.compileSync(y.a);e.addEvents(r),t(r)}))}},{key:"equals",value:function(t){return t instanceof s}},{key:"getQuerySelectorScapeCSS",value:function(t,e){return t.querySelector(CSS.escape(e))}},{key:"changeTab",value:function(t){var e=(t||window.event).target;this.selectedTab_=e.dataset.tab,this.checkButtons()}},{key:"checkButtons",value:function(){"loadWMC"===this.selectedTab_?(this.loadBtn_.disabled=M.utils.isNullOrEmpty(this.file_)&&M.utils.isNullOrEmpty(this.inputUrl_.value)||M.utils.isNullOrEmpty(this.inputWMCLoadName_.value),this.inputUrl_.disabled=!M.utils.isNullOrEmpty(this.file_)):this.saveBtn_.disabled=M.utils.isNullOrEmpty(this.inputWMCSaveName_.value)}},{key:"changeFile",value:function(t,e){this.file_=e,this.inputWMCLoadName_.value=this.file_.name.replace(/\.[^/.]+$/,""),this.checkButtons(),M.utils.isNullOrEmpty(e)||e.size>20971520&&(M.dialog.info("El fichero seleccionado sobrepasa el máximo de 20 MB permitido"),this.file_=null,this.checkButtons())}},{key:"changeName",value:function(t){var e=(t||window.event).target;this.loadBtn_.disabled=""===e.value.trim()}},{key:"saveWMC",value:function(){try{if("Blob"in window){var t="".concat(this.inputWMCSaveName_.value,".xml"),e=this.getImpl().getViewContext(),n=r.create({ViewContext:e},{stringify:{convertAttKey:"$"},encoding:"utf-8"}).end(),i=new Blob([n],{type:"text/plain;charset=utf-8"});if("msSaveOrOpenBlob"in navigator)navigator.msSaveOrOpenBlob(i,t);else{var o=document.createElement("a");o.download=t,o.innerHTML="Download File","webkitURL"in window?o.href=window.URL.createObjectURL(i):(o.href=window.URL.createObjectURL(i),o.onclick=this.destroyClickedElement,o.style.display="none",document.body.appendChild(o)),o.click()}}else M.dialog.info("Tu navegador no soporta la descarga de ficheros Blob HML5")}catch(t){M.dialog.error("Error al guardar el contexto del mapa")}}},{key:"loadWMC",value:function(){var t,e=this;if(this.file_){var n=new FileReader;n.addEventListener("load",(function(r){var i;"undefined"!=typeof DOMParser&&(i=(new DOMParser).parseFromString(n.result,"text/xml")),t={documentXML:i},e.addToMap(t)})),n.readAsText(this.file_)}else t={url:this.inputUrl_.value},this.addToMap(t)}},{key:"addToMap",value:function(t){var e=this;try{var n=new S(t);n.name=this.inputWMCLoadName_.value,n.url=t.url;var r=this.facadeMap_.getWMC(n);0===r.length?(this.facadeMap_.getImpl().addWMC([n]),this.facadeMap_.fire(M.evt.ADDED_LAYER,[n]),this.facadeMap_.fire(M.evt.ADDED_WMC,[n]),n.getImpl().loadContext(t.documentXML).then((function(t){n.getImpl().loadContextParameters(t);var r=e.facadeMap_.getControls("wmcselector").length>0;e.facadeMap_.getWMC().length>1&&!r&&e.facadeMap_.addControls(new M.control.WMCSelector),n.select()}))):r[0].select()}catch(t){M.dialog.error("Error al cargar el fichero. Compruebe que se trata del fichero correcto")}}},{key:"destroyClickedElement_",value:function(t){document.body.removeChild(t.target)}}])&&L(e.prototype,n),i&&L(e,i),s}(),k=n(27);function W(t){return(W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function V(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function U(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return V(this,o),(t=i.call(this,e)).map_=null,t.control_=null,t.panel_=null,t.params_={},M.utils.isNullOrEmpty(e.params)||(t.params_=e.params),t.options_={},M.utils.isNullOrEmpty(e.options)||(t.options_=e.options),t.metadata_=k.metadata,t}return e=o,(n=[{key:"addTo",value:function(t){var e=this;this.map_=t,this.control_=new B,this.panel_=new M.ui.Panel("panelWmc",{collapsible:!0,className:"m-wmc",collapsedButtonClass:"g-cartografia-opciones",position:M.ui.position.TR,tooltip:"Gestión de WMC"}),this.panel_.on(M.evt.ADDED_TO_MAP,(function(t){M.utils.enableTouchScroll(t)})),this.panel_.addControls(this.control_),this.map_.addPanels(this.panel_),this.control_.on(M.evt.ADDED_TO_MAP,(function(){e.fire(M.evt.ADDED_TO_MAP)}))}},{key:"destroy",value:function(){this.map_.removeControls([this.control_]);var t=[null,null,null,null];this.map_=t[0],this.control_=t[1],this.panel_=t[2],this.options_=t[3]}},{key:"equals",value:function(t){var e=!1;return t instanceof o&&(e=!0),e}},{key:"name",get:function(){return"wmc"}},{key:"getMetadata",value:function(){return this.metadata_}}])&&U(e.prototype,n),r&&U(e,r),o}();window.M.plugin||(window.M.plugin={}),window.M.control||(window.M.control={}),window.M.impl||(window.M.impl={}),window.M.impl.control||(window.M.impl.control={}),window.M.plugin.Wmc=z,window.M.control.WmcControl=B,window.M.impl.control.WmcControl=f,window.M.impl.control.WmcLayer=x}]); //# sourceMappingURL=wmc.ol.min.js.map \ No newline at end of file diff --git a/dist/wmc.ol.min.js.map b/dist/wmc.ol.min.js.map index 1402219..ef3e9dc 100644 --- a/dist/wmc.ol.min.js.map +++ b/dist/wmc.ol.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/xmlbuilder/lib/NodeType.js","webpack:///./node_modules/xmlbuilder/lib/XMLNode.js","webpack:///./node_modules/xmlbuilder/lib/Utility.js","webpack:///./node_modules/xmlbuilder/lib/XMLCharacterData.js","webpack:///./node_modules/xmlbuilder/lib/WriterState.js","webpack:///./node_modules/xmlbuilder/lib/XMLElement.js","webpack:///./node_modules/xmlbuilder/lib/XMLNamedNodeMap.js","webpack:///./node_modules/xmlbuilder/lib/XMLCData.js","webpack:///./node_modules/xmlbuilder/lib/XMLComment.js","webpack:///./node_modules/xmlbuilder/lib/XMLDeclaration.js","webpack:///./node_modules/xmlbuilder/lib/XMLDocType.js","webpack:///./node_modules/xmlbuilder/lib/XMLDTDAttList.js","webpack:///./node_modules/xmlbuilder/lib/XMLDTDEntity.js","webpack:///./node_modules/xmlbuilder/lib/XMLDTDElement.js","webpack:///./node_modules/xmlbuilder/lib/XMLDTDNotation.js","webpack:///./node_modules/xmlbuilder/lib/XMLRaw.js","webpack:///./node_modules/xmlbuilder/lib/XMLText.js","webpack:///./node_modules/xmlbuilder/lib/XMLProcessingInstruction.js","webpack:///./node_modules/xmlbuilder/lib/XMLStringWriter.js","webpack:///./node_modules/xmlbuilder/lib/XMLDOMImplementation.js","webpack:///./node_modules/xmlbuilder/lib/XMLDocument.js","webpack:///./node_modules/xmlbuilder/lib/XMLAttribute.js","webpack:///./node_modules/xmlbuilder/lib/XMLDummy.js","webpack:///./node_modules/xmlbuilder/lib/XMLStringifier.js","webpack:///./node_modules/xmlbuilder/lib/XMLWriterBase.js","webpack:///./node_modules/xmlbuilder/lib/index.js","webpack:///./src/templates/wmc.html","webpack:///./node_modules/xmlbuilder/lib/XMLDOMConfiguration.js","webpack:///./node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js","webpack:///./node_modules/xmlbuilder/lib/XMLDOMStringList.js","webpack:///./node_modules/xmlbuilder/lib/XMLNodeList.js","webpack:///./node_modules/xmlbuilder/lib/DocumentPosition.js","webpack:///./node_modules/xmlbuilder/lib/XMLDocumentCB.js","webpack:///./node_modules/xmlbuilder/lib/XMLStreamWriter.js","webpack:///./src/impl/ol/js/wmccontrol.js","webpack:///./src/impl/ol/js/wmclayer.js","webpack:///./src/facade/js/wmclayer.js","webpack:///./src/facade/js/wmccontrol.js","webpack:///./src/facade/js/wmc.js","webpack:///./src/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","Element","Attribute","Text","CData","EntityReference","EntityDeclaration","ProcessingInstruction","Comment","Document","DocType","DocumentFragment","NotationDeclaration","Declaration","Raw","AttributeDeclaration","ElementDeclaration","Dummy","this","DocumentPosition","NodeType","XMLCData","XMLComment","XMLDeclaration","XMLDocType","XMLDummy","XMLElement","XMLNodeList","XMLProcessingInstruction","XMLRaw","XMLText","getValue","isEmpty","isFunction","isObject","hasProp","splice","XMLNode","parent1","parent","options","stringify","children","baseURI","child","j","len","ref1","results","length","push","setParent","attributes","text","childNode","item","k","lastChild","len1","val","Array","isArray","element","apply","ignoreDecorators","convertAttKey","indexOf","attribute","substr","separateArrayItems","dummy","keepNullNodes","convertTextKey","convertCDataKey","cdata","convertCommentKey","comment","convertRawKey","raw","convertPIKey","instruction","node","Error","debugInfo","newChild","refChild","removed","type","isRoot","concat","target","insTarget","insValue","version","encoding","standalone","doc","xmldec","document","unshift","root","pubID","sysID","doctype","ref2","rootObject","end","clonedRoot","clone","documentObject","declaration","up","importDocument","oldChild","deep","feature","attribs","other","res","Disconnected","ImplementationSpecific","Math","random","Preceding","Following","isAncestor","Contains","isDescendant","isPreceding","namespaceURI","prefix","nodeType","isEqualNode","data","handler","nodePos","thisPos","treePosition","found","pos","foreachTreeNode","func","childNodeList","nodes","str","textContent","set","assign","isPlainObject","sources","source","arguments","toString","ref","ctor","proto","getPrototypeOf","constructor","Function","obj","valueOf","XMLCharacterData","super","offset","count","arg","None","OpenTag","InsideTag","CloseTag","XMLAttribute","XMLNamedNodeMap","schemaTypeInfo","att","attName","clonedSelf","forEach","clonedChild","attValue","keepNullAttributes","writer","filterOptions","newAttr","oldAttr","localName","qualifiedName","isId","idAttr","tagname","classNames","attributeMap","oldNode","nodeName","index","keys","xmlVersion","xmlEncoding","xmlStandalone","XMLDTDAttList","XMLDTDElement","XMLDTDEntity","XMLDTDNotation","dtdPubID","dtdSysID","elementName","attributeName","attributeType","defaultValueType","defaultValue","docType","attList","entity","pEntity","notation","publicId","systemId","pe","match","dtdAttType","dtdAttDefault","dtdAttList","internal","nData","dtdNData","dtdEntityValue","dtdEntity","join","dtdElementValue","dtdElement","dtdNotation","content","next","prev","previousSibling","nextSibling","processingInstruction","XMLWriterBase","writeChildNode","pretty","slice","newline","title","XMLDOMConfiguration","XMLDOMImplementation","XMLStringWriter","XMLStringifier","XMLDocument","documentURI","domConfig","writerOptions","tagName","importedNode","elementId","eventInterface","whatToShow","filter","assertLegalChar","assertLegalName","noValidation","textEscape","replace","attEscape","regex","ampregex","noDoubleEncoding","WriterState","filteredOptions","ref3","ref4","ref5","ref6","ref7","allowEmpty","indent","width","dontPrettyTextNodes","dontprettytextnodes","spaceBeforeSlash","spacebeforeslash","suppressPrettyCount","user","state","level","indentLevel","openAttribute","closeAttribute","openNode","endline","closeNode","childNodeCount","firstChildNode","len2","prettySuppressed","ratt","rline","every","e","XMLDocumentCB","XMLStreamWriter","headless","dtd","begin","onData","onEnd","stringWriter","streamWriter","stream","implementation","writerState","XMLDOMErrorHandler","XMLDOMStringList","defaultParams","params","error","arr","ContainedBy","onDataCallback","onEndCallback","currentNode","currentLevel","openTags","documentStarted","documentCompleted","createChildNode","openCurrent","oldValidationFlag","rootNodeName","chunk","isOpen","isClosed","isLastRootNode","write","WmcControl","M","impl","Control","map","html","facadeMap_","olMap","getMapImpl","ol","control","addControl","viewContext","General","BoundingBox","LayerList","Layer","$version","$xmlns","$id","Title","$SRS","getProjection","code","extent","getBbox","$minx","x","min","$miny","y","$maxx","max","$maxy","KeywordList","Keyword","Abstract","Extension","maxExtent","getMaxExtent","getWMS","layer","wmcLayer","$hidden","isVisible","$queryable","isQueryable","Name","legend","Server","OnlineResource","url","$service","transparent","StyleList","Style","$current","LegendURL","$width","$height","$format","getLegendURL","getOpacity","displayInLayerSwitcher","tiled","WmcLayer","projection","WMC","selected","getWMC","unselect","setProjection","getCode","units","getUnits","utils","isNullOrEmpty","bbox","setBbox","nearest","dialog","info","setMaxExtent","layers","addWMS","fire","evt","CHANGE_WMC","documentXML","Promise","success","fail","context","format","wmc","readFromDocument","remote","then","response","wmcDocument","xml","sort","layerA","layerB","result","visibleA","visibleB","isBaseLayerA","isBaseLayerB","bounds","proj","isUndefined","WmcLayerImpl","exception","setImpl","WmcImplControl","file_","inputUrl_","loadBtn_","saveBtn_","inputsTabs_","selectedTab_","inputWMCLoadName_","inputWMCSaveName_","inputFile","querySelector","querySelectorAll","dataset","tab","addEventListener","changeFile","files","loadWMC","saveWMC","checkButtons","changeTab","template","compileSync","addEvents","selector","CSS","escape","itemTarget","window","event","disabled","file","size","trim","fileName","ViewContext","getImpl","getViewContext","xmlbuilder","textFileAsBlob","Blob","navigator","msSaveOrOpenBlob","downloadLink","createElement","download","innerHTML","href","URL","createObjectURL","onclick","destroyClickedElement","style","display","body","appendChild","click","fileReader","FileReader","DOMParser","parseFromString","addToMap","readAsText","addWMC","ADDED_LAYER","ADDED_WMC","loadContext","loadContextParameters","wmcselectorActive","getControls","addControls","WMCSelector","select","removeChild","Wmc","parameters","map_","control_","panel_","params_","options_","metadata_","api","metadata","Plugin","ui","Panel","collapsible","className","collapsedButtonClass","position","TR","tooltip","on","ADDED_TO_MAP","enableTouchScroll","addPanels","removeControls","plugin","M$pl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uM,GAAGK,SAASC,GACxBC,QAAS,mBAEXzgB,KAAK2f,OAAOe,GAAG/M,EAAEqF,IAAI2H,aAAc,SAAC5M,GAClCJ,EAAE0E,MAAMuI,kBAAkB7M,KAE5B/T,KAAK2f,OAAOR,YAAYnf,KAAK0f,UAC7B1f,KAAKyf,KAAKoB,UAAU7gB,KAAK2f,QAEzB3f,KAAK0f,SAASgB,GAAG/M,EAAEqF,IAAI2H,aAAc,WACnC,EAAK5H,KAAKpF,EAAEqF,IAAI2H,kB,gCAQlB3gB,KAAKyf,KAAKqB,eAAe,CAAC9gB,KAAK0f,WADvB,MAEiD,CAAC,KAAM,KAAM,KAAM,MAA3E1f,KAAKyf,KAFE,KAEIzf,KAAK0f,SAFT,KAEmB1f,KAAK2f,OAFxB,KAEgC3f,KAAK6f,SAFrC,O,6BAUHkB,GACL,IAAI7G,GAAS,EAIb,OAHI6G,aAAkBxB,IACpBrF,GAAS,GAEJA,I,oCAsBP,OAAOla,KAAK8f,Y,2BAXZ,MAAO,W,gCC3HNrD,OAAO9I,EAAEoN,SAAQtE,OAAO9I,EAAEoN,OAAS,IACnCtE,OAAO9I,EAAES,UAASqI,OAAO9I,EAAES,QAAU,IACrCqI,OAAO9I,EAAEC,OAAM6I,OAAO9I,EAAEC,KAAO,IAC/B6I,OAAO9I,EAAEC,KAAKQ,UAASqI,OAAO9I,EAAEC,KAAKQ,QAAU,IACpDqI,OAAO9I,EAAEoN,OAAOxB,IAAMyB,EACtBvE,OAAO9I,EAAES,QAAQV,WAAauN,EAC9BxE,OAAO9I,EAAEC,KAAKQ,QAAQV,WAAawN,EACnCzE,OAAO9I,EAAEC,KAAKQ,QAAQuD,SAAWwJ","file":"wmc.ol.min.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 36);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n module.exports = {\n Element: 1,\n Attribute: 2,\n Text: 3,\n CData: 4,\n EntityReference: 5,\n EntityDeclaration: 6,\n ProcessingInstruction: 7,\n Comment: 8,\n Document: 9,\n DocType: 10,\n DocumentFragment: 11,\n NotationDeclaration: 12,\n // Numeric codes up to 200 are reserved to W3C for possible future use.\n // Following are types internal to this library:\n Declaration: 201,\n Raw: 202,\n AttributeDeclaration: 203,\n ElementDeclaration: 204,\n Dummy: 205\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var DocumentPosition, NodeType, XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLNamedNodeMap, XMLNode, XMLNodeList, XMLProcessingInstruction, XMLRaw, XMLText, getValue, isEmpty, isFunction, isObject,\n hasProp = {}.hasOwnProperty,\n splice = [].splice;\n\n ({isObject, isFunction, isEmpty, getValue} = require('./Utility'));\n\n XMLElement = null;\n\n XMLCData = null;\n\n XMLComment = null;\n\n XMLDeclaration = null;\n\n XMLDocType = null;\n\n XMLRaw = null;\n\n XMLText = null;\n\n XMLProcessingInstruction = null;\n\n XMLDummy = null;\n\n NodeType = null;\n\n XMLNodeList = null;\n\n XMLNamedNodeMap = null;\n\n DocumentPosition = null;\n\n // Represents a generic XMl element\n module.exports = XMLNode = (function() {\n class XMLNode {\n // Initializes a new instance of `XMLNode`\n\n // `parent` the parent node\n constructor(parent1) {\n this.parent = parent1;\n if (this.parent) {\n this.options = this.parent.options;\n this.stringify = this.parent.stringify;\n }\n this.value = null;\n this.children = [];\n this.baseURI = null;\n // first execution, load dependencies that are otherwise\n // circular (so we can't load them at the top)\n if (!XMLElement) {\n XMLElement = require('./XMLElement');\n XMLCData = require('./XMLCData');\n XMLComment = require('./XMLComment');\n XMLDeclaration = require('./XMLDeclaration');\n XMLDocType = require('./XMLDocType');\n XMLRaw = require('./XMLRaw');\n XMLText = require('./XMLText');\n XMLProcessingInstruction = require('./XMLProcessingInstruction');\n XMLDummy = require('./XMLDummy');\n NodeType = require('./NodeType');\n XMLNodeList = require('./XMLNodeList');\n XMLNamedNodeMap = require('./XMLNamedNodeMap');\n DocumentPosition = require('./DocumentPosition');\n }\n }\n\n \n // Sets the parent node of this node and its children recursively\n\n // `parent` the parent node\n setParent(parent) {\n var child, j, len, ref1, results;\n this.parent = parent;\n if (parent) {\n this.options = parent.options;\n this.stringify = parent.stringify;\n }\n ref1 = this.children;\n results = [];\n for (j = 0, len = ref1.length; j < len; j++) {\n child = ref1[j];\n results.push(child.setParent(this));\n }\n return results;\n }\n\n // Creates a child element node\n\n // `name` node name or an object describing the XML tree\n // `attributes` an object containing name/value pairs of attributes\n // `text` element text\n element(name, attributes, text) {\n var childNode, item, j, k, key, lastChild, len, len1, val;\n lastChild = null;\n if (attributes === null && (text == null)) {\n [attributes, text] = [{}, null];\n }\n if (attributes == null) {\n attributes = {};\n }\n attributes = getValue(attributes);\n // swap argument order: text <-> attributes\n if (!isObject(attributes)) {\n [text, attributes] = [attributes, text];\n }\n if (name != null) {\n name = getValue(name);\n }\n // expand if array\n if (Array.isArray(name)) {\n for (j = 0, len = name.length; j < len; j++) {\n item = name[j];\n lastChild = this.element(item);\n }\n // evaluate if function\n } else if (isFunction(name)) {\n lastChild = this.element(name.apply());\n // expand if object\n } else if (isObject(name)) {\n for (key in name) {\n if (!hasProp.call(name, key)) continue;\n val = name[key];\n if (isFunction(val)) {\n // evaluate if function\n val = val.apply();\n }\n // assign attributes\n if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) {\n lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val);\n // skip empty arrays\n } else if (!this.options.separateArrayItems && Array.isArray(val) && isEmpty(val)) {\n lastChild = this.dummy();\n // empty objects produce one node\n } else if (isObject(val) && isEmpty(val)) {\n lastChild = this.element(key);\n // skip null and undefined nodes\n } else if (!this.options.keepNullNodes && (val == null)) {\n lastChild = this.dummy();\n \n // expand list by creating child nodes\n } else if (!this.options.separateArrayItems && Array.isArray(val)) {\n for (k = 0, len1 = val.length; k < len1; k++) {\n item = val[k];\n childNode = {};\n childNode[key] = item;\n lastChild = this.element(childNode);\n }\n \n // expand child nodes under parent\n } else if (isObject(val)) {\n // if the key is #text expand child nodes under this node to support mixed content\n if (!this.options.ignoreDecorators && this.stringify.convertTextKey && key.indexOf(this.stringify.convertTextKey) === 0) {\n lastChild = this.element(val);\n } else {\n lastChild = this.element(key);\n lastChild.element(val);\n }\n } else {\n \n // text node\n lastChild = this.element(key, val);\n }\n }\n // skip null nodes\n } else if (!this.options.keepNullNodes && text === null) {\n lastChild = this.dummy();\n } else {\n // text node\n if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) {\n lastChild = this.text(text);\n // cdata node\n } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) {\n lastChild = this.cdata(text);\n // comment node\n } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) {\n lastChild = this.comment(text);\n // raw text node\n } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) {\n lastChild = this.raw(text);\n // processing instruction\n } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && name.indexOf(this.stringify.convertPIKey) === 0) {\n lastChild = this.instruction(name.substr(this.stringify.convertPIKey.length), text);\n } else {\n // element node\n lastChild = this.node(name, attributes, text);\n }\n }\n if (lastChild == null) {\n throw new Error(\"Could not create any elements with: \" + name + \". \" + this.debugInfo());\n }\n return lastChild;\n }\n\n // Creates a child element node before the current node\n\n // `name` node name or an object describing the XML tree\n // `attributes` an object containing name/value pairs of attributes\n // `text` element text\n insertBefore(name, attributes, text) {\n var child, i, newChild, refChild, removed;\n // DOM level 1\n // insertBefore(newChild, refChild) inserts the child node newChild before refChild\n if (name != null ? name.type : void 0) {\n newChild = name;\n refChild = attributes;\n newChild.setParent(this);\n if (refChild) {\n // temporarily remove children starting *with* refChild\n i = children.indexOf(refChild);\n removed = children.splice(i);\n \n // add the new child\n children.push(newChild);\n \n // add back removed children after new child\n Array.prototype.push.apply(children, removed);\n } else {\n children.push(newChild);\n }\n return newChild;\n } else {\n if (this.isRoot) {\n throw new Error(\"Cannot insert elements at root level. \" + this.debugInfo(name));\n }\n \n // temporarily remove children starting *with* this\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i);\n \n // add the new child\n child = this.parent.element(name, attributes, text);\n \n // add back removed children after new child\n Array.prototype.push.apply(this.parent.children, removed);\n return child;\n }\n }\n\n // Creates a child element node after the current node\n\n // `name` node name or an object describing the XML tree\n // `attributes` an object containing name/value pairs of attributes\n // `text` element text\n insertAfter(name, attributes, text) {\n var child, i, removed;\n if (this.isRoot) {\n throw new Error(\"Cannot insert elements at root level. \" + this.debugInfo(name));\n }\n \n // temporarily remove children starting *after* this\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i + 1);\n \n // add the new child\n child = this.parent.element(name, attributes, text);\n \n // add back removed children after new child\n Array.prototype.push.apply(this.parent.children, removed);\n return child;\n }\n\n // Deletes a child element node\n\n remove() {\n var i, ref1;\n if (this.isRoot) {\n throw new Error(\"Cannot remove the root element. \" + this.debugInfo());\n }\n i = this.parent.children.indexOf(this);\n splice.apply(this.parent.children, [i, i - i + 1].concat(ref1 = [])), ref1;\n return this.parent;\n }\n\n // Creates a node\n\n // `name` name of the node\n // `attributes` an object containing name/value pairs of attributes\n // `text` element text\n node(name, attributes, text) {\n var child;\n if (name != null) {\n name = getValue(name);\n }\n attributes || (attributes = {});\n attributes = getValue(attributes);\n // swap argument order: text <-> attributes\n if (!isObject(attributes)) {\n [text, attributes] = [attributes, text];\n }\n child = new XMLElement(this, name, attributes);\n if (text != null) {\n child.text(text);\n }\n this.children.push(child);\n return child;\n }\n\n // Creates a text node\n\n // `value` element text\n text(value) {\n var child;\n if (isObject(value)) {\n this.element(value);\n }\n child = new XMLText(this, value);\n this.children.push(child);\n return this;\n }\n\n // Creates a CDATA node\n\n // `value` element text without CDATA delimiters\n cdata(value) {\n var child;\n child = new XMLCData(this, value);\n this.children.push(child);\n return this;\n }\n\n // Creates a comment node\n\n // `value` comment text\n comment(value) {\n var child;\n child = new XMLComment(this, value);\n this.children.push(child);\n return this;\n }\n\n // Creates a comment node before the current node\n\n // `value` comment text\n commentBefore(value) {\n var child, i, removed;\n // temporarily remove children starting *with* this\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i);\n // add the new child\n child = this.parent.comment(value);\n // add back removed children after new child\n Array.prototype.push.apply(this.parent.children, removed);\n return this;\n }\n\n // Creates a comment node after the current node\n\n // `value` comment text\n commentAfter(value) {\n var child, i, removed;\n // temporarily remove children starting *after* this\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i + 1);\n // add the new child\n child = this.parent.comment(value);\n // add back removed children after new child\n Array.prototype.push.apply(this.parent.children, removed);\n return this;\n }\n\n // Adds unescaped raw text\n\n // `value` text\n raw(value) {\n var child;\n child = new XMLRaw(this, value);\n this.children.push(child);\n return this;\n }\n\n // Adds a dummy node\n dummy() {\n var child;\n child = new XMLDummy(this);\n // Normally when a new node is created it is added to the child node collection.\n // However, dummy nodes are never added to the XML tree. They are created while\n // converting JS objects to XML nodes in order not to break the recursive function\n // chain. They can be thought of as invisible nodes. They can be traversed through\n // by using prev(), next(), up(), etc. functions but they do not exists in the tree.\n\n // @children.push child\n return child;\n }\n\n // Adds a processing instruction\n\n // `target` instruction target\n // `value` instruction value\n instruction(target, value) {\n var insTarget, insValue, instruction, j, len;\n if (target != null) {\n target = getValue(target);\n }\n if (value != null) {\n value = getValue(value);\n }\n if (Array.isArray(target)) { // expand if array\n for (j = 0, len = target.length; j < len; j++) {\n insTarget = target[j];\n this.instruction(insTarget);\n }\n } else if (isObject(target)) { // expand if object\n for (insTarget in target) {\n if (!hasProp.call(target, insTarget)) continue;\n insValue = target[insTarget];\n this.instruction(insTarget, insValue);\n }\n } else {\n if (isFunction(value)) {\n value = value.apply();\n }\n instruction = new XMLProcessingInstruction(this, target, value);\n this.children.push(instruction);\n }\n return this;\n }\n\n // Creates a processing instruction node before the current node\n\n // `target` instruction target\n // `value` instruction value\n instructionBefore(target, value) {\n var child, i, removed;\n // temporarily remove children starting *with* this\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i);\n // add the new child\n child = this.parent.instruction(target, value);\n // add back removed children after new child\n Array.prototype.push.apply(this.parent.children, removed);\n return this;\n }\n\n // Creates a processing instruction node after the current node\n\n // `target` instruction target\n // `value` instruction value\n instructionAfter(target, value) {\n var child, i, removed;\n // temporarily remove children starting *after* this\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i + 1);\n // add the new child\n child = this.parent.instruction(target, value);\n // add back removed children after new child\n Array.prototype.push.apply(this.parent.children, removed);\n return this;\n }\n\n // Creates the xml declaration\n\n // `version` A version number string, e.g. 1.0\n // `encoding` Encoding declaration, e.g. UTF-8\n // `standalone` standalone document declaration: true or false\n declaration(version, encoding, standalone) {\n var doc, xmldec;\n doc = this.document();\n xmldec = new XMLDeclaration(doc, version, encoding, standalone);\n // Replace XML declaration if exists, otherwise insert at top\n if (doc.children.length === 0) {\n doc.children.unshift(xmldec);\n } else if (doc.children[0].type === NodeType.Declaration) {\n doc.children[0] = xmldec;\n } else {\n doc.children.unshift(xmldec);\n }\n return doc.root() || doc;\n }\n\n // Creates the document type declaration\n\n // `pubID` the public identifier of the external subset\n // `sysID` the system identifier of the external subset\n dtd(pubID, sysID) {\n var child, doc, doctype, i, j, k, len, len1, ref1, ref2;\n doc = this.document();\n doctype = new XMLDocType(doc, pubID, sysID);\n ref1 = doc.children;\n // Replace DTD if exists\n for (i = j = 0, len = ref1.length; j < len; i = ++j) {\n child = ref1[i];\n if (child.type === NodeType.DocType) {\n doc.children[i] = doctype;\n return doctype;\n }\n }\n ref2 = doc.children;\n // insert before root node if the root node exists\n for (i = k = 0, len1 = ref2.length; k < len1; i = ++k) {\n child = ref2[i];\n if (child.isRoot) {\n doc.children.splice(i, 0, doctype);\n return doctype;\n }\n }\n // otherwise append to end\n doc.children.push(doctype);\n return doctype;\n }\n\n // Gets the parent node\n up() {\n if (this.isRoot) {\n throw new Error(\"The root node has no parent. Use doc() if you need to get the document object.\");\n }\n return this.parent;\n }\n\n // Gets the root node\n root() {\n var node;\n node = this;\n while (node) {\n if (node.type === NodeType.Document) {\n return node.rootObject;\n } else if (node.isRoot) {\n return node;\n } else {\n node = node.parent;\n }\n }\n }\n\n // Gets the node representing the XML document\n document() {\n var node;\n node = this;\n while (node) {\n if (node.type === NodeType.Document) {\n return node;\n } else {\n node = node.parent;\n }\n }\n }\n\n // Ends the document and converts string\n end(options) {\n return this.document().end(options);\n }\n\n // Gets the previous node\n prev() {\n var i;\n i = this.parent.children.indexOf(this);\n if (i < 1) {\n throw new Error(\"Already at the first node. \" + this.debugInfo());\n }\n return this.parent.children[i - 1];\n }\n\n // Gets the next node\n next() {\n var i;\n i = this.parent.children.indexOf(this);\n if (i === -1 || i === this.parent.children.length - 1) {\n throw new Error(\"Already at the last node. \" + this.debugInfo());\n }\n return this.parent.children[i + 1];\n }\n\n // Imports cloned root from another XML document\n\n // `doc` the XML document to insert nodes from\n importDocument(doc) {\n var child, clonedRoot, j, len, ref1;\n clonedRoot = doc.root().clone();\n clonedRoot.parent = this;\n clonedRoot.isRoot = false;\n this.children.push(clonedRoot);\n // set properties if imported element becomes the root node\n if (this.type === NodeType.Document) {\n clonedRoot.isRoot = true;\n clonedRoot.documentObject = this;\n this.rootObject = clonedRoot;\n // set dtd name\n if (this.children) {\n ref1 = this.children;\n for (j = 0, len = ref1.length; j < len; j++) {\n child = ref1[j];\n if (child.type === NodeType.DocType) {\n child.name = clonedRoot.name;\n break;\n }\n }\n }\n }\n return this;\n }\n\n \n // Returns debug string for this node\n debugInfo(name) {\n var ref1, ref2;\n name = name || this.name;\n if ((name == null) && !((ref1 = this.parent) != null ? ref1.name : void 0)) {\n return \"\";\n } else if (name == null) {\n return \"parent: <\" + this.parent.name + \">\";\n } else if (!((ref2 = this.parent) != null ? ref2.name : void 0)) {\n return \"node: <\" + name + \">\";\n } else {\n return \"node: <\" + name + \">, parent: <\" + this.parent.name + \">\";\n }\n }\n\n // Aliases\n ele(name, attributes, text) {\n return this.element(name, attributes, text);\n }\n\n nod(name, attributes, text) {\n return this.node(name, attributes, text);\n }\n\n txt(value) {\n return this.text(value);\n }\n\n dat(value) {\n return this.cdata(value);\n }\n\n com(value) {\n return this.comment(value);\n }\n\n ins(target, value) {\n return this.instruction(target, value);\n }\n\n doc() {\n return this.document();\n }\n\n dec(version, encoding, standalone) {\n return this.declaration(version, encoding, standalone);\n }\n\n e(name, attributes, text) {\n return this.element(name, attributes, text);\n }\n\n n(name, attributes, text) {\n return this.node(name, attributes, text);\n }\n\n t(value) {\n return this.text(value);\n }\n\n d(value) {\n return this.cdata(value);\n }\n\n c(value) {\n return this.comment(value);\n }\n\n r(value) {\n return this.raw(value);\n }\n\n i(target, value) {\n return this.instruction(target, value);\n }\n\n u() {\n return this.up();\n }\n\n // can be deprecated in a future release\n importXMLBuilder(doc) {\n return this.importDocument(doc);\n }\n\n // Adds or modifies an attribute.\n\n // `name` attribute name\n // `value` attribute value\n attribute(name, value) {\n throw new Error(\"attribute() applies to element nodes only.\");\n }\n\n att(name, value) {\n return this.attribute(name, value);\n }\n\n a(name, value) {\n return this.attribute(name, value);\n }\n\n // Removes an attribute\n\n // `name` attribute name\n removeAttribute(name) {\n throw new Error(\"attribute() applies to element nodes only.\");\n }\n\n // DOM level 1 functions to be implemented later\n replaceChild(newChild, oldChild) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n removeChild(oldChild) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n appendChild(newChild) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n hasChildNodes() {\n return this.children.length !== 0;\n }\n\n cloneNode(deep) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n normalize() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n // DOM level 2\n isSupported(feature, version) {\n return true;\n }\n\n hasAttributes() {\n return this.attribs.length !== 0;\n }\n\n // DOM level 3 functions to be implemented later\n compareDocumentPosition(other) {\n var ref, res;\n ref = this;\n if (ref === other) {\n return 0;\n } else if (this.document() !== other.document()) {\n res = DocumentPosition.Disconnected | DocumentPosition.ImplementationSpecific;\n if (Math.random() < 0.5) {\n res |= DocumentPosition.Preceding;\n } else {\n res |= DocumentPosition.Following;\n }\n return res;\n } else if (ref.isAncestor(other)) {\n return DocumentPosition.Contains | DocumentPosition.Preceding;\n } else if (ref.isDescendant(other)) {\n return DocumentPosition.Contains | DocumentPosition.Following;\n } else if (ref.isPreceding(other)) {\n return DocumentPosition.Preceding;\n } else {\n return DocumentPosition.Following;\n }\n }\n\n isSameNode(other) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n lookupPrefix(namespaceURI) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n isDefaultNamespace(namespaceURI) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n lookupNamespaceURI(prefix) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n isEqualNode(node) {\n var i, j, ref1;\n if (node.nodeType !== this.nodeType) {\n return false;\n }\n if (node.children.length !== this.children.length) {\n return false;\n }\n for (i = j = 0, ref1 = this.children.length - 1; (0 <= ref1 ? j <= ref1 : j >= ref1); i = 0 <= ref1 ? ++j : --j) {\n if (!this.children[i].isEqualNode(node.children[i])) {\n return false;\n }\n }\n return true;\n }\n\n getFeature(feature, version) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n setUserData(key, data, handler) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getUserData(key) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n // Returns true if other is an inclusive descendant of node,\n // and false otherwise.\n contains(other) {\n if (!other) {\n return false;\n }\n return other === this || this.isDescendant(other);\n }\n\n // An object A is called a descendant of an object B, if either A is \n // a child of B or A is a child of an object C that is a descendant of B.\n isDescendant(node) {\n var child, isDescendantChild, j, len, ref1;\n ref1 = this.children;\n for (j = 0, len = ref1.length; j < len; j++) {\n child = ref1[j];\n if (node === child) {\n return true;\n }\n isDescendantChild = child.isDescendant(node);\n if (isDescendantChild) {\n return true;\n }\n }\n return false;\n }\n\n // An object A is called an ancestor of an object B if and only if\n // B is a descendant of A.\n isAncestor(node) {\n return node.isDescendant(this);\n }\n\n // An object A is preceding an object B if A and B are in the \n // same tree and A comes before B in tree order.\n isPreceding(node) {\n var nodePos, thisPos;\n nodePos = this.treePosition(node);\n thisPos = this.treePosition(this);\n if (nodePos === -1 || thisPos === -1) {\n return false;\n } else {\n return nodePos < thisPos;\n }\n }\n\n // An object A is folllowing an object B if A and B are in the \n // same tree and A comes after B in tree order.\n isFollowing(node) {\n var nodePos, thisPos;\n nodePos = this.treePosition(node);\n thisPos = this.treePosition(this);\n if (nodePos === -1 || thisPos === -1) {\n return false;\n } else {\n return nodePos > thisPos;\n }\n }\n\n // Returns the preorder position of the given node in the tree, or -1\n // if the node is not in the tree.\n treePosition(node) {\n var found, pos;\n pos = 0;\n found = false;\n this.foreachTreeNode(this.document(), function(childNode) {\n pos++;\n if (!found && childNode === node) {\n return found = true;\n }\n });\n if (found) {\n return pos;\n } else {\n return -1;\n }\n }\n\n \n // Depth-first preorder traversal through the XML tree\n foreachTreeNode(node, func) {\n var child, j, len, ref1, res;\n node || (node = this.document());\n ref1 = node.children;\n for (j = 0, len = ref1.length; j < len; j++) {\n child = ref1[j];\n if (res = func(child)) {\n return res;\n } else {\n res = this.foreachTreeNode(child, func);\n if (res) {\n return res;\n }\n }\n }\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLNode.prototype, 'nodeName', {\n get: function() {\n return this.name;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'nodeType', {\n get: function() {\n return this.type;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'nodeValue', {\n get: function() {\n return this.value;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'parentNode', {\n get: function() {\n return this.parent;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'childNodes', {\n get: function() {\n if (!this.childNodeList || !this.childNodeList.nodes) {\n this.childNodeList = new XMLNodeList(this.children);\n }\n return this.childNodeList;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'firstChild', {\n get: function() {\n return this.children[0] || null;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'lastChild', {\n get: function() {\n return this.children[this.children.length - 1] || null;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'previousSibling', {\n get: function() {\n var i;\n i = this.parent.children.indexOf(this);\n return this.parent.children[i - 1] || null;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'nextSibling', {\n get: function() {\n var i;\n i = this.parent.children.indexOf(this);\n return this.parent.children[i + 1] || null;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'ownerDocument', {\n get: function() {\n return this.document() || null;\n }\n });\n\n // DOM level 3\n Object.defineProperty(XMLNode.prototype, 'textContent', {\n get: function() {\n var child, j, len, ref1, str;\n if (this.nodeType === NodeType.Element || this.nodeType === NodeType.DocumentFragment) {\n str = '';\n ref1 = this.children;\n for (j = 0, len = ref1.length; j < len; j++) {\n child = ref1[j];\n if (child.textContent) {\n str += child.textContent;\n }\n }\n return str;\n } else {\n return null;\n }\n },\n set: function(value) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n return XMLNode;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n // Copies all enumerable own properties from `sources` to `target`\n var assign, getValue, isArray, isEmpty, isFunction, isObject, isPlainObject,\n hasProp = {}.hasOwnProperty;\n\n assign = function(target, ...sources) {\n var i, key, len, source;\n if (isFunction(Object.assign)) {\n Object.assign.apply(null, arguments);\n } else {\n for (i = 0, len = sources.length; i < len; i++) {\n source = sources[i];\n if (source != null) {\n for (key in source) {\n if (!hasProp.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n }\n }\n return target;\n };\n\n // Determines if `val` is a Function object\n isFunction = function(val) {\n return !!val && Object.prototype.toString.call(val) === '[object Function]';\n };\n\n // Determines if `val` is an Object\n isObject = function(val) {\n var ref;\n return !!val && ((ref = typeof val) === 'function' || ref === 'object');\n };\n\n // Determines if `val` is an Array\n isArray = function(val) {\n if (isFunction(Array.isArray)) {\n return Array.isArray(val);\n } else {\n return Object.prototype.toString.call(val) === '[object Array]';\n }\n };\n\n // Determines if `val` is an empty Array or an Object with no own properties\n isEmpty = function(val) {\n var key;\n if (isArray(val)) {\n return !val.length;\n } else {\n for (key in val) {\n if (!hasProp.call(val, key)) continue;\n return false;\n }\n return true;\n }\n };\n\n // Determines if `val` is a plain Object\n isPlainObject = function(val) {\n var ctor, proto;\n return isObject(val) && (proto = Object.getPrototypeOf(val)) && (ctor = proto.constructor) && (typeof ctor === 'function') && (ctor instanceof ctor) && (Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object));\n };\n\n // Gets the primitive value of an object\n getValue = function(obj) {\n if (isFunction(obj.valueOf)) {\n return obj.valueOf();\n } else {\n return obj;\n }\n };\n\n module.exports.assign = assign;\n\n module.exports.isFunction = isFunction;\n\n module.exports.isObject = isObject;\n\n module.exports.isArray = isArray;\n\n module.exports.isEmpty = isEmpty;\n\n module.exports.isPlainObject = isPlainObject;\n\n module.exports.getValue = getValue;\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var XMLCharacterData, XMLNode;\n\n XMLNode = require('./XMLNode');\n\n // Represents a character data node\n module.exports = XMLCharacterData = (function() {\n class XMLCharacterData extends XMLNode {\n // Initializes a new instance of `XMLCharacterData`\n\n constructor(parent) {\n super(parent);\n this.value = '';\n }\n\n \n // Creates and returns a deep clone of `this`\n clone() {\n return Object.create(this);\n }\n\n // DOM level 1 functions to be implemented later\n substringData(offset, count) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n appendData(arg) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n insertData(offset, arg) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n deleteData(offset, count) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n replaceData(offset, count, arg) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n isEqualNode(node) {\n if (!super.isEqualNode(node)) {\n return false;\n }\n if (node.data !== this.data) {\n return false;\n }\n return true;\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLCharacterData.prototype, 'data', {\n get: function() {\n return this.value;\n },\n set: function(value) {\n return this.value = value || '';\n }\n });\n\n Object.defineProperty(XMLCharacterData.prototype, 'length', {\n get: function() {\n return this.value.length;\n }\n });\n\n // DOM level 3\n Object.defineProperty(XMLCharacterData.prototype, 'textContent', {\n get: function() {\n return this.value;\n },\n set: function(value) {\n return this.value = value || '';\n }\n });\n\n return XMLCharacterData;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n module.exports = {\n None: 0,\n OpenTag: 1,\n InsideTag: 2,\n CloseTag: 3\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLAttribute, XMLElement, XMLNamedNodeMap, XMLNode, getValue, isFunction, isObject,\n hasProp = {}.hasOwnProperty;\n\n ({isObject, isFunction, getValue} = require('./Utility'));\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n XMLAttribute = require('./XMLAttribute');\n\n XMLNamedNodeMap = require('./XMLNamedNodeMap');\n\n // Represents an element of the XML document\n module.exports = XMLElement = (function() {\n class XMLElement extends XMLNode {\n // Initializes a new instance of `XMLElement`\n\n // `parent` the parent node\n // `name` element name\n // `attributes` an object containing name/value pairs of attributes\n constructor(parent, name, attributes) {\n var child, j, len, ref;\n super(parent);\n if (name == null) {\n throw new Error(\"Missing element name. \" + this.debugInfo());\n }\n this.name = this.stringify.name(name);\n this.type = NodeType.Element;\n this.attribs = {};\n this.schemaTypeInfo = null;\n if (attributes != null) {\n this.attribute(attributes);\n }\n // set properties if this is the root node\n if (parent.type === NodeType.Document) {\n this.isRoot = true;\n this.documentObject = parent;\n parent.rootObject = this;\n // set dtd name\n if (parent.children) {\n ref = parent.children;\n for (j = 0, len = ref.length; j < len; j++) {\n child = ref[j];\n if (child.type === NodeType.DocType) {\n child.name = this.name;\n break;\n }\n }\n }\n }\n }\n\n // Creates and returns a deep clone of `this`\n\n clone() {\n var att, attName, clonedSelf, ref;\n clonedSelf = Object.create(this);\n // remove document element\n if (clonedSelf.isRoot) {\n clonedSelf.documentObject = null;\n }\n // clone attributes\n clonedSelf.attribs = {};\n ref = this.attribs;\n for (attName in ref) {\n if (!hasProp.call(ref, attName)) continue;\n att = ref[attName];\n clonedSelf.attribs[attName] = att.clone();\n }\n // clone child nodes\n clonedSelf.children = [];\n this.children.forEach(function(child) {\n var clonedChild;\n clonedChild = child.clone();\n clonedChild.parent = clonedSelf;\n return clonedSelf.children.push(clonedChild);\n });\n return clonedSelf;\n }\n\n // Adds or modifies an attribute\n\n // `name` attribute name\n // `value` attribute value\n attribute(name, value) {\n var attName, attValue;\n if (name != null) {\n name = getValue(name);\n }\n if (isObject(name)) { // expand if object\n for (attName in name) {\n if (!hasProp.call(name, attName)) continue;\n attValue = name[attName];\n this.attribute(attName, attValue);\n }\n } else {\n if (isFunction(value)) {\n value = value.apply();\n }\n if (this.options.keepNullAttributes && (value == null)) {\n this.attribs[name] = new XMLAttribute(this, name, \"\");\n } else if (value != null) {\n this.attribs[name] = new XMLAttribute(this, name, value);\n }\n }\n return this;\n }\n\n // Removes an attribute\n\n // `name` attribute name\n removeAttribute(name) {\n var attName, j, len;\n // Also defined in DOM level 1\n // removeAttribute(name) removes an attribute by name.\n if (name == null) {\n throw new Error(\"Missing attribute name. \" + this.debugInfo());\n }\n name = getValue(name);\n if (Array.isArray(name)) { // expand if array\n for (j = 0, len = name.length; j < len; j++) {\n attName = name[j];\n delete this.attribs[attName];\n }\n } else {\n delete this.attribs[name];\n }\n return this;\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n // `options.allowEmpty` do not self close empty element tags\n toString(options) {\n return this.options.writer.element(this, this.options.writer.filterOptions(options));\n }\n\n // Aliases\n att(name, value) {\n return this.attribute(name, value);\n }\n\n a(name, value) {\n return this.attribute(name, value);\n }\n\n // DOM Level 1\n getAttribute(name) {\n if (this.attribs.hasOwnProperty(name)) {\n return this.attribs[name].value;\n } else {\n return null;\n }\n }\n\n setAttribute(name, value) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getAttributeNode(name) {\n if (this.attribs.hasOwnProperty(name)) {\n return this.attribs[name];\n } else {\n return null;\n }\n }\n\n setAttributeNode(newAttr) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n removeAttributeNode(oldAttr) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getElementsByTagName(name) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n // DOM Level 2\n getAttributeNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n setAttributeNS(namespaceURI, qualifiedName, value) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n removeAttributeNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getAttributeNodeNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n setAttributeNodeNS(newAttr) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getElementsByTagNameNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n hasAttribute(name) {\n return this.attribs.hasOwnProperty(name);\n }\n\n hasAttributeNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n // DOM Level 3\n setIdAttribute(name, isId) {\n if (this.attribs.hasOwnProperty(name)) {\n return this.attribs[name].isId;\n } else {\n return isId;\n }\n }\n\n setIdAttributeNS(namespaceURI, localName, isId) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n setIdAttributeNode(idAttr, isId) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n // DOM Level 4\n getElementsByTagName(tagname) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getElementsByTagNameNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getElementsByClassName(classNames) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n isEqualNode(node) {\n var i, j, ref;\n if (!super.isEqualNode(node)) {\n return false;\n }\n if (node.namespaceURI !== this.namespaceURI) {\n return false;\n }\n if (node.prefix !== this.prefix) {\n return false;\n }\n if (node.localName !== this.localName) {\n return false;\n }\n if (node.attribs.length !== this.attribs.length) {\n return false;\n }\n for (i = j = 0, ref = this.attribs.length - 1; (0 <= ref ? j <= ref : j >= ref); i = 0 <= ref ? ++j : --j) {\n if (!this.attribs[i].isEqualNode(node.attribs[i])) {\n return false;\n }\n }\n return true;\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLElement.prototype, 'tagName', {\n get: function() {\n return this.name;\n }\n });\n\n // DOM level 4\n Object.defineProperty(XMLElement.prototype, 'namespaceURI', {\n get: function() {\n return '';\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'prefix', {\n get: function() {\n return '';\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'localName', {\n get: function() {\n return this.name;\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'id', {\n get: function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'className', {\n get: function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'classList', {\n get: function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'attributes', {\n get: function() {\n if (!this.attributeMap || !this.attributeMap.nodes) {\n this.attributeMap = new XMLNamedNodeMap(this.attribs);\n }\n return this.attributeMap;\n }\n });\n\n return XMLElement;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n // Represents a map of nodes accessed by a string key\n var XMLNamedNodeMap;\n\n module.exports = XMLNamedNodeMap = (function() {\n class XMLNamedNodeMap {\n // Initializes a new instance of `XMLNamedNodeMap`\n // This is just a wrapper around an ordinary\n // JS object.\n\n // `nodes` the object containing nodes.\n constructor(nodes) {\n this.nodes = nodes;\n }\n\n // Creates and returns a deep clone of `this`\n\n clone() {\n // this class should not be cloned since it wraps\n // around a given object. The calling function should check\n // whether the wrapped object is null and supply a new object\n // (from the clone).\n return this.nodes = null;\n }\n\n // DOM Level 1\n getNamedItem(name) {\n return this.nodes[name];\n }\n\n setNamedItem(node) {\n var oldNode;\n oldNode = this.nodes[node.nodeName];\n this.nodes[node.nodeName] = node;\n return oldNode || null;\n }\n\n removeNamedItem(name) {\n var oldNode;\n oldNode = this.nodes[name];\n delete this.nodes[name];\n return oldNode || null;\n }\n\n item(index) {\n return this.nodes[Object.keys(this.nodes)[index]] || null;\n }\n\n // DOM level 2 functions to be implemented later\n getNamedItemNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\");\n }\n\n setNamedItemNS(node) {\n throw new Error(\"This DOM method is not implemented.\");\n }\n\n removeNamedItemNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\");\n }\n\n };\n\n \n // DOM level 1\n Object.defineProperty(XMLNamedNodeMap.prototype, 'length', {\n get: function() {\n return Object.keys(this.nodes).length || 0;\n }\n });\n\n return XMLNamedNodeMap;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLCData, XMLCharacterData;\n\n NodeType = require('./NodeType');\n\n XMLCharacterData = require('./XMLCharacterData');\n\n // Represents a CDATA node\n module.exports = XMLCData = class XMLCData extends XMLCharacterData {\n // Initializes a new instance of `XMLCData`\n\n // `text` CDATA text\n constructor(parent, text) {\n super(parent);\n if (text == null) {\n throw new Error(\"Missing CDATA text. \" + this.debugInfo());\n }\n this.name = \"#cdata-section\";\n this.type = NodeType.CData;\n this.value = this.stringify.cdata(text);\n }\n\n // Creates and returns a deep clone of `this`\n clone() {\n return Object.create(this);\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.cdata(this, this.options.writer.filterOptions(options));\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLCharacterData, XMLComment;\n\n NodeType = require('./NodeType');\n\n XMLCharacterData = require('./XMLCharacterData');\n\n // Represents a comment node\n module.exports = XMLComment = class XMLComment extends XMLCharacterData {\n // Initializes a new instance of `XMLComment`\n\n // `text` comment text\n constructor(parent, text) {\n super(parent);\n if (text == null) {\n throw new Error(\"Missing comment text. \" + this.debugInfo());\n }\n this.name = \"#comment\";\n this.type = NodeType.Comment;\n this.value = this.stringify.comment(text);\n }\n\n // Creates and returns a deep clone of `this`\n clone() {\n return Object.create(this);\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.comment(this, this.options.writer.filterOptions(options));\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLDeclaration, XMLNode, isObject;\n\n ({isObject} = require('./Utility'));\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n // Represents the XML declaration\n module.exports = XMLDeclaration = class XMLDeclaration extends XMLNode {\n // Initializes a new instance of `XMLDeclaration`\n\n // `parent` the document object\n\n // `version` A version number string, e.g. 1.0\n // `encoding` Encoding declaration, e.g. UTF-8\n // `standalone` standalone document declaration: true or false\n constructor(parent, version, encoding, standalone) {\n super(parent);\n // arguments may also be passed as an object\n if (isObject(version)) {\n ({version, encoding, standalone} = version);\n }\n if (!version) {\n version = '1.0';\n }\n this.type = NodeType.Declaration;\n this.version = this.stringify.xmlVersion(version);\n if (encoding != null) {\n this.encoding = this.stringify.xmlEncoding(encoding);\n }\n if (standalone != null) {\n this.standalone = this.stringify.xmlStandalone(standalone);\n }\n }\n\n // Converts to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.declaration(this, this.options.writer.filterOptions(options));\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLNamedNodeMap, XMLNode, isObject;\n\n ({isObject} = require('./Utility'));\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n XMLDTDAttList = require('./XMLDTDAttList');\n\n XMLDTDEntity = require('./XMLDTDEntity');\n\n XMLDTDElement = require('./XMLDTDElement');\n\n XMLDTDNotation = require('./XMLDTDNotation');\n\n XMLNamedNodeMap = require('./XMLNamedNodeMap');\n\n // Represents doctype declaration\n module.exports = XMLDocType = (function() {\n class XMLDocType extends XMLNode {\n // Initializes a new instance of `XMLDocType`\n\n // `parent` the document object\n\n // `pubID` public identifier of the external subset\n // `sysID` system identifier of the external subset\n constructor(parent, pubID, sysID) {\n var child, i, len, ref;\n super(parent);\n this.type = NodeType.DocType;\n // set DTD name to the name of the root node\n if (parent.children) {\n ref = parent.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n if (child.type === NodeType.Element) {\n this.name = child.name;\n break;\n }\n }\n }\n this.documentObject = parent;\n // arguments may also be passed as an object\n if (isObject(pubID)) {\n ({pubID, sysID} = pubID);\n }\n if (sysID == null) {\n [sysID, pubID] = [pubID, sysID];\n }\n if (pubID != null) {\n this.pubID = this.stringify.dtdPubID(pubID);\n }\n if (sysID != null) {\n this.sysID = this.stringify.dtdSysID(sysID);\n }\n }\n\n // Creates an element type declaration\n\n // `name` element name\n // `value` element content (defaults to #PCDATA)\n element(name, value) {\n var child;\n child = new XMLDTDElement(this, name, value);\n this.children.push(child);\n return this;\n }\n\n // Creates an attribute declaration\n\n // `elementName` the name of the element containing this attribute\n // `attributeName` attribute name\n // `attributeType` type of the attribute (defaults to CDATA)\n // `defaultValueType` default value type (either #REQUIRED, #IMPLIED, #FIXED or\n // #DEFAULT) (defaults to #IMPLIED)\n // `defaultValue` default value of the attribute\n // (only used for #FIXED or #DEFAULT)\n attList(elementName, attributeName, attributeType, defaultValueType, defaultValue) {\n var child;\n child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue);\n this.children.push(child);\n return this;\n }\n\n // Creates a general entity declaration\n\n // `name` the name of the entity\n // `value` internal entity value or an object with external entity details\n // `value.pubID` public identifier\n // `value.sysID` system identifier\n // `value.nData` notation declaration\n entity(name, value) {\n var child;\n child = new XMLDTDEntity(this, false, name, value);\n this.children.push(child);\n return this;\n }\n\n // Creates a parameter entity declaration\n\n // `name` the name of the entity\n // `value` internal entity value or an object with external entity details\n // `value.pubID` public identifier\n // `value.sysID` system identifier\n pEntity(name, value) {\n var child;\n child = new XMLDTDEntity(this, true, name, value);\n this.children.push(child);\n return this;\n }\n\n // Creates a NOTATION declaration\n\n // `name` the name of the notation\n // `value` an object with external entity details\n // `value.pubID` public identifier\n // `value.sysID` system identifier\n notation(name, value) {\n var child;\n child = new XMLDTDNotation(this, name, value);\n this.children.push(child);\n return this;\n }\n\n // Converts to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.docType(this, this.options.writer.filterOptions(options));\n }\n\n // Aliases\n ele(name, value) {\n return this.element(name, value);\n }\n\n att(elementName, attributeName, attributeType, defaultValueType, defaultValue) {\n return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue);\n }\n\n ent(name, value) {\n return this.entity(name, value);\n }\n\n pent(name, value) {\n return this.pEntity(name, value);\n }\n\n not(name, value) {\n return this.notation(name, value);\n }\n\n up() {\n return this.root() || this.documentObject;\n }\n\n isEqualNode(node) {\n if (!super.isEqualNode(node)) {\n return false;\n }\n if (node.name !== this.name) {\n return false;\n }\n if (node.publicId !== this.publicId) {\n return false;\n }\n if (node.systemId !== this.systemId) {\n return false;\n }\n return true;\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLDocType.prototype, 'entities', {\n get: function() {\n var child, i, len, nodes, ref;\n nodes = {};\n ref = this.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n if ((child.type === NodeType.EntityDeclaration) && !child.pe) {\n nodes[child.name] = child;\n }\n }\n return new XMLNamedNodeMap(nodes);\n }\n });\n\n Object.defineProperty(XMLDocType.prototype, 'notations', {\n get: function() {\n var child, i, len, nodes, ref;\n nodes = {};\n ref = this.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n if (child.type === NodeType.NotationDeclaration) {\n nodes[child.name] = child;\n }\n }\n return new XMLNamedNodeMap(nodes);\n }\n });\n\n // DOM level 2\n Object.defineProperty(XMLDocType.prototype, 'publicId', {\n get: function() {\n return this.pubID;\n }\n });\n\n Object.defineProperty(XMLDocType.prototype, 'systemId', {\n get: function() {\n return this.sysID;\n }\n });\n\n Object.defineProperty(XMLDocType.prototype, 'internalSubset', {\n get: function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n return XMLDocType;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLDTDAttList, XMLNode;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n // Represents an attribute list\n module.exports = XMLDTDAttList = class XMLDTDAttList extends XMLNode {\n // Initializes a new instance of `XMLDTDAttList`\n\n // `parent` the parent `XMLDocType` element\n // `elementName` the name of the element containing this attribute\n // `attributeName` attribute name\n // `attributeType` type of the attribute\n // `defaultValueType` default value type (either #REQUIRED, #IMPLIED,\n // #FIXED or #DEFAULT)\n // `defaultValue` default value of the attribute\n // (only used for #FIXED or #DEFAULT)\n constructor(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) {\n super(parent);\n if (elementName == null) {\n throw new Error(\"Missing DTD element name. \" + this.debugInfo());\n }\n if (attributeName == null) {\n throw new Error(\"Missing DTD attribute name. \" + this.debugInfo(elementName));\n }\n if (!attributeType) {\n throw new Error(\"Missing DTD attribute type. \" + this.debugInfo(elementName));\n }\n if (!defaultValueType) {\n throw new Error(\"Missing DTD attribute default. \" + this.debugInfo(elementName));\n }\n if (defaultValueType.indexOf('#') !== 0) {\n defaultValueType = '#' + defaultValueType;\n }\n if (!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) {\n throw new Error(\"Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. \" + this.debugInfo(elementName));\n }\n if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) {\n throw new Error(\"Default value only applies to #FIXED or #DEFAULT. \" + this.debugInfo(elementName));\n }\n this.elementName = this.stringify.name(elementName);\n this.type = NodeType.AttributeDeclaration;\n this.attributeName = this.stringify.name(attributeName);\n this.attributeType = this.stringify.dtdAttType(attributeType);\n if (defaultValue) {\n this.defaultValue = this.stringify.dtdAttDefault(defaultValue);\n }\n this.defaultValueType = defaultValueType;\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.dtdAttList(this, this.options.writer.filterOptions(options));\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLDTDEntity, XMLNode, isObject;\n\n ({isObject} = require('./Utility'));\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n // Represents an entity declaration in the DTD\n module.exports = XMLDTDEntity = (function() {\n class XMLDTDEntity extends XMLNode {\n // Initializes a new instance of `XMLDTDEntity`\n\n // `parent` the parent `XMLDocType` element\n // `pe` whether this is a parameter entity or a general entity\n // defaults to `false` (general entity)\n // `name` the name of the entity\n // `value` internal entity value or an object with external entity details\n // `value.pubID` public identifier\n // `value.sysID` system identifier\n // `value.nData` notation declaration\n constructor(parent, pe, name, value) {\n super(parent);\n if (name == null) {\n throw new Error(\"Missing DTD entity name. \" + this.debugInfo(name));\n }\n if (value == null) {\n throw new Error(\"Missing DTD entity value. \" + this.debugInfo(name));\n }\n this.pe = !!pe;\n this.name = this.stringify.name(name);\n this.type = NodeType.EntityDeclaration;\n if (!isObject(value)) {\n this.value = this.stringify.dtdEntityValue(value);\n this.internal = true;\n } else {\n if (!value.pubID && !value.sysID) {\n throw new Error(\"Public and/or system identifiers are required for an external entity. \" + this.debugInfo(name));\n }\n if (value.pubID && !value.sysID) {\n throw new Error(\"System identifier is required for a public external entity. \" + this.debugInfo(name));\n }\n this.internal = false;\n if (value.pubID != null) {\n this.pubID = this.stringify.dtdPubID(value.pubID);\n }\n if (value.sysID != null) {\n this.sysID = this.stringify.dtdSysID(value.sysID);\n }\n if (value.nData != null) {\n this.nData = this.stringify.dtdNData(value.nData);\n }\n if (this.pe && this.nData) {\n throw new Error(\"Notation declaration is not allowed in a parameter entity. \" + this.debugInfo(name));\n }\n }\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.dtdEntity(this, this.options.writer.filterOptions(options));\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLDTDEntity.prototype, 'publicId', {\n get: function() {\n return this.pubID;\n }\n });\n\n Object.defineProperty(XMLDTDEntity.prototype, 'systemId', {\n get: function() {\n return this.sysID;\n }\n });\n\n Object.defineProperty(XMLDTDEntity.prototype, 'notationName', {\n get: function() {\n return this.nData || null;\n }\n });\n\n // DOM level 3\n Object.defineProperty(XMLDTDEntity.prototype, 'inputEncoding', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDTDEntity.prototype, 'xmlEncoding', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDTDEntity.prototype, 'xmlVersion', {\n get: function() {\n return null;\n }\n });\n\n return XMLDTDEntity;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLDTDElement, XMLNode;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n // Represents an attribute\n module.exports = XMLDTDElement = class XMLDTDElement extends XMLNode {\n // Initializes a new instance of `XMLDTDElement`\n\n // `parent` the parent `XMLDocType` element\n // `name` element name\n // `value` element content (defaults to #PCDATA)\n constructor(parent, name, value) {\n super(parent);\n if (name == null) {\n throw new Error(\"Missing DTD element name. \" + this.debugInfo());\n }\n if (!value) {\n value = '(#PCDATA)';\n }\n if (Array.isArray(value)) {\n value = '(' + value.join(',') + ')';\n }\n this.name = this.stringify.name(name);\n this.type = NodeType.ElementDeclaration;\n this.value = this.stringify.dtdElementValue(value);\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.dtdElement(this, this.options.writer.filterOptions(options));\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLDTDNotation, XMLNode;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n // Represents a NOTATION entry in the DTD\n module.exports = XMLDTDNotation = (function() {\n class XMLDTDNotation extends XMLNode {\n // Initializes a new instance of `XMLDTDNotation`\n\n // `parent` the parent `XMLDocType` element\n // `name` the name of the notation\n // `value` an object with external entity details\n // `value.pubID` public identifier\n // `value.sysID` system identifier\n constructor(parent, name, value) {\n super(parent);\n if (name == null) {\n throw new Error(\"Missing DTD notation name. \" + this.debugInfo(name));\n }\n if (!value.pubID && !value.sysID) {\n throw new Error(\"Public or system identifiers are required for an external entity. \" + this.debugInfo(name));\n }\n this.name = this.stringify.name(name);\n this.type = NodeType.NotationDeclaration;\n if (value.pubID != null) {\n this.pubID = this.stringify.dtdPubID(value.pubID);\n }\n if (value.sysID != null) {\n this.sysID = this.stringify.dtdSysID(value.sysID);\n }\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.dtdNotation(this, this.options.writer.filterOptions(options));\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLDTDNotation.prototype, 'publicId', {\n get: function() {\n return this.pubID;\n }\n });\n\n Object.defineProperty(XMLDTDNotation.prototype, 'systemId', {\n get: function() {\n return this.sysID;\n }\n });\n\n return XMLDTDNotation;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLNode, XMLRaw;\n\n NodeType = require('./NodeType');\n\n XMLNode = require('./XMLNode');\n\n // Represents a raw node\n module.exports = XMLRaw = class XMLRaw extends XMLNode {\n // Initializes a new instance of `XMLRaw`\n\n // `text` raw text\n constructor(parent, text) {\n super(parent);\n if (text == null) {\n throw new Error(\"Missing raw text. \" + this.debugInfo());\n }\n this.type = NodeType.Raw;\n this.value = this.stringify.raw(text);\n }\n\n // Creates and returns a deep clone of `this`\n clone() {\n return Object.create(this);\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.raw(this, this.options.writer.filterOptions(options));\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLCharacterData, XMLText;\n\n NodeType = require('./NodeType');\n\n XMLCharacterData = require('./XMLCharacterData');\n\n // Represents a text node\n module.exports = XMLText = (function() {\n class XMLText extends XMLCharacterData {\n // Initializes a new instance of `XMLText`\n\n // `text` element text\n constructor(parent, text) {\n super(parent);\n if (text == null) {\n throw new Error(\"Missing element text. \" + this.debugInfo());\n }\n this.name = \"#text\";\n this.type = NodeType.Text;\n this.value = this.stringify.text(text);\n }\n\n // Creates and returns a deep clone of `this`\n clone() {\n return Object.create(this);\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.text(this, this.options.writer.filterOptions(options));\n }\n\n // DOM level 1 functions to be implemented later\n splitText(offset) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n // DOM level 3 functions to be implemented later\n replaceWholeText(content) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n };\n\n // DOM level 3\n Object.defineProperty(XMLText.prototype, 'isElementContentWhitespace', {\n get: function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n Object.defineProperty(XMLText.prototype, 'wholeText', {\n get: function() {\n var next, prev, str;\n str = '';\n prev = this.previousSibling;\n while (prev) {\n str = prev.data + str;\n prev = prev.previousSibling;\n }\n str += this.data;\n next = this.nextSibling;\n while (next) {\n str = str + next.data;\n next = next.nextSibling;\n }\n return str;\n }\n });\n\n return XMLText;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLCharacterData, XMLProcessingInstruction;\n\n NodeType = require('./NodeType');\n\n XMLCharacterData = require('./XMLCharacterData');\n\n // Represents a processing instruction\n module.exports = XMLProcessingInstruction = class XMLProcessingInstruction extends XMLCharacterData {\n // Initializes a new instance of `XMLProcessingInstruction`\n\n // `parent` the parent node\n // `target` instruction target\n // `value` instruction value\n constructor(parent, target, value) {\n super(parent);\n if (target == null) {\n throw new Error(\"Missing instruction target. \" + this.debugInfo());\n }\n this.type = NodeType.ProcessingInstruction;\n this.target = this.stringify.insTarget(target);\n this.name = this.target;\n if (value) {\n this.value = this.stringify.insValue(value);\n }\n }\n\n // Creates and returns a deep clone of `this`\n clone() {\n return Object.create(this);\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.processingInstruction(this, this.options.writer.filterOptions(options));\n }\n\n isEqualNode(node) {\n if (!super.isEqualNode(node)) {\n return false;\n }\n if (node.target !== this.target) {\n return false;\n }\n return true;\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var XMLStringWriter, XMLWriterBase;\n\n XMLWriterBase = require('./XMLWriterBase');\n\n // Prints XML nodes as plain text\n module.exports = XMLStringWriter = class XMLStringWriter extends XMLWriterBase {\n // Initializes a new instance of `XMLStringWriter`\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation string\n // `options.newline` newline sequence\n // `options.offset` a fixed number of indentations to add to every line\n // `options.allowEmpty` do not self close empty element tags\n // 'options.dontPrettyTextNodes' if any text is present in node, don't indent or LF\n // `options.spaceBeforeSlash` add a space before the closing slash of empty elements\n constructor(options) {\n super(options);\n }\n\n document(doc, options) {\n var child, i, len, r, ref;\n options = this.filterOptions(options);\n r = '';\n ref = doc.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n r += this.writeChildNode(child, options, 0);\n }\n // remove trailing newline\n if (options.pretty && r.slice(-options.newline.length) === options.newline) {\n r = r.slice(0, -options.newline.length);\n }\n return r;\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n // Implements the DOMImplementation interface\n var XMLDOMImplementation;\n\n module.exports = XMLDOMImplementation = class XMLDOMImplementation {\n // Tests if the DOM implementation implements a specific feature.\n\n // `feature` package name of the feature to test. In Level 1, the\n // legal values are \"HTML\" and \"XML\" (case-insensitive).\n // `version` version number of the package name to test. \n // In Level 1, this is the string \"1.0\". If the version is \n // not specified, supporting any version of the feature will \n // cause the method to return true.\n hasFeature(feature, version) {\n return true;\n }\n\n // Creates a new document type declaration.\n\n // `qualifiedName` qualified name of the document type to be created\n // `publicId` public identifier of the external subset\n // `systemId` system identifier of the external subset\n createDocumentType(qualifiedName, publicId, systemId) {\n throw new Error(\"This DOM method is not implemented.\");\n }\n\n // Creates a new document.\n\n // `namespaceURI` namespace URI of the document element to create\n // `qualifiedName` the qualified name of the document to be created\n // `doctype` the type of document to be created or null\n createDocument(namespaceURI, qualifiedName, doctype) {\n throw new Error(\"This DOM method is not implemented.\");\n }\n\n // Creates a new HTML document.\n\n // `title` document title\n createHTMLDocument(title) {\n throw new Error(\"This DOM method is not implemented.\");\n }\n\n // Returns a specialized object which implements the specialized APIs \n // of the specified feature and version.\n\n // `feature` name of the feature requested.\n // `version` version number of the feature to test\n getFeature(feature, version) {\n throw new Error(\"This DOM method is not implemented.\");\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLDOMConfiguration, XMLDOMImplementation, XMLDocument, XMLNode, XMLStringWriter, XMLStringifier, isPlainObject;\n\n ({isPlainObject} = require('./Utility'));\n\n XMLDOMImplementation = require('./XMLDOMImplementation');\n\n XMLDOMConfiguration = require('./XMLDOMConfiguration');\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n XMLStringifier = require('./XMLStringifier');\n\n XMLStringWriter = require('./XMLStringWriter');\n\n // Represents an XML builder\n module.exports = XMLDocument = (function() {\n class XMLDocument extends XMLNode {\n // Initializes a new instance of `XMLDocument`\n\n // `options.keepNullNodes` whether nodes with null values will be kept\n // or ignored: true or false\n // `options.keepNullAttributes` whether attributes with null values will be\n // kept or ignored: true or false\n // `options.ignoreDecorators` whether decorator strings will be ignored when\n // converting JS objects: true or false\n // `options.separateArrayItems` whether array items are created as separate\n // nodes when passed as an object value: true or false\n // `options.noDoubleEncoding` whether existing html entities are encoded:\n // true or false\n // `options.stringify` a set of functions to use for converting values to\n // strings\n // `options.writer` the default XML writer to use for converting nodes to\n // string. If the default writer is not set, the built-in XMLStringWriter\n // will be used instead.\n constructor(options) {\n super(null);\n this.name = \"#document\";\n this.type = NodeType.Document;\n this.documentURI = null;\n this.domConfig = new XMLDOMConfiguration();\n options || (options = {});\n if (!options.writer) {\n options.writer = new XMLStringWriter();\n }\n this.options = options;\n this.stringify = new XMLStringifier(options);\n }\n\n // Ends the document and passes it to the given XML writer\n\n // `writer` is either an XML writer or a plain object to pass to the\n // constructor of the default XML writer. The default writer is assigned when\n // creating the XML document. Following flags are recognized by the\n // built-in XMLStringWriter:\n // `writer.pretty` pretty prints the result\n // `writer.indent` indentation for pretty print\n // `writer.offset` how many indentations to add to every line for pretty print\n // `writer.newline` newline sequence for pretty print\n end(writer) {\n var writerOptions;\n writerOptions = {};\n if (!writer) {\n writer = this.options.writer;\n } else if (isPlainObject(writer)) {\n writerOptions = writer;\n writer = this.options.writer;\n }\n return writer.document(this, writer.filterOptions(writerOptions));\n }\n\n // Converts the XML document to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.document(this, this.options.writer.filterOptions(options));\n }\n\n // DOM level 1 functions to be implemented later\n createElement(tagName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createDocumentFragment() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createTextNode(data) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createComment(data) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createCDATASection(data) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createProcessingInstruction(target, data) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createAttribute(name) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createEntityReference(name) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getElementsByTagName(tagname) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n // DOM level 2 functions to be implemented later\n importNode(importedNode, deep) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createElementNS(namespaceURI, qualifiedName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createAttributeNS(namespaceURI, qualifiedName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getElementsByTagNameNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getElementById(elementId) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n // DOM level 3 functions to be implemented later\n adoptNode(source) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n normalizeDocument() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n renameNode(node, namespaceURI, qualifiedName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n // DOM level 4 functions to be implemented later\n getElementsByClassName(classNames) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createEvent(eventInterface) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createRange() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createNodeIterator(root, whatToShow, filter) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createTreeWalker(root, whatToShow, filter) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLDocument.prototype, 'implementation', {\n value: new XMLDOMImplementation()\n });\n\n Object.defineProperty(XMLDocument.prototype, 'doctype', {\n get: function() {\n var child, i, len, ref;\n ref = this.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n if (child.type === NodeType.DocType) {\n return child;\n }\n }\n return null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'documentElement', {\n get: function() {\n return this.rootObject || null;\n }\n });\n\n // DOM level 3\n Object.defineProperty(XMLDocument.prototype, 'inputEncoding', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'strictErrorChecking', {\n get: function() {\n return false;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'xmlEncoding', {\n get: function() {\n if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {\n return this.children[0].encoding;\n } else {\n return null;\n }\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'xmlStandalone', {\n get: function() {\n if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {\n return this.children[0].standalone === 'yes';\n } else {\n return false;\n }\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'xmlVersion', {\n get: function() {\n if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {\n return this.children[0].version;\n } else {\n return \"1.0\";\n }\n }\n });\n\n // DOM level 4\n Object.defineProperty(XMLDocument.prototype, 'URL', {\n get: function() {\n return this.documentURI;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'origin', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'compatMode', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'characterSet', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'contentType', {\n get: function() {\n return null;\n }\n });\n\n return XMLDocument;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLAttribute, XMLNode;\n\n NodeType = require('./NodeType');\n\n XMLNode = require('./XMLNode');\n\n // Represents an attribute\n module.exports = XMLAttribute = (function() {\n class XMLAttribute {\n // Initializes a new instance of `XMLAttribute`\n\n // `parent` the parent node\n // `name` attribute target\n // `value` attribute value\n constructor(parent, name, value) {\n this.parent = parent;\n if (this.parent) {\n this.options = this.parent.options;\n this.stringify = this.parent.stringify;\n }\n if (name == null) {\n throw new Error(\"Missing attribute name. \" + this.debugInfo(name));\n }\n this.name = this.stringify.name(name);\n this.value = this.stringify.attValue(value);\n this.type = NodeType.Attribute;\n // DOM level 3\n this.isId = false;\n this.schemaTypeInfo = null;\n }\n\n // Creates and returns a deep clone of `this`\n clone() {\n return Object.create(this);\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.attribute(this, this.options.writer.filterOptions(options));\n }\n\n \n // Returns debug string for this node\n debugInfo(name) {\n name = name || this.name;\n if (name == null) {\n return \"parent: <\" + this.parent.name + \">\";\n } else {\n return \"attribute: {\" + name + \"}, parent: <\" + this.parent.name + \">\";\n }\n }\n\n isEqualNode(node) {\n if (node.namespaceURI !== this.namespaceURI) {\n return false;\n }\n if (node.prefix !== this.prefix) {\n return false;\n }\n if (node.localName !== this.localName) {\n return false;\n }\n if (node.value !== this.value) {\n return false;\n }\n return true;\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLAttribute.prototype, 'nodeType', {\n get: function() {\n return this.type;\n }\n });\n\n Object.defineProperty(XMLAttribute.prototype, 'ownerElement', {\n get: function() {\n return this.parent;\n }\n });\n\n // DOM level 3\n Object.defineProperty(XMLAttribute.prototype, 'textContent', {\n get: function() {\n return this.value;\n },\n set: function(value) {\n return this.value = value || '';\n }\n });\n\n // DOM level 4\n Object.defineProperty(XMLAttribute.prototype, 'namespaceURI', {\n get: function() {\n return '';\n }\n });\n\n Object.defineProperty(XMLAttribute.prototype, 'prefix', {\n get: function() {\n return '';\n }\n });\n\n Object.defineProperty(XMLAttribute.prototype, 'localName', {\n get: function() {\n return this.name;\n }\n });\n\n Object.defineProperty(XMLAttribute.prototype, 'specified', {\n get: function() {\n return true;\n }\n });\n\n return XMLAttribute;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLDummy, XMLNode;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n // Represents a raw node\n module.exports = XMLDummy = class XMLDummy extends XMLNode {\n // Initializes a new instance of `XMLDummy`\n\n // `XMLDummy` is a special node representing a node with \n // a null value. Dummy nodes are created while recursively\n // building the XML tree. Simply skipping null values doesn't\n // work because that would break the recursive chain.\n constructor(parent) {\n super(parent);\n this.type = NodeType.Dummy;\n }\n\n // Creates and returns a deep clone of `this`\n clone() {\n return Object.create(this);\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return '';\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n // Converts values to strings\n var XMLStringifier,\n hasProp = {}.hasOwnProperty;\n\n module.exports = XMLStringifier = (function() {\n class XMLStringifier {\n // Initializes a new instance of `XMLStringifier`\n\n // `options.version` The version number string of the XML spec to validate against, e.g. 1.0\n // `options.noDoubleEncoding` whether existing html entities are encoded: true or false\n // `options.stringify` a set of functions to use for converting values to strings\n // `options.noValidation` whether values will be validated and escaped or returned as is\n constructor(options) {\n var key, ref, value;\n // Checks whether the given string contains legal characters\n // Fails with an exception on error\n\n // `str` the string to check\n this.assertLegalChar = this.assertLegalChar.bind(this);\n // Checks whether the given string contains legal characters for a name\n // Fails with an exception on error\n\n // `str` the string to check\n this.assertLegalName = this.assertLegalName.bind(this);\n options || (options = {});\n this.options = options;\n if (!this.options.version) {\n this.options.version = '1.0';\n }\n ref = options.stringify || {};\n for (key in ref) {\n if (!hasProp.call(ref, key)) continue;\n value = ref[key];\n this[key] = value;\n }\n }\n\n // Defaults\n name(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalName('' + val || '');\n }\n\n text(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar(this.textEscape('' + val || ''));\n }\n\n cdata(val) {\n if (this.options.noValidation) {\n return val;\n }\n val = '' + val || '';\n val = val.replace(']]>', ']]]]>');\n return this.assertLegalChar(val);\n }\n\n comment(val) {\n if (this.options.noValidation) {\n return val;\n }\n val = '' + val || '';\n if (val.match(/--/)) {\n throw new Error(\"Comment text cannot contain double-hypen: \" + val);\n }\n return this.assertLegalChar(val);\n }\n\n raw(val) {\n if (this.options.noValidation) {\n return val;\n }\n return '' + val || '';\n }\n\n attValue(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar(this.attEscape(val = '' + val || ''));\n }\n\n insTarget(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n }\n\n insValue(val) {\n if (this.options.noValidation) {\n return val;\n }\n val = '' + val || '';\n if (val.match(/\\?>/)) {\n throw new Error(\"Invalid processing instruction value: \" + val);\n }\n return this.assertLegalChar(val);\n }\n\n xmlVersion(val) {\n if (this.options.noValidation) {\n return val;\n }\n val = '' + val || '';\n if (!val.match(/1\\.[0-9]+/)) {\n throw new Error(\"Invalid version number: \" + val);\n }\n return val;\n }\n\n xmlEncoding(val) {\n if (this.options.noValidation) {\n return val;\n }\n val = '' + val || '';\n if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)) {\n throw new Error(\"Invalid encoding: \" + val);\n }\n return this.assertLegalChar(val);\n }\n\n xmlStandalone(val) {\n if (this.options.noValidation) {\n return val;\n }\n if (val) {\n return \"yes\";\n } else {\n return \"no\";\n }\n }\n\n dtdPubID(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n }\n\n dtdSysID(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n }\n\n dtdElementValue(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n }\n\n dtdAttType(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n }\n\n dtdAttDefault(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n }\n\n dtdEntityValue(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n }\n\n dtdNData(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n }\n\n assertLegalChar(str) {\n var regex, res;\n if (this.options.noValidation) {\n return str;\n }\n regex = '';\n if (this.options.version === '1.0') {\n // Valid characters from https://www.w3.org/TR/xml/#charsets\n // any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.\n // #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]\n // This ES5 compatible Regexp has been generated using the \"regenerate\" NPM module:\n // let xml_10_InvalidChars = regenerate()\n // .addRange(0x0000, 0x0008)\n // .add(0x000B, 0x000C)\n // .addRange(0x000E, 0x001F)\n // .addRange(0xD800, 0xDFFF)\n // .addRange(0xFFFE, 0xFFFF)\n regex = /[\\0-\\x08\\x0B\\f\\x0E-\\x1F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/;\n if (res = str.match(regex)) {\n throw new Error(`Invalid character in string: ${str} at index ${res.index}`);\n }\n } else if (this.options.version === '1.1') {\n // Valid characters from https://www.w3.org/TR/xml11/#charsets\n // any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.\n // [#x1-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]\n // This ES5 compatible Regexp has been generated using the \"regenerate\" NPM module:\n // let xml_11_InvalidChars = regenerate()\n // .add(0x0000)\n // .addRange(0xD800, 0xDFFF)\n // .addRange(0xFFFE, 0xFFFF)\n regex = /[\\0\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/;\n if (res = str.match(regex)) {\n throw new Error(`Invalid character in string: ${str} at index ${res.index}`);\n }\n }\n return str;\n }\n\n assertLegalName(str) {\n var regex;\n if (this.options.noValidation) {\n return str;\n }\n this.assertLegalChar(str);\n regex = /^([:A-Z_a-z\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|[\\uD800-\\uDB7F][\\uDC00-\\uDFFF])([\\x2D\\.0-:A-Z_a-z\\xB7\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u037D\\u037F-\\u1FFF\\u200C\\u200D\\u203F\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|[\\uD800-\\uDB7F][\\uDC00-\\uDFFF])*$/;\n if (!str.match(regex)) {\n throw new Error(\"Invalid character in name\");\n }\n return str;\n }\n\n // Escapes special characters in text\n\n // See http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping\n\n // `str` the string to escape\n textEscape(str) {\n var ampregex;\n if (this.options.noValidation) {\n return str;\n }\n ampregex = this.options.noDoubleEncoding ? /(?!&\\S+;)&/g : /&/g;\n return str.replace(ampregex, '&').replace(//g, '>').replace(/\\r/g, ' ');\n }\n\n // Escapes special characters in attribute values\n\n // See http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping\n\n // `str` the string to escape\n attEscape(str) {\n var ampregex;\n if (this.options.noValidation) {\n return str;\n }\n ampregex = this.options.noDoubleEncoding ? /(?!&\\S+;)&/g : /&/g;\n return str.replace(ampregex, '&').replace(/ 0) {\n return new Array(indentLevel).join(options.indent);\n }\n }\n return '';\n }\n\n // Returns the newline string\n\n // `node` current node\n // `options` writer options\n // `level` current indentation level\n endline(node, options, level) {\n if (!options.pretty || options.suppressPrettyCount) {\n return '';\n } else {\n return options.newline;\n }\n }\n\n attribute(att, options, level) {\n var r;\n this.openAttribute(att, options, level);\n if (options.pretty && options.width > 0) {\n r = att.name + '=\"' + att.value + '\"';\n } else {\n r = ' ' + att.name + '=\"' + att.value + '\"';\n }\n this.closeAttribute(att, options, level);\n return r;\n }\n\n cdata(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n comment(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n declaration(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '';\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n docType(node, options, level) {\n var child, i, len1, r, ref;\n level || (level = 0);\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level);\n r += ' 0) {\n r += ' [';\n r += this.endline(node, options, level);\n options.state = WriterState.InsideTag;\n ref = node.children;\n for (i = 0, len1 = ref.length; i < len1; i++) {\n child = ref[i];\n r += this.writeChildNode(child, options, level + 1);\n }\n options.state = WriterState.CloseTag;\n r += ']';\n }\n // close tag\n options.state = WriterState.CloseTag;\n r += options.spaceBeforeSlash + '>';\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n element(node, options, level) {\n var att, attLen, child, childNodeCount, firstChildNode, i, j, len, len1, len2, name, prettySuppressed, r, ratt, ref, ref1, ref2, ref3, rline;\n level || (level = 0);\n prettySuppressed = false;\n // open tag\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '<' + node.name;\n // attributes\n if (options.pretty && options.width > 0) {\n len = r.length;\n ref = node.attribs;\n for (name in ref) {\n if (!hasProp.call(ref, name)) continue;\n att = ref[name];\n ratt = this.attribute(att, options, level);\n attLen = ratt.length;\n if (len + attLen > options.width) {\n rline = this.indent(node, options, level + 1) + ratt;\n r += this.endline(node, options, level) + rline;\n len = rline.length;\n } else {\n rline = ' ' + ratt;\n r += rline;\n len += rline.length;\n }\n }\n } else {\n ref1 = node.attribs;\n for (name in ref1) {\n if (!hasProp.call(ref1, name)) continue;\n att = ref1[name];\n r += this.attribute(att, options, level);\n }\n }\n childNodeCount = node.children.length;\n firstChildNode = childNodeCount === 0 ? null : node.children[0];\n if (childNodeCount === 0 || node.children.every(function(e) {\n return (e.type === NodeType.Text || e.type === NodeType.Raw) && e.value === '';\n })) {\n // empty element\n if (options.allowEmpty) {\n r += '>';\n options.state = WriterState.CloseTag;\n r += '' + this.endline(node, options, level);\n } else {\n options.state = WriterState.CloseTag;\n r += options.spaceBeforeSlash + '/>' + this.endline(node, options, level);\n }\n } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw) && (firstChildNode.value != null)) {\n // do not indent text-only nodes\n r += '>';\n options.state = WriterState.InsideTag;\n options.suppressPrettyCount++;\n prettySuppressed = true;\n r += this.writeChildNode(firstChildNode, options, level + 1);\n options.suppressPrettyCount--;\n prettySuppressed = false;\n options.state = WriterState.CloseTag;\n r += '' + this.endline(node, options, level);\n } else {\n // if ANY are a text node, then suppress pretty now\n if (options.dontPrettyTextNodes) {\n ref2 = node.children;\n for (i = 0, len1 = ref2.length; i < len1; i++) {\n child = ref2[i];\n if ((child.type === NodeType.Text || child.type === NodeType.Raw) && (child.value != null)) {\n options.suppressPrettyCount++;\n prettySuppressed = true;\n break;\n }\n }\n }\n // close the opening tag, after dealing with newline\n r += '>' + this.endline(node, options, level);\n options.state = WriterState.InsideTag;\n ref3 = node.children;\n // inner tags\n for (j = 0, len2 = ref3.length; j < len2; j++) {\n child = ref3[j];\n r += this.writeChildNode(child, options, level + 1);\n }\n // close tag\n options.state = WriterState.CloseTag;\n r += this.indent(node, options, level) + '';\n if (prettySuppressed) {\n options.suppressPrettyCount--;\n }\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n }\n this.closeNode(node, options, level);\n return r;\n }\n\n writeChildNode(node, options, level) {\n switch (node.type) {\n case NodeType.CData:\n return this.cdata(node, options, level);\n case NodeType.Comment:\n return this.comment(node, options, level);\n case NodeType.Element:\n return this.element(node, options, level);\n case NodeType.Raw:\n return this.raw(node, options, level);\n case NodeType.Text:\n return this.text(node, options, level);\n case NodeType.ProcessingInstruction:\n return this.processingInstruction(node, options, level);\n case NodeType.Dummy:\n return '';\n case NodeType.Declaration:\n return this.declaration(node, options, level);\n case NodeType.DocType:\n return this.docType(node, options, level);\n case NodeType.AttributeDeclaration:\n return this.dtdAttList(node, options, level);\n case NodeType.ElementDeclaration:\n return this.dtdElement(node, options, level);\n case NodeType.EntityDeclaration:\n return this.dtdEntity(node, options, level);\n case NodeType.NotationDeclaration:\n return this.dtdNotation(node, options, level);\n default:\n throw new Error(\"Unknown XML node type: \" + node.constructor.name);\n }\n }\n\n processingInstruction(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '';\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n raw(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level);\n options.state = WriterState.InsideTag;\n r += node.value;\n options.state = WriterState.CloseTag;\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n text(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level);\n options.state = WriterState.InsideTag;\n r += node.value;\n options.state = WriterState.CloseTag;\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n dtdAttList(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n dtdElement(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n dtdEntity(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n dtdNotation(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n openNode(node, options, level) {}\n\n closeNode(node, options, level) {}\n\n openAttribute(att, options, level) {}\n\n closeAttribute(att, options, level) {}\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, WriterState, XMLDOMImplementation, XMLDocument, XMLDocumentCB, XMLStreamWriter, XMLStringWriter, assign, isFunction;\n\n ({assign, isFunction} = require('./Utility'));\n\n XMLDOMImplementation = require('./XMLDOMImplementation');\n\n XMLDocument = require('./XMLDocument');\n\n XMLDocumentCB = require('./XMLDocumentCB');\n\n XMLStringWriter = require('./XMLStringWriter');\n\n XMLStreamWriter = require('./XMLStreamWriter');\n\n NodeType = require('./NodeType');\n\n WriterState = require('./WriterState');\n\n // Creates a new document and returns the root node for\n // chain-building the document tree\n\n // `name` name of the root element\n\n // `xmldec.version` A version number string, e.g. 1.0\n // `xmldec.encoding` Encoding declaration, e.g. UTF-8\n // `xmldec.standalone` standalone document declaration: true or false\n\n // `doctype.pubID` public identifier of the external subset\n // `doctype.sysID` system identifier of the external subset\n\n // `options.headless` whether XML declaration and doctype will be included:\n // true or false\n // `options.keepNullNodes` whether nodes with null values will be kept\n // or ignored: true or false\n // `options.keepNullAttributes` whether attributes with null values will be\n // kept or ignored: true or false\n // `options.ignoreDecorators` whether decorator strings will be ignored when\n // converting JS objects: true or false\n // `options.separateArrayItems` whether array items are created as separate\n // nodes when passed as an object value: true or false\n // `options.noDoubleEncoding` whether existing html entities are encoded:\n // true or false\n // `options.stringify` a set of functions to use for converting values to\n // strings\n // `options.writer` the default XML writer to use for converting nodes to\n // string. If the default writer is not set, the built-in XMLStringWriter\n // will be used instead.\n module.exports.create = function(name, xmldec, doctype, options) {\n var doc, root;\n if (name == null) {\n throw new Error(\"Root element needs a name.\");\n }\n options = assign({}, xmldec, doctype, options);\n // create the document node\n doc = new XMLDocument(options);\n // add the root node\n root = doc.element(name);\n // prolog\n if (!options.headless) {\n doc.declaration(options);\n if ((options.pubID != null) || (options.sysID != null)) {\n doc.dtd(options);\n }\n }\n return root;\n };\n\n // Creates a new document and returns the document node for\n // chain-building the document tree\n\n // `options.keepNullNodes` whether nodes with null values will be kept\n // or ignored: true or false\n // `options.keepNullAttributes` whether attributes with null values will be\n // kept or ignored: true or false\n // `options.ignoreDecorators` whether decorator strings will be ignored when\n // converting JS objects: true or false\n // `options.separateArrayItems` whether array items are created as separate\n // nodes when passed as an object value: true or false\n // `options.noDoubleEncoding` whether existing html entities are encoded:\n // true or false\n // `options.stringify` a set of functions to use for converting values to\n // strings\n // `options.writer` the default XML writer to use for converting nodes to\n // string. If the default writer is not set, the built-in XMLStringWriter\n // will be used instead.\n\n // `onData` the function to be called when a new chunk of XML is output. The\n // string containing the XML chunk is passed to `onData` as its single\n // argument.\n // `onEnd` the function to be called when the XML document is completed with\n // `end`. `onEnd` does not receive any arguments.\n module.exports.begin = function(options, onData, onEnd) {\n if (isFunction(options)) {\n [onData, onEnd] = [options, onData];\n options = {};\n }\n if (onData) {\n return new XMLDocumentCB(options, onData, onEnd);\n } else {\n return new XMLDocument(options);\n }\n };\n\n module.exports.stringWriter = function(options) {\n return new XMLStringWriter(options);\n };\n\n module.exports.streamWriter = function(stream, options) {\n return new XMLStreamWriter(stream, options);\n };\n\n module.exports.implementation = new XMLDOMImplementation();\n\n module.exports.nodeType = NodeType;\n\n module.exports.writerState = WriterState;\n\n}).call(this);\n","module.exports = \"
\\n \\n
Gestión de la sesión
\\n\\n \\n \\n\\n \\n \\n
\\n\\n \\n
\\n
\\n
\\n Carga un WMC v1.1.0 como fichero o desde una url\\n
\\n
\\n \\n \\n
\\n \\n
\\n \\n \\n
\\n
\\n \\n \\n
\\n
\\n \\n
\\n \\n
\\n
\\n\\n
\\n
\\n
\\n Guarda un WMC v1.1.0 como fichero\\n
\\n \\n
\\n \\n \\n
\\n
\\n \\n
\\n \\n
\\n
\\n\\n
\";","// Generated by CoffeeScript 2.4.1\n(function() {\n var XMLDOMConfiguration, XMLDOMErrorHandler, XMLDOMStringList;\n\n XMLDOMErrorHandler = require('./XMLDOMErrorHandler');\n\n XMLDOMStringList = require('./XMLDOMStringList');\n\n // Implements the DOMConfiguration interface\n module.exports = XMLDOMConfiguration = (function() {\n class XMLDOMConfiguration {\n constructor() {\n var clonedSelf;\n this.defaultParams = {\n \"canonical-form\": false,\n \"cdata-sections\": false,\n \"comments\": false,\n \"datatype-normalization\": false,\n \"element-content-whitespace\": true,\n \"entities\": true,\n \"error-handler\": new XMLDOMErrorHandler(),\n \"infoset\": true,\n \"validate-if-schema\": false,\n \"namespaces\": true,\n \"namespace-declarations\": true,\n \"normalize-characters\": false,\n \"schema-location\": '',\n \"schema-type\": '',\n \"split-cdata-sections\": true,\n \"validate\": false,\n \"well-formed\": true\n };\n this.params = clonedSelf = Object.create(this.defaultParams);\n }\n\n // Gets the value of a parameter.\n\n // `name` name of the parameter\n getParameter(name) {\n if (this.params.hasOwnProperty(name)) {\n return this.params[name];\n } else {\n return null;\n }\n }\n\n // Checks if setting a parameter to a specific value is supported.\n\n // `name` name of the parameter\n // `value` parameter value\n canSetParameter(name, value) {\n return true;\n }\n\n // Sets the value of a parameter.\n\n // `name` name of the parameter\n // `value` new value or null if the user wishes to unset the parameter\n setParameter(name, value) {\n if (value != null) {\n return this.params[name] = value;\n } else {\n return delete this.params[name];\n }\n }\n\n };\n\n // Returns the list of parameter names\n Object.defineProperty(XMLDOMConfiguration.prototype, 'parameterNames', {\n get: function() {\n return new XMLDOMStringList(Object.keys(this.defaultParams));\n }\n });\n\n return XMLDOMConfiguration;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n // Represents the error handler for DOM operations\n var XMLDOMErrorHandler;\n\n module.exports = XMLDOMErrorHandler = class XMLDOMErrorHandler {\n // Initializes a new instance of `XMLDOMErrorHandler`\n\n constructor() {}\n\n // Called on the error handler when an error occurs.\n\n // `error` the error message as a string\n handleError(error) {\n throw new Error(error);\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n // Represents a list of string entries\n var XMLDOMStringList;\n\n module.exports = XMLDOMStringList = (function() {\n class XMLDOMStringList {\n // Initializes a new instance of `XMLDOMStringList`\n // This is just a wrapper around an ordinary\n // JS array.\n\n // `arr` the array of string values\n constructor(arr) {\n this.arr = arr || [];\n }\n\n // Returns the indexth item in the collection.\n\n // `index` index into the collection\n item(index) {\n return this.arr[index] || null;\n }\n\n // Test if a string is part of this DOMStringList.\n\n // `str` the string to look for\n contains(str) {\n return this.arr.indexOf(str) !== -1;\n }\n\n };\n\n // Returns the number of strings in the list.\n Object.defineProperty(XMLDOMStringList.prototype, 'length', {\n get: function() {\n return this.arr.length;\n }\n });\n\n return XMLDOMStringList;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n // Represents a list of nodes\n var XMLNodeList;\n\n module.exports = XMLNodeList = (function() {\n class XMLNodeList {\n // Initializes a new instance of `XMLNodeList`\n // This is just a wrapper around an ordinary\n // JS array.\n\n // `nodes` the array containing nodes.\n constructor(nodes) {\n this.nodes = nodes;\n }\n\n // Creates and returns a deep clone of `this`\n\n clone() {\n // this class should not be cloned since it wraps\n // around a given array. The calling function should check\n // whether the wrapped array is null and supply a new array\n // (from the clone).\n return this.nodes = null;\n }\n\n // DOM Level 1\n item(index) {\n return this.nodes[index] || null;\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLNodeList.prototype, 'length', {\n get: function() {\n return this.nodes.length || 0;\n }\n });\n\n return XMLNodeList;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n module.exports = {\n Disconnected: 1,\n Preceding: 2,\n Following: 4,\n Contains: 8,\n ContainedBy: 16,\n ImplementationSpecific: 32\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, WriterState, XMLAttribute, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDocument, XMLDocumentCB, XMLElement, XMLProcessingInstruction, XMLRaw, XMLStringWriter, XMLStringifier, XMLText, getValue, isFunction, isObject, isPlainObject,\n hasProp = {}.hasOwnProperty;\n\n ({isObject, isFunction, isPlainObject, getValue} = require('./Utility'));\n\n NodeType = require('./NodeType');\n\n XMLDocument = require('./XMLDocument');\n\n XMLElement = require('./XMLElement');\n\n XMLCData = require('./XMLCData');\n\n XMLComment = require('./XMLComment');\n\n XMLRaw = require('./XMLRaw');\n\n XMLText = require('./XMLText');\n\n XMLProcessingInstruction = require('./XMLProcessingInstruction');\n\n XMLDeclaration = require('./XMLDeclaration');\n\n XMLDocType = require('./XMLDocType');\n\n XMLDTDAttList = require('./XMLDTDAttList');\n\n XMLDTDEntity = require('./XMLDTDEntity');\n\n XMLDTDElement = require('./XMLDTDElement');\n\n XMLDTDNotation = require('./XMLDTDNotation');\n\n XMLAttribute = require('./XMLAttribute');\n\n XMLStringifier = require('./XMLStringifier');\n\n XMLStringWriter = require('./XMLStringWriter');\n\n WriterState = require('./WriterState');\n\n // Represents an XML builder\n module.exports = XMLDocumentCB = class XMLDocumentCB {\n // Initializes a new instance of `XMLDocumentCB`\n\n // `options.keepNullNodes` whether nodes with null values will be kept\n // or ignored: true or false\n // `options.keepNullAttributes` whether attributes with null values will be\n // kept or ignored: true or false\n // `options.ignoreDecorators` whether decorator strings will be ignored when\n // converting JS objects: true or false\n // `options.separateArrayItems` whether array items are created as separate\n // nodes when passed as an object value: true or false\n // `options.noDoubleEncoding` whether existing html entities are encoded:\n // true or false\n // `options.stringify` a set of functions to use for converting values to\n // strings\n // `options.writer` the default XML writer to use for converting nodes to\n // string. If the default writer is not set, the built-in XMLStringWriter\n // will be used instead.\n\n // `onData` the function to be called when a new chunk of XML is output. The\n // string containing the XML chunk is passed to `onData` as its first\n // argument, and the current indentation level as its second argument.\n // `onEnd` the function to be called when the XML document is completed with\n // `end`. `onEnd` does not receive any arguments.\n constructor(options, onData, onEnd) {\n var writerOptions;\n this.name = \"?xml\";\n this.type = NodeType.Document;\n options || (options = {});\n writerOptions = {};\n if (!options.writer) {\n options.writer = new XMLStringWriter();\n } else if (isPlainObject(options.writer)) {\n writerOptions = options.writer;\n options.writer = new XMLStringWriter();\n }\n this.options = options;\n this.writer = options.writer;\n this.writerOptions = this.writer.filterOptions(writerOptions);\n this.stringify = new XMLStringifier(options);\n this.onDataCallback = onData || function() {};\n this.onEndCallback = onEnd || function() {};\n this.currentNode = null;\n this.currentLevel = -1;\n this.openTags = {};\n this.documentStarted = false;\n this.documentCompleted = false;\n this.root = null;\n }\n\n // Creates a child element node from the given XMLNode\n\n // `node` the child node\n createChildNode(node) {\n var att, attName, attributes, child, i, len, ref, ref1;\n switch (node.type) {\n case NodeType.CData:\n this.cdata(node.value);\n break;\n case NodeType.Comment:\n this.comment(node.value);\n break;\n case NodeType.Element:\n attributes = {};\n ref = node.attribs;\n for (attName in ref) {\n if (!hasProp.call(ref, attName)) continue;\n att = ref[attName];\n attributes[attName] = att.value;\n }\n this.node(node.name, attributes);\n break;\n case NodeType.Dummy:\n this.dummy();\n break;\n case NodeType.Raw:\n this.raw(node.value);\n break;\n case NodeType.Text:\n this.text(node.value);\n break;\n case NodeType.ProcessingInstruction:\n this.instruction(node.target, node.value);\n break;\n default:\n throw new Error(\"This XML node type is not supported in a JS object: \" + node.constructor.name);\n }\n ref1 = node.children;\n // write child nodes recursively\n for (i = 0, len = ref1.length; i < len; i++) {\n child = ref1[i];\n this.createChildNode(child);\n if (child.type === NodeType.Element) {\n this.up();\n }\n }\n return this;\n }\n\n // Creates a dummy node\n\n dummy() {\n // no-op, just return this\n return this;\n }\n\n // Creates a node\n\n // `name` name of the node\n // `attributes` an object containing name/value pairs of attributes\n // `text` element text\n node(name, attributes, text) {\n if (name == null) {\n throw new Error(\"Missing node name.\");\n }\n if (this.root && this.currentLevel === -1) {\n throw new Error(\"Document can only have one root node. \" + this.debugInfo(name));\n }\n this.openCurrent();\n name = getValue(name);\n if (attributes == null) {\n attributes = {};\n }\n attributes = getValue(attributes);\n // swap argument order: text <-> attributes\n if (!isObject(attributes)) {\n [text, attributes] = [attributes, text];\n }\n this.currentNode = new XMLElement(this, name, attributes);\n this.currentNode.children = false;\n this.currentLevel++;\n this.openTags[this.currentLevel] = this.currentNode;\n if (text != null) {\n this.text(text);\n }\n return this;\n }\n\n // Creates a child element node or an element type declaration when called\n // inside the DTD\n\n // `name` name of the node\n // `attributes` an object containing name/value pairs of attributes\n // `text` element text\n element(name, attributes, text) {\n var child, i, len, oldValidationFlag, ref, root;\n if (this.currentNode && this.currentNode.type === NodeType.DocType) {\n this.dtdElement(...arguments);\n } else {\n if (Array.isArray(name) || isObject(name) || isFunction(name)) {\n oldValidationFlag = this.options.noValidation;\n this.options.noValidation = true;\n root = new XMLDocument(this.options).element('TEMP_ROOT');\n root.element(name);\n this.options.noValidation = oldValidationFlag;\n ref = root.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n this.createChildNode(child);\n if (child.type === NodeType.Element) {\n this.up();\n }\n }\n } else {\n this.node(name, attributes, text);\n }\n }\n return this;\n }\n\n // Adds or modifies an attribute\n\n // `name` attribute name\n // `value` attribute value\n attribute(name, value) {\n var attName, attValue;\n if (!this.currentNode || this.currentNode.children) {\n throw new Error(\"att() can only be used immediately after an ele() call in callback mode. \" + this.debugInfo(name));\n }\n if (name != null) {\n name = getValue(name);\n }\n if (isObject(name)) { // expand if object\n for (attName in name) {\n if (!hasProp.call(name, attName)) continue;\n attValue = name[attName];\n this.attribute(attName, attValue);\n }\n } else {\n if (isFunction(value)) {\n value = value.apply();\n }\n if (this.options.keepNullAttributes && (value == null)) {\n this.currentNode.attribs[name] = new XMLAttribute(this, name, \"\");\n } else if (value != null) {\n this.currentNode.attribs[name] = new XMLAttribute(this, name, value);\n }\n }\n return this;\n }\n\n // Creates a text node\n\n // `value` element text\n text(value) {\n var node;\n this.openCurrent();\n node = new XMLText(this, value);\n this.onData(this.writer.text(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Creates a CDATA node\n\n // `value` element text without CDATA delimiters\n cdata(value) {\n var node;\n this.openCurrent();\n node = new XMLCData(this, value);\n this.onData(this.writer.cdata(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Creates a comment node\n\n // `value` comment text\n comment(value) {\n var node;\n this.openCurrent();\n node = new XMLComment(this, value);\n this.onData(this.writer.comment(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Adds unescaped raw text\n\n // `value` text\n raw(value) {\n var node;\n this.openCurrent();\n node = new XMLRaw(this, value);\n this.onData(this.writer.raw(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Adds a processing instruction\n\n // `target` instruction target\n // `value` instruction value\n instruction(target, value) {\n var i, insTarget, insValue, len, node;\n this.openCurrent();\n if (target != null) {\n target = getValue(target);\n }\n if (value != null) {\n value = getValue(value);\n }\n if (Array.isArray(target)) { // expand if array\n for (i = 0, len = target.length; i < len; i++) {\n insTarget = target[i];\n this.instruction(insTarget);\n }\n } else if (isObject(target)) { // expand if object\n for (insTarget in target) {\n if (!hasProp.call(target, insTarget)) continue;\n insValue = target[insTarget];\n this.instruction(insTarget, insValue);\n }\n } else {\n if (isFunction(value)) {\n value = value.apply();\n }\n node = new XMLProcessingInstruction(this, target, value);\n this.onData(this.writer.processingInstruction(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n }\n return this;\n }\n\n // Creates the xml declaration\n\n // `version` A version number string, e.g. 1.0\n // `encoding` Encoding declaration, e.g. UTF-8\n // `standalone` standalone document declaration: true or false\n declaration(version, encoding, standalone) {\n var node;\n this.openCurrent();\n if (this.documentStarted) {\n throw new Error(\"declaration() must be the first node.\");\n }\n node = new XMLDeclaration(this, version, encoding, standalone);\n this.onData(this.writer.declaration(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Creates the document type declaration\n\n // `root` the name of the root node\n // `pubID` the public identifier of the external subset\n // `sysID` the system identifier of the external subset\n doctype(root, pubID, sysID) {\n this.openCurrent();\n if (root == null) {\n throw new Error(\"Missing root node name.\");\n }\n if (this.root) {\n throw new Error(\"dtd() must come before the root node.\");\n }\n this.currentNode = new XMLDocType(this, pubID, sysID);\n this.currentNode.rootNodeName = root;\n this.currentNode.children = false;\n this.currentLevel++;\n this.openTags[this.currentLevel] = this.currentNode;\n return this;\n }\n\n // Creates an element type declaration\n\n // `name` element name\n // `value` element content (defaults to #PCDATA)\n dtdElement(name, value) {\n var node;\n this.openCurrent();\n node = new XMLDTDElement(this, name, value);\n this.onData(this.writer.dtdElement(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Creates an attribute declaration\n\n // `elementName` the name of the element containing this attribute\n // `attributeName` attribute name\n // `attributeType` type of the attribute (defaults to CDATA)\n // `defaultValueType` default value type (either #REQUIRED, #IMPLIED, #FIXED or\n // #DEFAULT) (defaults to #IMPLIED)\n // `defaultValue` default value of the attribute\n // (only used for #FIXED or #DEFAULT)\n attList(elementName, attributeName, attributeType, defaultValueType, defaultValue) {\n var node;\n this.openCurrent();\n node = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue);\n this.onData(this.writer.dtdAttList(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Creates a general entity declaration\n\n // `name` the name of the entity\n // `value` internal entity value or an object with external entity details\n // `value.pubID` public identifier\n // `value.sysID` system identifier\n // `value.nData` notation declaration\n entity(name, value) {\n var node;\n this.openCurrent();\n node = new XMLDTDEntity(this, false, name, value);\n this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Creates a parameter entity declaration\n\n // `name` the name of the entity\n // `value` internal entity value or an object with external entity details\n // `value.pubID` public identifier\n // `value.sysID` system identifier\n pEntity(name, value) {\n var node;\n this.openCurrent();\n node = new XMLDTDEntity(this, true, name, value);\n this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Creates a NOTATION declaration\n\n // `name` the name of the notation\n // `value` an object with external entity details\n // `value.pubID` public identifier\n // `value.sysID` system identifier\n notation(name, value) {\n var node;\n this.openCurrent();\n node = new XMLDTDNotation(this, name, value);\n this.onData(this.writer.dtdNotation(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Gets the parent node\n up() {\n if (this.currentLevel < 0) {\n throw new Error(\"The document node has no parent.\");\n }\n if (this.currentNode) {\n if (this.currentNode.children) {\n this.closeNode(this.currentNode);\n } else {\n this.openNode(this.currentNode);\n }\n this.currentNode = null;\n } else {\n this.closeNode(this.openTags[this.currentLevel]);\n }\n delete this.openTags[this.currentLevel];\n this.currentLevel--;\n return this;\n }\n\n // Ends the document\n end() {\n while (this.currentLevel >= 0) {\n this.up();\n }\n return this.onEnd();\n }\n\n // Opens the current parent node\n openCurrent() {\n if (this.currentNode) {\n this.currentNode.children = true;\n return this.openNode(this.currentNode);\n }\n }\n\n // Writes the opening tag of the current node or the entire node if it has\n // no child nodes\n openNode(node) {\n var att, chunk, name, ref;\n if (!node.isOpen) {\n if (!this.root && this.currentLevel === 0 && node.type === NodeType.Element) {\n this.root = node;\n }\n chunk = '';\n if (node.type === NodeType.Element) {\n this.writerOptions.state = WriterState.OpenTag;\n chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '<' + node.name;\n ref = node.attribs;\n for (name in ref) {\n if (!hasProp.call(ref, name)) continue;\n att = ref[name];\n chunk += this.writer.attribute(att, this.writerOptions, this.currentLevel);\n }\n chunk += (node.children ? '>' : '/>') + this.writer.endline(node, this.writerOptions, this.currentLevel);\n this.writerOptions.state = WriterState.InsideTag; // if node.type is NodeType.DocType\n } else {\n this.writerOptions.state = WriterState.OpenTag;\n chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '';\n }\n chunk += this.writer.endline(node, this.writerOptions, this.currentLevel);\n }\n this.onData(chunk, this.currentLevel);\n return node.isOpen = true;\n }\n }\n\n // Writes the closing tag of the current node\n closeNode(node) {\n var chunk;\n if (!node.isClosed) {\n chunk = '';\n this.writerOptions.state = WriterState.CloseTag;\n if (node.type === NodeType.Element) {\n chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '' + this.writer.endline(node, this.writerOptions, this.currentLevel); // if node.type is NodeType.DocType\n } else {\n chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + ']>' + this.writer.endline(node, this.writerOptions, this.currentLevel);\n }\n this.writerOptions.state = WriterState.None;\n this.onData(chunk, this.currentLevel);\n return node.isClosed = true;\n }\n }\n\n // Called when a new chunk of XML is output\n\n // `chunk` a string containing the XML chunk\n // `level` current indentation level\n onData(chunk, level) {\n this.documentStarted = true;\n return this.onDataCallback(chunk, level + 1);\n }\n\n // Called when the XML document is completed\n onEnd() {\n this.documentCompleted = true;\n return this.onEndCallback();\n }\n\n // Returns debug string\n debugInfo(name) {\n if (name == null) {\n return \"\";\n } else {\n return \"node: <\" + name + \">\";\n }\n }\n\n // Node aliases\n ele() {\n return this.element(...arguments);\n }\n\n nod(name, attributes, text) {\n return this.node(name, attributes, text);\n }\n\n txt(value) {\n return this.text(value);\n }\n\n dat(value) {\n return this.cdata(value);\n }\n\n com(value) {\n return this.comment(value);\n }\n\n ins(target, value) {\n return this.instruction(target, value);\n }\n\n dec(version, encoding, standalone) {\n return this.declaration(version, encoding, standalone);\n }\n\n dtd(root, pubID, sysID) {\n return this.doctype(root, pubID, sysID);\n }\n\n e(name, attributes, text) {\n return this.element(name, attributes, text);\n }\n\n n(name, attributes, text) {\n return this.node(name, attributes, text);\n }\n\n t(value) {\n return this.text(value);\n }\n\n d(value) {\n return this.cdata(value);\n }\n\n c(value) {\n return this.comment(value);\n }\n\n r(value) {\n return this.raw(value);\n }\n\n i(target, value) {\n return this.instruction(target, value);\n }\n\n // Attribute aliases\n att() {\n if (this.currentNode && this.currentNode.type === NodeType.DocType) {\n return this.attList(...arguments);\n } else {\n return this.attribute(...arguments);\n }\n }\n\n a() {\n if (this.currentNode && this.currentNode.type === NodeType.DocType) {\n return this.attList(...arguments);\n } else {\n return this.attribute(...arguments);\n }\n }\n\n // DTD aliases\n // att() and ele() are defined above\n ent(name, value) {\n return this.entity(name, value);\n }\n\n pent(name, value) {\n return this.pEntity(name, value);\n }\n\n not(name, value) {\n return this.notation(name, value);\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, WriterState, XMLStreamWriter, XMLWriterBase,\n hasProp = {}.hasOwnProperty;\n\n NodeType = require('./NodeType');\n\n XMLWriterBase = require('./XMLWriterBase');\n\n WriterState = require('./WriterState');\n\n // Prints XML nodes to a stream\n module.exports = XMLStreamWriter = class XMLStreamWriter extends XMLWriterBase {\n // Initializes a new instance of `XMLStreamWriter`\n\n // `stream` output stream\n // `options.pretty` pretty prints the result\n // `options.indent` indentation string\n // `options.newline` newline sequence\n // `options.offset` a fixed number of indentations to add to every line\n // `options.allowEmpty` do not self close empty element tags\n // 'options.dontPrettyTextNodes' if any text is present in node, don't indent or LF\n // `options.spaceBeforeSlash` add a space before the closing slash of empty elements\n constructor(stream, options) {\n super(options);\n this.stream = stream;\n }\n\n endline(node, options, level) {\n if (node.isLastRootNode && options.state === WriterState.CloseTag) {\n return '';\n } else {\n return super.endline(node, options, level);\n }\n }\n\n document(doc, options) {\n var child, i, j, k, len1, len2, ref, ref1, results;\n ref = doc.children;\n // set a flag so that we don't insert a newline after the last root level node \n for (i = j = 0, len1 = ref.length; j < len1; i = ++j) {\n child = ref[i];\n child.isLastRootNode = i === doc.children.length - 1;\n }\n options = this.filterOptions(options);\n ref1 = doc.children;\n results = [];\n for (k = 0, len2 = ref1.length; k < len2; k++) {\n child = ref1[k];\n results.push(this.writeChildNode(child, options, 0));\n }\n return results;\n }\n\n cdata(node, options, level) {\n return this.stream.write(super.cdata(node, options, level));\n }\n\n comment(node, options, level) {\n return this.stream.write(super.comment(node, options, level));\n }\n\n declaration(node, options, level) {\n return this.stream.write(super.declaration(node, options, level));\n }\n\n docType(node, options, level) {\n var child, j, len1, ref;\n level || (level = 0);\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n this.stream.write(this.indent(node, options, level));\n this.stream.write(' 0) {\n this.stream.write(' [');\n this.stream.write(this.endline(node, options, level));\n options.state = WriterState.InsideTag;\n ref = node.children;\n for (j = 0, len1 = ref.length; j < len1; j++) {\n child = ref[j];\n this.writeChildNode(child, options, level + 1);\n }\n options.state = WriterState.CloseTag;\n this.stream.write(']');\n }\n // close tag\n options.state = WriterState.CloseTag;\n this.stream.write(options.spaceBeforeSlash + '>');\n this.stream.write(this.endline(node, options, level));\n options.state = WriterState.None;\n return this.closeNode(node, options, level);\n }\n\n element(node, options, level) {\n var att, attLen, child, childNodeCount, firstChildNode, j, len, len1, name, prettySuppressed, r, ratt, ref, ref1, ref2, rline;\n level || (level = 0);\n // open tag\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '<' + node.name;\n // attributes\n if (options.pretty && options.width > 0) {\n len = r.length;\n ref = node.attribs;\n for (name in ref) {\n if (!hasProp.call(ref, name)) continue;\n att = ref[name];\n ratt = this.attribute(att, options, level);\n attLen = ratt.length;\n if (len + attLen > options.width) {\n rline = this.indent(node, options, level + 1) + ratt;\n r += this.endline(node, options, level) + rline;\n len = rline.length;\n } else {\n rline = ' ' + ratt;\n r += rline;\n len += rline.length;\n }\n }\n } else {\n ref1 = node.attribs;\n for (name in ref1) {\n if (!hasProp.call(ref1, name)) continue;\n att = ref1[name];\n r += this.attribute(att, options, level);\n }\n }\n this.stream.write(r);\n childNodeCount = node.children.length;\n firstChildNode = childNodeCount === 0 ? null : node.children[0];\n if (childNodeCount === 0 || node.children.every(function(e) {\n return (e.type === NodeType.Text || e.type === NodeType.Raw) && e.value === '';\n })) {\n // empty element\n if (options.allowEmpty) {\n this.stream.write('>');\n options.state = WriterState.CloseTag;\n this.stream.write('');\n } else {\n options.state = WriterState.CloseTag;\n this.stream.write(options.spaceBeforeSlash + '/>');\n }\n } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw) && (firstChildNode.value != null)) {\n // do not indent text-only nodes\n this.stream.write('>');\n options.state = WriterState.InsideTag;\n options.suppressPrettyCount++;\n prettySuppressed = true;\n this.writeChildNode(firstChildNode, options, level + 1);\n options.suppressPrettyCount--;\n prettySuppressed = false;\n options.state = WriterState.CloseTag;\n this.stream.write('');\n } else {\n this.stream.write('>' + this.endline(node, options, level));\n options.state = WriterState.InsideTag;\n ref2 = node.children;\n // inner tags\n for (j = 0, len1 = ref2.length; j < len1; j++) {\n child = ref2[j];\n this.writeChildNode(child, options, level + 1);\n }\n // close tag\n options.state = WriterState.CloseTag;\n this.stream.write(this.indent(node, options, level) + '');\n }\n this.stream.write(this.endline(node, options, level));\n options.state = WriterState.None;\n return this.closeNode(node, options, level);\n }\n\n processingInstruction(node, options, level) {\n return this.stream.write(super.processingInstruction(node, options, level));\n }\n\n raw(node, options, level) {\n return this.stream.write(super.raw(node, options, level));\n }\n\n text(node, options, level) {\n return this.stream.write(super.text(node, options, level));\n }\n\n dtdAttList(node, options, level) {\n return this.stream.write(super.dtdAttList(node, options, level));\n }\n\n dtdElement(node, options, level) {\n return this.stream.write(super.dtdElement(node, options, level));\n }\n\n dtdEntity(node, options, level) {\n return this.stream.write(super.dtdEntity(node, options, level));\n }\n\n dtdNotation(node, options, level) {\n return this.stream.write(super.dtdNotation(node, options, level));\n }\n\n };\n\n}).call(this);\n","/**\n * @module M/impl/control/WmcControl\n */\nexport default class WmcControl extends M.impl.Control {\n /**\n * This function adds the control to the specified map\n *\n * @public\n * @function\n * @param {M.Map} map to add the plugin\n * @param {HTMLElement} html of the plugin\n * @api stable\n */\n addTo(map, html) {\n this.facadeMap_ = map;\n this.element = html;\n\n const olMap = map.getMapImpl();\n ol.control.Control.call(this, {\n element: html,\n target: null,\n });\n olMap.addControl(this);\n\n // super addTo - don't delete\n super.addTo(map, html);\n }\n\n /**\n *\n * @public\n * @function\n * @api stable\n */\n activate() {}\n\n /**\n * @public\n * @function\n * @api stable\n */\n deactivate() {}\n\n /**\n * @memberof WMCControl\n */\n getViewContext() {\n const viewContext = {\n General: {\n BoundingBox: {},\n },\n LayerList: {\n Layer: [],\n },\n $version: '1.1.0',\n $xmlns: 'http://www.opengis.net/context',\n $id: 'Contexto_IECA',\n '$xmlns:xlink': 'http://www.w3.org/1999/xlink',\n '$xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance',\n '$xsi:schemaLocation': 'http://www.opengis.net/context http://schemas.opengis.net/context/1.1.0/context.xsd',\n };\n\n viewContext.General.Title = 'WMC IECA';\n\n // vista del mapa\n // mapView.getZoom\n viewContext.General.BoundingBox.$SRS = this.facadeMap_.getProjection().code;\n const extent = this.facadeMap_.getBbox();\n viewContext.General.BoundingBox.$minx = extent.x.min;\n viewContext.General.BoundingBox.$miny = extent.y.min;\n viewContext.General.BoundingBox.$maxx = extent.x.max;\n viewContext.General.BoundingBox.$maxy = extent.y.max;\n viewContext.General.KeywordList = {\n Keyword: ['IECA'],\n };\n viewContext.General.Abstract = 'Fichero de configuración del contexto de visualización de capas.';\n viewContext.General.Extension = {};\n const maxExtent = this.facadeMap_.getMaxExtent();\n if (maxExtent) {\n viewContext.General.Extension['ol:maxExtent'] = {\n '$xmlns:ol': 'http://openlayers.org/context',\n $minx: maxExtent.x ?\n maxExtent.x.min : maxExtent[0],\n $miny: maxExtent.y ?\n maxExtent.x.min : maxExtent[1],\n $maxx: maxExtent.x ?\n maxExtent.x.min : maxExtent[2],\n $maxy: maxExtent.y ?\n maxExtent.x.min : maxExtent[3],\n };\n }\n // ancho en pixels del mapa\n /* viewContext.General.Window.$width = vsMap.getSize()[0];\n viewContext.General.Window.$height = vsMap.getSize()[1]; */\n\n // CAPAS\n /* eslint-disable */\n for (const layer of this.facadeMap_.getWMS()) {\n const wmcLayer = {};\n\n wmcLayer.$hidden = !layer.isVisible() ?\n 1 :\n 0;\n wmcLayer.$queryable = layer.isQueryable() ?\n 1 :\n 0;\n wmcLayer.Name = layer.name;\n wmcLayer.Title = layer.legend;\n // server\n wmcLayer.Server = {\n OnlineResource: {\n '$xmlns:xlink': 'http://www.w3.org/1999/xlink',\n '$xlink:type': 'simple',\n '$xlink:href': layer.url,\n },\n $service: 'OGC:WMS',\n $version: layer.version,\n };\n\n // Si se trata de una capa base, incluyo la leyenda porque debería ser la imagen del mapa\n if (!layer.transparent) {\n wmcLayer.StyleList = {\n Style: [\n {\n $current: 1,\n Name: 'Default',\n Title: 'Default',\n LegendURL: {\n $width: 200,\n $height: 120,\n $format: 'image/png',\n OnlineResource: {\n '$xmlns:xlink': 'http://www.w3.org/1999/xlink',\n '$xlink:type': 'simple',\n '$xlink:href': layer.getLegendURL(),\n },\n },\n },\n ],\n };\n }\n\n // EXTENSIONES DE MAPEA\n wmcLayer.Extension = {\n 'ol:opacity': {\n '#text': layer.getOpacity(),\n '$xmlns:ol': 'http://openlayers.org/context',\n },\n 'ol:transparent': {\n '#text': layer.transparent,\n '$xmlns:ol': 'http://openlayers.org/context',\n },\n 'ol:isBaseLayer': {\n '#text': !layer.transparent,\n '$xmlns:ol': 'http://openlayers.org/context',\n },\n 'ol:displayInLayerSwitcher': {\n '#text': layer.displayInLayerSwitcher,\n '$xmlns:ol': 'http://openlayers.org/context',\n },\n 'ol:singleTile': {\n '#text': layer.tiled,\n '$xmlns:ol': 'http://openlayers.org/context',\n },\n };\n\n viewContext.LayerList.Layer.push(wmcLayer);\n }\n /* eslint-enable */\n return viewContext;\n }\n}\n","/**\n * @module M/impl/control/WmcLayer\n */\nexport default class WmcLayer extends M.impl.layer.WMC {\n /**\n * @classdesc\n * Extensión de la implementación de la capa WMC para poder insertar\n * capas WMC que no vengan por url\n *\n * @constructor\n * @extends {M.impl.layer.WMC}\n * @api stable\n */\n constructor(options) {\n super(options);\n this.projection = null;\n }\n\n /**\n * This function select this WMC layer and\n * triggers the event to draw it\n *\n * @public\n * @function\n * @api stable\n */\n select() {\n if (this.selected === false) {\n // unselect layers\n this.map.getWMC().forEach((wmcLayer) => {\n wmcLayer.unselect();\n });\n\n this.selected = true;\n // set projection with the wmc\n if (this.projection) {\n this.map.setProjection({\n code: this.projection.getCode(),\n units: this.projection.getUnits(),\n }, true);\n }\n if (!M.utils.isNullOrEmpty(this.bbox)) {\n try {\n this.map.setBbox(this.bbox, {\n nearest: true,\n });\n } catch (error) {\n M.dialog.info(error);\n }\n }\n if (!M.utils.isNullOrEmpty(this.maxExtent)) {\n this.map.setMaxExtent(this.maxExtent, false);\n }\n if (this.layers.length) {\n this.map.addWMS(this.layers, true);\n }\n this.map.fire(M.evt.CHANGE_WMC, this);\n }\n }\n\n loadContext(documentXML) {\n return new Promise((success, fail) => {\n try {\n if (documentXML) {\n // JGL: mapea5 incluye WMC y WMC110 dentro del array wmc\n const formater = M.impl.format.wmc ?\n new M.impl.format.wmc.WMC() : new M.impl.format.WMC();\n const context = formater.readFromDocument(documentXML);\n success(context);\n } else if (this.url) {\n // Carga el contexto\n M.remote.get(this.url).then((response) => {\n const wmcDocument = response.xml;\n // JGL: mapea5 incluye WMC y WMC110 dentro del array wmc\n const formater = M.impl.format.wmc ?\n new M.impl.format.wmc.WMC() : new M.impl.format.WMC();\n const context = formater.readFromDocument(wmcDocument);\n success(context);\n });\n } else {\n /* eslint-disable */\n fail('No hay contexto');\n /* eslint-enable */\n }\n } catch (error) {\n fail(error);\n }\n });\n }\n\n\n loadLayers() {\n if (this.map) {\n this.map.addWMS(this.layers, true);\n }\n }\n\n loadContextParameters(context) {\n this.layers = context.layers;\n // Debido a que en Mapea si no hay capas base se selecciona como activa\n // la primera que llegue y las demás se desactivan hay que reordenar\n // el array de capas base para que las visibles se añadan primero\n this.layers.sort((layerA, layerB) => {\n let result = 1;\n const visibleA = layerA.isVisible();\n const visibleB = layerB.isVisible();\n const isBaseLayerA = !layerA.transparent;\n const isBaseLayerB = !layerB.transparent;\n // Si ambas son visible, o no visibles, o alguna de las dos no es base no se ordenan\n if ((visibleA && visibleB) || (!visibleA && !visibleB) || !isBaseLayerA || !isBaseLayerB) {\n result = 0;\n } else if (visibleA) {\n result = -1;\n }\n return result;\n });\n this.bbox = {\n x: {\n min: context.bounds[0],\n max: context.bounds[2],\n },\n y: {\n min: context.bounds[1],\n max: context.bounds[3],\n },\n };\n this.maxExtent = {\n x: {\n min: context.maxExtent[0],\n max: context.maxExtent[2],\n },\n y: {\n min: context.maxExtent[1],\n max: context.maxExtent[3],\n },\n };\n this.projection = ol.proj.get(context.projection);\n }\n}\n","import WmcLayerImpl from 'impl/wmclayer';\n\nexport default class WmcLayer extends M.layer.WMC {\n /**\n * @classdesc\n * Clase WMCLayer que extiende de M.Layer.WMC para poder tener capas WMC\n * que no provengan o se inicialicen desde una url\n *\n * @constructor\n * @extends {M.Control}\n * @api stable\n */\n constructor(options = {}) {\n super('http://prueba.es');\n this.url = null;\n // 1. checks if the implementation can create PluginControl\n if (M.utils.isUndefined(WmcLayerImpl)) {\n M.exception('La implementación usada no puede crear controles WMCLayerImpl');\n }\n // 2. implementation of this control\n const impl = new WmcLayerImpl(options);\n this.setImpl(impl);\n }\n}\n","/**\n * @module M/control/WmcControl\n */\n\nimport * as xmlbuilder from 'xmlbuilder';\nimport WmcImplControl from 'impl/wmccontrol';\nimport template from 'templates/wmc';\nimport WmcLayer from './wmclayer';\n\nexport default class WmcControl extends M.Control {\n /**\n * @classdesc\n * Main constructor of the class. Creates a PluginControl\n * control\n *\n * @constructor\n * @extends {M.Control}\n * @api stable\n */\n constructor() {\n // 1. checks if the implementation can create PluginControl\n if (M.utils.isUndefined(WmcImplControl)) {\n M.exception('La implementación usada no puede crear controles WMCControl');\n }\n // 2. implementation of this control\n const impl = new WmcImplControl();\n super(impl, 'wmc');\n\n this.file_ = null;\n this.inputUrl_ = null;\n this.loadBtn_ = null;\n this.saveBtn_ = null;\n\n // Inputs tabs\n this.inputsTabs_ = null;\n this.selectedTab_ = '';\n // Inputs nombre carga wmc\n this.inputWMCLoadName_ = null;\n // Inputs nombre guardado wmc\n this.inputWMCSaveName_ = null;\n this.facadeMap_ = null;\n }\n\n /**\n * @param {any} html\n * @memberof WMCControl\n */\n addEvents(html) {\n const inputFile = html.querySelector('.form div.file > input');\n this.loadBtn_ = html.querySelector('.button > button.load');\n this.saveBtn_ = html.querySelector('.button > button.save');\n this.inputUrl_ = html.querySelector('.form div.url > input');\n this.inputsTabs_ = html.querySelectorAll('input[name=\"tabs-wmc\"]');\n this.selectedTab_ = html.querySelector('input[name=\"tabs-wmc\"]:checked').dataset.tab;\n this.inputWMCLoadName_ = html.querySelector('.form div.load-name > input');\n this.inputWMCSaveName_ = html.querySelector('.form div.save-name > input');\n\n inputFile.addEventListener('change', evt => this.changeFile(evt, inputFile.files[0]));\n this.loadBtn_.addEventListener('click', evt => this.loadWMC());\n this.saveBtn_.addEventListener('click', evt => this.saveWMC());\n this.inputUrl_.addEventListener('input', evt => this.checkButtons());\n this.inputWMCLoadName_.addEventListener('input', evt => this.checkButtons());\n this.inputWMCSaveName_.addEventListener('input', evt => this.checkButtons());\n\n // Annado el evento a cada radio button para saber cuando se ha cambiado de tab\n this.inputsTabs_.forEach((element) => {\n element.addEventListener('change', evt => this.changeTab(evt));\n });\n }\n\n /**\n * This function creates the view\n *\n * @public\n * @function\n * @param {M.Map} map to add the control\n * @api stable\n */\n createView(map) {\n this.facadeMap_ = map;\n return new Promise((success, fail) => {\n const html = M.template.compileSync(template);\n this.addEvents(html);\n success(html);\n });\n }\n\n /**\n * This function compares controls\n *\n * @public\n * @function\n * @param {M.Control} control to compare\n * @api stable\n */\n equals(control) {\n return control instanceof WmcControl;\n }\n\n /**\n * Obtiene elemento del DOM escapando caracteres (no validos para busqueda por CSS)\n * @param {any} target\n * @param {any} selector\n * @returns\n * @memberof WMCControl\n */\n getQuerySelectorScapeCSS(target, selector) {\n // eslint-disable-next-line no-undef\n return target.querySelector(CSS.escape(selector));\n }\n\n changeTab(evt) {\n const e = (evt || window.event);\n const itemTarget = e.target;\n this.selectedTab_ = itemTarget.dataset.tab;\n this.checkButtons();\n }\n\n checkButtons() {\n if (this.selectedTab_ === 'loadWMC') {\n this.loadBtn_.disabled = (M.utils.isNullOrEmpty(this.file_) &&\n M.utils.isNullOrEmpty(this.inputUrl_.value)) ||\n M.utils.isNullOrEmpty(this.inputWMCLoadName_.value);\n this.inputUrl_.disabled = !M.utils.isNullOrEmpty(this.file_);\n } else {\n this.saveBtn_.disabled = M.utils.isNullOrEmpty(this.inputWMCSaveName_.value);\n }\n }\n\n /**\n * @param {any} file\n * @memberof WMCControl\n */\n changeFile(evt, file) {\n this.file_ = file;\n this.inputWMCLoadName_.value = this.file_.name.replace(/\\.[^/.]+$/, '');\n this.checkButtons();\n if (!M.utils.isNullOrEmpty(file)) {\n if (file.size > 20971520) {\n M.dialog.info('El fichero seleccionado sobrepasa el máximo de 20 MB permitido');\n this.file_ = null;\n this.checkButtons();\n }\n }\n }\n\n /**\n * @param {any} evt\n * @memberof WMCControl\n */\n changeName(evt) {\n const e = (evt || window.event);\n const itemTarget = e.target;\n this.loadBtn_.disabled = (itemTarget.value.trim() === '');\n }\n\n saveWMC() {\n try {\n if ('Blob' in window) {\n const fileName = `${this.inputWMCSaveName_.value}.xml`;\n const ViewContext = this.getImpl().getViewContext();\n // let writer = xmlbuilder.streamWriter(process.stdout);\n const xml = xmlbuilder.create({\n ViewContext,\n }, {\n stringify: {\n convertAttKey: '$',\n },\n encoding: 'utf-8',\n });\n const content = xml.end();\n /* eslint-disable */\n const textFileAsBlob = new Blob([content], { type: 'text/plain;charset=utf-8' });\n if ('msSaveOrOpenBlob' in navigator) {\n navigator.msSaveOrOpenBlob(textFileAsBlob, fileName);\n /* eslint-enable */\n } else {\n const downloadLink = document.createElement('a');\n downloadLink.download = fileName;\n downloadLink.innerHTML = 'Download File';\n if ('webkitURL' in window) {\n // Chrome allows the link to be clicked without actually adding it to the DOM.\n downloadLink.href = window.URL.createObjectURL(textFileAsBlob);\n } else {\n // Firefox requires the link to be added to the DOM before it can be clicked.\n downloadLink.href = window.URL.createObjectURL(textFileAsBlob);\n downloadLink.onclick = this.destroyClickedElement;\n downloadLink.style.display = 'none';\n document.body.appendChild(downloadLink);\n }\n\n downloadLink.click();\n }\n } else {\n M.dialog.info('Tu navegador no soporta la descarga de ficheros Blob HML5');\n }\n } catch (error) {\n M.dialog.error('Error al guardar el contexto del mapa');\n }\n }\n\n /**\n * @memberof WMCControl\n */\n loadWMC() {\n let options;\n if (this.file_) {\n // eslint-disable-next-line no-undef\n const fileReader = new FileReader();\n fileReader.addEventListener('load', (e) => {\n let documentXML;\n if ((typeof DOMParser !== 'undefined')) {\n documentXML = (new DOMParser()).parseFromString(fileReader.result, 'text/xml');\n }\n options = {\n documentXML,\n };\n this.addToMap(options);\n });\n\n fileReader.readAsText(this.file_);\n } else {\n options = {\n url: this.inputUrl_.value,\n };\n this.addToMap(options);\n }\n }\n\n addToMap(options) {\n try {\n const wmcLayer = new WmcLayer(options); // adds the WMC layer\n wmcLayer.name = this.inputWMCLoadName_.value;\n wmcLayer.url = options.url;\n // Compruebo que no esté ya añadida al mapa\n const wmc = this.facadeMap_.getWMC(wmcLayer);\n if (wmc.length === 0) {\n this.facadeMap_.getImpl().addWMC([wmcLayer]);\n this.facadeMap_.fire(M.evt.ADDED_LAYER, [wmcLayer]);\n this.facadeMap_.fire(M.evt.ADDED_WMC, [wmcLayer]);\n\n wmcLayer.getImpl().loadContext(options.documentXML).then((context) => {\n wmcLayer.getImpl().loadContextParameters(context);\n /* checks if it should create the WMC control\n to select WMC */\n const wmcselectorActive = (this.facadeMap_.getControls('wmcselector').length > 0);\n const addedWmcLayers = this.facadeMap_.getWMC();\n if (addedWmcLayers.length > 1 && !wmcselectorActive) {\n this.facadeMap_.addControls(new M.control.WMCSelector());\n }\n wmcLayer.select();\n });\n } else {\n wmc[0].select();\n }\n } catch (error) {\n M.dialog.error('Error al cargar el fichero. Compruebe que se trata del fichero correcto');\n }\n }\n\n destroyClickedElement_(event) {\n document.body.removeChild(event.target);\n }\n}\n","/**\n * @module M/plugin/Wmc\n */\nimport 'assets/css/wmc';\nimport WmcControl from './wmccontrol';\nimport api from '../../api';\n\n\nexport default class Wmc extends M.Plugin {\n /**\n * @classdesc\n * Main facade plugin object. This class creates a plugin\n * object which has an implementation Object\n *\n * @constructor\n * @extends {M.Plugin}\n * @param {Object} impl implementation object\n * @api stable\n */\n constructor(parameters = {}) {\n super(parameters);\n /**\n * Facade of the map\n * @private\n * @type {M.Map}\n */\n this.map_ = null;\n\n /**\n * Array of controls\n * @private\n * @type {Array}\n */\n this.control_ = null;\n\n /**\n * @private\n * @type {M.ui.Panel}\n */\n this.panel_ = null;\n\n /**\n * Facade of the map\n * @private\n * @type {String}\n */\n this.params_ = {};\n if (!M.utils.isNullOrEmpty(parameters.params)) {\n this.params_ = parameters.params;\n }\n\n /**\n * Facade of the map\n * @private\n * @type {String}\n */\n this.options_ = {};\n if (!M.utils.isNullOrEmpty(parameters.options)) {\n this.options_ = parameters.options;\n }\n\n /**\n * Metadata from api.json\n * @private\n * @type {Object}\n */\n this.metadata_ = api.metadata;\n }\n\n /**\n * This function adds this plugin into the map\n *\n * @public\n * @function\n * @param {M.Map} map the map to add the plugin\n * @api stable\n */\n addTo(map) {\n this.map_ = map;\n\n this.control_ = new WmcControl();\n this.panel_ = new M.ui.Panel('panelWmc', {\n collapsible: true,\n className: 'm-wmc',\n collapsedButtonClass: 'g-cartografia-opciones',\n position: M.ui.position.TR,\n tooltip: 'Gestión de WMC',\n });\n this.panel_.on(M.evt.ADDED_TO_MAP, (html) => {\n M.utils.enableTouchScroll(html);\n });\n this.panel_.addControls(this.control_);\n this.map_.addPanels(this.panel_);\n\n this.control_.on(M.evt.ADDED_TO_MAP, () => {\n this.fire(M.evt.ADDED_TO_MAP);\n });\n }\n\n /**\n * @memberof WMC\n */\n destroy() {\n this.map_.removeControls([this.control_]);\n [this.map_, this.control_, this.panel_, this.options_] = [null, null, null, null];\n }\n\n /**\n * @param {any} plugin\n * @returns\n * @memberof WMC\n */\n equals(plugin) {\n let result = false;\n if (plugin instanceof Wmc) {\n result = true;\n }\n return result;\n }\n\n /**\n * Name to identify this plugin\n * @const\n * @type {string}\n * @public\n * @api stable\n */\n get name() {\n return 'wmc';\n }\n\n /**\n * This function gets metadata plugin\n *\n * @public\n * @function\n * @api stable\n */\n getMetadata() {\n return this.metadata_;\n }\n}\n","import M$plugin$Wmc from './/facade/js/wmc';\nimport M$control$WmcControl from './/facade/js/wmccontrol';\nimport M$impl$control$WmcControl from './/impl/ol/js/wmccontrol';\nimport M$impl$control$WmcLayer from './/impl/ol/js/wmclayer';\n\nif (!window.M.plugin) window.M.plugin = {};\nif (!window.M.control) window.M.control = {};\nif (!window.M.impl) window.M.impl = {};\nif (!window.M.impl.control) window.M.impl.control = {};\nwindow.M.plugin.Wmc = M$plugin$Wmc;\nwindow.M.control.WmcControl = M$control$WmcControl;\nwindow.M.impl.control.WmcControl = M$impl$control$WmcControl;\nwindow.M.impl.control.WmcLayer = M$impl$control$WmcLayer;\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/xmlbuilder/lib/NodeType.js","webpack:///./node_modules/xmlbuilder/lib/XMLNode.js","webpack:///./node_modules/xmlbuilder/lib/Utility.js","webpack:///./node_modules/xmlbuilder/lib/XMLCharacterData.js","webpack:///./node_modules/xmlbuilder/lib/WriterState.js","webpack:///./node_modules/xmlbuilder/lib/XMLElement.js","webpack:///./node_modules/xmlbuilder/lib/XMLNamedNodeMap.js","webpack:///./node_modules/xmlbuilder/lib/XMLCData.js","webpack:///./node_modules/xmlbuilder/lib/XMLComment.js","webpack:///./node_modules/xmlbuilder/lib/XMLDeclaration.js","webpack:///./node_modules/xmlbuilder/lib/XMLDocType.js","webpack:///./node_modules/xmlbuilder/lib/XMLDTDAttList.js","webpack:///./node_modules/xmlbuilder/lib/XMLDTDEntity.js","webpack:///./node_modules/xmlbuilder/lib/XMLDTDElement.js","webpack:///./node_modules/xmlbuilder/lib/XMLDTDNotation.js","webpack:///./node_modules/xmlbuilder/lib/XMLRaw.js","webpack:///./node_modules/xmlbuilder/lib/XMLText.js","webpack:///./node_modules/xmlbuilder/lib/XMLProcessingInstruction.js","webpack:///./node_modules/xmlbuilder/lib/XMLStringWriter.js","webpack:///./node_modules/xmlbuilder/lib/XMLDOMImplementation.js","webpack:///./node_modules/xmlbuilder/lib/XMLDocument.js","webpack:///./node_modules/xmlbuilder/lib/XMLAttribute.js","webpack:///./node_modules/xmlbuilder/lib/XMLDummy.js","webpack:///./node_modules/xmlbuilder/lib/XMLStringifier.js","webpack:///./node_modules/xmlbuilder/lib/XMLWriterBase.js","webpack:///./node_modules/xmlbuilder/lib/index.js","webpack:///./src/templates/wmc.html","webpack:///./node_modules/xmlbuilder/lib/XMLDOMConfiguration.js","webpack:///./node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js","webpack:///./node_modules/xmlbuilder/lib/XMLDOMStringList.js","webpack:///./node_modules/xmlbuilder/lib/XMLNodeList.js","webpack:///./node_modules/xmlbuilder/lib/DocumentPosition.js","webpack:///./node_modules/xmlbuilder/lib/XMLDocumentCB.js","webpack:///./node_modules/xmlbuilder/lib/XMLStreamWriter.js","webpack:///./src/impl/ol/js/wmccontrol.js","webpack:///./src/impl/ol/js/wmclayer.js","webpack:///./src/facade/js/wmclayer.js","webpack:///./src/facade/js/wmccontrol.js","webpack:///./src/facade/js/wmc.js","webpack:///./src/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","Element","Attribute","Text","CData","EntityReference","EntityDeclaration","ProcessingInstruction","Comment","Document","DocType","DocumentFragment","NotationDeclaration","Declaration","Raw","AttributeDeclaration","ElementDeclaration","Dummy","this","DocumentPosition","NodeType","XMLCData","XMLComment","XMLDeclaration","XMLDocType","XMLDummy","XMLElement","XMLNodeList","XMLProcessingInstruction","XMLRaw","XMLText","getValue","isEmpty","isFunction","isObject","hasProp","splice","XMLNode","parent1","parent","options","stringify","children","baseURI","child","j","len","ref1","results","length","push","setParent","attributes","text","childNode","item","k","lastChild","len1","val","Array","isArray","element","apply","ignoreDecorators","convertAttKey","indexOf","attribute","substr","separateArrayItems","dummy","keepNullNodes","convertTextKey","convertCDataKey","cdata","convertCommentKey","comment","convertRawKey","raw","convertPIKey","instruction","node","Error","debugInfo","newChild","refChild","removed","type","isRoot","concat","target","insTarget","insValue","version","encoding","standalone","doc","xmldec","document","unshift","root","pubID","sysID","doctype","ref2","rootObject","end","clonedRoot","clone","documentObject","declaration","up","importDocument","oldChild","deep","feature","attribs","other","res","Disconnected","ImplementationSpecific","Math","random","Preceding","Following","isAncestor","Contains","isDescendant","isPreceding","namespaceURI","prefix","nodeType","isEqualNode","data","handler","nodePos","thisPos","treePosition","found","pos","foreachTreeNode","func","childNodeList","nodes","str","textContent","set","assign","isPlainObject","sources","source","arguments","toString","ref","ctor","proto","getPrototypeOf","constructor","Function","obj","valueOf","XMLCharacterData","super","offset","count","arg","None","OpenTag","InsideTag","CloseTag","XMLAttribute","XMLNamedNodeMap","schemaTypeInfo","att","attName","clonedSelf","forEach","clonedChild","attValue","keepNullAttributes","writer","filterOptions","newAttr","oldAttr","localName","qualifiedName","isId","idAttr","tagname","classNames","attributeMap","oldNode","nodeName","index","keys","xmlVersion","xmlEncoding","xmlStandalone","XMLDTDAttList","XMLDTDElement","XMLDTDEntity","XMLDTDNotation","dtdPubID","dtdSysID","elementName","attributeName","attributeType","defaultValueType","defaultValue","docType","attList","entity","pEntity","notation","publicId","systemId","pe","match","dtdAttType","dtdAttDefault","dtdAttList","internal","nData","dtdNData","dtdEntityValue","dtdEntity","join","dtdElementValue","dtdElement","dtdNotation","content","next","prev","previousSibling","nextSibling","processingInstruction","XMLWriterBase","writeChildNode","pretty","slice","newline","title","XMLDOMConfiguration","XMLDOMImplementation","XMLStringWriter","XMLStringifier","XMLDocument","documentURI","domConfig","writerOptions","tagName","importedNode","elementId","eventInterface","whatToShow","filter","assertLegalChar","assertLegalName","noValidation","textEscape","replace","attEscape","regex","ampregex","noDoubleEncoding","WriterState","filteredOptions","ref3","ref4","ref5","ref6","ref7","allowEmpty","indent","width","dontPrettyTextNodes","dontprettytextnodes","spaceBeforeSlash","spacebeforeslash","suppressPrettyCount","user","state","level","indentLevel","openAttribute","closeAttribute","openNode","endline","closeNode","childNodeCount","firstChildNode","len2","prettySuppressed","ratt","rline","every","e","XMLDocumentCB","XMLStreamWriter","headless","dtd","begin","onData","onEnd","stringWriter","streamWriter","stream","implementation","writerState","XMLDOMErrorHandler","XMLDOMStringList","defaultParams","params","error","arr","ContainedBy","onDataCallback","onEndCallback","currentNode","currentLevel","openTags","documentStarted","documentCompleted","createChildNode","openCurrent","oldValidationFlag","rootNodeName","chunk","isOpen","isClosed","isLastRootNode","write","WmcControl","M","impl","Control","map","html","facadeMap_","olMap","getMapImpl","ol","control","addControl","viewContext","General","BoundingBox","LayerList","Layer","$version","$xmlns","$id","Title","$SRS","getProjection","code","extent","getBbox","$minx","x","min","$miny","y","$maxx","max","$maxy","KeywordList","Keyword","Abstract","Extension","maxExtent","getMaxExtent","getWMS","layer","wmcLayer","$hidden","isVisible","$queryable","isQueryable","Name","legend","Server","OnlineResource","url","$service","transparent","StyleList","Style","$current","LegendURL","$width","$height","$format","getLegendURL","getOpacity","displayInLayerSwitcher","tiled","WmcLayer","WMC","projection","selected","getWMC","unselect","setProjection","getCode","units","getUnits","utils","isNullOrEmpty","bbox","setBbox","nearest","dialog","info","setMaxExtent","layers","addWMS","fire","evt","CHANGE_WMC","documentXML","Promise","success","fail","context","format","wmc","readFromDocument","remote","then","response","wmcDocument","xml","sort","layerA","layerB","result","visibleA","visibleB","isBaseLayerA","isBaseLayerB","bounds","proj","isUndefined","WmcLayerImpl","exception","setImpl","WmcImplControl","file_","inputUrl_","loadBtn_","saveBtn_","inputsTabs_","selectedTab_","inputWMCLoadName_","inputWMCSaveName_","inputFile","querySelector","querySelectorAll","dataset","tab","addEventListener","changeFile","files","loadWMC","saveWMC","checkButtons","changeTab","template","compileSync","addEvents","selector","CSS","escape","itemTarget","window","event","disabled","file","size","trim","fileName","ViewContext","getImpl","getViewContext","xmlbuilder","textFileAsBlob","Blob","navigator","msSaveOrOpenBlob","downloadLink","createElement","download","innerHTML","href","URL","createObjectURL","onclick","destroyClickedElement","style","display","body","appendChild","click","fileReader","FileReader","DOMParser","parseFromString","addToMap","readAsText","addWMC","ADDED_LAYER","ADDED_WMC","loadContext","loadContextParameters","wmcselectorActive","getControls","addControls","WMCSelector","select","removeChild","Wmc","Plugin","parameters","map_","control_","panel_","params_","options_","metadata_","api","metadata","ui","Panel","collapsible","className","collapsedButtonClass","position","TR","tooltip","on","ADDED_TO_MAP","enableTouchScroll","addPanels","removeControls","plugin","M$plugin$Wmc","M$control$WmcControl","M$impl$control$WmcControl","M$impl$control$WmcLayer"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,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AC7B3f,KAAK0f,KAAKmB,UAAU7gB,KAAK4f,QAEzB5f,KAAK2f,SAASe,GAAG/M,EAAEqF,IAAI2H,cAAc,WACnC,EAAK5H,KAAKpF,EAAEqF,IAAI2H,mB,qBAOpB,WACE3gB,KAAK0f,KAAKoB,eAAe,CAAC9gB,KAAK2f,WADvB,MAEiD,CAAC,KAAM,KAAM,KAAM,MAA3E3f,KAAK0f,KAFE,KAEI1f,KAAK2f,SAFT,KAEmB3f,KAAK4f,OAFxB,KAEgC5f,KAAK8f,SAFrC,O,oBAUV,SAAOiB,GACL,IAAI7G,GAAS,EAIb,OAHI6G,aAAkBxB,IACpBrF,GAAS,GAEJA,I,gBAUT,WACE,MAAO,Q,yBAUT,WACE,OAAOla,KAAK+f,e,gCCtIXtD,OAAO9I,EAAEoN,SAAQtE,OAAO9I,EAAEoN,OAAS,IACnCtE,OAAO9I,EAAES,UAASqI,OAAO9I,EAAES,QAAU,IACrCqI,OAAO9I,EAAEC,OAAM6I,OAAO9I,EAAEC,KAAO,IAC/B6I,OAAO9I,EAAEC,KAAKQ,UAASqI,OAAO9I,EAAEC,KAAKQ,QAAU,IACpDqI,OAAO9I,EAAEoN,OAAOxB,IAAMyB,EACtBvE,OAAO9I,EAAES,QAAQV,WAAauN,EAC9BxE,OAAO9I,EAAEC,KAAKQ,QAAQV,WAAawN,EACnCzE,OAAO9I,EAAEC,KAAKQ,QAAQuD,SAAWwJ","file":"wmc.ol.min.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 36);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n module.exports = {\n Element: 1,\n Attribute: 2,\n Text: 3,\n CData: 4,\n EntityReference: 5,\n EntityDeclaration: 6,\n ProcessingInstruction: 7,\n Comment: 8,\n Document: 9,\n DocType: 10,\n DocumentFragment: 11,\n NotationDeclaration: 12,\n // Numeric codes up to 200 are reserved to W3C for possible future use.\n // Following are types internal to this library:\n Declaration: 201,\n Raw: 202,\n AttributeDeclaration: 203,\n ElementDeclaration: 204,\n Dummy: 205\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var DocumentPosition, NodeType, XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLNamedNodeMap, XMLNode, XMLNodeList, XMLProcessingInstruction, XMLRaw, XMLText, getValue, isEmpty, isFunction, isObject,\n hasProp = {}.hasOwnProperty,\n splice = [].splice;\n\n ({isObject, isFunction, isEmpty, getValue} = require('./Utility'));\n\n XMLElement = null;\n\n XMLCData = null;\n\n XMLComment = null;\n\n XMLDeclaration = null;\n\n XMLDocType = null;\n\n XMLRaw = null;\n\n XMLText = null;\n\n XMLProcessingInstruction = null;\n\n XMLDummy = null;\n\n NodeType = null;\n\n XMLNodeList = null;\n\n XMLNamedNodeMap = null;\n\n DocumentPosition = null;\n\n // Represents a generic XMl element\n module.exports = XMLNode = (function() {\n class XMLNode {\n // Initializes a new instance of `XMLNode`\n\n // `parent` the parent node\n constructor(parent1) {\n this.parent = parent1;\n if (this.parent) {\n this.options = this.parent.options;\n this.stringify = this.parent.stringify;\n }\n this.value = null;\n this.children = [];\n this.baseURI = null;\n // first execution, load dependencies that are otherwise\n // circular (so we can't load them at the top)\n if (!XMLElement) {\n XMLElement = require('./XMLElement');\n XMLCData = require('./XMLCData');\n XMLComment = require('./XMLComment');\n XMLDeclaration = require('./XMLDeclaration');\n XMLDocType = require('./XMLDocType');\n XMLRaw = require('./XMLRaw');\n XMLText = require('./XMLText');\n XMLProcessingInstruction = require('./XMLProcessingInstruction');\n XMLDummy = require('./XMLDummy');\n NodeType = require('./NodeType');\n XMLNodeList = require('./XMLNodeList');\n XMLNamedNodeMap = require('./XMLNamedNodeMap');\n DocumentPosition = require('./DocumentPosition');\n }\n }\n\n \n // Sets the parent node of this node and its children recursively\n\n // `parent` the parent node\n setParent(parent) {\n var child, j, len, ref1, results;\n this.parent = parent;\n if (parent) {\n this.options = parent.options;\n this.stringify = parent.stringify;\n }\n ref1 = this.children;\n results = [];\n for (j = 0, len = ref1.length; j < len; j++) {\n child = ref1[j];\n results.push(child.setParent(this));\n }\n return results;\n }\n\n // Creates a child element node\n\n // `name` node name or an object describing the XML tree\n // `attributes` an object containing name/value pairs of attributes\n // `text` element text\n element(name, attributes, text) {\n var childNode, item, j, k, key, lastChild, len, len1, val;\n lastChild = null;\n if (attributes === null && (text == null)) {\n [attributes, text] = [{}, null];\n }\n if (attributes == null) {\n attributes = {};\n }\n attributes = getValue(attributes);\n // swap argument order: text <-> attributes\n if (!isObject(attributes)) {\n [text, attributes] = [attributes, text];\n }\n if (name != null) {\n name = getValue(name);\n }\n // expand if array\n if (Array.isArray(name)) {\n for (j = 0, len = name.length; j < len; j++) {\n item = name[j];\n lastChild = this.element(item);\n }\n // evaluate if function\n } else if (isFunction(name)) {\n lastChild = this.element(name.apply());\n // expand if object\n } else if (isObject(name)) {\n for (key in name) {\n if (!hasProp.call(name, key)) continue;\n val = name[key];\n if (isFunction(val)) {\n // evaluate if function\n val = val.apply();\n }\n // assign attributes\n if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) {\n lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val);\n // skip empty arrays\n } else if (!this.options.separateArrayItems && Array.isArray(val) && isEmpty(val)) {\n lastChild = this.dummy();\n // empty objects produce one node\n } else if (isObject(val) && isEmpty(val)) {\n lastChild = this.element(key);\n // skip null and undefined nodes\n } else if (!this.options.keepNullNodes && (val == null)) {\n lastChild = this.dummy();\n \n // expand list by creating child nodes\n } else if (!this.options.separateArrayItems && Array.isArray(val)) {\n for (k = 0, len1 = val.length; k < len1; k++) {\n item = val[k];\n childNode = {};\n childNode[key] = item;\n lastChild = this.element(childNode);\n }\n \n // expand child nodes under parent\n } else if (isObject(val)) {\n // if the key is #text expand child nodes under this node to support mixed content\n if (!this.options.ignoreDecorators && this.stringify.convertTextKey && key.indexOf(this.stringify.convertTextKey) === 0) {\n lastChild = this.element(val);\n } else {\n lastChild = this.element(key);\n lastChild.element(val);\n }\n } else {\n \n // text node\n lastChild = this.element(key, val);\n }\n }\n // skip null nodes\n } else if (!this.options.keepNullNodes && text === null) {\n lastChild = this.dummy();\n } else {\n // text node\n if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) {\n lastChild = this.text(text);\n // cdata node\n } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) {\n lastChild = this.cdata(text);\n // comment node\n } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) {\n lastChild = this.comment(text);\n // raw text node\n } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) {\n lastChild = this.raw(text);\n // processing instruction\n } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && name.indexOf(this.stringify.convertPIKey) === 0) {\n lastChild = this.instruction(name.substr(this.stringify.convertPIKey.length), text);\n } else {\n // element node\n lastChild = this.node(name, attributes, text);\n }\n }\n if (lastChild == null) {\n throw new Error(\"Could not create any elements with: \" + name + \". \" + this.debugInfo());\n }\n return lastChild;\n }\n\n // Creates a child element node before the current node\n\n // `name` node name or an object describing the XML tree\n // `attributes` an object containing name/value pairs of attributes\n // `text` element text\n insertBefore(name, attributes, text) {\n var child, i, newChild, refChild, removed;\n // DOM level 1\n // insertBefore(newChild, refChild) inserts the child node newChild before refChild\n if (name != null ? name.type : void 0) {\n newChild = name;\n refChild = attributes;\n newChild.setParent(this);\n if (refChild) {\n // temporarily remove children starting *with* refChild\n i = children.indexOf(refChild);\n removed = children.splice(i);\n \n // add the new child\n children.push(newChild);\n \n // add back removed children after new child\n Array.prototype.push.apply(children, removed);\n } else {\n children.push(newChild);\n }\n return newChild;\n } else {\n if (this.isRoot) {\n throw new Error(\"Cannot insert elements at root level. \" + this.debugInfo(name));\n }\n \n // temporarily remove children starting *with* this\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i);\n \n // add the new child\n child = this.parent.element(name, attributes, text);\n \n // add back removed children after new child\n Array.prototype.push.apply(this.parent.children, removed);\n return child;\n }\n }\n\n // Creates a child element node after the current node\n\n // `name` node name or an object describing the XML tree\n // `attributes` an object containing name/value pairs of attributes\n // `text` element text\n insertAfter(name, attributes, text) {\n var child, i, removed;\n if (this.isRoot) {\n throw new Error(\"Cannot insert elements at root level. \" + this.debugInfo(name));\n }\n \n // temporarily remove children starting *after* this\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i + 1);\n \n // add the new child\n child = this.parent.element(name, attributes, text);\n \n // add back removed children after new child\n Array.prototype.push.apply(this.parent.children, removed);\n return child;\n }\n\n // Deletes a child element node\n\n remove() {\n var i, ref1;\n if (this.isRoot) {\n throw new Error(\"Cannot remove the root element. \" + this.debugInfo());\n }\n i = this.parent.children.indexOf(this);\n splice.apply(this.parent.children, [i, i - i + 1].concat(ref1 = [])), ref1;\n return this.parent;\n }\n\n // Creates a node\n\n // `name` name of the node\n // `attributes` an object containing name/value pairs of attributes\n // `text` element text\n node(name, attributes, text) {\n var child;\n if (name != null) {\n name = getValue(name);\n }\n attributes || (attributes = {});\n attributes = getValue(attributes);\n // swap argument order: text <-> attributes\n if (!isObject(attributes)) {\n [text, attributes] = [attributes, text];\n }\n child = new XMLElement(this, name, attributes);\n if (text != null) {\n child.text(text);\n }\n this.children.push(child);\n return child;\n }\n\n // Creates a text node\n\n // `value` element text\n text(value) {\n var child;\n if (isObject(value)) {\n this.element(value);\n }\n child = new XMLText(this, value);\n this.children.push(child);\n return this;\n }\n\n // Creates a CDATA node\n\n // `value` element text without CDATA delimiters\n cdata(value) {\n var child;\n child = new XMLCData(this, value);\n this.children.push(child);\n return this;\n }\n\n // Creates a comment node\n\n // `value` comment text\n comment(value) {\n var child;\n child = new XMLComment(this, value);\n this.children.push(child);\n return this;\n }\n\n // Creates a comment node before the current node\n\n // `value` comment text\n commentBefore(value) {\n var child, i, removed;\n // temporarily remove children starting *with* this\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i);\n // add the new child\n child = this.parent.comment(value);\n // add back removed children after new child\n Array.prototype.push.apply(this.parent.children, removed);\n return this;\n }\n\n // Creates a comment node after the current node\n\n // `value` comment text\n commentAfter(value) {\n var child, i, removed;\n // temporarily remove children starting *after* this\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i + 1);\n // add the new child\n child = this.parent.comment(value);\n // add back removed children after new child\n Array.prototype.push.apply(this.parent.children, removed);\n return this;\n }\n\n // Adds unescaped raw text\n\n // `value` text\n raw(value) {\n var child;\n child = new XMLRaw(this, value);\n this.children.push(child);\n return this;\n }\n\n // Adds a dummy node\n dummy() {\n var child;\n child = new XMLDummy(this);\n // Normally when a new node is created it is added to the child node collection.\n // However, dummy nodes are never added to the XML tree. They are created while\n // converting JS objects to XML nodes in order not to break the recursive function\n // chain. They can be thought of as invisible nodes. They can be traversed through\n // by using prev(), next(), up(), etc. functions but they do not exists in the tree.\n\n // @children.push child\n return child;\n }\n\n // Adds a processing instruction\n\n // `target` instruction target\n // `value` instruction value\n instruction(target, value) {\n var insTarget, insValue, instruction, j, len;\n if (target != null) {\n target = getValue(target);\n }\n if (value != null) {\n value = getValue(value);\n }\n if (Array.isArray(target)) { // expand if array\n for (j = 0, len = target.length; j < len; j++) {\n insTarget = target[j];\n this.instruction(insTarget);\n }\n } else if (isObject(target)) { // expand if object\n for (insTarget in target) {\n if (!hasProp.call(target, insTarget)) continue;\n insValue = target[insTarget];\n this.instruction(insTarget, insValue);\n }\n } else {\n if (isFunction(value)) {\n value = value.apply();\n }\n instruction = new XMLProcessingInstruction(this, target, value);\n this.children.push(instruction);\n }\n return this;\n }\n\n // Creates a processing instruction node before the current node\n\n // `target` instruction target\n // `value` instruction value\n instructionBefore(target, value) {\n var child, i, removed;\n // temporarily remove children starting *with* this\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i);\n // add the new child\n child = this.parent.instruction(target, value);\n // add back removed children after new child\n Array.prototype.push.apply(this.parent.children, removed);\n return this;\n }\n\n // Creates a processing instruction node after the current node\n\n // `target` instruction target\n // `value` instruction value\n instructionAfter(target, value) {\n var child, i, removed;\n // temporarily remove children starting *after* this\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i + 1);\n // add the new child\n child = this.parent.instruction(target, value);\n // add back removed children after new child\n Array.prototype.push.apply(this.parent.children, removed);\n return this;\n }\n\n // Creates the xml declaration\n\n // `version` A version number string, e.g. 1.0\n // `encoding` Encoding declaration, e.g. UTF-8\n // `standalone` standalone document declaration: true or false\n declaration(version, encoding, standalone) {\n var doc, xmldec;\n doc = this.document();\n xmldec = new XMLDeclaration(doc, version, encoding, standalone);\n // Replace XML declaration if exists, otherwise insert at top\n if (doc.children.length === 0) {\n doc.children.unshift(xmldec);\n } else if (doc.children[0].type === NodeType.Declaration) {\n doc.children[0] = xmldec;\n } else {\n doc.children.unshift(xmldec);\n }\n return doc.root() || doc;\n }\n\n // Creates the document type declaration\n\n // `pubID` the public identifier of the external subset\n // `sysID` the system identifier of the external subset\n dtd(pubID, sysID) {\n var child, doc, doctype, i, j, k, len, len1, ref1, ref2;\n doc = this.document();\n doctype = new XMLDocType(doc, pubID, sysID);\n ref1 = doc.children;\n // Replace DTD if exists\n for (i = j = 0, len = ref1.length; j < len; i = ++j) {\n child = ref1[i];\n if (child.type === NodeType.DocType) {\n doc.children[i] = doctype;\n return doctype;\n }\n }\n ref2 = doc.children;\n // insert before root node if the root node exists\n for (i = k = 0, len1 = ref2.length; k < len1; i = ++k) {\n child = ref2[i];\n if (child.isRoot) {\n doc.children.splice(i, 0, doctype);\n return doctype;\n }\n }\n // otherwise append to end\n doc.children.push(doctype);\n return doctype;\n }\n\n // Gets the parent node\n up() {\n if (this.isRoot) {\n throw new Error(\"The root node has no parent. Use doc() if you need to get the document object.\");\n }\n return this.parent;\n }\n\n // Gets the root node\n root() {\n var node;\n node = this;\n while (node) {\n if (node.type === NodeType.Document) {\n return node.rootObject;\n } else if (node.isRoot) {\n return node;\n } else {\n node = node.parent;\n }\n }\n }\n\n // Gets the node representing the XML document\n document() {\n var node;\n node = this;\n while (node) {\n if (node.type === NodeType.Document) {\n return node;\n } else {\n node = node.parent;\n }\n }\n }\n\n // Ends the document and converts string\n end(options) {\n return this.document().end(options);\n }\n\n // Gets the previous node\n prev() {\n var i;\n i = this.parent.children.indexOf(this);\n if (i < 1) {\n throw new Error(\"Already at the first node. \" + this.debugInfo());\n }\n return this.parent.children[i - 1];\n }\n\n // Gets the next node\n next() {\n var i;\n i = this.parent.children.indexOf(this);\n if (i === -1 || i === this.parent.children.length - 1) {\n throw new Error(\"Already at the last node. \" + this.debugInfo());\n }\n return this.parent.children[i + 1];\n }\n\n // Imports cloned root from another XML document\n\n // `doc` the XML document to insert nodes from\n importDocument(doc) {\n var child, clonedRoot, j, len, ref1;\n clonedRoot = doc.root().clone();\n clonedRoot.parent = this;\n clonedRoot.isRoot = false;\n this.children.push(clonedRoot);\n // set properties if imported element becomes the root node\n if (this.type === NodeType.Document) {\n clonedRoot.isRoot = true;\n clonedRoot.documentObject = this;\n this.rootObject = clonedRoot;\n // set dtd name\n if (this.children) {\n ref1 = this.children;\n for (j = 0, len = ref1.length; j < len; j++) {\n child = ref1[j];\n if (child.type === NodeType.DocType) {\n child.name = clonedRoot.name;\n break;\n }\n }\n }\n }\n return this;\n }\n\n \n // Returns debug string for this node\n debugInfo(name) {\n var ref1, ref2;\n name = name || this.name;\n if ((name == null) && !((ref1 = this.parent) != null ? ref1.name : void 0)) {\n return \"\";\n } else if (name == null) {\n return \"parent: <\" + this.parent.name + \">\";\n } else if (!((ref2 = this.parent) != null ? ref2.name : void 0)) {\n return \"node: <\" + name + \">\";\n } else {\n return \"node: <\" + name + \">, parent: <\" + this.parent.name + \">\";\n }\n }\n\n // Aliases\n ele(name, attributes, text) {\n return this.element(name, attributes, text);\n }\n\n nod(name, attributes, text) {\n return this.node(name, attributes, text);\n }\n\n txt(value) {\n return this.text(value);\n }\n\n dat(value) {\n return this.cdata(value);\n }\n\n com(value) {\n return this.comment(value);\n }\n\n ins(target, value) {\n return this.instruction(target, value);\n }\n\n doc() {\n return this.document();\n }\n\n dec(version, encoding, standalone) {\n return this.declaration(version, encoding, standalone);\n }\n\n e(name, attributes, text) {\n return this.element(name, attributes, text);\n }\n\n n(name, attributes, text) {\n return this.node(name, attributes, text);\n }\n\n t(value) {\n return this.text(value);\n }\n\n d(value) {\n return this.cdata(value);\n }\n\n c(value) {\n return this.comment(value);\n }\n\n r(value) {\n return this.raw(value);\n }\n\n i(target, value) {\n return this.instruction(target, value);\n }\n\n u() {\n return this.up();\n }\n\n // can be deprecated in a future release\n importXMLBuilder(doc) {\n return this.importDocument(doc);\n }\n\n // Adds or modifies an attribute.\n\n // `name` attribute name\n // `value` attribute value\n attribute(name, value) {\n throw new Error(\"attribute() applies to element nodes only.\");\n }\n\n att(name, value) {\n return this.attribute(name, value);\n }\n\n a(name, value) {\n return this.attribute(name, value);\n }\n\n // Removes an attribute\n\n // `name` attribute name\n removeAttribute(name) {\n throw new Error(\"attribute() applies to element nodes only.\");\n }\n\n // DOM level 1 functions to be implemented later\n replaceChild(newChild, oldChild) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n removeChild(oldChild) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n appendChild(newChild) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n hasChildNodes() {\n return this.children.length !== 0;\n }\n\n cloneNode(deep) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n normalize() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n // DOM level 2\n isSupported(feature, version) {\n return true;\n }\n\n hasAttributes() {\n return this.attribs.length !== 0;\n }\n\n // DOM level 3 functions to be implemented later\n compareDocumentPosition(other) {\n var ref, res;\n ref = this;\n if (ref === other) {\n return 0;\n } else if (this.document() !== other.document()) {\n res = DocumentPosition.Disconnected | DocumentPosition.ImplementationSpecific;\n if (Math.random() < 0.5) {\n res |= DocumentPosition.Preceding;\n } else {\n res |= DocumentPosition.Following;\n }\n return res;\n } else if (ref.isAncestor(other)) {\n return DocumentPosition.Contains | DocumentPosition.Preceding;\n } else if (ref.isDescendant(other)) {\n return DocumentPosition.Contains | DocumentPosition.Following;\n } else if (ref.isPreceding(other)) {\n return DocumentPosition.Preceding;\n } else {\n return DocumentPosition.Following;\n }\n }\n\n isSameNode(other) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n lookupPrefix(namespaceURI) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n isDefaultNamespace(namespaceURI) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n lookupNamespaceURI(prefix) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n isEqualNode(node) {\n var i, j, ref1;\n if (node.nodeType !== this.nodeType) {\n return false;\n }\n if (node.children.length !== this.children.length) {\n return false;\n }\n for (i = j = 0, ref1 = this.children.length - 1; (0 <= ref1 ? j <= ref1 : j >= ref1); i = 0 <= ref1 ? ++j : --j) {\n if (!this.children[i].isEqualNode(node.children[i])) {\n return false;\n }\n }\n return true;\n }\n\n getFeature(feature, version) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n setUserData(key, data, handler) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getUserData(key) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n // Returns true if other is an inclusive descendant of node,\n // and false otherwise.\n contains(other) {\n if (!other) {\n return false;\n }\n return other === this || this.isDescendant(other);\n }\n\n // An object A is called a descendant of an object B, if either A is \n // a child of B or A is a child of an object C that is a descendant of B.\n isDescendant(node) {\n var child, isDescendantChild, j, len, ref1;\n ref1 = this.children;\n for (j = 0, len = ref1.length; j < len; j++) {\n child = ref1[j];\n if (node === child) {\n return true;\n }\n isDescendantChild = child.isDescendant(node);\n if (isDescendantChild) {\n return true;\n }\n }\n return false;\n }\n\n // An object A is called an ancestor of an object B if and only if\n // B is a descendant of A.\n isAncestor(node) {\n return node.isDescendant(this);\n }\n\n // An object A is preceding an object B if A and B are in the \n // same tree and A comes before B in tree order.\n isPreceding(node) {\n var nodePos, thisPos;\n nodePos = this.treePosition(node);\n thisPos = this.treePosition(this);\n if (nodePos === -1 || thisPos === -1) {\n return false;\n } else {\n return nodePos < thisPos;\n }\n }\n\n // An object A is folllowing an object B if A and B are in the \n // same tree and A comes after B in tree order.\n isFollowing(node) {\n var nodePos, thisPos;\n nodePos = this.treePosition(node);\n thisPos = this.treePosition(this);\n if (nodePos === -1 || thisPos === -1) {\n return false;\n } else {\n return nodePos > thisPos;\n }\n }\n\n // Returns the preorder position of the given node in the tree, or -1\n // if the node is not in the tree.\n treePosition(node) {\n var found, pos;\n pos = 0;\n found = false;\n this.foreachTreeNode(this.document(), function(childNode) {\n pos++;\n if (!found && childNode === node) {\n return found = true;\n }\n });\n if (found) {\n return pos;\n } else {\n return -1;\n }\n }\n\n \n // Depth-first preorder traversal through the XML tree\n foreachTreeNode(node, func) {\n var child, j, len, ref1, res;\n node || (node = this.document());\n ref1 = node.children;\n for (j = 0, len = ref1.length; j < len; j++) {\n child = ref1[j];\n if (res = func(child)) {\n return res;\n } else {\n res = this.foreachTreeNode(child, func);\n if (res) {\n return res;\n }\n }\n }\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLNode.prototype, 'nodeName', {\n get: function() {\n return this.name;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'nodeType', {\n get: function() {\n return this.type;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'nodeValue', {\n get: function() {\n return this.value;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'parentNode', {\n get: function() {\n return this.parent;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'childNodes', {\n get: function() {\n if (!this.childNodeList || !this.childNodeList.nodes) {\n this.childNodeList = new XMLNodeList(this.children);\n }\n return this.childNodeList;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'firstChild', {\n get: function() {\n return this.children[0] || null;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'lastChild', {\n get: function() {\n return this.children[this.children.length - 1] || null;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'previousSibling', {\n get: function() {\n var i;\n i = this.parent.children.indexOf(this);\n return this.parent.children[i - 1] || null;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'nextSibling', {\n get: function() {\n var i;\n i = this.parent.children.indexOf(this);\n return this.parent.children[i + 1] || null;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'ownerDocument', {\n get: function() {\n return this.document() || null;\n }\n });\n\n // DOM level 3\n Object.defineProperty(XMLNode.prototype, 'textContent', {\n get: function() {\n var child, j, len, ref1, str;\n if (this.nodeType === NodeType.Element || this.nodeType === NodeType.DocumentFragment) {\n str = '';\n ref1 = this.children;\n for (j = 0, len = ref1.length; j < len; j++) {\n child = ref1[j];\n if (child.textContent) {\n str += child.textContent;\n }\n }\n return str;\n } else {\n return null;\n }\n },\n set: function(value) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n return XMLNode;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n // Copies all enumerable own properties from `sources` to `target`\n var assign, getValue, isArray, isEmpty, isFunction, isObject, isPlainObject,\n hasProp = {}.hasOwnProperty;\n\n assign = function(target, ...sources) {\n var i, key, len, source;\n if (isFunction(Object.assign)) {\n Object.assign.apply(null, arguments);\n } else {\n for (i = 0, len = sources.length; i < len; i++) {\n source = sources[i];\n if (source != null) {\n for (key in source) {\n if (!hasProp.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n }\n }\n return target;\n };\n\n // Determines if `val` is a Function object\n isFunction = function(val) {\n return !!val && Object.prototype.toString.call(val) === '[object Function]';\n };\n\n // Determines if `val` is an Object\n isObject = function(val) {\n var ref;\n return !!val && ((ref = typeof val) === 'function' || ref === 'object');\n };\n\n // Determines if `val` is an Array\n isArray = function(val) {\n if (isFunction(Array.isArray)) {\n return Array.isArray(val);\n } else {\n return Object.prototype.toString.call(val) === '[object Array]';\n }\n };\n\n // Determines if `val` is an empty Array or an Object with no own properties\n isEmpty = function(val) {\n var key;\n if (isArray(val)) {\n return !val.length;\n } else {\n for (key in val) {\n if (!hasProp.call(val, key)) continue;\n return false;\n }\n return true;\n }\n };\n\n // Determines if `val` is a plain Object\n isPlainObject = function(val) {\n var ctor, proto;\n return isObject(val) && (proto = Object.getPrototypeOf(val)) && (ctor = proto.constructor) && (typeof ctor === 'function') && (ctor instanceof ctor) && (Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object));\n };\n\n // Gets the primitive value of an object\n getValue = function(obj) {\n if (isFunction(obj.valueOf)) {\n return obj.valueOf();\n } else {\n return obj;\n }\n };\n\n module.exports.assign = assign;\n\n module.exports.isFunction = isFunction;\n\n module.exports.isObject = isObject;\n\n module.exports.isArray = isArray;\n\n module.exports.isEmpty = isEmpty;\n\n module.exports.isPlainObject = isPlainObject;\n\n module.exports.getValue = getValue;\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var XMLCharacterData, XMLNode;\n\n XMLNode = require('./XMLNode');\n\n // Represents a character data node\n module.exports = XMLCharacterData = (function() {\n class XMLCharacterData extends XMLNode {\n // Initializes a new instance of `XMLCharacterData`\n\n constructor(parent) {\n super(parent);\n this.value = '';\n }\n\n \n // Creates and returns a deep clone of `this`\n clone() {\n return Object.create(this);\n }\n\n // DOM level 1 functions to be implemented later\n substringData(offset, count) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n appendData(arg) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n insertData(offset, arg) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n deleteData(offset, count) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n replaceData(offset, count, arg) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n isEqualNode(node) {\n if (!super.isEqualNode(node)) {\n return false;\n }\n if (node.data !== this.data) {\n return false;\n }\n return true;\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLCharacterData.prototype, 'data', {\n get: function() {\n return this.value;\n },\n set: function(value) {\n return this.value = value || '';\n }\n });\n\n Object.defineProperty(XMLCharacterData.prototype, 'length', {\n get: function() {\n return this.value.length;\n }\n });\n\n // DOM level 3\n Object.defineProperty(XMLCharacterData.prototype, 'textContent', {\n get: function() {\n return this.value;\n },\n set: function(value) {\n return this.value = value || '';\n }\n });\n\n return XMLCharacterData;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n module.exports = {\n None: 0,\n OpenTag: 1,\n InsideTag: 2,\n CloseTag: 3\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLAttribute, XMLElement, XMLNamedNodeMap, XMLNode, getValue, isFunction, isObject,\n hasProp = {}.hasOwnProperty;\n\n ({isObject, isFunction, getValue} = require('./Utility'));\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n XMLAttribute = require('./XMLAttribute');\n\n XMLNamedNodeMap = require('./XMLNamedNodeMap');\n\n // Represents an element of the XML document\n module.exports = XMLElement = (function() {\n class XMLElement extends XMLNode {\n // Initializes a new instance of `XMLElement`\n\n // `parent` the parent node\n // `name` element name\n // `attributes` an object containing name/value pairs of attributes\n constructor(parent, name, attributes) {\n var child, j, len, ref;\n super(parent);\n if (name == null) {\n throw new Error(\"Missing element name. \" + this.debugInfo());\n }\n this.name = this.stringify.name(name);\n this.type = NodeType.Element;\n this.attribs = {};\n this.schemaTypeInfo = null;\n if (attributes != null) {\n this.attribute(attributes);\n }\n // set properties if this is the root node\n if (parent.type === NodeType.Document) {\n this.isRoot = true;\n this.documentObject = parent;\n parent.rootObject = this;\n // set dtd name\n if (parent.children) {\n ref = parent.children;\n for (j = 0, len = ref.length; j < len; j++) {\n child = ref[j];\n if (child.type === NodeType.DocType) {\n child.name = this.name;\n break;\n }\n }\n }\n }\n }\n\n // Creates and returns a deep clone of `this`\n\n clone() {\n var att, attName, clonedSelf, ref;\n clonedSelf = Object.create(this);\n // remove document element\n if (clonedSelf.isRoot) {\n clonedSelf.documentObject = null;\n }\n // clone attributes\n clonedSelf.attribs = {};\n ref = this.attribs;\n for (attName in ref) {\n if (!hasProp.call(ref, attName)) continue;\n att = ref[attName];\n clonedSelf.attribs[attName] = att.clone();\n }\n // clone child nodes\n clonedSelf.children = [];\n this.children.forEach(function(child) {\n var clonedChild;\n clonedChild = child.clone();\n clonedChild.parent = clonedSelf;\n return clonedSelf.children.push(clonedChild);\n });\n return clonedSelf;\n }\n\n // Adds or modifies an attribute\n\n // `name` attribute name\n // `value` attribute value\n attribute(name, value) {\n var attName, attValue;\n if (name != null) {\n name = getValue(name);\n }\n if (isObject(name)) { // expand if object\n for (attName in name) {\n if (!hasProp.call(name, attName)) continue;\n attValue = name[attName];\n this.attribute(attName, attValue);\n }\n } else {\n if (isFunction(value)) {\n value = value.apply();\n }\n if (this.options.keepNullAttributes && (value == null)) {\n this.attribs[name] = new XMLAttribute(this, name, \"\");\n } else if (value != null) {\n this.attribs[name] = new XMLAttribute(this, name, value);\n }\n }\n return this;\n }\n\n // Removes an attribute\n\n // `name` attribute name\n removeAttribute(name) {\n var attName, j, len;\n // Also defined in DOM level 1\n // removeAttribute(name) removes an attribute by name.\n if (name == null) {\n throw new Error(\"Missing attribute name. \" + this.debugInfo());\n }\n name = getValue(name);\n if (Array.isArray(name)) { // expand if array\n for (j = 0, len = name.length; j < len; j++) {\n attName = name[j];\n delete this.attribs[attName];\n }\n } else {\n delete this.attribs[name];\n }\n return this;\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n // `options.allowEmpty` do not self close empty element tags\n toString(options) {\n return this.options.writer.element(this, this.options.writer.filterOptions(options));\n }\n\n // Aliases\n att(name, value) {\n return this.attribute(name, value);\n }\n\n a(name, value) {\n return this.attribute(name, value);\n }\n\n // DOM Level 1\n getAttribute(name) {\n if (this.attribs.hasOwnProperty(name)) {\n return this.attribs[name].value;\n } else {\n return null;\n }\n }\n\n setAttribute(name, value) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getAttributeNode(name) {\n if (this.attribs.hasOwnProperty(name)) {\n return this.attribs[name];\n } else {\n return null;\n }\n }\n\n setAttributeNode(newAttr) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n removeAttributeNode(oldAttr) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getElementsByTagName(name) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n // DOM Level 2\n getAttributeNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n setAttributeNS(namespaceURI, qualifiedName, value) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n removeAttributeNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getAttributeNodeNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n setAttributeNodeNS(newAttr) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getElementsByTagNameNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n hasAttribute(name) {\n return this.attribs.hasOwnProperty(name);\n }\n\n hasAttributeNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n // DOM Level 3\n setIdAttribute(name, isId) {\n if (this.attribs.hasOwnProperty(name)) {\n return this.attribs[name].isId;\n } else {\n return isId;\n }\n }\n\n setIdAttributeNS(namespaceURI, localName, isId) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n setIdAttributeNode(idAttr, isId) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n // DOM Level 4\n getElementsByTagName(tagname) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getElementsByTagNameNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getElementsByClassName(classNames) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n isEqualNode(node) {\n var i, j, ref;\n if (!super.isEqualNode(node)) {\n return false;\n }\n if (node.namespaceURI !== this.namespaceURI) {\n return false;\n }\n if (node.prefix !== this.prefix) {\n return false;\n }\n if (node.localName !== this.localName) {\n return false;\n }\n if (node.attribs.length !== this.attribs.length) {\n return false;\n }\n for (i = j = 0, ref = this.attribs.length - 1; (0 <= ref ? j <= ref : j >= ref); i = 0 <= ref ? ++j : --j) {\n if (!this.attribs[i].isEqualNode(node.attribs[i])) {\n return false;\n }\n }\n return true;\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLElement.prototype, 'tagName', {\n get: function() {\n return this.name;\n }\n });\n\n // DOM level 4\n Object.defineProperty(XMLElement.prototype, 'namespaceURI', {\n get: function() {\n return '';\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'prefix', {\n get: function() {\n return '';\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'localName', {\n get: function() {\n return this.name;\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'id', {\n get: function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'className', {\n get: function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'classList', {\n get: function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'attributes', {\n get: function() {\n if (!this.attributeMap || !this.attributeMap.nodes) {\n this.attributeMap = new XMLNamedNodeMap(this.attribs);\n }\n return this.attributeMap;\n }\n });\n\n return XMLElement;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n // Represents a map of nodes accessed by a string key\n var XMLNamedNodeMap;\n\n module.exports = XMLNamedNodeMap = (function() {\n class XMLNamedNodeMap {\n // Initializes a new instance of `XMLNamedNodeMap`\n // This is just a wrapper around an ordinary\n // JS object.\n\n // `nodes` the object containing nodes.\n constructor(nodes) {\n this.nodes = nodes;\n }\n\n // Creates and returns a deep clone of `this`\n\n clone() {\n // this class should not be cloned since it wraps\n // around a given object. The calling function should check\n // whether the wrapped object is null and supply a new object\n // (from the clone).\n return this.nodes = null;\n }\n\n // DOM Level 1\n getNamedItem(name) {\n return this.nodes[name];\n }\n\n setNamedItem(node) {\n var oldNode;\n oldNode = this.nodes[node.nodeName];\n this.nodes[node.nodeName] = node;\n return oldNode || null;\n }\n\n removeNamedItem(name) {\n var oldNode;\n oldNode = this.nodes[name];\n delete this.nodes[name];\n return oldNode || null;\n }\n\n item(index) {\n return this.nodes[Object.keys(this.nodes)[index]] || null;\n }\n\n // DOM level 2 functions to be implemented later\n getNamedItemNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\");\n }\n\n setNamedItemNS(node) {\n throw new Error(\"This DOM method is not implemented.\");\n }\n\n removeNamedItemNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\");\n }\n\n };\n\n \n // DOM level 1\n Object.defineProperty(XMLNamedNodeMap.prototype, 'length', {\n get: function() {\n return Object.keys(this.nodes).length || 0;\n }\n });\n\n return XMLNamedNodeMap;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLCData, XMLCharacterData;\n\n NodeType = require('./NodeType');\n\n XMLCharacterData = require('./XMLCharacterData');\n\n // Represents a CDATA node\n module.exports = XMLCData = class XMLCData extends XMLCharacterData {\n // Initializes a new instance of `XMLCData`\n\n // `text` CDATA text\n constructor(parent, text) {\n super(parent);\n if (text == null) {\n throw new Error(\"Missing CDATA text. \" + this.debugInfo());\n }\n this.name = \"#cdata-section\";\n this.type = NodeType.CData;\n this.value = this.stringify.cdata(text);\n }\n\n // Creates and returns a deep clone of `this`\n clone() {\n return Object.create(this);\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.cdata(this, this.options.writer.filterOptions(options));\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLCharacterData, XMLComment;\n\n NodeType = require('./NodeType');\n\n XMLCharacterData = require('./XMLCharacterData');\n\n // Represents a comment node\n module.exports = XMLComment = class XMLComment extends XMLCharacterData {\n // Initializes a new instance of `XMLComment`\n\n // `text` comment text\n constructor(parent, text) {\n super(parent);\n if (text == null) {\n throw new Error(\"Missing comment text. \" + this.debugInfo());\n }\n this.name = \"#comment\";\n this.type = NodeType.Comment;\n this.value = this.stringify.comment(text);\n }\n\n // Creates and returns a deep clone of `this`\n clone() {\n return Object.create(this);\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.comment(this, this.options.writer.filterOptions(options));\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLDeclaration, XMLNode, isObject;\n\n ({isObject} = require('./Utility'));\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n // Represents the XML declaration\n module.exports = XMLDeclaration = class XMLDeclaration extends XMLNode {\n // Initializes a new instance of `XMLDeclaration`\n\n // `parent` the document object\n\n // `version` A version number string, e.g. 1.0\n // `encoding` Encoding declaration, e.g. UTF-8\n // `standalone` standalone document declaration: true or false\n constructor(parent, version, encoding, standalone) {\n super(parent);\n // arguments may also be passed as an object\n if (isObject(version)) {\n ({version, encoding, standalone} = version);\n }\n if (!version) {\n version = '1.0';\n }\n this.type = NodeType.Declaration;\n this.version = this.stringify.xmlVersion(version);\n if (encoding != null) {\n this.encoding = this.stringify.xmlEncoding(encoding);\n }\n if (standalone != null) {\n this.standalone = this.stringify.xmlStandalone(standalone);\n }\n }\n\n // Converts to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.declaration(this, this.options.writer.filterOptions(options));\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLNamedNodeMap, XMLNode, isObject;\n\n ({isObject} = require('./Utility'));\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n XMLDTDAttList = require('./XMLDTDAttList');\n\n XMLDTDEntity = require('./XMLDTDEntity');\n\n XMLDTDElement = require('./XMLDTDElement');\n\n XMLDTDNotation = require('./XMLDTDNotation');\n\n XMLNamedNodeMap = require('./XMLNamedNodeMap');\n\n // Represents doctype declaration\n module.exports = XMLDocType = (function() {\n class XMLDocType extends XMLNode {\n // Initializes a new instance of `XMLDocType`\n\n // `parent` the document object\n\n // `pubID` public identifier of the external subset\n // `sysID` system identifier of the external subset\n constructor(parent, pubID, sysID) {\n var child, i, len, ref;\n super(parent);\n this.type = NodeType.DocType;\n // set DTD name to the name of the root node\n if (parent.children) {\n ref = parent.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n if (child.type === NodeType.Element) {\n this.name = child.name;\n break;\n }\n }\n }\n this.documentObject = parent;\n // arguments may also be passed as an object\n if (isObject(pubID)) {\n ({pubID, sysID} = pubID);\n }\n if (sysID == null) {\n [sysID, pubID] = [pubID, sysID];\n }\n if (pubID != null) {\n this.pubID = this.stringify.dtdPubID(pubID);\n }\n if (sysID != null) {\n this.sysID = this.stringify.dtdSysID(sysID);\n }\n }\n\n // Creates an element type declaration\n\n // `name` element name\n // `value` element content (defaults to #PCDATA)\n element(name, value) {\n var child;\n child = new XMLDTDElement(this, name, value);\n this.children.push(child);\n return this;\n }\n\n // Creates an attribute declaration\n\n // `elementName` the name of the element containing this attribute\n // `attributeName` attribute name\n // `attributeType` type of the attribute (defaults to CDATA)\n // `defaultValueType` default value type (either #REQUIRED, #IMPLIED, #FIXED or\n // #DEFAULT) (defaults to #IMPLIED)\n // `defaultValue` default value of the attribute\n // (only used for #FIXED or #DEFAULT)\n attList(elementName, attributeName, attributeType, defaultValueType, defaultValue) {\n var child;\n child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue);\n this.children.push(child);\n return this;\n }\n\n // Creates a general entity declaration\n\n // `name` the name of the entity\n // `value` internal entity value or an object with external entity details\n // `value.pubID` public identifier\n // `value.sysID` system identifier\n // `value.nData` notation declaration\n entity(name, value) {\n var child;\n child = new XMLDTDEntity(this, false, name, value);\n this.children.push(child);\n return this;\n }\n\n // Creates a parameter entity declaration\n\n // `name` the name of the entity\n // `value` internal entity value or an object with external entity details\n // `value.pubID` public identifier\n // `value.sysID` system identifier\n pEntity(name, value) {\n var child;\n child = new XMLDTDEntity(this, true, name, value);\n this.children.push(child);\n return this;\n }\n\n // Creates a NOTATION declaration\n\n // `name` the name of the notation\n // `value` an object with external entity details\n // `value.pubID` public identifier\n // `value.sysID` system identifier\n notation(name, value) {\n var child;\n child = new XMLDTDNotation(this, name, value);\n this.children.push(child);\n return this;\n }\n\n // Converts to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.docType(this, this.options.writer.filterOptions(options));\n }\n\n // Aliases\n ele(name, value) {\n return this.element(name, value);\n }\n\n att(elementName, attributeName, attributeType, defaultValueType, defaultValue) {\n return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue);\n }\n\n ent(name, value) {\n return this.entity(name, value);\n }\n\n pent(name, value) {\n return this.pEntity(name, value);\n }\n\n not(name, value) {\n return this.notation(name, value);\n }\n\n up() {\n return this.root() || this.documentObject;\n }\n\n isEqualNode(node) {\n if (!super.isEqualNode(node)) {\n return false;\n }\n if (node.name !== this.name) {\n return false;\n }\n if (node.publicId !== this.publicId) {\n return false;\n }\n if (node.systemId !== this.systemId) {\n return false;\n }\n return true;\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLDocType.prototype, 'entities', {\n get: function() {\n var child, i, len, nodes, ref;\n nodes = {};\n ref = this.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n if ((child.type === NodeType.EntityDeclaration) && !child.pe) {\n nodes[child.name] = child;\n }\n }\n return new XMLNamedNodeMap(nodes);\n }\n });\n\n Object.defineProperty(XMLDocType.prototype, 'notations', {\n get: function() {\n var child, i, len, nodes, ref;\n nodes = {};\n ref = this.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n if (child.type === NodeType.NotationDeclaration) {\n nodes[child.name] = child;\n }\n }\n return new XMLNamedNodeMap(nodes);\n }\n });\n\n // DOM level 2\n Object.defineProperty(XMLDocType.prototype, 'publicId', {\n get: function() {\n return this.pubID;\n }\n });\n\n Object.defineProperty(XMLDocType.prototype, 'systemId', {\n get: function() {\n return this.sysID;\n }\n });\n\n Object.defineProperty(XMLDocType.prototype, 'internalSubset', {\n get: function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n return XMLDocType;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLDTDAttList, XMLNode;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n // Represents an attribute list\n module.exports = XMLDTDAttList = class XMLDTDAttList extends XMLNode {\n // Initializes a new instance of `XMLDTDAttList`\n\n // `parent` the parent `XMLDocType` element\n // `elementName` the name of the element containing this attribute\n // `attributeName` attribute name\n // `attributeType` type of the attribute\n // `defaultValueType` default value type (either #REQUIRED, #IMPLIED,\n // #FIXED or #DEFAULT)\n // `defaultValue` default value of the attribute\n // (only used for #FIXED or #DEFAULT)\n constructor(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) {\n super(parent);\n if (elementName == null) {\n throw new Error(\"Missing DTD element name. \" + this.debugInfo());\n }\n if (attributeName == null) {\n throw new Error(\"Missing DTD attribute name. \" + this.debugInfo(elementName));\n }\n if (!attributeType) {\n throw new Error(\"Missing DTD attribute type. \" + this.debugInfo(elementName));\n }\n if (!defaultValueType) {\n throw new Error(\"Missing DTD attribute default. \" + this.debugInfo(elementName));\n }\n if (defaultValueType.indexOf('#') !== 0) {\n defaultValueType = '#' + defaultValueType;\n }\n if (!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) {\n throw new Error(\"Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. \" + this.debugInfo(elementName));\n }\n if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) {\n throw new Error(\"Default value only applies to #FIXED or #DEFAULT. \" + this.debugInfo(elementName));\n }\n this.elementName = this.stringify.name(elementName);\n this.type = NodeType.AttributeDeclaration;\n this.attributeName = this.stringify.name(attributeName);\n this.attributeType = this.stringify.dtdAttType(attributeType);\n if (defaultValue) {\n this.defaultValue = this.stringify.dtdAttDefault(defaultValue);\n }\n this.defaultValueType = defaultValueType;\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.dtdAttList(this, this.options.writer.filterOptions(options));\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLDTDEntity, XMLNode, isObject;\n\n ({isObject} = require('./Utility'));\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n // Represents an entity declaration in the DTD\n module.exports = XMLDTDEntity = (function() {\n class XMLDTDEntity extends XMLNode {\n // Initializes a new instance of `XMLDTDEntity`\n\n // `parent` the parent `XMLDocType` element\n // `pe` whether this is a parameter entity or a general entity\n // defaults to `false` (general entity)\n // `name` the name of the entity\n // `value` internal entity value or an object with external entity details\n // `value.pubID` public identifier\n // `value.sysID` system identifier\n // `value.nData` notation declaration\n constructor(parent, pe, name, value) {\n super(parent);\n if (name == null) {\n throw new Error(\"Missing DTD entity name. \" + this.debugInfo(name));\n }\n if (value == null) {\n throw new Error(\"Missing DTD entity value. \" + this.debugInfo(name));\n }\n this.pe = !!pe;\n this.name = this.stringify.name(name);\n this.type = NodeType.EntityDeclaration;\n if (!isObject(value)) {\n this.value = this.stringify.dtdEntityValue(value);\n this.internal = true;\n } else {\n if (!value.pubID && !value.sysID) {\n throw new Error(\"Public and/or system identifiers are required for an external entity. \" + this.debugInfo(name));\n }\n if (value.pubID && !value.sysID) {\n throw new Error(\"System identifier is required for a public external entity. \" + this.debugInfo(name));\n }\n this.internal = false;\n if (value.pubID != null) {\n this.pubID = this.stringify.dtdPubID(value.pubID);\n }\n if (value.sysID != null) {\n this.sysID = this.stringify.dtdSysID(value.sysID);\n }\n if (value.nData != null) {\n this.nData = this.stringify.dtdNData(value.nData);\n }\n if (this.pe && this.nData) {\n throw new Error(\"Notation declaration is not allowed in a parameter entity. \" + this.debugInfo(name));\n }\n }\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.dtdEntity(this, this.options.writer.filterOptions(options));\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLDTDEntity.prototype, 'publicId', {\n get: function() {\n return this.pubID;\n }\n });\n\n Object.defineProperty(XMLDTDEntity.prototype, 'systemId', {\n get: function() {\n return this.sysID;\n }\n });\n\n Object.defineProperty(XMLDTDEntity.prototype, 'notationName', {\n get: function() {\n return this.nData || null;\n }\n });\n\n // DOM level 3\n Object.defineProperty(XMLDTDEntity.prototype, 'inputEncoding', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDTDEntity.prototype, 'xmlEncoding', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDTDEntity.prototype, 'xmlVersion', {\n get: function() {\n return null;\n }\n });\n\n return XMLDTDEntity;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLDTDElement, XMLNode;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n // Represents an attribute\n module.exports = XMLDTDElement = class XMLDTDElement extends XMLNode {\n // Initializes a new instance of `XMLDTDElement`\n\n // `parent` the parent `XMLDocType` element\n // `name` element name\n // `value` element content (defaults to #PCDATA)\n constructor(parent, name, value) {\n super(parent);\n if (name == null) {\n throw new Error(\"Missing DTD element name. \" + this.debugInfo());\n }\n if (!value) {\n value = '(#PCDATA)';\n }\n if (Array.isArray(value)) {\n value = '(' + value.join(',') + ')';\n }\n this.name = this.stringify.name(name);\n this.type = NodeType.ElementDeclaration;\n this.value = this.stringify.dtdElementValue(value);\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.dtdElement(this, this.options.writer.filterOptions(options));\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLDTDNotation, XMLNode;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n // Represents a NOTATION entry in the DTD\n module.exports = XMLDTDNotation = (function() {\n class XMLDTDNotation extends XMLNode {\n // Initializes a new instance of `XMLDTDNotation`\n\n // `parent` the parent `XMLDocType` element\n // `name` the name of the notation\n // `value` an object with external entity details\n // `value.pubID` public identifier\n // `value.sysID` system identifier\n constructor(parent, name, value) {\n super(parent);\n if (name == null) {\n throw new Error(\"Missing DTD notation name. \" + this.debugInfo(name));\n }\n if (!value.pubID && !value.sysID) {\n throw new Error(\"Public or system identifiers are required for an external entity. \" + this.debugInfo(name));\n }\n this.name = this.stringify.name(name);\n this.type = NodeType.NotationDeclaration;\n if (value.pubID != null) {\n this.pubID = this.stringify.dtdPubID(value.pubID);\n }\n if (value.sysID != null) {\n this.sysID = this.stringify.dtdSysID(value.sysID);\n }\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.dtdNotation(this, this.options.writer.filterOptions(options));\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLDTDNotation.prototype, 'publicId', {\n get: function() {\n return this.pubID;\n }\n });\n\n Object.defineProperty(XMLDTDNotation.prototype, 'systemId', {\n get: function() {\n return this.sysID;\n }\n });\n\n return XMLDTDNotation;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLNode, XMLRaw;\n\n NodeType = require('./NodeType');\n\n XMLNode = require('./XMLNode');\n\n // Represents a raw node\n module.exports = XMLRaw = class XMLRaw extends XMLNode {\n // Initializes a new instance of `XMLRaw`\n\n // `text` raw text\n constructor(parent, text) {\n super(parent);\n if (text == null) {\n throw new Error(\"Missing raw text. \" + this.debugInfo());\n }\n this.type = NodeType.Raw;\n this.value = this.stringify.raw(text);\n }\n\n // Creates and returns a deep clone of `this`\n clone() {\n return Object.create(this);\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.raw(this, this.options.writer.filterOptions(options));\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLCharacterData, XMLText;\n\n NodeType = require('./NodeType');\n\n XMLCharacterData = require('./XMLCharacterData');\n\n // Represents a text node\n module.exports = XMLText = (function() {\n class XMLText extends XMLCharacterData {\n // Initializes a new instance of `XMLText`\n\n // `text` element text\n constructor(parent, text) {\n super(parent);\n if (text == null) {\n throw new Error(\"Missing element text. \" + this.debugInfo());\n }\n this.name = \"#text\";\n this.type = NodeType.Text;\n this.value = this.stringify.text(text);\n }\n\n // Creates and returns a deep clone of `this`\n clone() {\n return Object.create(this);\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.text(this, this.options.writer.filterOptions(options));\n }\n\n // DOM level 1 functions to be implemented later\n splitText(offset) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n // DOM level 3 functions to be implemented later\n replaceWholeText(content) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n };\n\n // DOM level 3\n Object.defineProperty(XMLText.prototype, 'isElementContentWhitespace', {\n get: function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n Object.defineProperty(XMLText.prototype, 'wholeText', {\n get: function() {\n var next, prev, str;\n str = '';\n prev = this.previousSibling;\n while (prev) {\n str = prev.data + str;\n prev = prev.previousSibling;\n }\n str += this.data;\n next = this.nextSibling;\n while (next) {\n str = str + next.data;\n next = next.nextSibling;\n }\n return str;\n }\n });\n\n return XMLText;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLCharacterData, XMLProcessingInstruction;\n\n NodeType = require('./NodeType');\n\n XMLCharacterData = require('./XMLCharacterData');\n\n // Represents a processing instruction\n module.exports = XMLProcessingInstruction = class XMLProcessingInstruction extends XMLCharacterData {\n // Initializes a new instance of `XMLProcessingInstruction`\n\n // `parent` the parent node\n // `target` instruction target\n // `value` instruction value\n constructor(parent, target, value) {\n super(parent);\n if (target == null) {\n throw new Error(\"Missing instruction target. \" + this.debugInfo());\n }\n this.type = NodeType.ProcessingInstruction;\n this.target = this.stringify.insTarget(target);\n this.name = this.target;\n if (value) {\n this.value = this.stringify.insValue(value);\n }\n }\n\n // Creates and returns a deep clone of `this`\n clone() {\n return Object.create(this);\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.processingInstruction(this, this.options.writer.filterOptions(options));\n }\n\n isEqualNode(node) {\n if (!super.isEqualNode(node)) {\n return false;\n }\n if (node.target !== this.target) {\n return false;\n }\n return true;\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var XMLStringWriter, XMLWriterBase;\n\n XMLWriterBase = require('./XMLWriterBase');\n\n // Prints XML nodes as plain text\n module.exports = XMLStringWriter = class XMLStringWriter extends XMLWriterBase {\n // Initializes a new instance of `XMLStringWriter`\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation string\n // `options.newline` newline sequence\n // `options.offset` a fixed number of indentations to add to every line\n // `options.allowEmpty` do not self close empty element tags\n // 'options.dontPrettyTextNodes' if any text is present in node, don't indent or LF\n // `options.spaceBeforeSlash` add a space before the closing slash of empty elements\n constructor(options) {\n super(options);\n }\n\n document(doc, options) {\n var child, i, len, r, ref;\n options = this.filterOptions(options);\n r = '';\n ref = doc.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n r += this.writeChildNode(child, options, 0);\n }\n // remove trailing newline\n if (options.pretty && r.slice(-options.newline.length) === options.newline) {\n r = r.slice(0, -options.newline.length);\n }\n return r;\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n // Implements the DOMImplementation interface\n var XMLDOMImplementation;\n\n module.exports = XMLDOMImplementation = class XMLDOMImplementation {\n // Tests if the DOM implementation implements a specific feature.\n\n // `feature` package name of the feature to test. In Level 1, the\n // legal values are \"HTML\" and \"XML\" (case-insensitive).\n // `version` version number of the package name to test. \n // In Level 1, this is the string \"1.0\". If the version is \n // not specified, supporting any version of the feature will \n // cause the method to return true.\n hasFeature(feature, version) {\n return true;\n }\n\n // Creates a new document type declaration.\n\n // `qualifiedName` qualified name of the document type to be created\n // `publicId` public identifier of the external subset\n // `systemId` system identifier of the external subset\n createDocumentType(qualifiedName, publicId, systemId) {\n throw new Error(\"This DOM method is not implemented.\");\n }\n\n // Creates a new document.\n\n // `namespaceURI` namespace URI of the document element to create\n // `qualifiedName` the qualified name of the document to be created\n // `doctype` the type of document to be created or null\n createDocument(namespaceURI, qualifiedName, doctype) {\n throw new Error(\"This DOM method is not implemented.\");\n }\n\n // Creates a new HTML document.\n\n // `title` document title\n createHTMLDocument(title) {\n throw new Error(\"This DOM method is not implemented.\");\n }\n\n // Returns a specialized object which implements the specialized APIs \n // of the specified feature and version.\n\n // `feature` name of the feature requested.\n // `version` version number of the feature to test\n getFeature(feature, version) {\n throw new Error(\"This DOM method is not implemented.\");\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLDOMConfiguration, XMLDOMImplementation, XMLDocument, XMLNode, XMLStringWriter, XMLStringifier, isPlainObject;\n\n ({isPlainObject} = require('./Utility'));\n\n XMLDOMImplementation = require('./XMLDOMImplementation');\n\n XMLDOMConfiguration = require('./XMLDOMConfiguration');\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n XMLStringifier = require('./XMLStringifier');\n\n XMLStringWriter = require('./XMLStringWriter');\n\n // Represents an XML builder\n module.exports = XMLDocument = (function() {\n class XMLDocument extends XMLNode {\n // Initializes a new instance of `XMLDocument`\n\n // `options.keepNullNodes` whether nodes with null values will be kept\n // or ignored: true or false\n // `options.keepNullAttributes` whether attributes with null values will be\n // kept or ignored: true or false\n // `options.ignoreDecorators` whether decorator strings will be ignored when\n // converting JS objects: true or false\n // `options.separateArrayItems` whether array items are created as separate\n // nodes when passed as an object value: true or false\n // `options.noDoubleEncoding` whether existing html entities are encoded:\n // true or false\n // `options.stringify` a set of functions to use for converting values to\n // strings\n // `options.writer` the default XML writer to use for converting nodes to\n // string. If the default writer is not set, the built-in XMLStringWriter\n // will be used instead.\n constructor(options) {\n super(null);\n this.name = \"#document\";\n this.type = NodeType.Document;\n this.documentURI = null;\n this.domConfig = new XMLDOMConfiguration();\n options || (options = {});\n if (!options.writer) {\n options.writer = new XMLStringWriter();\n }\n this.options = options;\n this.stringify = new XMLStringifier(options);\n }\n\n // Ends the document and passes it to the given XML writer\n\n // `writer` is either an XML writer or a plain object to pass to the\n // constructor of the default XML writer. The default writer is assigned when\n // creating the XML document. Following flags are recognized by the\n // built-in XMLStringWriter:\n // `writer.pretty` pretty prints the result\n // `writer.indent` indentation for pretty print\n // `writer.offset` how many indentations to add to every line for pretty print\n // `writer.newline` newline sequence for pretty print\n end(writer) {\n var writerOptions;\n writerOptions = {};\n if (!writer) {\n writer = this.options.writer;\n } else if (isPlainObject(writer)) {\n writerOptions = writer;\n writer = this.options.writer;\n }\n return writer.document(this, writer.filterOptions(writerOptions));\n }\n\n // Converts the XML document to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.document(this, this.options.writer.filterOptions(options));\n }\n\n // DOM level 1 functions to be implemented later\n createElement(tagName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createDocumentFragment() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createTextNode(data) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createComment(data) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createCDATASection(data) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createProcessingInstruction(target, data) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createAttribute(name) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createEntityReference(name) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getElementsByTagName(tagname) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n // DOM level 2 functions to be implemented later\n importNode(importedNode, deep) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createElementNS(namespaceURI, qualifiedName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createAttributeNS(namespaceURI, qualifiedName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getElementsByTagNameNS(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n getElementById(elementId) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n // DOM level 3 functions to be implemented later\n adoptNode(source) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n normalizeDocument() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n renameNode(node, namespaceURI, qualifiedName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n // DOM level 4 functions to be implemented later\n getElementsByClassName(classNames) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createEvent(eventInterface) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createRange() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createNodeIterator(root, whatToShow, filter) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n createTreeWalker(root, whatToShow, filter) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLDocument.prototype, 'implementation', {\n value: new XMLDOMImplementation()\n });\n\n Object.defineProperty(XMLDocument.prototype, 'doctype', {\n get: function() {\n var child, i, len, ref;\n ref = this.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n if (child.type === NodeType.DocType) {\n return child;\n }\n }\n return null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'documentElement', {\n get: function() {\n return this.rootObject || null;\n }\n });\n\n // DOM level 3\n Object.defineProperty(XMLDocument.prototype, 'inputEncoding', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'strictErrorChecking', {\n get: function() {\n return false;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'xmlEncoding', {\n get: function() {\n if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {\n return this.children[0].encoding;\n } else {\n return null;\n }\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'xmlStandalone', {\n get: function() {\n if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {\n return this.children[0].standalone === 'yes';\n } else {\n return false;\n }\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'xmlVersion', {\n get: function() {\n if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {\n return this.children[0].version;\n } else {\n return \"1.0\";\n }\n }\n });\n\n // DOM level 4\n Object.defineProperty(XMLDocument.prototype, 'URL', {\n get: function() {\n return this.documentURI;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'origin', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'compatMode', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'characterSet', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'contentType', {\n get: function() {\n return null;\n }\n });\n\n return XMLDocument;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLAttribute, XMLNode;\n\n NodeType = require('./NodeType');\n\n XMLNode = require('./XMLNode');\n\n // Represents an attribute\n module.exports = XMLAttribute = (function() {\n class XMLAttribute {\n // Initializes a new instance of `XMLAttribute`\n\n // `parent` the parent node\n // `name` attribute target\n // `value` attribute value\n constructor(parent, name, value) {\n this.parent = parent;\n if (this.parent) {\n this.options = this.parent.options;\n this.stringify = this.parent.stringify;\n }\n if (name == null) {\n throw new Error(\"Missing attribute name. \" + this.debugInfo(name));\n }\n this.name = this.stringify.name(name);\n this.value = this.stringify.attValue(value);\n this.type = NodeType.Attribute;\n // DOM level 3\n this.isId = false;\n this.schemaTypeInfo = null;\n }\n\n // Creates and returns a deep clone of `this`\n clone() {\n return Object.create(this);\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return this.options.writer.attribute(this, this.options.writer.filterOptions(options));\n }\n\n \n // Returns debug string for this node\n debugInfo(name) {\n name = name || this.name;\n if (name == null) {\n return \"parent: <\" + this.parent.name + \">\";\n } else {\n return \"attribute: {\" + name + \"}, parent: <\" + this.parent.name + \">\";\n }\n }\n\n isEqualNode(node) {\n if (node.namespaceURI !== this.namespaceURI) {\n return false;\n }\n if (node.prefix !== this.prefix) {\n return false;\n }\n if (node.localName !== this.localName) {\n return false;\n }\n if (node.value !== this.value) {\n return false;\n }\n return true;\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLAttribute.prototype, 'nodeType', {\n get: function() {\n return this.type;\n }\n });\n\n Object.defineProperty(XMLAttribute.prototype, 'ownerElement', {\n get: function() {\n return this.parent;\n }\n });\n\n // DOM level 3\n Object.defineProperty(XMLAttribute.prototype, 'textContent', {\n get: function() {\n return this.value;\n },\n set: function(value) {\n return this.value = value || '';\n }\n });\n\n // DOM level 4\n Object.defineProperty(XMLAttribute.prototype, 'namespaceURI', {\n get: function() {\n return '';\n }\n });\n\n Object.defineProperty(XMLAttribute.prototype, 'prefix', {\n get: function() {\n return '';\n }\n });\n\n Object.defineProperty(XMLAttribute.prototype, 'localName', {\n get: function() {\n return this.name;\n }\n });\n\n Object.defineProperty(XMLAttribute.prototype, 'specified', {\n get: function() {\n return true;\n }\n });\n\n return XMLAttribute;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, XMLDummy, XMLNode;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n // Represents a raw node\n module.exports = XMLDummy = class XMLDummy extends XMLNode {\n // Initializes a new instance of `XMLDummy`\n\n // `XMLDummy` is a special node representing a node with \n // a null value. Dummy nodes are created while recursively\n // building the XML tree. Simply skipping null values doesn't\n // work because that would break the recursive chain.\n constructor(parent) {\n super(parent);\n this.type = NodeType.Dummy;\n }\n\n // Creates and returns a deep clone of `this`\n clone() {\n return Object.create(this);\n }\n\n // Converts the XML fragment to string\n\n // `options.pretty` pretty prints the result\n // `options.indent` indentation for pretty print\n // `options.offset` how many indentations to add to every line for pretty print\n // `options.newline` newline sequence for pretty print\n toString(options) {\n return '';\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n // Converts values to strings\n var XMLStringifier,\n hasProp = {}.hasOwnProperty;\n\n module.exports = XMLStringifier = (function() {\n class XMLStringifier {\n // Initializes a new instance of `XMLStringifier`\n\n // `options.version` The version number string of the XML spec to validate against, e.g. 1.0\n // `options.noDoubleEncoding` whether existing html entities are encoded: true or false\n // `options.stringify` a set of functions to use for converting values to strings\n // `options.noValidation` whether values will be validated and escaped or returned as is\n constructor(options) {\n var key, ref, value;\n // Checks whether the given string contains legal characters\n // Fails with an exception on error\n\n // `str` the string to check\n this.assertLegalChar = this.assertLegalChar.bind(this);\n // Checks whether the given string contains legal characters for a name\n // Fails with an exception on error\n\n // `str` the string to check\n this.assertLegalName = this.assertLegalName.bind(this);\n options || (options = {});\n this.options = options;\n if (!this.options.version) {\n this.options.version = '1.0';\n }\n ref = options.stringify || {};\n for (key in ref) {\n if (!hasProp.call(ref, key)) continue;\n value = ref[key];\n this[key] = value;\n }\n }\n\n // Defaults\n name(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalName('' + val || '');\n }\n\n text(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar(this.textEscape('' + val || ''));\n }\n\n cdata(val) {\n if (this.options.noValidation) {\n return val;\n }\n val = '' + val || '';\n val = val.replace(']]>', ']]]]>');\n return this.assertLegalChar(val);\n }\n\n comment(val) {\n if (this.options.noValidation) {\n return val;\n }\n val = '' + val || '';\n if (val.match(/--/)) {\n throw new Error(\"Comment text cannot contain double-hypen: \" + val);\n }\n return this.assertLegalChar(val);\n }\n\n raw(val) {\n if (this.options.noValidation) {\n return val;\n }\n return '' + val || '';\n }\n\n attValue(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar(this.attEscape(val = '' + val || ''));\n }\n\n insTarget(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n }\n\n insValue(val) {\n if (this.options.noValidation) {\n return val;\n }\n val = '' + val || '';\n if (val.match(/\\?>/)) {\n throw new Error(\"Invalid processing instruction value: \" + val);\n }\n return this.assertLegalChar(val);\n }\n\n xmlVersion(val) {\n if (this.options.noValidation) {\n return val;\n }\n val = '' + val || '';\n if (!val.match(/1\\.[0-9]+/)) {\n throw new Error(\"Invalid version number: \" + val);\n }\n return val;\n }\n\n xmlEncoding(val) {\n if (this.options.noValidation) {\n return val;\n }\n val = '' + val || '';\n if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)) {\n throw new Error(\"Invalid encoding: \" + val);\n }\n return this.assertLegalChar(val);\n }\n\n xmlStandalone(val) {\n if (this.options.noValidation) {\n return val;\n }\n if (val) {\n return \"yes\";\n } else {\n return \"no\";\n }\n }\n\n dtdPubID(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n }\n\n dtdSysID(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n }\n\n dtdElementValue(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n }\n\n dtdAttType(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n }\n\n dtdAttDefault(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n }\n\n dtdEntityValue(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n }\n\n dtdNData(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n }\n\n assertLegalChar(str) {\n var regex, res;\n if (this.options.noValidation) {\n return str;\n }\n regex = '';\n if (this.options.version === '1.0') {\n // Valid characters from https://www.w3.org/TR/xml/#charsets\n // any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.\n // #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]\n // This ES5 compatible Regexp has been generated using the \"regenerate\" NPM module:\n // let xml_10_InvalidChars = regenerate()\n // .addRange(0x0000, 0x0008)\n // .add(0x000B, 0x000C)\n // .addRange(0x000E, 0x001F)\n // .addRange(0xD800, 0xDFFF)\n // .addRange(0xFFFE, 0xFFFF)\n regex = /[\\0-\\x08\\x0B\\f\\x0E-\\x1F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/;\n if (res = str.match(regex)) {\n throw new Error(`Invalid character in string: ${str} at index ${res.index}`);\n }\n } else if (this.options.version === '1.1') {\n // Valid characters from https://www.w3.org/TR/xml11/#charsets\n // any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.\n // [#x1-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]\n // This ES5 compatible Regexp has been generated using the \"regenerate\" NPM module:\n // let xml_11_InvalidChars = regenerate()\n // .add(0x0000)\n // .addRange(0xD800, 0xDFFF)\n // .addRange(0xFFFE, 0xFFFF)\n regex = /[\\0\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/;\n if (res = str.match(regex)) {\n throw new Error(`Invalid character in string: ${str} at index ${res.index}`);\n }\n }\n return str;\n }\n\n assertLegalName(str) {\n var regex;\n if (this.options.noValidation) {\n return str;\n }\n this.assertLegalChar(str);\n regex = /^([:A-Z_a-z\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|[\\uD800-\\uDB7F][\\uDC00-\\uDFFF])([\\x2D\\.0-:A-Z_a-z\\xB7\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u037D\\u037F-\\u1FFF\\u200C\\u200D\\u203F\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|[\\uD800-\\uDB7F][\\uDC00-\\uDFFF])*$/;\n if (!str.match(regex)) {\n throw new Error(\"Invalid character in name\");\n }\n return str;\n }\n\n // Escapes special characters in text\n\n // See http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping\n\n // `str` the string to escape\n textEscape(str) {\n var ampregex;\n if (this.options.noValidation) {\n return str;\n }\n ampregex = this.options.noDoubleEncoding ? /(?!&\\S+;)&/g : /&/g;\n return str.replace(ampregex, '&').replace(//g, '>').replace(/\\r/g, ' ');\n }\n\n // Escapes special characters in attribute values\n\n // See http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping\n\n // `str` the string to escape\n attEscape(str) {\n var ampregex;\n if (this.options.noValidation) {\n return str;\n }\n ampregex = this.options.noDoubleEncoding ? /(?!&\\S+;)&/g : /&/g;\n return str.replace(ampregex, '&').replace(/ 0) {\n return new Array(indentLevel).join(options.indent);\n }\n }\n return '';\n }\n\n // Returns the newline string\n\n // `node` current node\n // `options` writer options\n // `level` current indentation level\n endline(node, options, level) {\n if (!options.pretty || options.suppressPrettyCount) {\n return '';\n } else {\n return options.newline;\n }\n }\n\n attribute(att, options, level) {\n var r;\n this.openAttribute(att, options, level);\n if (options.pretty && options.width > 0) {\n r = att.name + '=\"' + att.value + '\"';\n } else {\n r = ' ' + att.name + '=\"' + att.value + '\"';\n }\n this.closeAttribute(att, options, level);\n return r;\n }\n\n cdata(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n comment(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n declaration(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '';\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n docType(node, options, level) {\n var child, i, len1, r, ref;\n level || (level = 0);\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level);\n r += ' 0) {\n r += ' [';\n r += this.endline(node, options, level);\n options.state = WriterState.InsideTag;\n ref = node.children;\n for (i = 0, len1 = ref.length; i < len1; i++) {\n child = ref[i];\n r += this.writeChildNode(child, options, level + 1);\n }\n options.state = WriterState.CloseTag;\n r += ']';\n }\n // close tag\n options.state = WriterState.CloseTag;\n r += options.spaceBeforeSlash + '>';\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n element(node, options, level) {\n var att, attLen, child, childNodeCount, firstChildNode, i, j, len, len1, len2, name, prettySuppressed, r, ratt, ref, ref1, ref2, ref3, rline;\n level || (level = 0);\n prettySuppressed = false;\n // open tag\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '<' + node.name;\n // attributes\n if (options.pretty && options.width > 0) {\n len = r.length;\n ref = node.attribs;\n for (name in ref) {\n if (!hasProp.call(ref, name)) continue;\n att = ref[name];\n ratt = this.attribute(att, options, level);\n attLen = ratt.length;\n if (len + attLen > options.width) {\n rline = this.indent(node, options, level + 1) + ratt;\n r += this.endline(node, options, level) + rline;\n len = rline.length;\n } else {\n rline = ' ' + ratt;\n r += rline;\n len += rline.length;\n }\n }\n } else {\n ref1 = node.attribs;\n for (name in ref1) {\n if (!hasProp.call(ref1, name)) continue;\n att = ref1[name];\n r += this.attribute(att, options, level);\n }\n }\n childNodeCount = node.children.length;\n firstChildNode = childNodeCount === 0 ? null : node.children[0];\n if (childNodeCount === 0 || node.children.every(function(e) {\n return (e.type === NodeType.Text || e.type === NodeType.Raw) && e.value === '';\n })) {\n // empty element\n if (options.allowEmpty) {\n r += '>';\n options.state = WriterState.CloseTag;\n r += '' + this.endline(node, options, level);\n } else {\n options.state = WriterState.CloseTag;\n r += options.spaceBeforeSlash + '/>' + this.endline(node, options, level);\n }\n } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw) && (firstChildNode.value != null)) {\n // do not indent text-only nodes\n r += '>';\n options.state = WriterState.InsideTag;\n options.suppressPrettyCount++;\n prettySuppressed = true;\n r += this.writeChildNode(firstChildNode, options, level + 1);\n options.suppressPrettyCount--;\n prettySuppressed = false;\n options.state = WriterState.CloseTag;\n r += '' + this.endline(node, options, level);\n } else {\n // if ANY are a text node, then suppress pretty now\n if (options.dontPrettyTextNodes) {\n ref2 = node.children;\n for (i = 0, len1 = ref2.length; i < len1; i++) {\n child = ref2[i];\n if ((child.type === NodeType.Text || child.type === NodeType.Raw) && (child.value != null)) {\n options.suppressPrettyCount++;\n prettySuppressed = true;\n break;\n }\n }\n }\n // close the opening tag, after dealing with newline\n r += '>' + this.endline(node, options, level);\n options.state = WriterState.InsideTag;\n ref3 = node.children;\n // inner tags\n for (j = 0, len2 = ref3.length; j < len2; j++) {\n child = ref3[j];\n r += this.writeChildNode(child, options, level + 1);\n }\n // close tag\n options.state = WriterState.CloseTag;\n r += this.indent(node, options, level) + '';\n if (prettySuppressed) {\n options.suppressPrettyCount--;\n }\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n }\n this.closeNode(node, options, level);\n return r;\n }\n\n writeChildNode(node, options, level) {\n switch (node.type) {\n case NodeType.CData:\n return this.cdata(node, options, level);\n case NodeType.Comment:\n return this.comment(node, options, level);\n case NodeType.Element:\n return this.element(node, options, level);\n case NodeType.Raw:\n return this.raw(node, options, level);\n case NodeType.Text:\n return this.text(node, options, level);\n case NodeType.ProcessingInstruction:\n return this.processingInstruction(node, options, level);\n case NodeType.Dummy:\n return '';\n case NodeType.Declaration:\n return this.declaration(node, options, level);\n case NodeType.DocType:\n return this.docType(node, options, level);\n case NodeType.AttributeDeclaration:\n return this.dtdAttList(node, options, level);\n case NodeType.ElementDeclaration:\n return this.dtdElement(node, options, level);\n case NodeType.EntityDeclaration:\n return this.dtdEntity(node, options, level);\n case NodeType.NotationDeclaration:\n return this.dtdNotation(node, options, level);\n default:\n throw new Error(\"Unknown XML node type: \" + node.constructor.name);\n }\n }\n\n processingInstruction(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '';\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n raw(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level);\n options.state = WriterState.InsideTag;\n r += node.value;\n options.state = WriterState.CloseTag;\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n text(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level);\n options.state = WriterState.InsideTag;\n r += node.value;\n options.state = WriterState.CloseTag;\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n dtdAttList(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n dtdElement(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n dtdEntity(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n dtdNotation(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n }\n\n openNode(node, options, level) {}\n\n closeNode(node, options, level) {}\n\n openAttribute(att, options, level) {}\n\n closeAttribute(att, options, level) {}\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, WriterState, XMLDOMImplementation, XMLDocument, XMLDocumentCB, XMLStreamWriter, XMLStringWriter, assign, isFunction;\n\n ({assign, isFunction} = require('./Utility'));\n\n XMLDOMImplementation = require('./XMLDOMImplementation');\n\n XMLDocument = require('./XMLDocument');\n\n XMLDocumentCB = require('./XMLDocumentCB');\n\n XMLStringWriter = require('./XMLStringWriter');\n\n XMLStreamWriter = require('./XMLStreamWriter');\n\n NodeType = require('./NodeType');\n\n WriterState = require('./WriterState');\n\n // Creates a new document and returns the root node for\n // chain-building the document tree\n\n // `name` name of the root element\n\n // `xmldec.version` A version number string, e.g. 1.0\n // `xmldec.encoding` Encoding declaration, e.g. UTF-8\n // `xmldec.standalone` standalone document declaration: true or false\n\n // `doctype.pubID` public identifier of the external subset\n // `doctype.sysID` system identifier of the external subset\n\n // `options.headless` whether XML declaration and doctype will be included:\n // true or false\n // `options.keepNullNodes` whether nodes with null values will be kept\n // or ignored: true or false\n // `options.keepNullAttributes` whether attributes with null values will be\n // kept or ignored: true or false\n // `options.ignoreDecorators` whether decorator strings will be ignored when\n // converting JS objects: true or false\n // `options.separateArrayItems` whether array items are created as separate\n // nodes when passed as an object value: true or false\n // `options.noDoubleEncoding` whether existing html entities are encoded:\n // true or false\n // `options.stringify` a set of functions to use for converting values to\n // strings\n // `options.writer` the default XML writer to use for converting nodes to\n // string. If the default writer is not set, the built-in XMLStringWriter\n // will be used instead.\n module.exports.create = function(name, xmldec, doctype, options) {\n var doc, root;\n if (name == null) {\n throw new Error(\"Root element needs a name.\");\n }\n options = assign({}, xmldec, doctype, options);\n // create the document node\n doc = new XMLDocument(options);\n // add the root node\n root = doc.element(name);\n // prolog\n if (!options.headless) {\n doc.declaration(options);\n if ((options.pubID != null) || (options.sysID != null)) {\n doc.dtd(options);\n }\n }\n return root;\n };\n\n // Creates a new document and returns the document node for\n // chain-building the document tree\n\n // `options.keepNullNodes` whether nodes with null values will be kept\n // or ignored: true or false\n // `options.keepNullAttributes` whether attributes with null values will be\n // kept or ignored: true or false\n // `options.ignoreDecorators` whether decorator strings will be ignored when\n // converting JS objects: true or false\n // `options.separateArrayItems` whether array items are created as separate\n // nodes when passed as an object value: true or false\n // `options.noDoubleEncoding` whether existing html entities are encoded:\n // true or false\n // `options.stringify` a set of functions to use for converting values to\n // strings\n // `options.writer` the default XML writer to use for converting nodes to\n // string. If the default writer is not set, the built-in XMLStringWriter\n // will be used instead.\n\n // `onData` the function to be called when a new chunk of XML is output. The\n // string containing the XML chunk is passed to `onData` as its single\n // argument.\n // `onEnd` the function to be called when the XML document is completed with\n // `end`. `onEnd` does not receive any arguments.\n module.exports.begin = function(options, onData, onEnd) {\n if (isFunction(options)) {\n [onData, onEnd] = [options, onData];\n options = {};\n }\n if (onData) {\n return new XMLDocumentCB(options, onData, onEnd);\n } else {\n return new XMLDocument(options);\n }\n };\n\n module.exports.stringWriter = function(options) {\n return new XMLStringWriter(options);\n };\n\n module.exports.streamWriter = function(stream, options) {\n return new XMLStreamWriter(stream, options);\n };\n\n module.exports.implementation = new XMLDOMImplementation();\n\n module.exports.nodeType = NodeType;\n\n module.exports.writerState = WriterState;\n\n}).call(this);\n","module.exports = \"
\\n \\n
Gestión de la sesión
\\n\\n \\n \\n\\n \\n \\n
\\n\\n \\n
\\n
\\n
\\n Carga un WMC v1.1.0 como fichero o desde una url\\n
\\n
\\n \\n \\n
\\n \\n
\\n \\n \\n
\\n
\\n \\n \\n
\\n
\\n \\n
\\n \\n
\\n
\\n\\n
\\n
\\n
\\n Guarda un WMC v1.1.0 como fichero\\n
\\n \\n
\\n \\n \\n
\\n
\\n \\n
\\n \\n
\\n
\\n\\n
\";","// Generated by CoffeeScript 2.4.1\n(function() {\n var XMLDOMConfiguration, XMLDOMErrorHandler, XMLDOMStringList;\n\n XMLDOMErrorHandler = require('./XMLDOMErrorHandler');\n\n XMLDOMStringList = require('./XMLDOMStringList');\n\n // Implements the DOMConfiguration interface\n module.exports = XMLDOMConfiguration = (function() {\n class XMLDOMConfiguration {\n constructor() {\n var clonedSelf;\n this.defaultParams = {\n \"canonical-form\": false,\n \"cdata-sections\": false,\n \"comments\": false,\n \"datatype-normalization\": false,\n \"element-content-whitespace\": true,\n \"entities\": true,\n \"error-handler\": new XMLDOMErrorHandler(),\n \"infoset\": true,\n \"validate-if-schema\": false,\n \"namespaces\": true,\n \"namespace-declarations\": true,\n \"normalize-characters\": false,\n \"schema-location\": '',\n \"schema-type\": '',\n \"split-cdata-sections\": true,\n \"validate\": false,\n \"well-formed\": true\n };\n this.params = clonedSelf = Object.create(this.defaultParams);\n }\n\n // Gets the value of a parameter.\n\n // `name` name of the parameter\n getParameter(name) {\n if (this.params.hasOwnProperty(name)) {\n return this.params[name];\n } else {\n return null;\n }\n }\n\n // Checks if setting a parameter to a specific value is supported.\n\n // `name` name of the parameter\n // `value` parameter value\n canSetParameter(name, value) {\n return true;\n }\n\n // Sets the value of a parameter.\n\n // `name` name of the parameter\n // `value` new value or null if the user wishes to unset the parameter\n setParameter(name, value) {\n if (value != null) {\n return this.params[name] = value;\n } else {\n return delete this.params[name];\n }\n }\n\n };\n\n // Returns the list of parameter names\n Object.defineProperty(XMLDOMConfiguration.prototype, 'parameterNames', {\n get: function() {\n return new XMLDOMStringList(Object.keys(this.defaultParams));\n }\n });\n\n return XMLDOMConfiguration;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n // Represents the error handler for DOM operations\n var XMLDOMErrorHandler;\n\n module.exports = XMLDOMErrorHandler = class XMLDOMErrorHandler {\n // Initializes a new instance of `XMLDOMErrorHandler`\n\n constructor() {}\n\n // Called on the error handler when an error occurs.\n\n // `error` the error message as a string\n handleError(error) {\n throw new Error(error);\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n // Represents a list of string entries\n var XMLDOMStringList;\n\n module.exports = XMLDOMStringList = (function() {\n class XMLDOMStringList {\n // Initializes a new instance of `XMLDOMStringList`\n // This is just a wrapper around an ordinary\n // JS array.\n\n // `arr` the array of string values\n constructor(arr) {\n this.arr = arr || [];\n }\n\n // Returns the indexth item in the collection.\n\n // `index` index into the collection\n item(index) {\n return this.arr[index] || null;\n }\n\n // Test if a string is part of this DOMStringList.\n\n // `str` the string to look for\n contains(str) {\n return this.arr.indexOf(str) !== -1;\n }\n\n };\n\n // Returns the number of strings in the list.\n Object.defineProperty(XMLDOMStringList.prototype, 'length', {\n get: function() {\n return this.arr.length;\n }\n });\n\n return XMLDOMStringList;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n // Represents a list of nodes\n var XMLNodeList;\n\n module.exports = XMLNodeList = (function() {\n class XMLNodeList {\n // Initializes a new instance of `XMLNodeList`\n // This is just a wrapper around an ordinary\n // JS array.\n\n // `nodes` the array containing nodes.\n constructor(nodes) {\n this.nodes = nodes;\n }\n\n // Creates and returns a deep clone of `this`\n\n clone() {\n // this class should not be cloned since it wraps\n // around a given array. The calling function should check\n // whether the wrapped array is null and supply a new array\n // (from the clone).\n return this.nodes = null;\n }\n\n // DOM Level 1\n item(index) {\n return this.nodes[index] || null;\n }\n\n };\n\n // DOM level 1\n Object.defineProperty(XMLNodeList.prototype, 'length', {\n get: function() {\n return this.nodes.length || 0;\n }\n });\n\n return XMLNodeList;\n\n }).call(this);\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n module.exports = {\n Disconnected: 1,\n Preceding: 2,\n Following: 4,\n Contains: 8,\n ContainedBy: 16,\n ImplementationSpecific: 32\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, WriterState, XMLAttribute, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDocument, XMLDocumentCB, XMLElement, XMLProcessingInstruction, XMLRaw, XMLStringWriter, XMLStringifier, XMLText, getValue, isFunction, isObject, isPlainObject,\n hasProp = {}.hasOwnProperty;\n\n ({isObject, isFunction, isPlainObject, getValue} = require('./Utility'));\n\n NodeType = require('./NodeType');\n\n XMLDocument = require('./XMLDocument');\n\n XMLElement = require('./XMLElement');\n\n XMLCData = require('./XMLCData');\n\n XMLComment = require('./XMLComment');\n\n XMLRaw = require('./XMLRaw');\n\n XMLText = require('./XMLText');\n\n XMLProcessingInstruction = require('./XMLProcessingInstruction');\n\n XMLDeclaration = require('./XMLDeclaration');\n\n XMLDocType = require('./XMLDocType');\n\n XMLDTDAttList = require('./XMLDTDAttList');\n\n XMLDTDEntity = require('./XMLDTDEntity');\n\n XMLDTDElement = require('./XMLDTDElement');\n\n XMLDTDNotation = require('./XMLDTDNotation');\n\n XMLAttribute = require('./XMLAttribute');\n\n XMLStringifier = require('./XMLStringifier');\n\n XMLStringWriter = require('./XMLStringWriter');\n\n WriterState = require('./WriterState');\n\n // Represents an XML builder\n module.exports = XMLDocumentCB = class XMLDocumentCB {\n // Initializes a new instance of `XMLDocumentCB`\n\n // `options.keepNullNodes` whether nodes with null values will be kept\n // or ignored: true or false\n // `options.keepNullAttributes` whether attributes with null values will be\n // kept or ignored: true or false\n // `options.ignoreDecorators` whether decorator strings will be ignored when\n // converting JS objects: true or false\n // `options.separateArrayItems` whether array items are created as separate\n // nodes when passed as an object value: true or false\n // `options.noDoubleEncoding` whether existing html entities are encoded:\n // true or false\n // `options.stringify` a set of functions to use for converting values to\n // strings\n // `options.writer` the default XML writer to use for converting nodes to\n // string. If the default writer is not set, the built-in XMLStringWriter\n // will be used instead.\n\n // `onData` the function to be called when a new chunk of XML is output. The\n // string containing the XML chunk is passed to `onData` as its first\n // argument, and the current indentation level as its second argument.\n // `onEnd` the function to be called when the XML document is completed with\n // `end`. `onEnd` does not receive any arguments.\n constructor(options, onData, onEnd) {\n var writerOptions;\n this.name = \"?xml\";\n this.type = NodeType.Document;\n options || (options = {});\n writerOptions = {};\n if (!options.writer) {\n options.writer = new XMLStringWriter();\n } else if (isPlainObject(options.writer)) {\n writerOptions = options.writer;\n options.writer = new XMLStringWriter();\n }\n this.options = options;\n this.writer = options.writer;\n this.writerOptions = this.writer.filterOptions(writerOptions);\n this.stringify = new XMLStringifier(options);\n this.onDataCallback = onData || function() {};\n this.onEndCallback = onEnd || function() {};\n this.currentNode = null;\n this.currentLevel = -1;\n this.openTags = {};\n this.documentStarted = false;\n this.documentCompleted = false;\n this.root = null;\n }\n\n // Creates a child element node from the given XMLNode\n\n // `node` the child node\n createChildNode(node) {\n var att, attName, attributes, child, i, len, ref, ref1;\n switch (node.type) {\n case NodeType.CData:\n this.cdata(node.value);\n break;\n case NodeType.Comment:\n this.comment(node.value);\n break;\n case NodeType.Element:\n attributes = {};\n ref = node.attribs;\n for (attName in ref) {\n if (!hasProp.call(ref, attName)) continue;\n att = ref[attName];\n attributes[attName] = att.value;\n }\n this.node(node.name, attributes);\n break;\n case NodeType.Dummy:\n this.dummy();\n break;\n case NodeType.Raw:\n this.raw(node.value);\n break;\n case NodeType.Text:\n this.text(node.value);\n break;\n case NodeType.ProcessingInstruction:\n this.instruction(node.target, node.value);\n break;\n default:\n throw new Error(\"This XML node type is not supported in a JS object: \" + node.constructor.name);\n }\n ref1 = node.children;\n // write child nodes recursively\n for (i = 0, len = ref1.length; i < len; i++) {\n child = ref1[i];\n this.createChildNode(child);\n if (child.type === NodeType.Element) {\n this.up();\n }\n }\n return this;\n }\n\n // Creates a dummy node\n\n dummy() {\n // no-op, just return this\n return this;\n }\n\n // Creates a node\n\n // `name` name of the node\n // `attributes` an object containing name/value pairs of attributes\n // `text` element text\n node(name, attributes, text) {\n if (name == null) {\n throw new Error(\"Missing node name.\");\n }\n if (this.root && this.currentLevel === -1) {\n throw new Error(\"Document can only have one root node. \" + this.debugInfo(name));\n }\n this.openCurrent();\n name = getValue(name);\n if (attributes == null) {\n attributes = {};\n }\n attributes = getValue(attributes);\n // swap argument order: text <-> attributes\n if (!isObject(attributes)) {\n [text, attributes] = [attributes, text];\n }\n this.currentNode = new XMLElement(this, name, attributes);\n this.currentNode.children = false;\n this.currentLevel++;\n this.openTags[this.currentLevel] = this.currentNode;\n if (text != null) {\n this.text(text);\n }\n return this;\n }\n\n // Creates a child element node or an element type declaration when called\n // inside the DTD\n\n // `name` name of the node\n // `attributes` an object containing name/value pairs of attributes\n // `text` element text\n element(name, attributes, text) {\n var child, i, len, oldValidationFlag, ref, root;\n if (this.currentNode && this.currentNode.type === NodeType.DocType) {\n this.dtdElement(...arguments);\n } else {\n if (Array.isArray(name) || isObject(name) || isFunction(name)) {\n oldValidationFlag = this.options.noValidation;\n this.options.noValidation = true;\n root = new XMLDocument(this.options).element('TEMP_ROOT');\n root.element(name);\n this.options.noValidation = oldValidationFlag;\n ref = root.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n this.createChildNode(child);\n if (child.type === NodeType.Element) {\n this.up();\n }\n }\n } else {\n this.node(name, attributes, text);\n }\n }\n return this;\n }\n\n // Adds or modifies an attribute\n\n // `name` attribute name\n // `value` attribute value\n attribute(name, value) {\n var attName, attValue;\n if (!this.currentNode || this.currentNode.children) {\n throw new Error(\"att() can only be used immediately after an ele() call in callback mode. \" + this.debugInfo(name));\n }\n if (name != null) {\n name = getValue(name);\n }\n if (isObject(name)) { // expand if object\n for (attName in name) {\n if (!hasProp.call(name, attName)) continue;\n attValue = name[attName];\n this.attribute(attName, attValue);\n }\n } else {\n if (isFunction(value)) {\n value = value.apply();\n }\n if (this.options.keepNullAttributes && (value == null)) {\n this.currentNode.attribs[name] = new XMLAttribute(this, name, \"\");\n } else if (value != null) {\n this.currentNode.attribs[name] = new XMLAttribute(this, name, value);\n }\n }\n return this;\n }\n\n // Creates a text node\n\n // `value` element text\n text(value) {\n var node;\n this.openCurrent();\n node = new XMLText(this, value);\n this.onData(this.writer.text(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Creates a CDATA node\n\n // `value` element text without CDATA delimiters\n cdata(value) {\n var node;\n this.openCurrent();\n node = new XMLCData(this, value);\n this.onData(this.writer.cdata(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Creates a comment node\n\n // `value` comment text\n comment(value) {\n var node;\n this.openCurrent();\n node = new XMLComment(this, value);\n this.onData(this.writer.comment(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Adds unescaped raw text\n\n // `value` text\n raw(value) {\n var node;\n this.openCurrent();\n node = new XMLRaw(this, value);\n this.onData(this.writer.raw(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Adds a processing instruction\n\n // `target` instruction target\n // `value` instruction value\n instruction(target, value) {\n var i, insTarget, insValue, len, node;\n this.openCurrent();\n if (target != null) {\n target = getValue(target);\n }\n if (value != null) {\n value = getValue(value);\n }\n if (Array.isArray(target)) { // expand if array\n for (i = 0, len = target.length; i < len; i++) {\n insTarget = target[i];\n this.instruction(insTarget);\n }\n } else if (isObject(target)) { // expand if object\n for (insTarget in target) {\n if (!hasProp.call(target, insTarget)) continue;\n insValue = target[insTarget];\n this.instruction(insTarget, insValue);\n }\n } else {\n if (isFunction(value)) {\n value = value.apply();\n }\n node = new XMLProcessingInstruction(this, target, value);\n this.onData(this.writer.processingInstruction(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n }\n return this;\n }\n\n // Creates the xml declaration\n\n // `version` A version number string, e.g. 1.0\n // `encoding` Encoding declaration, e.g. UTF-8\n // `standalone` standalone document declaration: true or false\n declaration(version, encoding, standalone) {\n var node;\n this.openCurrent();\n if (this.documentStarted) {\n throw new Error(\"declaration() must be the first node.\");\n }\n node = new XMLDeclaration(this, version, encoding, standalone);\n this.onData(this.writer.declaration(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Creates the document type declaration\n\n // `root` the name of the root node\n // `pubID` the public identifier of the external subset\n // `sysID` the system identifier of the external subset\n doctype(root, pubID, sysID) {\n this.openCurrent();\n if (root == null) {\n throw new Error(\"Missing root node name.\");\n }\n if (this.root) {\n throw new Error(\"dtd() must come before the root node.\");\n }\n this.currentNode = new XMLDocType(this, pubID, sysID);\n this.currentNode.rootNodeName = root;\n this.currentNode.children = false;\n this.currentLevel++;\n this.openTags[this.currentLevel] = this.currentNode;\n return this;\n }\n\n // Creates an element type declaration\n\n // `name` element name\n // `value` element content (defaults to #PCDATA)\n dtdElement(name, value) {\n var node;\n this.openCurrent();\n node = new XMLDTDElement(this, name, value);\n this.onData(this.writer.dtdElement(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Creates an attribute declaration\n\n // `elementName` the name of the element containing this attribute\n // `attributeName` attribute name\n // `attributeType` type of the attribute (defaults to CDATA)\n // `defaultValueType` default value type (either #REQUIRED, #IMPLIED, #FIXED or\n // #DEFAULT) (defaults to #IMPLIED)\n // `defaultValue` default value of the attribute\n // (only used for #FIXED or #DEFAULT)\n attList(elementName, attributeName, attributeType, defaultValueType, defaultValue) {\n var node;\n this.openCurrent();\n node = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue);\n this.onData(this.writer.dtdAttList(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Creates a general entity declaration\n\n // `name` the name of the entity\n // `value` internal entity value or an object with external entity details\n // `value.pubID` public identifier\n // `value.sysID` system identifier\n // `value.nData` notation declaration\n entity(name, value) {\n var node;\n this.openCurrent();\n node = new XMLDTDEntity(this, false, name, value);\n this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Creates a parameter entity declaration\n\n // `name` the name of the entity\n // `value` internal entity value or an object with external entity details\n // `value.pubID` public identifier\n // `value.sysID` system identifier\n pEntity(name, value) {\n var node;\n this.openCurrent();\n node = new XMLDTDEntity(this, true, name, value);\n this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Creates a NOTATION declaration\n\n // `name` the name of the notation\n // `value` an object with external entity details\n // `value.pubID` public identifier\n // `value.sysID` system identifier\n notation(name, value) {\n var node;\n this.openCurrent();\n node = new XMLDTDNotation(this, name, value);\n this.onData(this.writer.dtdNotation(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n }\n\n // Gets the parent node\n up() {\n if (this.currentLevel < 0) {\n throw new Error(\"The document node has no parent.\");\n }\n if (this.currentNode) {\n if (this.currentNode.children) {\n this.closeNode(this.currentNode);\n } else {\n this.openNode(this.currentNode);\n }\n this.currentNode = null;\n } else {\n this.closeNode(this.openTags[this.currentLevel]);\n }\n delete this.openTags[this.currentLevel];\n this.currentLevel--;\n return this;\n }\n\n // Ends the document\n end() {\n while (this.currentLevel >= 0) {\n this.up();\n }\n return this.onEnd();\n }\n\n // Opens the current parent node\n openCurrent() {\n if (this.currentNode) {\n this.currentNode.children = true;\n return this.openNode(this.currentNode);\n }\n }\n\n // Writes the opening tag of the current node or the entire node if it has\n // no child nodes\n openNode(node) {\n var att, chunk, name, ref;\n if (!node.isOpen) {\n if (!this.root && this.currentLevel === 0 && node.type === NodeType.Element) {\n this.root = node;\n }\n chunk = '';\n if (node.type === NodeType.Element) {\n this.writerOptions.state = WriterState.OpenTag;\n chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '<' + node.name;\n ref = node.attribs;\n for (name in ref) {\n if (!hasProp.call(ref, name)) continue;\n att = ref[name];\n chunk += this.writer.attribute(att, this.writerOptions, this.currentLevel);\n }\n chunk += (node.children ? '>' : '/>') + this.writer.endline(node, this.writerOptions, this.currentLevel);\n this.writerOptions.state = WriterState.InsideTag; // if node.type is NodeType.DocType\n } else {\n this.writerOptions.state = WriterState.OpenTag;\n chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '';\n }\n chunk += this.writer.endline(node, this.writerOptions, this.currentLevel);\n }\n this.onData(chunk, this.currentLevel);\n return node.isOpen = true;\n }\n }\n\n // Writes the closing tag of the current node\n closeNode(node) {\n var chunk;\n if (!node.isClosed) {\n chunk = '';\n this.writerOptions.state = WriterState.CloseTag;\n if (node.type === NodeType.Element) {\n chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '' + this.writer.endline(node, this.writerOptions, this.currentLevel); // if node.type is NodeType.DocType\n } else {\n chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + ']>' + this.writer.endline(node, this.writerOptions, this.currentLevel);\n }\n this.writerOptions.state = WriterState.None;\n this.onData(chunk, this.currentLevel);\n return node.isClosed = true;\n }\n }\n\n // Called when a new chunk of XML is output\n\n // `chunk` a string containing the XML chunk\n // `level` current indentation level\n onData(chunk, level) {\n this.documentStarted = true;\n return this.onDataCallback(chunk, level + 1);\n }\n\n // Called when the XML document is completed\n onEnd() {\n this.documentCompleted = true;\n return this.onEndCallback();\n }\n\n // Returns debug string\n debugInfo(name) {\n if (name == null) {\n return \"\";\n } else {\n return \"node: <\" + name + \">\";\n }\n }\n\n // Node aliases\n ele() {\n return this.element(...arguments);\n }\n\n nod(name, attributes, text) {\n return this.node(name, attributes, text);\n }\n\n txt(value) {\n return this.text(value);\n }\n\n dat(value) {\n return this.cdata(value);\n }\n\n com(value) {\n return this.comment(value);\n }\n\n ins(target, value) {\n return this.instruction(target, value);\n }\n\n dec(version, encoding, standalone) {\n return this.declaration(version, encoding, standalone);\n }\n\n dtd(root, pubID, sysID) {\n return this.doctype(root, pubID, sysID);\n }\n\n e(name, attributes, text) {\n return this.element(name, attributes, text);\n }\n\n n(name, attributes, text) {\n return this.node(name, attributes, text);\n }\n\n t(value) {\n return this.text(value);\n }\n\n d(value) {\n return this.cdata(value);\n }\n\n c(value) {\n return this.comment(value);\n }\n\n r(value) {\n return this.raw(value);\n }\n\n i(target, value) {\n return this.instruction(target, value);\n }\n\n // Attribute aliases\n att() {\n if (this.currentNode && this.currentNode.type === NodeType.DocType) {\n return this.attList(...arguments);\n } else {\n return this.attribute(...arguments);\n }\n }\n\n a() {\n if (this.currentNode && this.currentNode.type === NodeType.DocType) {\n return this.attList(...arguments);\n } else {\n return this.attribute(...arguments);\n }\n }\n\n // DTD aliases\n // att() and ele() are defined above\n ent(name, value) {\n return this.entity(name, value);\n }\n\n pent(name, value) {\n return this.pEntity(name, value);\n }\n\n not(name, value) {\n return this.notation(name, value);\n }\n\n };\n\n}).call(this);\n","// Generated by CoffeeScript 2.4.1\n(function() {\n var NodeType, WriterState, XMLStreamWriter, XMLWriterBase,\n hasProp = {}.hasOwnProperty;\n\n NodeType = require('./NodeType');\n\n XMLWriterBase = require('./XMLWriterBase');\n\n WriterState = require('./WriterState');\n\n // Prints XML nodes to a stream\n module.exports = XMLStreamWriter = class XMLStreamWriter extends XMLWriterBase {\n // Initializes a new instance of `XMLStreamWriter`\n\n // `stream` output stream\n // `options.pretty` pretty prints the result\n // `options.indent` indentation string\n // `options.newline` newline sequence\n // `options.offset` a fixed number of indentations to add to every line\n // `options.allowEmpty` do not self close empty element tags\n // 'options.dontPrettyTextNodes' if any text is present in node, don't indent or LF\n // `options.spaceBeforeSlash` add a space before the closing slash of empty elements\n constructor(stream, options) {\n super(options);\n this.stream = stream;\n }\n\n endline(node, options, level) {\n if (node.isLastRootNode && options.state === WriterState.CloseTag) {\n return '';\n } else {\n return super.endline(node, options, level);\n }\n }\n\n document(doc, options) {\n var child, i, j, k, len1, len2, ref, ref1, results;\n ref = doc.children;\n // set a flag so that we don't insert a newline after the last root level node \n for (i = j = 0, len1 = ref.length; j < len1; i = ++j) {\n child = ref[i];\n child.isLastRootNode = i === doc.children.length - 1;\n }\n options = this.filterOptions(options);\n ref1 = doc.children;\n results = [];\n for (k = 0, len2 = ref1.length; k < len2; k++) {\n child = ref1[k];\n results.push(this.writeChildNode(child, options, 0));\n }\n return results;\n }\n\n cdata(node, options, level) {\n return this.stream.write(super.cdata(node, options, level));\n }\n\n comment(node, options, level) {\n return this.stream.write(super.comment(node, options, level));\n }\n\n declaration(node, options, level) {\n return this.stream.write(super.declaration(node, options, level));\n }\n\n docType(node, options, level) {\n var child, j, len1, ref;\n level || (level = 0);\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n this.stream.write(this.indent(node, options, level));\n this.stream.write(' 0) {\n this.stream.write(' [');\n this.stream.write(this.endline(node, options, level));\n options.state = WriterState.InsideTag;\n ref = node.children;\n for (j = 0, len1 = ref.length; j < len1; j++) {\n child = ref[j];\n this.writeChildNode(child, options, level + 1);\n }\n options.state = WriterState.CloseTag;\n this.stream.write(']');\n }\n // close tag\n options.state = WriterState.CloseTag;\n this.stream.write(options.spaceBeforeSlash + '>');\n this.stream.write(this.endline(node, options, level));\n options.state = WriterState.None;\n return this.closeNode(node, options, level);\n }\n\n element(node, options, level) {\n var att, attLen, child, childNodeCount, firstChildNode, j, len, len1, name, prettySuppressed, r, ratt, ref, ref1, ref2, rline;\n level || (level = 0);\n // open tag\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '<' + node.name;\n // attributes\n if (options.pretty && options.width > 0) {\n len = r.length;\n ref = node.attribs;\n for (name in ref) {\n if (!hasProp.call(ref, name)) continue;\n att = ref[name];\n ratt = this.attribute(att, options, level);\n attLen = ratt.length;\n if (len + attLen > options.width) {\n rline = this.indent(node, options, level + 1) + ratt;\n r += this.endline(node, options, level) + rline;\n len = rline.length;\n } else {\n rline = ' ' + ratt;\n r += rline;\n len += rline.length;\n }\n }\n } else {\n ref1 = node.attribs;\n for (name in ref1) {\n if (!hasProp.call(ref1, name)) continue;\n att = ref1[name];\n r += this.attribute(att, options, level);\n }\n }\n this.stream.write(r);\n childNodeCount = node.children.length;\n firstChildNode = childNodeCount === 0 ? null : node.children[0];\n if (childNodeCount === 0 || node.children.every(function(e) {\n return (e.type === NodeType.Text || e.type === NodeType.Raw) && e.value === '';\n })) {\n // empty element\n if (options.allowEmpty) {\n this.stream.write('>');\n options.state = WriterState.CloseTag;\n this.stream.write('');\n } else {\n options.state = WriterState.CloseTag;\n this.stream.write(options.spaceBeforeSlash + '/>');\n }\n } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw) && (firstChildNode.value != null)) {\n // do not indent text-only nodes\n this.stream.write('>');\n options.state = WriterState.InsideTag;\n options.suppressPrettyCount++;\n prettySuppressed = true;\n this.writeChildNode(firstChildNode, options, level + 1);\n options.suppressPrettyCount--;\n prettySuppressed = false;\n options.state = WriterState.CloseTag;\n this.stream.write('');\n } else {\n this.stream.write('>' + this.endline(node, options, level));\n options.state = WriterState.InsideTag;\n ref2 = node.children;\n // inner tags\n for (j = 0, len1 = ref2.length; j < len1; j++) {\n child = ref2[j];\n this.writeChildNode(child, options, level + 1);\n }\n // close tag\n options.state = WriterState.CloseTag;\n this.stream.write(this.indent(node, options, level) + '');\n }\n this.stream.write(this.endline(node, options, level));\n options.state = WriterState.None;\n return this.closeNode(node, options, level);\n }\n\n processingInstruction(node, options, level) {\n return this.stream.write(super.processingInstruction(node, options, level));\n }\n\n raw(node, options, level) {\n return this.stream.write(super.raw(node, options, level));\n }\n\n text(node, options, level) {\n return this.stream.write(super.text(node, options, level));\n }\n\n dtdAttList(node, options, level) {\n return this.stream.write(super.dtdAttList(node, options, level));\n }\n\n dtdElement(node, options, level) {\n return this.stream.write(super.dtdElement(node, options, level));\n }\n\n dtdEntity(node, options, level) {\n return this.stream.write(super.dtdEntity(node, options, level));\n }\n\n dtdNotation(node, options, level) {\n return this.stream.write(super.dtdNotation(node, options, level));\n }\n\n };\n\n}).call(this);\n","/**\n * @module M/impl/control/WmcControl\n */\nexport default class WmcControl extends M.impl.Control {\n /**\n * This function adds the control to the specified map\n *\n * @public\n * @function\n * @param {M.Map} map to add the plugin\n * @param {HTMLElement} html of the plugin\n * @api stable\n */\n addTo(map, html) {\n this.facadeMap_ = map;\n this.element = html;\n\n const olMap = map.getMapImpl();\n ol.control.Control.call(this, {\n element: html,\n target: null,\n });\n olMap.addControl(this);\n\n // super addTo - don't delete\n super.addTo(map, html);\n }\n\n /**\n *\n * @public\n * @function\n * @api stable\n */\n activate() {}\n\n /**\n * @public\n * @function\n * @api stable\n */\n deactivate() {}\n\n /**\n * @memberof WMCControl\n */\n getViewContext() {\n const viewContext = {\n General: {\n BoundingBox: {},\n },\n LayerList: {\n Layer: [],\n },\n $version: '1.1.0',\n $xmlns: 'http://www.opengis.net/context',\n $id: 'Contexto_IECA',\n '$xmlns:xlink': 'http://www.w3.org/1999/xlink',\n '$xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance',\n '$xsi:schemaLocation': 'http://www.opengis.net/context http://schemas.opengis.net/context/1.1.0/context.xsd',\n };\n\n viewContext.General.Title = 'WMC IECA';\n\n // vista del mapa\n // mapView.getZoom\n viewContext.General.BoundingBox.$SRS = this.facadeMap_.getProjection().code;\n const extent = this.facadeMap_.getBbox();\n viewContext.General.BoundingBox.$minx = extent.x.min;\n viewContext.General.BoundingBox.$miny = extent.y.min;\n viewContext.General.BoundingBox.$maxx = extent.x.max;\n viewContext.General.BoundingBox.$maxy = extent.y.max;\n viewContext.General.KeywordList = {\n Keyword: ['IECA'],\n };\n viewContext.General.Abstract = 'Fichero de configuración del contexto de visualización de capas.';\n viewContext.General.Extension = {};\n const maxExtent = this.facadeMap_.getMaxExtent();\n if (maxExtent) {\n viewContext.General.Extension['ol:maxExtent'] = {\n '$xmlns:ol': 'http://openlayers.org/context',\n $minx: maxExtent.x ?\n maxExtent.x.min : maxExtent[0],\n $miny: maxExtent.y ?\n maxExtent.x.min : maxExtent[1],\n $maxx: maxExtent.x ?\n maxExtent.x.min : maxExtent[2],\n $maxy: maxExtent.y ?\n maxExtent.x.min : maxExtent[3],\n };\n }\n // ancho en pixels del mapa\n /* viewContext.General.Window.$width = vsMap.getSize()[0];\n viewContext.General.Window.$height = vsMap.getSize()[1]; */\n\n // CAPAS\n /* eslint-disable */\n for (const layer of this.facadeMap_.getWMS()) {\n const wmcLayer = {};\n\n wmcLayer.$hidden = !layer.isVisible() ?\n 1 :\n 0;\n wmcLayer.$queryable = layer.isQueryable() ?\n 1 :\n 0;\n wmcLayer.Name = layer.name;\n wmcLayer.Title = layer.legend;\n // server\n wmcLayer.Server = {\n OnlineResource: {\n '$xmlns:xlink': 'http://www.w3.org/1999/xlink',\n '$xlink:type': 'simple',\n '$xlink:href': layer.url,\n },\n $service: 'OGC:WMS',\n $version: layer.version,\n };\n\n // Si se trata de una capa base, incluyo la leyenda porque debería ser la imagen del mapa\n if (!layer.transparent) {\n wmcLayer.StyleList = {\n Style: [\n {\n $current: 1,\n Name: 'Default',\n Title: 'Default',\n LegendURL: {\n $width: 200,\n $height: 120,\n $format: 'image/png',\n OnlineResource: {\n '$xmlns:xlink': 'http://www.w3.org/1999/xlink',\n '$xlink:type': 'simple',\n '$xlink:href': layer.getLegendURL(),\n },\n },\n },\n ],\n };\n }\n\n // EXTENSIONES DE MAPEA\n wmcLayer.Extension = {\n 'ol:opacity': {\n '#text': layer.getOpacity(),\n '$xmlns:ol': 'http://openlayers.org/context',\n },\n 'ol:transparent': {\n '#text': layer.transparent,\n '$xmlns:ol': 'http://openlayers.org/context',\n },\n 'ol:isBaseLayer': {\n '#text': !layer.transparent,\n '$xmlns:ol': 'http://openlayers.org/context',\n },\n 'ol:displayInLayerSwitcher': {\n '#text': layer.displayInLayerSwitcher,\n '$xmlns:ol': 'http://openlayers.org/context',\n },\n 'ol:singleTile': {\n '#text': layer.tiled,\n '$xmlns:ol': 'http://openlayers.org/context',\n },\n };\n\n viewContext.LayerList.Layer.push(wmcLayer);\n }\n /* eslint-enable */\n return viewContext;\n }\n}\n","/**\n * @module M/impl/control/WmcLayer\n */\nexport default class WmcLayer extends M.impl.layer.WMC {\n /**\n * @classdesc\n * Extensión de la implementación de la capa WMC para poder insertar\n * capas WMC que no vengan por url\n *\n * @constructor\n * @extends {M.impl.layer.WMC}\n * @api stable\n */\n constructor(options) {\n super(options);\n this.projection = null;\n }\n\n /**\n * This function select this WMC layer and\n * triggers the event to draw it\n *\n * @public\n * @function\n * @api stable\n */\n select() {\n if (this.selected === false) {\n // unselect layers\n this.map.getWMC().forEach((wmcLayer) => {\n wmcLayer.unselect();\n });\n\n this.selected = true;\n // set projection with the wmc\n if (this.projection) {\n this.map.setProjection({\n code: this.projection.getCode(),\n units: this.projection.getUnits(),\n }, true);\n }\n if (!M.utils.isNullOrEmpty(this.bbox)) {\n try {\n this.map.setBbox(this.bbox, {\n nearest: true,\n });\n } catch (error) {\n M.dialog.info(error);\n }\n }\n if (!M.utils.isNullOrEmpty(this.maxExtent)) {\n this.map.setMaxExtent(this.maxExtent, false);\n }\n if (this.layers.length) {\n this.map.addWMS(this.layers, true);\n }\n this.map.fire(M.evt.CHANGE_WMC, this);\n }\n }\n\n loadContext(documentXML) {\n return new Promise((success, fail) => {\n try {\n if (documentXML) {\n // JGL: mapea5 incluye WMC y WMC110 dentro del array wmc\n const formater = M.impl.format.wmc ?\n new M.impl.format.wmc.WMC() : new M.impl.format.WMC();\n const context = formater.readFromDocument(documentXML);\n success(context);\n } else if (this.url) {\n // Carga el contexto\n M.remote.get(this.url).then((response) => {\n const wmcDocument = response.xml;\n // JGL: mapea5 incluye WMC y WMC110 dentro del array wmc\n const formater = M.impl.format.wmc ?\n new M.impl.format.wmc.WMC() : new M.impl.format.WMC();\n const context = formater.readFromDocument(wmcDocument);\n success(context);\n });\n } else {\n /* eslint-disable */\n fail('No hay contexto');\n /* eslint-enable */\n }\n } catch (error) {\n fail(error);\n }\n });\n }\n\n\n loadLayers() {\n if (this.map) {\n this.map.addWMS(this.layers, true);\n }\n }\n\n loadContextParameters(context) {\n this.layers = context.layers;\n // Debido a que en Mapea si no hay capas base se selecciona como activa\n // la primera que llegue y las demás se desactivan hay que reordenar\n // el array de capas base para que las visibles se añadan primero\n this.layers.sort((layerA, layerB) => {\n let result = 1;\n const visibleA = layerA.isVisible();\n const visibleB = layerB.isVisible();\n const isBaseLayerA = !layerA.transparent;\n const isBaseLayerB = !layerB.transparent;\n // Si ambas son visible, o no visibles, o alguna de las dos no es base no se ordenan\n if ((visibleA && visibleB) || (!visibleA && !visibleB) || !isBaseLayerA || !isBaseLayerB) {\n result = 0;\n } else if (visibleA) {\n result = -1;\n }\n return result;\n });\n this.bbox = {\n x: {\n min: context.bounds[0],\n max: context.bounds[2],\n },\n y: {\n min: context.bounds[1],\n max: context.bounds[3],\n },\n };\n this.maxExtent = {\n x: {\n min: context.maxExtent[0],\n max: context.maxExtent[2],\n },\n y: {\n min: context.maxExtent[1],\n max: context.maxExtent[3],\n },\n };\n this.projection = ol.proj.get(context.projection);\n }\n}\n","import WmcLayerImpl from 'impl/wmclayer';\n\nexport default class WmcLayer extends M.layer.WMC {\n /**\n * @classdesc\n * Clase WMCLayer que extiende de M.Layer.WMC para poder tener capas WMC\n * que no provengan o se inicialicen desde una url\n *\n * @constructor\n * @extends {M.Control}\n * @api stable\n */\n constructor(options = {}) {\n super('http://prueba.es');\n this.url = null;\n // 1. checks if the implementation can create PluginControl\n if (M.utils.isUndefined(WmcLayerImpl)) {\n M.exception('La implementación usada no puede crear controles WMCLayerImpl');\n }\n // 2. implementation of this control\n const impl = new WmcLayerImpl(options);\n this.setImpl(impl);\n }\n}\n","/**\n * @module M/control/WmcControl\n */\n\nimport * as xmlbuilder from 'xmlbuilder';\nimport WmcImplControl from 'impl/wmccontrol';\nimport template from 'templates/wmc';\nimport WmcLayer from './wmclayer';\n\nexport default class WmcControl extends M.Control {\n /**\n * @classdesc\n * Main constructor of the class. Creates a PluginControl\n * control\n *\n * @constructor\n * @extends {M.Control}\n * @api stable\n */\n constructor() {\n // 1. checks if the implementation can create PluginControl\n if (M.utils.isUndefined(WmcImplControl)) {\n M.exception('La implementación usada no puede crear controles WMCControl');\n }\n // 2. implementation of this control\n const impl = new WmcImplControl();\n super(impl, 'wmc');\n\n this.file_ = null;\n this.inputUrl_ = null;\n this.loadBtn_ = null;\n this.saveBtn_ = null;\n\n // Inputs tabs\n this.inputsTabs_ = null;\n this.selectedTab_ = '';\n // Inputs nombre carga wmc\n this.inputWMCLoadName_ = null;\n // Inputs nombre guardado wmc\n this.inputWMCSaveName_ = null;\n this.facadeMap_ = null;\n }\n\n /**\n * @param {any} html\n * @memberof WMCControl\n */\n addEvents(html) {\n const inputFile = html.querySelector('.form div.file > input');\n this.loadBtn_ = html.querySelector('.button > button.load');\n this.saveBtn_ = html.querySelector('.button > button.save');\n this.inputUrl_ = html.querySelector('.form div.url > input');\n this.inputsTabs_ = html.querySelectorAll('input[name=\"tabs-wmc\"]');\n this.selectedTab_ = html.querySelector('input[name=\"tabs-wmc\"]:checked').dataset.tab;\n this.inputWMCLoadName_ = html.querySelector('.form div.load-name > input');\n this.inputWMCSaveName_ = html.querySelector('.form div.save-name > input');\n\n inputFile.addEventListener('change', evt => this.changeFile(evt, inputFile.files[0]));\n this.loadBtn_.addEventListener('click', evt => this.loadWMC());\n this.saveBtn_.addEventListener('click', evt => this.saveWMC());\n this.inputUrl_.addEventListener('input', evt => this.checkButtons());\n this.inputWMCLoadName_.addEventListener('input', evt => this.checkButtons());\n this.inputWMCSaveName_.addEventListener('input', evt => this.checkButtons());\n\n // Annado el evento a cada radio button para saber cuando se ha cambiado de tab\n this.inputsTabs_.forEach((element) => {\n element.addEventListener('change', evt => this.changeTab(evt));\n });\n }\n\n /**\n * This function creates the view\n *\n * @public\n * @function\n * @param {M.Map} map to add the control\n * @api stable\n */\n createView(map) {\n this.facadeMap_ = map;\n return new Promise((success, fail) => {\n const html = M.template.compileSync(template);\n this.addEvents(html);\n success(html);\n });\n }\n\n /**\n * This function compares controls\n *\n * @public\n * @function\n * @param {M.Control} control to compare\n * @api stable\n */\n equals(control) {\n return control instanceof WmcControl;\n }\n\n /**\n * Obtiene elemento del DOM escapando caracteres (no validos para busqueda por CSS)\n * @param {any} target\n * @param {any} selector\n * @returns\n * @memberof WMCControl\n */\n getQuerySelectorScapeCSS(target, selector) {\n // eslint-disable-next-line no-undef\n return target.querySelector(CSS.escape(selector));\n }\n\n changeTab(evt) {\n const e = (evt || window.event);\n const itemTarget = e.target;\n this.selectedTab_ = itemTarget.dataset.tab;\n this.checkButtons();\n }\n\n checkButtons() {\n if (this.selectedTab_ === 'loadWMC') {\n this.loadBtn_.disabled = (M.utils.isNullOrEmpty(this.file_) &&\n M.utils.isNullOrEmpty(this.inputUrl_.value)) ||\n M.utils.isNullOrEmpty(this.inputWMCLoadName_.value);\n this.inputUrl_.disabled = !M.utils.isNullOrEmpty(this.file_);\n } else {\n this.saveBtn_.disabled = M.utils.isNullOrEmpty(this.inputWMCSaveName_.value);\n }\n }\n\n /**\n * @param {any} file\n * @memberof WMCControl\n */\n changeFile(evt, file) {\n this.file_ = file;\n this.inputWMCLoadName_.value = this.file_.name.replace(/\\.[^/.]+$/, '');\n this.checkButtons();\n if (!M.utils.isNullOrEmpty(file)) {\n if (file.size > 20971520) {\n M.dialog.info('El fichero seleccionado sobrepasa el máximo de 20 MB permitido');\n this.file_ = null;\n this.checkButtons();\n }\n }\n }\n\n /**\n * @param {any} evt\n * @memberof WMCControl\n */\n changeName(evt) {\n const e = (evt || window.event);\n const itemTarget = e.target;\n this.loadBtn_.disabled = (itemTarget.value.trim() === '');\n }\n\n saveWMC() {\n try {\n if ('Blob' in window) {\n const fileName = `${this.inputWMCSaveName_.value}.xml`;\n const ViewContext = this.getImpl().getViewContext();\n // let writer = xmlbuilder.streamWriter(process.stdout);\n const xml = xmlbuilder.create({\n ViewContext,\n }, {\n stringify: {\n convertAttKey: '$',\n },\n encoding: 'utf-8',\n });\n const content = xml.end();\n /* eslint-disable */\n const textFileAsBlob = new Blob([content], { type: 'text/plain;charset=utf-8' });\n if ('msSaveOrOpenBlob' in navigator) {\n navigator.msSaveOrOpenBlob(textFileAsBlob, fileName);\n /* eslint-enable */\n } else {\n const downloadLink = document.createElement('a');\n downloadLink.download = fileName;\n downloadLink.innerHTML = 'Download File';\n if ('webkitURL' in window) {\n // Chrome allows the link to be clicked without actually adding it to the DOM.\n downloadLink.href = window.URL.createObjectURL(textFileAsBlob);\n } else {\n // Firefox requires the link to be added to the DOM before it can be clicked.\n downloadLink.href = window.URL.createObjectURL(textFileAsBlob);\n downloadLink.onclick = this.destroyClickedElement;\n downloadLink.style.display = 'none';\n document.body.appendChild(downloadLink);\n }\n\n downloadLink.click();\n }\n } else {\n M.dialog.info('Tu navegador no soporta la descarga de ficheros Blob HML5');\n }\n } catch (error) {\n M.dialog.error('Error al guardar el contexto del mapa');\n }\n }\n\n /**\n * @memberof WMCControl\n */\n loadWMC() {\n let options;\n if (this.file_) {\n // eslint-disable-next-line no-undef\n const fileReader = new FileReader();\n fileReader.addEventListener('load', (e) => {\n let documentXML;\n if ((typeof DOMParser !== 'undefined')) {\n documentXML = (new DOMParser()).parseFromString(fileReader.result, 'text/xml');\n }\n options = {\n documentXML,\n };\n this.addToMap(options);\n });\n\n fileReader.readAsText(this.file_);\n } else {\n options = {\n url: this.inputUrl_.value,\n };\n this.addToMap(options);\n }\n }\n\n addToMap(options) {\n try {\n const wmcLayer = new WmcLayer(options); // adds the WMC layer\n wmcLayer.name = this.inputWMCLoadName_.value;\n wmcLayer.url = options.url;\n // Compruebo que no esté ya añadida al mapa\n const wmc = this.facadeMap_.getWMC(wmcLayer);\n if (wmc.length === 0) {\n this.facadeMap_.getImpl().addWMC([wmcLayer]);\n this.facadeMap_.fire(M.evt.ADDED_LAYER, [wmcLayer]);\n this.facadeMap_.fire(M.evt.ADDED_WMC, [wmcLayer]);\n\n wmcLayer.getImpl().loadContext(options.documentXML).then((context) => {\n wmcLayer.getImpl().loadContextParameters(context);\n /* checks if it should create the WMC control\n to select WMC */\n const wmcselectorActive = (this.facadeMap_.getControls('wmcselector').length > 0);\n const addedWmcLayers = this.facadeMap_.getWMC();\n if (addedWmcLayers.length > 1 && !wmcselectorActive) {\n this.facadeMap_.addControls(new M.control.WMCSelector());\n }\n wmcLayer.select();\n });\n } else {\n wmc[0].select();\n }\n } catch (error) {\n M.dialog.error('Error al cargar el fichero. Compruebe que se trata del fichero correcto');\n }\n }\n\n destroyClickedElement_(event) {\n document.body.removeChild(event.target);\n }\n}\n","/**\n * @module M/plugin/Wmc\n */\nimport 'assets/css/wmc';\nimport WmcControl from './wmccontrol';\nimport api from '../../api';\n\n\nexport default class Wmc extends M.Plugin {\n /**\n * @classdesc\n * Main facade plugin object. This class creates a plugin\n * object which has an implementation Object\n *\n * @constructor\n * @extends {M.Plugin}\n * @param {Object} impl implementation object\n * @api stable\n */\n constructor(parameters = {}) {\n super(parameters);\n /**\n * Facade of the map\n * @private\n * @type {M.Map}\n */\n this.map_ = null;\n\n /**\n * Array of controls\n * @private\n * @type {Array}\n */\n this.control_ = null;\n\n /**\n * @private\n * @type {M.ui.Panel}\n */\n this.panel_ = null;\n\n /**\n * Facade of the map\n * @private\n * @type {String}\n */\n this.params_ = {};\n if (!M.utils.isNullOrEmpty(parameters.params)) {\n this.params_ = parameters.params;\n }\n\n /**\n * Facade of the map\n * @private\n * @type {String}\n */\n this.options_ = {};\n if (!M.utils.isNullOrEmpty(parameters.options)) {\n this.options_ = parameters.options;\n }\n\n /**\n * Metadata from api.json\n * @private\n * @type {Object}\n */\n this.metadata_ = api.metadata;\n }\n\n /**\n * This function adds this plugin into the map\n *\n * @public\n * @function\n * @param {M.Map} map the map to add the plugin\n * @api stable\n */\n addTo(map) {\n this.map_ = map;\n\n this.control_ = new WmcControl();\n this.panel_ = new M.ui.Panel('panelWmc', {\n collapsible: true,\n className: 'm-wmc',\n collapsedButtonClass: 'g-cartografia-opciones',\n position: M.ui.position.TR,\n tooltip: 'Gestión de WMC',\n });\n this.panel_.on(M.evt.ADDED_TO_MAP, (html) => {\n M.utils.enableTouchScroll(html);\n });\n this.panel_.addControls(this.control_);\n this.map_.addPanels(this.panel_);\n\n this.control_.on(M.evt.ADDED_TO_MAP, () => {\n this.fire(M.evt.ADDED_TO_MAP);\n });\n }\n\n /**\n * @memberof WMC\n */\n destroy() {\n this.map_.removeControls([this.control_]);\n [this.map_, this.control_, this.panel_, this.options_] = [null, null, null, null];\n }\n\n /**\n * @param {any} plugin\n * @returns\n * @memberof WMC\n */\n equals(plugin) {\n let result = false;\n if (plugin instanceof Wmc) {\n result = true;\n }\n return result;\n }\n\n /**\n * Name to identify this plugin\n * @const\n * @type {string}\n * @public\n * @api stable\n */\n get name() {\n return 'wmc';\n }\n\n /**\n * This function gets metadata plugin\n *\n * @public\n * @function\n * @api stable\n */\n getMetadata() {\n return this.metadata_;\n }\n}\n","import M$plugin$Wmc from './/facade/js/wmc';\nimport M$control$WmcControl from './/facade/js/wmccontrol';\nimport M$impl$control$WmcControl from './/impl/ol/js/wmccontrol';\nimport M$impl$control$WmcLayer from './/impl/ol/js/wmclayer';\n\nif (!window.M.plugin) window.M.plugin = {};\nif (!window.M.control) window.M.control = {};\nif (!window.M.impl) window.M.impl = {};\nif (!window.M.impl.control) window.M.impl.control = {};\nwindow.M.plugin.Wmc = M$plugin$Wmc;\nwindow.M.control.WmcControl = M$control$WmcControl;\nwindow.M.impl.control.WmcControl = M$impl$control$WmcControl;\nwindow.M.impl.control.WmcLayer = M$impl$control$WmcLayer;\n"],"sourceRoot":""} \ No newline at end of file diff --git a/package.json b/package.json index 34f8c3a..d997f3a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Wmc", - "version": "1.0.0", + "version": "1.0.1", "description": "", "keywords": [ "map", diff --git a/src/api.json b/src/api.json index 88e6f7c..5282407 100644 --- a/src/api.json +++ b/src/api.json @@ -15,12 +15,13 @@ "name": "Wmc", "description": "Plugin para poder guardar la sesión de trabajo mediante un fichero de contexto de mapa (WMC)", "text": "Permite recuperar o compartir, una sesión de trabajo en contexto de mapa en cualquier momento", - "version": "1.1.0", - "date": "Junio, 2020", + "version": "1.1.1", + "date": "Mayo, 2021", "author": "", "org": "Instituto de Estadística y Cartografía. Junta de Andalucía", "tags": "mapea,plugin", "icon": "./facade/assets/icons/icons.svg", - "centralized": true + "centralized": true, + "compatibility": ["5","6"] } } diff --git a/test/dev.html b/test/dev.html index bfc642a..81bd54c 100644 --- a/test/dev.html +++ b/test/dev.html @@ -7,7 +7,7 @@ WMC SESSION - +