From aa902793135aac0d6fcda248829d3c4c829b47b6 Mon Sep 17 00:00:00 2001 From: dntzhang Date: Tue, 9 May 2017 11:56:22 +0800 Subject: [PATCH] omi v1.6.1 - support ::data-* to pass data to child component --- README.md | 24 ++++++++++++------------ dist/omi.js | 14 +++++++++----- dist/omi.lite.js | 14 +++++++++----- dist/omi.lite.min.js | 6 +++--- dist/omi.min.js | 6 +++--- dist/omi.mustache.js | 14 +++++++++----- dist/omi.mustache.min.js | 8 ++++---- package.json | 2 +- 8 files changed, 50 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index 1c90cbccf..5604c6628 100644 --- a/README.md +++ b/README.md @@ -65,12 +65,12 @@ $ npm install omi ## CDN -* [https://unpkg.com/omi@1.6.0/dist/omi.min.js](https://unpkg.com/omi@1.6.0/dist/omi.min.js) -* [https://unpkg.com/omi@1.6.0/dist/omi.js](https://unpkg.com/omi@1.6.0/dist/omi.js) -* [https://unpkg.com/omi@1.6.0/dist/omi.lite.min.js](https://unpkg.com/omi@1.6.0/dist/omi.lite.min.js) -* [https://unpkg.com/omi@1.6.0/dist/omi.lite.js](https://unpkg.com/omi@1.6.0/dist/omi.lite.js) -* [https://unpkg.com/omi@1.6.0/dist/omi.mustache.min.js](https://unpkg.com/omi@1.6.0/dist/omi.mustache.min.js) -* [https://unpkg.com/omi@1.6.0/dist/omi.mustache.js](https://unpkg.com/omi@1.6.0/dist/omi.mustache.js) +* [https://unpkg.com/omi@1.6.1/dist/omi.min.js](https://unpkg.com/omi@1.6.1/dist/omi.min.js) +* [https://unpkg.com/omi@1.6.1/dist/omi.js](https://unpkg.com/omi@1.6.1/dist/omi.js) +* [https://unpkg.com/omi@1.6.1/dist/omi.lite.min.js](https://unpkg.com/omi@1.6.1/dist/omi.lite.min.js) +* [https://unpkg.com/omi@1.6.1/dist/omi.lite.js](https://unpkg.com/omi@1.6.1/dist/omi.lite.js) +* [https://unpkg.com/omi@1.6.1/dist/omi.mustache.min.js](https://unpkg.com/omi@1.6.1/dist/omi.mustache.min.js) +* [https://unpkg.com/omi@1.6.1/dist/omi.mustache.js](https://unpkg.com/omi@1.6.1/dist/omi.mustache.js) ## 感谢 @@ -134,12 +134,12 @@ if using 'omi.lite.js' (without [mustache.js](https://github.com/janl/mustache.j ## CDN -* [https://unpkg.com/omi@1.6.0/dist/omi.min.js](https://unpkg.com/omi@1.6.0/dist/omi.min.js) -* [https://unpkg.com/omi@1.6.0/dist/omi.js](https://unpkg.com/omi@1.6.0/dist/omi.js) -* [https://unpkg.com/omi@1.6.0/dist/omi.lite.min.js](https://unpkg.com/omi@1.6.0/dist/omi.lite.min.js) -* [https://unpkg.com/omi@1.6.0/dist/omi.lite.js](https://unpkg.com/omi@1.6.0/dist/omi.lite.js) -* [https://unpkg.com/omi@1.6.0/dist/omi.mustache.min.js](https://unpkg.com/omi@1.6.0/dist/omi.mustache.min.js) -* [https://unpkg.com/omi@1.6.0/dist/omi.mustache.js](https://unpkg.com/omi@1.6.0/dist/omi.mustache.js) +* [https://unpkg.com/omi@1.6.1/dist/omi.min.js](https://unpkg.com/omi@1.6.1/dist/omi.min.js) +* [https://unpkg.com/omi@1.6.1/dist/omi.js](https://unpkg.com/omi@1.6.1/dist/omi.js) +* [https://unpkg.com/omi@1.6.1/dist/omi.lite.min.js](https://unpkg.com/omi@1.6.1/dist/omi.lite.min.js) +* [https://unpkg.com/omi@1.6.1/dist/omi.lite.js](https://unpkg.com/omi@1.6.1/dist/omi.lite.js) +* [https://unpkg.com/omi@1.6.1/dist/omi.mustache.min.js](https://unpkg.com/omi@1.6.1/dist/omi.mustache.min.js) +* [https://unpkg.com/omi@1.6.1/dist/omi.mustache.js](https://unpkg.com/omi@1.6.1/dist/omi.mustache.js) ## Thanks diff --git a/dist/omi.js b/dist/omi.js index cb4533fd1..7a81b53a0 100644 --- a/dist/omi.js +++ b/dist/omi.js @@ -1,5 +1,5 @@ /*! - * Omi v1.6.0 By dntzhang + * Omi v1.6.1 By dntzhang * Github: https://github.com/AlloyTeam/omi * MIT Licensed. */ @@ -1703,10 +1703,12 @@ return /******/ (function(modules) { // webpackBootstrap _this12._dataset[_this12._capitalize(key.replace('data-', ''))] = value; } else if (key.indexOf(':data-') === 0) { _this12._dataset[_this12._capitalize(key.replace(':data-', ''))] = eval('(' + value + ')'); - } else if (key === ':data') { - _this12._dataset = eval('(' + value + ')'); + } else if (key.indexOf('::data-') === 0) { + _this12._dataset[_this12._capitalize(key.replace('::data-', ''))] = _this12._extractPropertyFromString(value, _this12.parent); } else if (key === 'data') { _this12._dataset = _this12._extractPropertyFromString(value, _this12.parent); + } else if (key === ':data') { + _this12._dataset = eval('(' + value + ')'); } else if (key === 'group-data') { _this12._dataset = _this12._extractPropertyFromString(value, _this12.parent)[_this12._omi_groupDataIndex]; } @@ -1801,10 +1803,12 @@ return /******/ (function(modules) { // webpackBootstrap dataset[_this13._capitalize(key.replace('data-', ''))] = value; } else if (key.indexOf(':data-') === 0) { dataset[_this13._capitalize(key.replace(':data-', ''))] = eval('(' + value + ')'); - } else if (key === ':data') { - dataset = eval('(' + value + ')'); + } else if (key.indexOf('::data-') === 0) { + dataset[_this13._capitalize(key.replace('::data-', ''))] = _this13._extractPropertyFromString(value, child); } else if (key === 'data') { dataset = _this13._extractPropertyFromString(value, child); + } else if (key === ':data') { + dataset = eval('(' + value + ')'); } else if (key === 'preventSelfUpdate' || key === 'psu') { _omi_option.preventSelfUpdate = true; } else if (key === 'selfDataFirst' || key === 'sdf') { diff --git a/dist/omi.lite.js b/dist/omi.lite.js index c29cabceb..e0dcfb68f 100644 --- a/dist/omi.lite.js +++ b/dist/omi.lite.js @@ -1,5 +1,5 @@ /*! - * Omi v1.6.0 By dntzhang + * Omi v1.6.1 By dntzhang * Github: https://github.com/AlloyTeam/omi * MIT Licensed. */ @@ -1007,10 +1007,12 @@ return /******/ (function(modules) { // webpackBootstrap _this12._dataset[_this12._capitalize(key.replace('data-', ''))] = value; } else if (key.indexOf(':data-') === 0) { _this12._dataset[_this12._capitalize(key.replace(':data-', ''))] = eval('(' + value + ')'); - } else if (key === ':data') { - _this12._dataset = eval('(' + value + ')'); + } else if (key.indexOf('::data-') === 0) { + _this12._dataset[_this12._capitalize(key.replace('::data-', ''))] = _this12._extractPropertyFromString(value, _this12.parent); } else if (key === 'data') { _this12._dataset = _this12._extractPropertyFromString(value, _this12.parent); + } else if (key === ':data') { + _this12._dataset = eval('(' + value + ')'); } else if (key === 'group-data') { _this12._dataset = _this12._extractPropertyFromString(value, _this12.parent)[_this12._omi_groupDataIndex]; } @@ -1105,10 +1107,12 @@ return /******/ (function(modules) { // webpackBootstrap dataset[_this13._capitalize(key.replace('data-', ''))] = value; } else if (key.indexOf(':data-') === 0) { dataset[_this13._capitalize(key.replace(':data-', ''))] = eval('(' + value + ')'); - } else if (key === ':data') { - dataset = eval('(' + value + ')'); + } else if (key.indexOf('::data-') === 0) { + dataset[_this13._capitalize(key.replace('::data-', ''))] = _this13._extractPropertyFromString(value, child); } else if (key === 'data') { dataset = _this13._extractPropertyFromString(value, child); + } else if (key === ':data') { + dataset = eval('(' + value + ')'); } else if (key === 'preventSelfUpdate' || key === 'psu') { _omi_option.preventSelfUpdate = true; } else if (key === 'selfDataFirst' || key === 'sdf') { diff --git a/dist/omi.lite.min.js b/dist/omi.lite.min.js index bcd7a9851..8399b1245 100644 --- a/dist/omi.lite.min.js +++ b/dist/omi.lite.min.js @@ -1,7 +1,7 @@ /*! - * Omi v1.6.0 By dntzhang + * Omi v1.6.1 By dntzhang * Github: https://github.com/AlloyTeam/omi * MIT Licensed. */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Omi=t():e.Omi=t()}(this,function(){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}var r=n(1),o=i(r),a=n(2),s=i(a),l=n(7),u=i(l);o.default.template=function(e,t){return e},o.default.Store=u.default,o.default.Component=s.default,window.Omi?e.exports=window.Omi:(window.Omi=o.default,e.exports=o.default)},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"==typeof t?"undefined":a(t))&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":a(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function o(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push({key:n,value:e[n]});return t}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s={};s.instances={},s._instanceId=0,s.getInstanceId=function(){return s._instanceId++},s.customTags=[],s.mapping={},s.STYLEPREFIX="omi_style_",s.STYLESCOPEDPREFIX="omi_scoped_",s.style={},s.componentConstructor={},"function"!=typeof Object.assign&&(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");e=Object(e);for(var t=1;t=0?s:a+s;var l=n?n:a;if(n<0&&(l=a+n),r=l-s,r>0)if(o=new Array(r),this.charAt)for(i=0;i2&&(u=a,d=t),s.componentConstructor[e]=function(t){function a(t,r){return n(this,a),this.___omi_constructor_name=e,i(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,t,r))}return r(a,t),l(a,o(u)),a}(d),s.customTags.push(e),s.componentConstructor[e]},s.createStore=function(e){var t=function(t){function a(t,r){return n(this,a),this.data=t,e.methods.install&&e.methods.install.call(this),i(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,t,r))}return r(a,t),l(a,o(e.methods)),a}(s.Store);return new t(e.data,!0)},s.mixIndex=function(e,t){for(var n=e.length,i=t||"index",r=0;r",this.HTML):(this._mergeData(e),this.parent._omi_autoStoreToData&&(this._omi_autoStoreToData=!0,this._omi_ignoreStoreData||(this.data=this.$store.data)),this.beforeRender(),this._fixSlot(this._generateHTMLCSS()),t?this._extractChildrenString(this):this._extractChildren(this),this.children.forEach(function(e){n.HTML=n.HTML.replace(e._omiChildStr,t?e.node.outerHTML:e.HTML)}),this.HTML=(0,_event2.default)(this.HTML,this.id),this.HTML)}},{key:"_fixSlot",value:function(e){var t=this;if(this._omi_slotContent){this._omi_slotContent=this._scopedAttr(this._omi_slotContent,this._omi_scoped_attr,e);var n=_morphdom2.default.toElements(this._omi_slotContent),i=this.HTML.match(//g);1===n.length&&i&&1===i.length?this.HTML=this.HTML.replace(//,this._omi_slotContent):(n.sort(function(e,t){return parseInt(e.getAttribute("slot-index"))-parseInt(t.getAttribute("slot-index"))}),n.forEach(function(e){t.HTML=t.HTML.replace(//,e.outerHTML)}))}}},{key:"_queryElements",value:function(e){e._mixRefs(),e._execPlugins(),e.children.forEach(function(t){t.node=e.node.querySelector("["+_omi2.default.STYLESCOPEDPREFIX+t.id+"]"),t.node&&e._queryElements(t)})}},{key:"_mixRefs",value:function(){var e=this,t=_omi2.default.$$("*[ref]",this.node);t.forEach(function(t){t.hasAttribute(e._omi_scoped_attr)&&(e.refs[t.getAttribute("ref")]=t)});var n=this.node.getAttribute("ref");n&&(this.refs[n]=this.node)}},{key:"_execPlugins",value:function(){var e=this;Object.keys(_omi2.default.plugins).forEach(function(t){var n=_omi2.default.$$("*["+t+"]",e.node);n.forEach(function(n){n.hasAttribute(e._omi_scoped_attr)&&_omi2.default.plugins[t](n,e)}),e.node.hasAttribute(t)&&_omi2.default.plugins[t](e.node,e)})}},{key:"_childrenInstalled",value:function(e){var t=this;e.children.forEach(function(e){t._childrenInstalled(e),e.installed(),e._execInstalledHandlers()})}},{key:"_fixForm",value:function(){_omi2.default.$$("input",this.node).forEach(function(e){var t=e.type.toLowerCase();""===e.getAttribute("value")&&(e.value=""),"checked"!==t&&"radio"!==t||(e.hasAttribute("checked")?e.checked="checked":e.checked=!1)}),_omi2.default.$$("textarea",this.node).forEach(function(e){e.value=e.getAttribute("value")}),_omi2.default.$$("select",this.node).forEach(function(e){var t=e.getAttribute("value");if(t)_omi2.default.$$("option",e).forEach(function(e){t===e.getAttribute("value")&&e.setAttribute("selected","selected")});else{var n=_omi2.default.$$("option",e)[0];n&&n.setAttribute("selected","selected")}})}},{key:"_replaceTags",value:function(e,t,n){var i=this;if(0!==_omi2.default.customTags.length){var r=e.join("|"),o=new RegExp("<("+r+"+)((?:\\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\\s*=\\s*(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>\\s]+))?)*)\\s*((\\/>)|>(([\\s\\S]*?)<\\/\\1>))","g"),a=0;return t.replace(o,function(e,t,r,o,s,l,u){if(n){var d=i.children[a];d&&d.___omi_constructor_name===t&&(d._omiChildStr=e)}else i._initComponentByString(t,e,u,a++,i)})}}},{key:"_createHiddenNode",value:function(){var e=document.createElement("input");return e.setAttribute("type","hidden"),e.setAttribute(this._omi_scoped_attr,""),e}},{key:"_mergeData",value:function(e){this.selfDataFirst?this.data=Object.assign({},this._getDataset(e),this.data):this.data=Object.assign({},this.data,this._getDataset(e))}},{key:"_generateHTMLCSS",value:function(){this.CSS=(this.style()||"").replace(/<\/?style>/g,"");var e=this.___omi_constructor_name?_omi2.default.STYLESCOPEDPREFIX+this.___omi_constructor_name.toLowerCase():this._omi_scoped_attr;this.CSS&&(!this._omi_scopedSelfCSS&&_omi2.default.style[e]||(this.CSS=_style2.default.scoper(this.CSS,this._omi_scopedSelfCSS?"["+this._omi_scoped_attr+"]":"["+e+"]"),_omi2.default.style[e]=this.CSS,this.CSS===this._preCSS||this._omi_server_rendering||(_style2.default.addStyle(this.CSS,this.id),this._preCSS=this.CSS)));var t=this.render();return this.HTML=this._scopedAttr(_omi2.default.template(t?t:"",this.data),this._omi_scoped_attr,e).trim(),this._omi_server_rendering&&(this.HTML='\r\n\r\n"+this.HTML,this.HTML+='\r\n\r\n"),e}},{key:"_scopedAttr",value:function(e,t,n){var i=this;return e.replace(/<[^\/]([A-Za-z]*)[^>]*>/g,function(e){var r=e.split(" ")[0].replace(">","");return i._omi_scopedSelfCSS||!i.___omi_constructor_name?e.replace(r,r+" "+t):e.replace(r,r+" "+t+" "+n)})}},{key:"_getDataset",value:function _getDataset(childStr){var _this12=this,json=(0,_html2json2.default)(childStr),attr=json.child[0].attr,baseData={};return Object.keys(attr).forEach(function(key){var value=attr[key];if(0===key.indexOf("on")){var handler=_this12.parent[value];handler&&(baseData[_this12._capitalize(key)]=handler.bind(_this12.parent))}else 0===key.indexOf("data-")?_this12._dataset[_this12._capitalize(key.replace("data-",""))]=value:0===key.indexOf(":data-")?_this12._dataset[_this12._capitalize(key.replace(":data-",""))]=eval("("+value+")"):":data"===key?_this12._dataset=eval("("+value+")"):"data"===key?_this12._dataset=_this12._extractPropertyFromString(value,_this12.parent):"group-data"===key&&(_this12._dataset=_this12._extractPropertyFromString(value,_this12.parent)[_this12._omi_groupDataIndex])}),Object.assign(baseData,this._dataset)}},{key:"_capitalize",value:function(e){return e=e.toLowerCase(),e=e.replace(/\b\w+\b/g,function(e){return e.substring(0,1).toUpperCase()+e.substring(1)}).replace(/-/g,""),e.substring(0,1).toLowerCase()+e.substring(1)}},{key:"_extractPropertyFromString",value:function(e,t){var n=e.replace(/['|"|\]]/g,"").replace(/\[/g,".").split("."),i=t;return n.forEach(function(e){i=i[e]}),n=null,i}},{key:"_extractChildrenString",value:function(e){this._replaceTags(_omi2.default.customTags,e.HTML,!0)}},{key:"_extractChildren",value:function(e){this._replaceTags(_omi2.default.customTags,e.HTML)}},{key:"_initComponentByString",value:function _initComponentByString(name,childStr,slotContent,i,child){var _this13=this,json=(0,_html2json2.default)(childStr),attr=json.child[0].attr,cmi=this.children[i];if(cmi&&cmi.___omi_constructor_name===name)cmi._omiChildStr=childStr,cmi._omi_slotContent=slotContent,Object.keys(attr).forEach(function(e){var t=attr[e];"group-data"===e&&(child._omiGroupDataCounter.hasOwnProperty(t)?child._omiGroupDataCounter[t]++:child._omiGroupDataCounter[t]=0,cmi._omi_groupDataIndex=child._omiGroupDataCounter[t])}),cmi._childRender(childStr);else{var baseData={},dataset={},groupDataIndex=null,omiID=null,instanceName=null,_omi_option={};Object.keys(attr).forEach(function(key){var value=attr[key];if(0===key.indexOf("on")){var handler=child[value];handler&&(baseData[_this13._capitalize(key)]=handler.bind(child))}else"omi-id"===key?omiID=value:"name"===key?instanceName=value:"group-data"===key?(child._omiGroupDataCounter.hasOwnProperty(value)?child._omiGroupDataCounter[value]++:child._omiGroupDataCounter[value]=0,groupDataIndex=child._omiGroupDataCounter[value],dataset=_this13._extractPropertyFromString(value,child)[groupDataIndex]):0===key.indexOf("data-")?dataset[_this13._capitalize(key.replace("data-",""))]=value:0===key.indexOf(":data-")?dataset[_this13._capitalize(key.replace(":data-",""))]=eval("("+value+")"):":data"===key?dataset=eval("("+value+")"):"data"===key?dataset=_this13._extractPropertyFromString(value,child):"preventSelfUpdate"===key||"psu"===key?_omi_option.preventSelfUpdate=!0:"selfDataFirst"===key||"sdf"===key?_omi_option.selfDataFirst=!0:"domDiffDisabled"===key||"ddd"===key?_omi_option.domDiffDisabled=!0:"ignoreStoreData"===key||"isd"===key?_omi_option.ignoreStoreData=!0:"scopedSelfCSS"!==key&&"ssc"!==key||(_omi_option.scopedSelfCSS=!0)});var ChildClass=_omi2.default.getClassFromString(name);if(!ChildClass)throw"Can't find Class called ["+name+"]";var sub_child=new ChildClass(Object.assign(baseData,dataset),_omi_option);sub_child._omi_groupDataIndex=groupDataIndex,sub_child._omiChildStr=childStr,sub_child._omi_slotContent=slotContent,sub_child.parent=child,sub_child.$store=child.$store,sub_child.___omi_constructor_name=name,sub_child._dataset={},sub_child.install(),omiID&&(_omi2.default.mapping[omiID]=sub_child),instanceName&&(child[instanceName]=sub_child),cmi?child.children[i]=sub_child:child.children.push(sub_child),sub_child._childRender(childStr)}}}]),Component}();exports.default=Component},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){e=e.replace(/\/\*[^*]*\*+([^\/][^*]*\*+)*\//g,"");var n=new RegExp("([^\r\n,{}:]+)(:[^\r\n,{}]+)?(,(?=[^{}]*{)|s*{)","g");return e=e.replace(n,function(e,n,i,r){if("undefined"==typeof i&&(i=""),n.match(/^\s*(@media|@keyframes|to|from|@font-face)/))return n+i+r;var o=n.replace(/(\s*)$/,"")+t+i,a=t+" "+n.trim()+i;return o+","+a+r})}function o(e,t){var n=document.getElementById(s.default.STYLEPREFIX+t),i=document.getElementsByTagName("head")[0];n&&n.parentNode===i&&i.removeChild(n);var r=document.createElement("style");i.appendChild(r),r.setAttribute("type","text/css"),r.setAttribute("id",s.default.STYLEPREFIX+t),window.ActiveXObject?r.styleSheet.cssText=e:r.textContent=e}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),s=i(a);t.default={scoper:r,addStyle:o}},function(e,t){"use strict";function n(e,t){return e.replace(/<[\s\S]*?>/g,function(e){return e.replace(/on(abort|blur|cancel|canplay|canplaythrough|change|click|close|contextmenu|cuechange|dblclick|drag|dragend|dragenter|dragleave|dragover|dragstart|drop|durationchange|emptied|ended|error|focus|input|invalid|keydown|keypress|keyup|load|loadeddata|loadedmetadata|loadstart|mousedown|mouseenter|mouseleave|mousemove|mouseout|mouseover|mouseup|mousewheel|pause|play|playing|progress|ratechange|reset|resize|scroll|seeked|seeking|select|show|stalled|submit|suspend|timeupdate|toggle|volumechange|waiting|autocomplete|autocompleteerror|beforecopy|beforecut|beforepaste|copy|cut|paste|search|selectstart|wheel|webkitfullscreenchange|webkitfullscreenerror|touchstart|touchmove|touchend|touchcancel|pointerdown|pointerup|pointercancel|pointermove|pointerover|pointerout|pointerenter|pointerleave|Abort|Blur|Cancel|CanPlay|CanPlayThrough|Change|Click|Close|ContextMenu|CueChange|DblClick|Drag|DragEnd|DragEnter|DragLeave|DragOver|DragStart|Drop|DurationChange|Emptied|Ended|Error|Focus|Input|Invalid|KeyDown|KeyPress|KeyUp|Load|LoadedData|LoadedMetadata|LoadStart|MouseDown|MouseEnter|MouseLeave|MouseMove|MouseOut|MouseOver|MouseUp|MouseWheel|Pause|Play|Playing|Progress|RateChange|Reset|Resize|Scroll|Seeked|Seeking|Select|Show|Stalled|Submit|Suspend|TimeUpdate|Toggle|VolumeChange|Waiting|AutoComplete|AutoCompleteError|BeforeCopy|BeforeCut|BeforePaste|Copy|Cut|Paste|Search|SelectStart|Wheel|WebkitFullScreenChange|WebkitFullScreenError|TouchStart|TouchMove|TouchEnd|TouchCancel|PointerDown|PointerUp|PointerCancel|PointerMove|PointerOver|PointerOut|PointerEnter|PointerLeave)=(('([\s\S]*?)')|("([\s\S]*?)"))/g,function(e,n,i){if(1===i.indexOf("Omi.instances["))return e;if(i.lastIndexOf(")")===i.length-2)return e.replace(/=(['|"])/,"=$1Omi.instances["+t+"].");var r=e.replace(/=(['|"])/,"=$1Omi.instances["+t+"].");return r.substr(0,r.length-1)+"(event)"+r.substr(r.length-1,1)})})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},function(e,t,n){var i,r,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(a,s){"object"===o(t)&&"undefined"!=typeof e?e.exports=s():(i=s,r="function"==typeof i?i.call(t,n,t,e):i,!(void 0!==r&&(e.exports=r)))}(void 0,function(){"use strict";function e(e){!d&&f.createRange&&(d=f.createRange(),d.selectNode(f.body));var t;return d&&d.createContextualFragment?t=d.createContextualFragment(e):(t=f.createElement("body"),t.innerHTML=e),t.childNodes[0]}function t(e){!d&&f.createRange&&(d=f.createRange(),d.selectNode(f.body));var t;d&&d.createContextualFragment?t=d.createContextualFragment(e):(t=f.createElement("body"),t.innerHTML=e);for(var n=[],i=0,r=t.childNodes.length;i90)&&n===i.toUpperCase()}function i(e,t){return t&&t!==h?f.createElementNS(t,e):f.createElement(e)}function r(e,t){for(var n=e.firstChild;n;){var i=n.nextSibling;t.appendChild(n),n=i}return t}function o(e,t){var n,i,r,o,a,s,l=t.attributes;for(n=l.length-1;n>=0;--n)i=l[n],r=i.name,o=i.namespaceURI,a=i.value,o?(r=i.localName||r,s=e.getAttributeNS(o,r),s!==a&&e.setAttributeNS(o,r,a)):(s=e.getAttribute(r),s!==a&&e.setAttribute(r,a));for(l=e.attributes,n=l.length-1;n>=0;--n)i=l[n],i.specified!==!1&&(r=i.name,o=i.namespaceURI,o?(r=i.localName||r,p(t,o,r)||e.removeAttributeNS(o,r)):p(t,null,r)||e.removeAttribute(r))}function a(e,t,n){e[n]!==t[n]&&(e[n]=t[n],e[n]?e.setAttribute(n,""):e.removeAttribute(n,""))}function s(){}function l(e){return e.id}function u(t){return function(o,a,u){function d(e){C?C.push(e):C=[e]}function c(e,t){if(e.nodeType===v)for(var n=e.firstChild;n;){var i=void 0;t&&(i=k(n))?d(i):(w(n),n.firstChild&&c(n,t)),n=n.nextSibling}}function h(e,t,n){A(e)!==!1&&(t&&t.removeChild(e),w(e),c(e,n))}function _(e){if(e.nodeType===v)for(var t=e.firstChild;t;){var n=k(t);n&&(M[n]=t),_(t),t=t.nextSibling}}function p(e){E(e);for(var t=e.firstChild;t;){var i=t.nextSibling,r=k(t);if(r){var o=M[r];o&&n(t,o)&&(t.parentNode.replaceChild(o,t),S(o,t))}p(t),t=i}}function S(e,i,r){if(L){for(var s=!1,l=!1,u=null,c=null,_=0,b=L.length;_\s]+))?)*)\s*(\/?)>/,i=/^<\/([-A-Za-z0-9_]+)[^>]*>/,r=/([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,o=function(e,t){function o(e,n,i,o){if(o=!!o,o||d.push(n),t.start){var a=[];i.replace(r,function(e,t){var n=arguments[2]?arguments[2]:arguments[3]?arguments[3]:arguments[4]?arguments[4]:"";a.push({name:t,value:n,escaped:n.replace(/(^|[^\\])"/g,'$1\\"')})}),t.start&&t.start(n,a,o)}}function a(e,n){if(n)for(var i=d.length-1;i>=0&&d[i]!=n;i--);else var i=0;if(i>=0){for(var r=d.length-1;r>=i;r--)t.end&&t.end(d[r]);d.length=i}}var s,l,u,d=[],c=e;for(d.last=function(){return this[this.length-1]};e;){if(l=!0,d.last())e=e.replace(new RegExp("([\\s\\S]*?)]*>"),function(e,n){return t.chars&&t.chars(n),""}),a("",d.last());else if(0==e.indexOf(">>0,r=0;if(2==arguments.length)t=arguments[1];else{for(;r=i)throw new TypeError("Reduce of empty array with no initial value");t=n[r++]}for(;r=0?s:a+s;var l=n?n:a;if(n<0&&(l=a+n),r=l-s,r>0)if(o=new Array(r),this.charAt)for(i=0;i2&&(u=a,d=t),s.componentConstructor[e]=function(t){function a(t,r){return n(this,a),this.___omi_constructor_name=e,i(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,t,r))}return r(a,t),l(a,o(u)),a}(d),s.customTags.push(e),s.componentConstructor[e]},s.createStore=function(e){var t=function(t){function a(t,r){return n(this,a),this.data=t,e.methods.install&&e.methods.install.call(this),i(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,t,r))}return r(a,t),l(a,o(e.methods)),a}(s.Store);return new t(e.data,!0)},s.mixIndex=function(e,t){for(var n=e.length,i=t||"index",r=0;r",this.HTML):(this._mergeData(e),this.parent._omi_autoStoreToData&&(this._omi_autoStoreToData=!0,this._omi_ignoreStoreData||(this.data=this.$store.data)),this.beforeRender(),this._fixSlot(this._generateHTMLCSS()),t?this._extractChildrenString(this):this._extractChildren(this),this.children.forEach(function(e){n.HTML=n.HTML.replace(e._omiChildStr,t?e.node.outerHTML:e.HTML)}),this.HTML=(0,_event2.default)(this.HTML,this.id),this.HTML)}},{key:"_fixSlot",value:function(e){var t=this;if(this._omi_slotContent){this._omi_slotContent=this._scopedAttr(this._omi_slotContent,this._omi_scoped_attr,e);var n=_morphdom2.default.toElements(this._omi_slotContent),i=this.HTML.match(//g);1===n.length&&i&&1===i.length?this.HTML=this.HTML.replace(//,this._omi_slotContent):(n.sort(function(e,t){return parseInt(e.getAttribute("slot-index"))-parseInt(t.getAttribute("slot-index"))}),n.forEach(function(e){t.HTML=t.HTML.replace(//,e.outerHTML)}))}}},{key:"_queryElements",value:function(e){e._mixRefs(),e._execPlugins(),e.children.forEach(function(t){t.node=e.node.querySelector("["+_omi2.default.STYLESCOPEDPREFIX+t.id+"]"),t.node&&e._queryElements(t)})}},{key:"_mixRefs",value:function(){var e=this,t=_omi2.default.$$("*[ref]",this.node);t.forEach(function(t){t.hasAttribute(e._omi_scoped_attr)&&(e.refs[t.getAttribute("ref")]=t)});var n=this.node.getAttribute("ref");n&&(this.refs[n]=this.node)}},{key:"_execPlugins",value:function(){var e=this;Object.keys(_omi2.default.plugins).forEach(function(t){var n=_omi2.default.$$("*["+t+"]",e.node);n.forEach(function(n){n.hasAttribute(e._omi_scoped_attr)&&_omi2.default.plugins[t](n,e)}),e.node.hasAttribute(t)&&_omi2.default.plugins[t](e.node,e)})}},{key:"_childrenInstalled",value:function(e){var t=this;e.children.forEach(function(e){t._childrenInstalled(e),e.installed(),e._execInstalledHandlers()})}},{key:"_fixForm",value:function(){_omi2.default.$$("input",this.node).forEach(function(e){var t=e.type.toLowerCase();""===e.getAttribute("value")&&(e.value=""),"checked"!==t&&"radio"!==t||(e.hasAttribute("checked")?e.checked="checked":e.checked=!1)}),_omi2.default.$$("textarea",this.node).forEach(function(e){e.value=e.getAttribute("value")}),_omi2.default.$$("select",this.node).forEach(function(e){var t=e.getAttribute("value");if(t)_omi2.default.$$("option",e).forEach(function(e){t===e.getAttribute("value")&&e.setAttribute("selected","selected")});else{var n=_omi2.default.$$("option",e)[0];n&&n.setAttribute("selected","selected")}})}},{key:"_replaceTags",value:function(e,t,n){var i=this;if(0!==_omi2.default.customTags.length){var r=e.join("|"),o=new RegExp("<("+r+"+)((?:\\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\\s*=\\s*(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>\\s]+))?)*)\\s*((\\/>)|>(([\\s\\S]*?)<\\/\\1>))","g"),a=0;return t.replace(o,function(e,t,r,o,s,l,u){if(n){var d=i.children[a];d&&d.___omi_constructor_name===t&&(d._omiChildStr=e)}else i._initComponentByString(t,e,u,a++,i)})}}},{key:"_createHiddenNode",value:function(){var e=document.createElement("input");return e.setAttribute("type","hidden"),e.setAttribute(this._omi_scoped_attr,""),e}},{key:"_mergeData",value:function(e){this.selfDataFirst?this.data=Object.assign({},this._getDataset(e),this.data):this.data=Object.assign({},this.data,this._getDataset(e))}},{key:"_generateHTMLCSS",value:function(){this.CSS=(this.style()||"").replace(/<\/?style>/g,"");var e=this.___omi_constructor_name?_omi2.default.STYLESCOPEDPREFIX+this.___omi_constructor_name.toLowerCase():this._omi_scoped_attr;this.CSS&&(!this._omi_scopedSelfCSS&&_omi2.default.style[e]||(this.CSS=_style2.default.scoper(this.CSS,this._omi_scopedSelfCSS?"["+this._omi_scoped_attr+"]":"["+e+"]"),_omi2.default.style[e]=this.CSS,this.CSS===this._preCSS||this._omi_server_rendering||(_style2.default.addStyle(this.CSS,this.id),this._preCSS=this.CSS)));var t=this.render();return this.HTML=this._scopedAttr(_omi2.default.template(t?t:"",this.data),this._omi_scoped_attr,e).trim(),this._omi_server_rendering&&(this.HTML='\r\n\r\n"+this.HTML,this.HTML+='\r\n\r\n"),e}},{key:"_scopedAttr",value:function(e,t,n){var i=this;return e.replace(/<[^\/]([A-Za-z]*)[^>]*>/g,function(e){var r=e.split(" ")[0].replace(">","");return i._omi_scopedSelfCSS||!i.___omi_constructor_name?e.replace(r,r+" "+t):e.replace(r,r+" "+t+" "+n)})}},{key:"_getDataset",value:function _getDataset(childStr){var _this12=this,json=(0,_html2json2.default)(childStr),attr=json.child[0].attr,baseData={};return Object.keys(attr).forEach(function(key){var value=attr[key];if(0===key.indexOf("on")){var handler=_this12.parent[value];handler&&(baseData[_this12._capitalize(key)]=handler.bind(_this12.parent))}else 0===key.indexOf("data-")?_this12._dataset[_this12._capitalize(key.replace("data-",""))]=value:0===key.indexOf(":data-")?_this12._dataset[_this12._capitalize(key.replace(":data-",""))]=eval("("+value+")"):0===key.indexOf("::data-")?_this12._dataset[_this12._capitalize(key.replace("::data-",""))]=_this12._extractPropertyFromString(value,_this12.parent):"data"===key?_this12._dataset=_this12._extractPropertyFromString(value,_this12.parent):":data"===key?_this12._dataset=eval("("+value+")"):"group-data"===key&&(_this12._dataset=_this12._extractPropertyFromString(value,_this12.parent)[_this12._omi_groupDataIndex])}),Object.assign(baseData,this._dataset)}},{key:"_capitalize",value:function(e){return e=e.toLowerCase(),e=e.replace(/\b\w+\b/g,function(e){return e.substring(0,1).toUpperCase()+e.substring(1)}).replace(/-/g,""),e.substring(0,1).toLowerCase()+e.substring(1)}},{key:"_extractPropertyFromString",value:function(e,t){var n=e.replace(/['|"|\]]/g,"").replace(/\[/g,".").split("."),i=t;return n.forEach(function(e){i=i[e]}),n=null,i}},{key:"_extractChildrenString",value:function(e){this._replaceTags(_omi2.default.customTags,e.HTML,!0)}},{key:"_extractChildren",value:function(e){this._replaceTags(_omi2.default.customTags,e.HTML)}},{key:"_initComponentByString",value:function _initComponentByString(name,childStr,slotContent,i,child){var _this13=this,json=(0,_html2json2.default)(childStr),attr=json.child[0].attr,cmi=this.children[i];if(cmi&&cmi.___omi_constructor_name===name)cmi._omiChildStr=childStr,cmi._omi_slotContent=slotContent,Object.keys(attr).forEach(function(e){var t=attr[e];"group-data"===e&&(child._omiGroupDataCounter.hasOwnProperty(t)?child._omiGroupDataCounter[t]++:child._omiGroupDataCounter[t]=0,cmi._omi_groupDataIndex=child._omiGroupDataCounter[t])}),cmi._childRender(childStr);else{var baseData={},dataset={},groupDataIndex=null,omiID=null,instanceName=null,_omi_option={};Object.keys(attr).forEach(function(key){var value=attr[key];if(0===key.indexOf("on")){var handler=child[value];handler&&(baseData[_this13._capitalize(key)]=handler.bind(child))}else"omi-id"===key?omiID=value:"name"===key?instanceName=value:"group-data"===key?(child._omiGroupDataCounter.hasOwnProperty(value)?child._omiGroupDataCounter[value]++:child._omiGroupDataCounter[value]=0,groupDataIndex=child._omiGroupDataCounter[value],dataset=_this13._extractPropertyFromString(value,child)[groupDataIndex]):0===key.indexOf("data-")?dataset[_this13._capitalize(key.replace("data-",""))]=value:0===key.indexOf(":data-")?dataset[_this13._capitalize(key.replace(":data-",""))]=eval("("+value+")"):0===key.indexOf("::data-")?dataset[_this13._capitalize(key.replace("::data-",""))]=_this13._extractPropertyFromString(value,child):"data"===key?dataset=_this13._extractPropertyFromString(value,child):":data"===key?dataset=eval("("+value+")"):"preventSelfUpdate"===key||"psu"===key?_omi_option.preventSelfUpdate=!0:"selfDataFirst"===key||"sdf"===key?_omi_option.selfDataFirst=!0:"domDiffDisabled"===key||"ddd"===key?_omi_option.domDiffDisabled=!0:"ignoreStoreData"===key||"isd"===key?_omi_option.ignoreStoreData=!0:"scopedSelfCSS"!==key&&"ssc"!==key||(_omi_option.scopedSelfCSS=!0)});var ChildClass=_omi2.default.getClassFromString(name);if(!ChildClass)throw"Can't find Class called ["+name+"]";var sub_child=new ChildClass(Object.assign(baseData,dataset),_omi_option);sub_child._omi_groupDataIndex=groupDataIndex,sub_child._omiChildStr=childStr,sub_child._omi_slotContent=slotContent,sub_child.parent=child,sub_child.$store=child.$store,sub_child.___omi_constructor_name=name,sub_child._dataset={},sub_child.install(),omiID&&(_omi2.default.mapping[omiID]=sub_child),instanceName&&(child[instanceName]=sub_child),cmi?child.children[i]=sub_child:child.children.push(sub_child),sub_child._childRender(childStr)}}}]),Component}();exports.default=Component},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){e=e.replace(/\/\*[^*]*\*+([^\/][^*]*\*+)*\//g,"");var n=new RegExp("([^\r\n,{}:]+)(:[^\r\n,{}]+)?(,(?=[^{}]*{)|s*{)","g");return e=e.replace(n,function(e,n,i,r){if("undefined"==typeof i&&(i=""),n.match(/^\s*(@media|@keyframes|to|from|@font-face)/))return n+i+r;var o=n.replace(/(\s*)$/,"")+t+i,a=t+" "+n.trim()+i;return o+","+a+r})}function o(e,t){var n=document.getElementById(s.default.STYLEPREFIX+t),i=document.getElementsByTagName("head")[0];n&&n.parentNode===i&&i.removeChild(n);var r=document.createElement("style");i.appendChild(r),r.setAttribute("type","text/css"),r.setAttribute("id",s.default.STYLEPREFIX+t),window.ActiveXObject?r.styleSheet.cssText=e:r.textContent=e}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),s=i(a);t.default={scoper:r,addStyle:o}},function(e,t){"use strict";function n(e,t){return e.replace(/<[\s\S]*?>/g,function(e){return e.replace(/on(abort|blur|cancel|canplay|canplaythrough|change|click|close|contextmenu|cuechange|dblclick|drag|dragend|dragenter|dragleave|dragover|dragstart|drop|durationchange|emptied|ended|error|focus|input|invalid|keydown|keypress|keyup|load|loadeddata|loadedmetadata|loadstart|mousedown|mouseenter|mouseleave|mousemove|mouseout|mouseover|mouseup|mousewheel|pause|play|playing|progress|ratechange|reset|resize|scroll|seeked|seeking|select|show|stalled|submit|suspend|timeupdate|toggle|volumechange|waiting|autocomplete|autocompleteerror|beforecopy|beforecut|beforepaste|copy|cut|paste|search|selectstart|wheel|webkitfullscreenchange|webkitfullscreenerror|touchstart|touchmove|touchend|touchcancel|pointerdown|pointerup|pointercancel|pointermove|pointerover|pointerout|pointerenter|pointerleave|Abort|Blur|Cancel|CanPlay|CanPlayThrough|Change|Click|Close|ContextMenu|CueChange|DblClick|Drag|DragEnd|DragEnter|DragLeave|DragOver|DragStart|Drop|DurationChange|Emptied|Ended|Error|Focus|Input|Invalid|KeyDown|KeyPress|KeyUp|Load|LoadedData|LoadedMetadata|LoadStart|MouseDown|MouseEnter|MouseLeave|MouseMove|MouseOut|MouseOver|MouseUp|MouseWheel|Pause|Play|Playing|Progress|RateChange|Reset|Resize|Scroll|Seeked|Seeking|Select|Show|Stalled|Submit|Suspend|TimeUpdate|Toggle|VolumeChange|Waiting|AutoComplete|AutoCompleteError|BeforeCopy|BeforeCut|BeforePaste|Copy|Cut|Paste|Search|SelectStart|Wheel|WebkitFullScreenChange|WebkitFullScreenError|TouchStart|TouchMove|TouchEnd|TouchCancel|PointerDown|PointerUp|PointerCancel|PointerMove|PointerOver|PointerOut|PointerEnter|PointerLeave)=(('([\s\S]*?)')|("([\s\S]*?)"))/g,function(e,n,i){if(1===i.indexOf("Omi.instances["))return e;if(i.lastIndexOf(")")===i.length-2)return e.replace(/=(['|"])/,"=$1Omi.instances["+t+"].");var r=e.replace(/=(['|"])/,"=$1Omi.instances["+t+"].");return r.substr(0,r.length-1)+"(event)"+r.substr(r.length-1,1)})})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},function(e,t,n){var i,r,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(a,s){"object"===o(t)&&"undefined"!=typeof e?e.exports=s():(i=s,r="function"==typeof i?i.call(t,n,t,e):i,!(void 0!==r&&(e.exports=r)))}(void 0,function(){"use strict";function e(e){!d&&f.createRange&&(d=f.createRange(),d.selectNode(f.body));var t;return d&&d.createContextualFragment?t=d.createContextualFragment(e):(t=f.createElement("body"),t.innerHTML=e),t.childNodes[0]}function t(e){!d&&f.createRange&&(d=f.createRange(),d.selectNode(f.body));var t;d&&d.createContextualFragment?t=d.createContextualFragment(e):(t=f.createElement("body"),t.innerHTML=e);for(var n=[],i=0,r=t.childNodes.length;i90)&&n===i.toUpperCase()}function i(e,t){return t&&t!==h?f.createElementNS(t,e):f.createElement(e)}function r(e,t){for(var n=e.firstChild;n;){var i=n.nextSibling;t.appendChild(n),n=i}return t}function o(e,t){var n,i,r,o,a,s,l=t.attributes;for(n=l.length-1;n>=0;--n)i=l[n],r=i.name,o=i.namespaceURI,a=i.value,o?(r=i.localName||r,s=e.getAttributeNS(o,r),s!==a&&e.setAttributeNS(o,r,a)):(s=e.getAttribute(r),s!==a&&e.setAttribute(r,a));for(l=e.attributes,n=l.length-1;n>=0;--n)i=l[n],i.specified!==!1&&(r=i.name,o=i.namespaceURI,o?(r=i.localName||r,p(t,o,r)||e.removeAttributeNS(o,r)):p(t,null,r)||e.removeAttribute(r))}function a(e,t,n){e[n]!==t[n]&&(e[n]=t[n],e[n]?e.setAttribute(n,""):e.removeAttribute(n,""))}function s(){}function l(e){return e.id}function u(t){return function(o,a,u){function d(e){C?C.push(e):C=[e]}function c(e,t){if(e.nodeType===v)for(var n=e.firstChild;n;){var i=void 0;t&&(i=k(n))?d(i):(w(n),n.firstChild&&c(n,t)),n=n.nextSibling}}function h(e,t,n){A(e)!==!1&&(t&&t.removeChild(e),w(e),c(e,n))}function _(e){if(e.nodeType===v)for(var t=e.firstChild;t;){var n=k(t);n&&(M[n]=t),_(t),t=t.nextSibling}}function p(e){E(e);for(var t=e.firstChild;t;){var i=t.nextSibling,r=k(t);if(r){var o=M[r];o&&n(t,o)&&(t.parentNode.replaceChild(o,t),S(o,t))}p(t),t=i}}function S(e,i,r){if(L){for(var s=!1,l=!1,u=null,c=null,_=0,b=L.length;_\s]+))?)*)\s*(\/?)>/,i=/^<\/([-A-Za-z0-9_]+)[^>]*>/,r=/([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,o=function(e,t){function o(e,n,i,o){if(o=!!o,o||d.push(n),t.start){var a=[];i.replace(r,function(e,t){var n=arguments[2]?arguments[2]:arguments[3]?arguments[3]:arguments[4]?arguments[4]:"";a.push({name:t,value:n,escaped:n.replace(/(^|[^\\])"/g,'$1\\"')})}),t.start&&t.start(n,a,o)}}function a(e,n){if(n)for(var i=d.length-1;i>=0&&d[i]!=n;i--);else var i=0;if(i>=0){for(var r=d.length-1;r>=i;r--)t.end&&t.end(d[r]);d.length=i}}var s,l,u,d=[],c=e;for(d.last=function(){return this[this.length-1]};e;){if(l=!0,d.last())e=e.replace(new RegExp("([\\s\\S]*?)]*>"),function(e,n){return t.chars&&t.chars(n),""}),a("",d.last());else if(0==e.indexOf(">>0,r=0;if(2==arguments.length)t=arguments[1];else{for(;r=i)throw new TypeError("Reduce of empty array with no initial value");t=n[r++]}for(;r=0?s:a+s;var u=n?n:a;if(n<0&&(u=a+n),i=u-s,i>0)if(o=new Array(i),this.charAt)for(r=0;r2&&(l=a,c=t),s.componentConstructor[e]=function(t){function a(t,i){return n(this,a),this.___omi_constructor_name=e,r(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,t,i))}return i(a,t),u(a,o(l)),a}(c),s.customTags.push(e),s.componentConstructor[e]},s.createStore=function(e){var t=function(t){function a(t,i){return n(this,a),this.data=t,e.methods.install&&e.methods.install.call(this),r(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,t,i))}return i(a,t),u(a,o(e.methods)),a}(s.Store);return new t(e.data,!0)},s.mixIndex=function(e,t){for(var n=e.length,r=t||"index",i=0;i",this.HTML):(this._mergeData(e),this.parent._omi_autoStoreToData&&(this._omi_autoStoreToData=!0,this._omi_ignoreStoreData||(this.data=this.$store.data)),this.beforeRender(),this._fixSlot(this._generateHTMLCSS()),t?this._extractChildrenString(this):this._extractChildren(this),this.children.forEach(function(e){n.HTML=n.HTML.replace(e._omiChildStr,t?e.node.outerHTML:e.HTML)}),this.HTML=(0,_event2.default)(this.HTML,this.id),this.HTML)}},{key:"_fixSlot",value:function(e){var t=this;if(this._omi_slotContent){this._omi_slotContent=this._scopedAttr(this._omi_slotContent,this._omi_scoped_attr,e);var n=_morphdom2.default.toElements(this._omi_slotContent),r=this.HTML.match(//g);1===n.length&&r&&1===r.length?this.HTML=this.HTML.replace(//,this._omi_slotContent):(n.sort(function(e,t){return parseInt(e.getAttribute("slot-index"))-parseInt(t.getAttribute("slot-index"))}),n.forEach(function(e){t.HTML=t.HTML.replace(//,e.outerHTML)}))}}},{key:"_queryElements",value:function(e){e._mixRefs(),e._execPlugins(),e.children.forEach(function(t){t.node=e.node.querySelector("["+_omi2.default.STYLESCOPEDPREFIX+t.id+"]"),t.node&&e._queryElements(t)})}},{key:"_mixRefs",value:function(){var e=this,t=_omi2.default.$$("*[ref]",this.node);t.forEach(function(t){t.hasAttribute(e._omi_scoped_attr)&&(e.refs[t.getAttribute("ref")]=t)});var n=this.node.getAttribute("ref");n&&(this.refs[n]=this.node)}},{key:"_execPlugins",value:function(){var e=this;Object.keys(_omi2.default.plugins).forEach(function(t){var n=_omi2.default.$$("*["+t+"]",e.node);n.forEach(function(n){n.hasAttribute(e._omi_scoped_attr)&&_omi2.default.plugins[t](n,e)}),e.node.hasAttribute(t)&&_omi2.default.plugins[t](e.node,e)})}},{key:"_childrenInstalled",value:function(e){var t=this;e.children.forEach(function(e){t._childrenInstalled(e),e.installed(),e._execInstalledHandlers()})}},{key:"_fixForm",value:function(){_omi2.default.$$("input",this.node).forEach(function(e){var t=e.type.toLowerCase();""===e.getAttribute("value")&&(e.value=""),"checked"!==t&&"radio"!==t||(e.hasAttribute("checked")?e.checked="checked":e.checked=!1)}),_omi2.default.$$("textarea",this.node).forEach(function(e){e.value=e.getAttribute("value")}),_omi2.default.$$("select",this.node).forEach(function(e){var t=e.getAttribute("value");if(t)_omi2.default.$$("option",e).forEach(function(e){t===e.getAttribute("value")&&e.setAttribute("selected","selected")});else{var n=_omi2.default.$$("option",e)[0];n&&n.setAttribute("selected","selected")}})}},{key:"_replaceTags",value:function(e,t,n){var r=this;if(0!==_omi2.default.customTags.length){var i=e.join("|"),o=new RegExp("<("+i+"+)((?:\\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\\s*=\\s*(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>\\s]+))?)*)\\s*((\\/>)|>(([\\s\\S]*?)<\\/\\1>))","g"),a=0;return t.replace(o,function(e,t,i,o,s,u,l){if(n){var c=r.children[a];c&&c.___omi_constructor_name===t&&(c._omiChildStr=e)}else r._initComponentByString(t,e,l,a++,r)})}}},{key:"_createHiddenNode",value:function(){var e=document.createElement("input");return e.setAttribute("type","hidden"),e.setAttribute(this._omi_scoped_attr,""),e}},{key:"_mergeData",value:function(e){this.selfDataFirst?this.data=Object.assign({},this._getDataset(e),this.data):this.data=Object.assign({},this.data,this._getDataset(e))}},{key:"_generateHTMLCSS",value:function(){this.CSS=(this.style()||"").replace(/<\/?style>/g,"");var e=this.___omi_constructor_name?_omi2.default.STYLESCOPEDPREFIX+this.___omi_constructor_name.toLowerCase():this._omi_scoped_attr;this.CSS&&(!this._omi_scopedSelfCSS&&_omi2.default.style[e]||(this.CSS=_style2.default.scoper(this.CSS,this._omi_scopedSelfCSS?"["+this._omi_scoped_attr+"]":"["+e+"]"),_omi2.default.style[e]=this.CSS,this.CSS===this._preCSS||this._omi_server_rendering||(_style2.default.addStyle(this.CSS,this.id),this._preCSS=this.CSS)));var t=this.render();return this.HTML=this._scopedAttr(_omi2.default.template(t?t:"",this.data),this._omi_scoped_attr,e).trim(),this._omi_server_rendering&&(this.HTML='\r\n\r\n"+this.HTML,this.HTML+='\r\n\r\n"),e}},{key:"_scopedAttr",value:function(e,t,n){var r=this;return e.replace(/<[^\/]([A-Za-z]*)[^>]*>/g,function(e){var i=e.split(" ")[0].replace(">","");return r._omi_scopedSelfCSS||!r.___omi_constructor_name?e.replace(i,i+" "+t):e.replace(i,i+" "+t+" "+n)})}},{key:"_getDataset",value:function _getDataset(childStr){var _this12=this,json=(0,_html2json2.default)(childStr),attr=json.child[0].attr,baseData={};return Object.keys(attr).forEach(function(key){var value=attr[key];if(0===key.indexOf("on")){var handler=_this12.parent[value];handler&&(baseData[_this12._capitalize(key)]=handler.bind(_this12.parent))}else 0===key.indexOf("data-")?_this12._dataset[_this12._capitalize(key.replace("data-",""))]=value:0===key.indexOf(":data-")?_this12._dataset[_this12._capitalize(key.replace(":data-",""))]=eval("("+value+")"):":data"===key?_this12._dataset=eval("("+value+")"):"data"===key?_this12._dataset=_this12._extractPropertyFromString(value,_this12.parent):"group-data"===key&&(_this12._dataset=_this12._extractPropertyFromString(value,_this12.parent)[_this12._omi_groupDataIndex])}),Object.assign(baseData,this._dataset)}},{key:"_capitalize",value:function(e){return e=e.toLowerCase(),e=e.replace(/\b\w+\b/g,function(e){return e.substring(0,1).toUpperCase()+e.substring(1)}).replace(/-/g,""),e.substring(0,1).toLowerCase()+e.substring(1)}},{key:"_extractPropertyFromString",value:function(e,t){var n=e.replace(/['|"|\]]/g,"").replace(/\[/g,".").split("."),r=t;return n.forEach(function(e){r=r[e]}),n=null,r}},{key:"_extractChildrenString",value:function(e){this._replaceTags(_omi2.default.customTags,e.HTML,!0)}},{key:"_extractChildren",value:function(e){this._replaceTags(_omi2.default.customTags,e.HTML)}},{key:"_initComponentByString",value:function _initComponentByString(name,childStr,slotContent,i,child){var _this13=this,json=(0,_html2json2.default)(childStr),attr=json.child[0].attr,cmi=this.children[i];if(cmi&&cmi.___omi_constructor_name===name)cmi._omiChildStr=childStr,cmi._omi_slotContent=slotContent,Object.keys(attr).forEach(function(e){var t=attr[e];"group-data"===e&&(child._omiGroupDataCounter.hasOwnProperty(t)?child._omiGroupDataCounter[t]++:child._omiGroupDataCounter[t]=0,cmi._omi_groupDataIndex=child._omiGroupDataCounter[t])}),cmi._childRender(childStr);else{var baseData={},dataset={},groupDataIndex=null,omiID=null,instanceName=null,_omi_option={};Object.keys(attr).forEach(function(key){var value=attr[key];if(0===key.indexOf("on")){var handler=child[value];handler&&(baseData[_this13._capitalize(key)]=handler.bind(child))}else"omi-id"===key?omiID=value:"name"===key?instanceName=value:"group-data"===key?(child._omiGroupDataCounter.hasOwnProperty(value)?child._omiGroupDataCounter[value]++:child._omiGroupDataCounter[value]=0,groupDataIndex=child._omiGroupDataCounter[value],dataset=_this13._extractPropertyFromString(value,child)[groupDataIndex]):0===key.indexOf("data-")?dataset[_this13._capitalize(key.replace("data-",""))]=value:0===key.indexOf(":data-")?dataset[_this13._capitalize(key.replace(":data-",""))]=eval("("+value+")"):":data"===key?dataset=eval("("+value+")"):"data"===key?dataset=_this13._extractPropertyFromString(value,child):"preventSelfUpdate"===key||"psu"===key?_omi_option.preventSelfUpdate=!0:"selfDataFirst"===key||"sdf"===key?_omi_option.selfDataFirst=!0:"domDiffDisabled"===key||"ddd"===key?_omi_option.domDiffDisabled=!0:"ignoreStoreData"===key||"isd"===key?_omi_option.ignoreStoreData=!0:"scopedSelfCSS"!==key&&"ssc"!==key||(_omi_option.scopedSelfCSS=!0)});var ChildClass=_omi2.default.getClassFromString(name);if(!ChildClass)throw"Can't find Class called ["+name+"]";var sub_child=new ChildClass(Object.assign(baseData,dataset),_omi_option);sub_child._omi_groupDataIndex=groupDataIndex,sub_child._omiChildStr=childStr,sub_child._omi_slotContent=slotContent,sub_child.parent=child,sub_child.$store=child.$store,sub_child.___omi_constructor_name=name,sub_child._dataset={},sub_child.install(),omiID&&(_omi2.default.mapping[omiID]=sub_child),instanceName&&(child[instanceName]=sub_child),cmi?child.children[i]=sub_child:child.children.push(sub_child),sub_child._childRender(childStr)}}}]),Component}();exports.default=Component},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){e=e.replace(/\/\*[^*]*\*+([^\/][^*]*\*+)*\//g,"");var n=new RegExp("([^\r\n,{}:]+)(:[^\r\n,{}]+)?(,(?=[^{}]*{)|s*{)","g");return e=e.replace(n,function(e,n,r,i){if("undefined"==typeof r&&(r=""),n.match(/^\s*(@media|@keyframes|to|from|@font-face)/))return n+r+i;var o=n.replace(/(\s*)$/,"")+t+r,a=t+" "+n.trim()+r;return o+","+a+i})}function o(e,t){var n=document.getElementById(s.default.STYLEPREFIX+t),r=document.getElementsByTagName("head")[0];n&&n.parentNode===r&&r.removeChild(n);var i=document.createElement("style");r.appendChild(i),i.setAttribute("type","text/css"),i.setAttribute("id",s.default.STYLEPREFIX+t),window.ActiveXObject?i.styleSheet.cssText=e:i.textContent=e}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),s=r(a);t.default={scoper:i,addStyle:o}},function(e,t){"use strict";function n(e,t){return e.replace(/<[\s\S]*?>/g,function(e){return e.replace(/on(abort|blur|cancel|canplay|canplaythrough|change|click|close|contextmenu|cuechange|dblclick|drag|dragend|dragenter|dragleave|dragover|dragstart|drop|durationchange|emptied|ended|error|focus|input|invalid|keydown|keypress|keyup|load|loadeddata|loadedmetadata|loadstart|mousedown|mouseenter|mouseleave|mousemove|mouseout|mouseover|mouseup|mousewheel|pause|play|playing|progress|ratechange|reset|resize|scroll|seeked|seeking|select|show|stalled|submit|suspend|timeupdate|toggle|volumechange|waiting|autocomplete|autocompleteerror|beforecopy|beforecut|beforepaste|copy|cut|paste|search|selectstart|wheel|webkitfullscreenchange|webkitfullscreenerror|touchstart|touchmove|touchend|touchcancel|pointerdown|pointerup|pointercancel|pointermove|pointerover|pointerout|pointerenter|pointerleave|Abort|Blur|Cancel|CanPlay|CanPlayThrough|Change|Click|Close|ContextMenu|CueChange|DblClick|Drag|DragEnd|DragEnter|DragLeave|DragOver|DragStart|Drop|DurationChange|Emptied|Ended|Error|Focus|Input|Invalid|KeyDown|KeyPress|KeyUp|Load|LoadedData|LoadedMetadata|LoadStart|MouseDown|MouseEnter|MouseLeave|MouseMove|MouseOut|MouseOver|MouseUp|MouseWheel|Pause|Play|Playing|Progress|RateChange|Reset|Resize|Scroll|Seeked|Seeking|Select|Show|Stalled|Submit|Suspend|TimeUpdate|Toggle|VolumeChange|Waiting|AutoComplete|AutoCompleteError|BeforeCopy|BeforeCut|BeforePaste|Copy|Cut|Paste|Search|SelectStart|Wheel|WebkitFullScreenChange|WebkitFullScreenError|TouchStart|TouchMove|TouchEnd|TouchCancel|PointerDown|PointerUp|PointerCancel|PointerMove|PointerOver|PointerOut|PointerEnter|PointerLeave)=(('([\s\S]*?)')|("([\s\S]*?)"))/g,function(e,n,r){if(1===r.indexOf("Omi.instances["))return e;if(r.lastIndexOf(")")===r.length-2)return e.replace(/=(['|"])/,"=$1Omi.instances["+t+"].");var i=e.replace(/=(['|"])/,"=$1Omi.instances["+t+"].");return i.substr(0,i.length-1)+"(event)"+i.substr(i.length-1,1)})})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},function(e,t,n){var r,i,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(a,s){"object"===o(t)&&"undefined"!=typeof e?e.exports=s():(r=s,i="function"==typeof r?r.call(t,n,t,e):r,!(void 0!==i&&(e.exports=i)))}(void 0,function(){"use strict";function e(e){!c&&h.createRange&&(c=h.createRange(),c.selectNode(h.body));var t;return c&&c.createContextualFragment?t=c.createContextualFragment(e):(t=h.createElement("body"),t.innerHTML=e),t.childNodes[0]}function t(e){!c&&h.createRange&&(c=h.createRange(),c.selectNode(h.body));var t;c&&c.createContextualFragment?t=c.createContextualFragment(e):(t=h.createElement("body"),t.innerHTML=e);for(var n=[],r=0,i=t.childNodes.length;r90)&&n===r.toUpperCase()}function r(e,t){return t&&t!==f?h.createElementNS(t,e):h.createElement(e)}function i(e,t){for(var n=e.firstChild;n;){var r=n.nextSibling;t.appendChild(n),n=r}return t}function o(e,t){var n,r,i,o,a,s,u=t.attributes;for(n=u.length-1;n>=0;--n)r=u[n],i=r.name,o=r.namespaceURI,a=r.value,o?(i=r.localName||i,s=e.getAttributeNS(o,i),s!==a&&e.setAttributeNS(o,i,a)):(s=e.getAttribute(i),s!==a&&e.setAttribute(i,a));for(u=e.attributes,n=u.length-1;n>=0;--n)r=u[n],r.specified!==!1&&(i=r.name,o=r.namespaceURI,o?(i=r.localName||i,_(t,o,i)||e.removeAttributeNS(o,i)):_(t,null,i)||e.removeAttribute(i))}function a(e,t,n){e[n]!==t[n]&&(e[n]=t[n],e[n]?e.setAttribute(n,""):e.removeAttribute(n,""))}function s(){}function u(e){return e.id}function l(t){return function(o,a,l){function c(e){C?C.push(e):C=[e]}function d(e,t){if(e.nodeType===v)for(var n=e.firstChild;n;){var r=void 0;t&&(r=k(n))?c(r):(D(n),n.firstChild&&d(n,t)),n=n.nextSibling}}function f(e,t,n){w(e)!==!1&&(t&&t.removeChild(e),D(e),d(e,n))}function p(e){if(e.nodeType===v)for(var t=e.firstChild;t;){var n=k(t);n&&(L[n]=t),p(t),t=t.nextSibling}}function _(e){x(e);for(var t=e.firstChild;t;){var r=t.nextSibling,i=k(t);if(i){var o=L[i];o&&n(t,o)&&(t.parentNode.replaceChild(o,t),b(o,t))}_(t),t=r}}function b(e,r,i){if(I){for(var s=!1,u=!1,l=null,d=null,p=0,S=I.length;p\s]+))?)*)\s*(\/?)>/,r=/^<\/([-A-Za-z0-9_]+)[^>]*>/,i=/([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,o=function(e,t){function o(e,n,r,o){if(o=!!o,o||c.push(n),t.start){var a=[];r.replace(i,function(e,t){var n=arguments[2]?arguments[2]:arguments[3]?arguments[3]:arguments[4]?arguments[4]:"";a.push({name:t,value:n,escaped:n.replace(/(^|[^\\])"/g,'$1\\"')})}),t.start&&t.start(n,a,o)}}function a(e,n){if(n)for(var r=c.length-1;r>=0&&c[r]!=n;r--);else var r=0;if(r>=0){for(var i=c.length-1;i>=r;i--)t.end&&t.end(c[i]);c.length=r}}var s,u,l,c=[],d=e;for(c.last=function(){return this[this.length-1]};e;){if(u=!0,c.last())e=e.replace(new RegExp("([\\s\\S]*?)]*>"),function(e,n){return t.chars&&t.chars(n),""}),a("",c.last());else if(0==e.indexOf(">>0,i=0;if(2==arguments.length)t=arguments[1];else{for(;i=r)throw new TypeError("Reduce of empty array with no initial value");t=n[i++]}for(;i-1){var a=i.substr(0,o);if(i=i.substr(o+1),"undefined"!=typeof e[a]&&S.test(a)&&(a=e[a]),"undefined"!=typeof r[a])return t(r[a],i);var s={name:n,data:e};return L("nullvalue",{type:"nullattr",data:s},s),""}"undefined"!=typeof e[i]&&S.test(i)&&(i=e[i]);var u;if("undefined"!=typeof r[i])u=r[i];else{var s={name:n,data:e};L("nullvalue",{type:"nullvalue",data:s},s),u=""}return u};return r(e,t)},f=/"([^"]*)"|'([^']*)'/g,h=/[a-zA-Z_\$]+[\w\$]*(?:\s*\.\s*(?:[a-zA-Z_\$]+[\w\$]*|\d+))*/g,p=/[a-zA-Z_\$]+[\w\$]*(?:\s*\.\s*(?:[a-zA-Z_\$]+[\w\$]*|\d+))*/,_=/\[([^\[\]]*)\]/g,m=/\[([^\[\]]*)\]/,v=/\|\|/g,y="OR_OPERATOR",g=function(){return"$$"+~~(1e6*Math.random())},b="_$C$_",S=/^_\$C\$_/,C=/_\$C\$_[^\.]+/g,k=function(){return b+~~(1e6*Math.random())},T=function e(t,n){t=t.replace(v,y).split("|");for(var r=0;r=0?s:a+s;var u=n?n:a;if(n<0&&(u=a+n),i=u-s,i>0)if(o=new Array(i),this.charAt)for(r=0;r2&&(l=a,c=t),s.componentConstructor[e]=function(t){function a(t,i){return n(this,a),this.___omi_constructor_name=e,r(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,t,i))}return i(a,t),u(a,o(l)),a}(c),s.customTags.push(e),s.componentConstructor[e]},s.createStore=function(e){var t=function(t){function a(t,i){return n(this,a),this.data=t,e.methods.install&&e.methods.install.call(this),r(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,t,i))}return i(a,t),u(a,o(e.methods)),a}(s.Store);return new t(e.data,!0)},s.mixIndex=function(e,t){for(var n=e.length,r=t||"index",i=0;i",this.HTML):(this._mergeData(e),this.parent._omi_autoStoreToData&&(this._omi_autoStoreToData=!0,this._omi_ignoreStoreData||(this.data=this.$store.data)),this.beforeRender(),this._fixSlot(this._generateHTMLCSS()),t?this._extractChildrenString(this):this._extractChildren(this),this.children.forEach(function(e){n.HTML=n.HTML.replace(e._omiChildStr,t?e.node.outerHTML:e.HTML)}),this.HTML=(0,_event2.default)(this.HTML,this.id),this.HTML)}},{key:"_fixSlot",value:function(e){var t=this;if(this._omi_slotContent){this._omi_slotContent=this._scopedAttr(this._omi_slotContent,this._omi_scoped_attr,e);var n=_morphdom2.default.toElements(this._omi_slotContent),r=this.HTML.match(//g);1===n.length&&r&&1===r.length?this.HTML=this.HTML.replace(//,this._omi_slotContent):(n.sort(function(e,t){return parseInt(e.getAttribute("slot-index"))-parseInt(t.getAttribute("slot-index"))}),n.forEach(function(e){t.HTML=t.HTML.replace(//,e.outerHTML)}))}}},{key:"_queryElements",value:function(e){e._mixRefs(),e._execPlugins(),e.children.forEach(function(t){t.node=e.node.querySelector("["+_omi2.default.STYLESCOPEDPREFIX+t.id+"]"),t.node&&e._queryElements(t)})}},{key:"_mixRefs",value:function(){var e=this,t=_omi2.default.$$("*[ref]",this.node);t.forEach(function(t){t.hasAttribute(e._omi_scoped_attr)&&(e.refs[t.getAttribute("ref")]=t)});var n=this.node.getAttribute("ref");n&&(this.refs[n]=this.node)}},{key:"_execPlugins",value:function(){var e=this;Object.keys(_omi2.default.plugins).forEach(function(t){var n=_omi2.default.$$("*["+t+"]",e.node);n.forEach(function(n){n.hasAttribute(e._omi_scoped_attr)&&_omi2.default.plugins[t](n,e)}),e.node.hasAttribute(t)&&_omi2.default.plugins[t](e.node,e)})}},{key:"_childrenInstalled",value:function(e){var t=this;e.children.forEach(function(e){t._childrenInstalled(e),e.installed(),e._execInstalledHandlers()})}},{key:"_fixForm",value:function(){_omi2.default.$$("input",this.node).forEach(function(e){var t=e.type.toLowerCase();""===e.getAttribute("value")&&(e.value=""),"checked"!==t&&"radio"!==t||(e.hasAttribute("checked")?e.checked="checked":e.checked=!1)}),_omi2.default.$$("textarea",this.node).forEach(function(e){e.value=e.getAttribute("value")}),_omi2.default.$$("select",this.node).forEach(function(e){var t=e.getAttribute("value");if(t)_omi2.default.$$("option",e).forEach(function(e){t===e.getAttribute("value")&&e.setAttribute("selected","selected")});else{var n=_omi2.default.$$("option",e)[0];n&&n.setAttribute("selected","selected")}})}},{key:"_replaceTags",value:function(e,t,n){var r=this;if(0!==_omi2.default.customTags.length){var i=e.join("|"),o=new RegExp("<("+i+"+)((?:\\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\\s*=\\s*(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>\\s]+))?)*)\\s*((\\/>)|>(([\\s\\S]*?)<\\/\\1>))","g"),a=0;return t.replace(o,function(e,t,i,o,s,u,l){if(n){var c=r.children[a];c&&c.___omi_constructor_name===t&&(c._omiChildStr=e)}else r._initComponentByString(t,e,l,a++,r)})}}},{key:"_createHiddenNode",value:function(){var e=document.createElement("input");return e.setAttribute("type","hidden"),e.setAttribute(this._omi_scoped_attr,""),e}},{key:"_mergeData",value:function(e){this.selfDataFirst?this.data=Object.assign({},this._getDataset(e),this.data):this.data=Object.assign({},this.data,this._getDataset(e))}},{key:"_generateHTMLCSS",value:function(){this.CSS=(this.style()||"").replace(/<\/?style>/g,"");var e=this.___omi_constructor_name?_omi2.default.STYLESCOPEDPREFIX+this.___omi_constructor_name.toLowerCase():this._omi_scoped_attr;this.CSS&&(!this._omi_scopedSelfCSS&&_omi2.default.style[e]||(this.CSS=_style2.default.scoper(this.CSS,this._omi_scopedSelfCSS?"["+this._omi_scoped_attr+"]":"["+e+"]"),_omi2.default.style[e]=this.CSS,this.CSS===this._preCSS||this._omi_server_rendering||(_style2.default.addStyle(this.CSS,this.id),this._preCSS=this.CSS)));var t=this.render();return this.HTML=this._scopedAttr(_omi2.default.template(t?t:"",this.data),this._omi_scoped_attr,e).trim(),this._omi_server_rendering&&(this.HTML='\r\n\r\n"+this.HTML,this.HTML+='\r\n\r\n"),e}},{key:"_scopedAttr",value:function(e,t,n){var r=this;return e.replace(/<[^\/]([A-Za-z]*)[^>]*>/g,function(e){var i=e.split(" ")[0].replace(">","");return r._omi_scopedSelfCSS||!r.___omi_constructor_name?e.replace(i,i+" "+t):e.replace(i,i+" "+t+" "+n)})}},{key:"_getDataset",value:function _getDataset(childStr){var _this12=this,json=(0,_html2json2.default)(childStr),attr=json.child[0].attr,baseData={};return Object.keys(attr).forEach(function(key){var value=attr[key];if(0===key.indexOf("on")){var handler=_this12.parent[value];handler&&(baseData[_this12._capitalize(key)]=handler.bind(_this12.parent))}else 0===key.indexOf("data-")?_this12._dataset[_this12._capitalize(key.replace("data-",""))]=value:0===key.indexOf(":data-")?_this12._dataset[_this12._capitalize(key.replace(":data-",""))]=eval("("+value+")"):0===key.indexOf("::data-")?_this12._dataset[_this12._capitalize(key.replace("::data-",""))]=_this12._extractPropertyFromString(value,_this12.parent):"data"===key?_this12._dataset=_this12._extractPropertyFromString(value,_this12.parent):":data"===key?_this12._dataset=eval("("+value+")"):"group-data"===key&&(_this12._dataset=_this12._extractPropertyFromString(value,_this12.parent)[_this12._omi_groupDataIndex])}),Object.assign(baseData,this._dataset)}},{key:"_capitalize",value:function(e){return e=e.toLowerCase(),e=e.replace(/\b\w+\b/g,function(e){return e.substring(0,1).toUpperCase()+e.substring(1)}).replace(/-/g,""),e.substring(0,1).toLowerCase()+e.substring(1)}},{key:"_extractPropertyFromString",value:function(e,t){var n=e.replace(/['|"|\]]/g,"").replace(/\[/g,".").split("."),r=t;return n.forEach(function(e){r=r[e]}),n=null,r}},{key:"_extractChildrenString",value:function(e){this._replaceTags(_omi2.default.customTags,e.HTML,!0)}},{key:"_extractChildren",value:function(e){this._replaceTags(_omi2.default.customTags,e.HTML)}},{key:"_initComponentByString",value:function _initComponentByString(name,childStr,slotContent,i,child){var _this13=this,json=(0,_html2json2.default)(childStr),attr=json.child[0].attr,cmi=this.children[i];if(cmi&&cmi.___omi_constructor_name===name)cmi._omiChildStr=childStr,cmi._omi_slotContent=slotContent,Object.keys(attr).forEach(function(e){var t=attr[e];"group-data"===e&&(child._omiGroupDataCounter.hasOwnProperty(t)?child._omiGroupDataCounter[t]++:child._omiGroupDataCounter[t]=0,cmi._omi_groupDataIndex=child._omiGroupDataCounter[t])}),cmi._childRender(childStr);else{var baseData={},dataset={},groupDataIndex=null,omiID=null,instanceName=null,_omi_option={};Object.keys(attr).forEach(function(key){var value=attr[key];if(0===key.indexOf("on")){var handler=child[value];handler&&(baseData[_this13._capitalize(key)]=handler.bind(child))}else"omi-id"===key?omiID=value:"name"===key?instanceName=value:"group-data"===key?(child._omiGroupDataCounter.hasOwnProperty(value)?child._omiGroupDataCounter[value]++:child._omiGroupDataCounter[value]=0,groupDataIndex=child._omiGroupDataCounter[value],dataset=_this13._extractPropertyFromString(value,child)[groupDataIndex]):0===key.indexOf("data-")?dataset[_this13._capitalize(key.replace("data-",""))]=value:0===key.indexOf(":data-")?dataset[_this13._capitalize(key.replace(":data-",""))]=eval("("+value+")"):0===key.indexOf("::data-")?dataset[_this13._capitalize(key.replace("::data-",""))]=_this13._extractPropertyFromString(value,child):"data"===key?dataset=_this13._extractPropertyFromString(value,child):":data"===key?dataset=eval("("+value+")"):"preventSelfUpdate"===key||"psu"===key?_omi_option.preventSelfUpdate=!0:"selfDataFirst"===key||"sdf"===key?_omi_option.selfDataFirst=!0:"domDiffDisabled"===key||"ddd"===key?_omi_option.domDiffDisabled=!0:"ignoreStoreData"===key||"isd"===key?_omi_option.ignoreStoreData=!0:"scopedSelfCSS"!==key&&"ssc"!==key||(_omi_option.scopedSelfCSS=!0)});var ChildClass=_omi2.default.getClassFromString(name);if(!ChildClass)throw"Can't find Class called ["+name+"]";var sub_child=new ChildClass(Object.assign(baseData,dataset),_omi_option);sub_child._omi_groupDataIndex=groupDataIndex,sub_child._omiChildStr=childStr,sub_child._omi_slotContent=slotContent,sub_child.parent=child,sub_child.$store=child.$store,sub_child.___omi_constructor_name=name,sub_child._dataset={},sub_child.install(),omiID&&(_omi2.default.mapping[omiID]=sub_child),instanceName&&(child[instanceName]=sub_child),cmi?child.children[i]=sub_child:child.children.push(sub_child),sub_child._childRender(childStr)}}}]),Component}();exports.default=Component},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){e=e.replace(/\/\*[^*]*\*+([^\/][^*]*\*+)*\//g,"");var n=new RegExp("([^\r\n,{}:]+)(:[^\r\n,{}]+)?(,(?=[^{}]*{)|s*{)","g");return e=e.replace(n,function(e,n,r,i){if("undefined"==typeof r&&(r=""),n.match(/^\s*(@media|@keyframes|to|from|@font-face)/))return n+r+i;var o=n.replace(/(\s*)$/,"")+t+r,a=t+" "+n.trim()+r;return o+","+a+i})}function o(e,t){var n=document.getElementById(s.default.STYLEPREFIX+t),r=document.getElementsByTagName("head")[0];n&&n.parentNode===r&&r.removeChild(n);var i=document.createElement("style");r.appendChild(i),i.setAttribute("type","text/css"),i.setAttribute("id",s.default.STYLEPREFIX+t),window.ActiveXObject?i.styleSheet.cssText=e:i.textContent=e}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),s=r(a);t.default={scoper:i,addStyle:o}},function(e,t){"use strict";function n(e,t){return e.replace(/<[\s\S]*?>/g,function(e){return e.replace(/on(abort|blur|cancel|canplay|canplaythrough|change|click|close|contextmenu|cuechange|dblclick|drag|dragend|dragenter|dragleave|dragover|dragstart|drop|durationchange|emptied|ended|error|focus|input|invalid|keydown|keypress|keyup|load|loadeddata|loadedmetadata|loadstart|mousedown|mouseenter|mouseleave|mousemove|mouseout|mouseover|mouseup|mousewheel|pause|play|playing|progress|ratechange|reset|resize|scroll|seeked|seeking|select|show|stalled|submit|suspend|timeupdate|toggle|volumechange|waiting|autocomplete|autocompleteerror|beforecopy|beforecut|beforepaste|copy|cut|paste|search|selectstart|wheel|webkitfullscreenchange|webkitfullscreenerror|touchstart|touchmove|touchend|touchcancel|pointerdown|pointerup|pointercancel|pointermove|pointerover|pointerout|pointerenter|pointerleave|Abort|Blur|Cancel|CanPlay|CanPlayThrough|Change|Click|Close|ContextMenu|CueChange|DblClick|Drag|DragEnd|DragEnter|DragLeave|DragOver|DragStart|Drop|DurationChange|Emptied|Ended|Error|Focus|Input|Invalid|KeyDown|KeyPress|KeyUp|Load|LoadedData|LoadedMetadata|LoadStart|MouseDown|MouseEnter|MouseLeave|MouseMove|MouseOut|MouseOver|MouseUp|MouseWheel|Pause|Play|Playing|Progress|RateChange|Reset|Resize|Scroll|Seeked|Seeking|Select|Show|Stalled|Submit|Suspend|TimeUpdate|Toggle|VolumeChange|Waiting|AutoComplete|AutoCompleteError|BeforeCopy|BeforeCut|BeforePaste|Copy|Cut|Paste|Search|SelectStart|Wheel|WebkitFullScreenChange|WebkitFullScreenError|TouchStart|TouchMove|TouchEnd|TouchCancel|PointerDown|PointerUp|PointerCancel|PointerMove|PointerOver|PointerOut|PointerEnter|PointerLeave)=(('([\s\S]*?)')|("([\s\S]*?)"))/g,function(e,n,r){if(1===r.indexOf("Omi.instances["))return e;if(r.lastIndexOf(")")===r.length-2)return e.replace(/=(['|"])/,"=$1Omi.instances["+t+"].");var i=e.replace(/=(['|"])/,"=$1Omi.instances["+t+"].");return i.substr(0,i.length-1)+"(event)"+i.substr(i.length-1,1)})})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},function(e,t,n){var r,i,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(a,s){"object"===o(t)&&"undefined"!=typeof e?e.exports=s():(r=s,i="function"==typeof r?r.call(t,n,t,e):r,!(void 0!==i&&(e.exports=i)))}(void 0,function(){"use strict";function e(e){!c&&h.createRange&&(c=h.createRange(),c.selectNode(h.body));var t;return c&&c.createContextualFragment?t=c.createContextualFragment(e):(t=h.createElement("body"),t.innerHTML=e),t.childNodes[0]}function t(e){!c&&h.createRange&&(c=h.createRange(),c.selectNode(h.body));var t;c&&c.createContextualFragment?t=c.createContextualFragment(e):(t=h.createElement("body"),t.innerHTML=e);for(var n=[],r=0,i=t.childNodes.length;r90)&&n===r.toUpperCase()}function r(e,t){return t&&t!==f?h.createElementNS(t,e):h.createElement(e)}function i(e,t){for(var n=e.firstChild;n;){var r=n.nextSibling;t.appendChild(n),n=r}return t}function o(e,t){var n,r,i,o,a,s,u=t.attributes;for(n=u.length-1;n>=0;--n)r=u[n],i=r.name,o=r.namespaceURI,a=r.value,o?(i=r.localName||i,s=e.getAttributeNS(o,i),s!==a&&e.setAttributeNS(o,i,a)):(s=e.getAttribute(i),s!==a&&e.setAttribute(i,a));for(u=e.attributes,n=u.length-1;n>=0;--n)r=u[n],r.specified!==!1&&(i=r.name,o=r.namespaceURI,o?(i=r.localName||i,_(t,o,i)||e.removeAttributeNS(o,i)):_(t,null,i)||e.removeAttribute(i))}function a(e,t,n){e[n]!==t[n]&&(e[n]=t[n],e[n]?e.setAttribute(n,""):e.removeAttribute(n,""))}function s(){}function u(e){return e.id}function l(t){return function(o,a,l){function c(e){C?C.push(e):C=[e]}function d(e,t){if(e.nodeType===v)for(var n=e.firstChild;n;){var r=void 0;t&&(r=k(n))?c(r):(D(n),n.firstChild&&d(n,t)),n=n.nextSibling}}function f(e,t,n){w(e)!==!1&&(t&&t.removeChild(e),D(e),d(e,n))}function p(e){if(e.nodeType===v)for(var t=e.firstChild;t;){var n=k(t);n&&(L[n]=t),p(t),t=t.nextSibling}}function _(e){x(e);for(var t=e.firstChild;t;){var r=t.nextSibling,i=k(t);if(i){var o=L[i];o&&n(t,o)&&(t.parentNode.replaceChild(o,t),b(o,t))}_(t),t=r}}function b(e,r,i){if(I){for(var s=!1,u=!1,l=null,d=null,p=0,S=I.length;p\s]+))?)*)\s*(\/?)>/,r=/^<\/([-A-Za-z0-9_]+)[^>]*>/,i=/([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,o=function(e,t){function o(e,n,r,o){if(o=!!o,o||c.push(n),t.start){var a=[];r.replace(i,function(e,t){var n=arguments[2]?arguments[2]:arguments[3]?arguments[3]:arguments[4]?arguments[4]:"";a.push({name:t,value:n,escaped:n.replace(/(^|[^\\])"/g,'$1\\"')})}),t.start&&t.start(n,a,o)}}function a(e,n){if(n)for(var r=c.length-1;r>=0&&c[r]!=n;r--);else var r=0;if(r>=0){for(var i=c.length-1;i>=r;i--)t.end&&t.end(c[i]);c.length=r}}var s,u,l,c=[],d=e;for(c.last=function(){return this[this.length-1]};e;){if(u=!0,c.last())e=e.replace(new RegExp("([\\s\\S]*?)]*>"),function(e,n){return t.chars&&t.chars(n),""}),a("",c.last());else if(0==e.indexOf(">>0,i=0;if(2==arguments.length)t=arguments[1];else{for(;i=r)throw new TypeError("Reduce of empty array with no initial value");t=n[i++]}for(;i-1){var a=i.substr(0,o);if(i=i.substr(o+1),"undefined"!=typeof e[a]&&S.test(a)&&(a=e[a]),"undefined"!=typeof r[a])return t(r[a],i);var s={name:n,data:e};return L("nullvalue",{type:"nullattr",data:s},s),""}"undefined"!=typeof e[i]&&S.test(i)&&(i=e[i]);var u;if("undefined"!=typeof r[i])u=r[i];else{var s={name:n,data:e};L("nullvalue",{type:"nullvalue",data:s},s),u=""}return u};return r(e,t)},f=/"([^"]*)"|'([^']*)'/g,h=/[a-zA-Z_\$]+[\w\$]*(?:\s*\.\s*(?:[a-zA-Z_\$]+[\w\$]*|\d+))*/g,p=/[a-zA-Z_\$]+[\w\$]*(?:\s*\.\s*(?:[a-zA-Z_\$]+[\w\$]*|\d+))*/,_=/\[([^\[\]]*)\]/g,m=/\[([^\[\]]*)\]/,v=/\|\|/g,y="OR_OPERATOR",g=function(){return"$$"+~~(1e6*Math.random())},b="_$C$_",S=/^_\$C\$_/,C=/_\$C\$_[^\.]+/g,k=function(){return b+~~(1e6*Math.random())},T=function e(t,n){t=t.replace(v,y).split("|");for(var r=0;r=0?s:a+s;var l=n?n:a;if(n<0&&(l=a+n),i=l-s,i>0)if(o=new Array(i),this.charAt)for(r=0;r2&&(u=a,c=t),s.componentConstructor[e]=function(t){function a(t,i){return n(this,a),this.___omi_constructor_name=e,r(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,t,i))}return i(a,t),l(a,o(u)),a}(c),s.customTags.push(e),s.componentConstructor[e]},s.createStore=function(e){var t=function(t){function a(t,i){return n(this,a),this.data=t,e.methods.install&&e.methods.install.call(this),r(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,t,i))}return i(a,t),l(a,o(e.methods)),a}(s.Store);return new t(e.data,!0)},s.mixIndex=function(e,t){for(var n=e.length,r=t||"index",i=0;i",this.HTML):(this._mergeData(e),this.parent._omi_autoStoreToData&&(this._omi_autoStoreToData=!0,this._omi_ignoreStoreData||(this.data=this.$store.data)),this.beforeRender(),this._fixSlot(this._generateHTMLCSS()),t?this._extractChildrenString(this):this._extractChildren(this),this.children.forEach(function(e){n.HTML=n.HTML.replace(e._omiChildStr,t?e.node.outerHTML:e.HTML)}),this.HTML=(0,_event2.default)(this.HTML,this.id),this.HTML)}},{key:"_fixSlot",value:function(e){var t=this;if(this._omi_slotContent){this._omi_slotContent=this._scopedAttr(this._omi_slotContent,this._omi_scoped_attr,e);var n=_morphdom2.default.toElements(this._omi_slotContent),r=this.HTML.match(//g);1===n.length&&r&&1===r.length?this.HTML=this.HTML.replace(//,this._omi_slotContent):(n.sort(function(e,t){return parseInt(e.getAttribute("slot-index"))-parseInt(t.getAttribute("slot-index"))}),n.forEach(function(e){t.HTML=t.HTML.replace(//,e.outerHTML)}))}}},{key:"_queryElements",value:function(e){e._mixRefs(),e._execPlugins(),e.children.forEach(function(t){t.node=e.node.querySelector("["+_omi2.default.STYLESCOPEDPREFIX+t.id+"]"),t.node&&e._queryElements(t)})}},{key:"_mixRefs",value:function(){var e=this,t=_omi2.default.$$("*[ref]",this.node);t.forEach(function(t){t.hasAttribute(e._omi_scoped_attr)&&(e.refs[t.getAttribute("ref")]=t)});var n=this.node.getAttribute("ref");n&&(this.refs[n]=this.node)}},{key:"_execPlugins",value:function(){var e=this;Object.keys(_omi2.default.plugins).forEach(function(t){var n=_omi2.default.$$("*["+t+"]",e.node);n.forEach(function(n){n.hasAttribute(e._omi_scoped_attr)&&_omi2.default.plugins[t](n,e)}),e.node.hasAttribute(t)&&_omi2.default.plugins[t](e.node,e)})}},{key:"_childrenInstalled",value:function(e){var t=this;e.children.forEach(function(e){t._childrenInstalled(e),e.installed(),e._execInstalledHandlers()})}},{key:"_fixForm",value:function(){_omi2.default.$$("input",this.node).forEach(function(e){var t=e.type.toLowerCase();""===e.getAttribute("value")&&(e.value=""),"checked"!==t&&"radio"!==t||(e.hasAttribute("checked")?e.checked="checked":e.checked=!1)}),_omi2.default.$$("textarea",this.node).forEach(function(e){e.value=e.getAttribute("value")}),_omi2.default.$$("select",this.node).forEach(function(e){var t=e.getAttribute("value");if(t)_omi2.default.$$("option",e).forEach(function(e){t===e.getAttribute("value")&&e.setAttribute("selected","selected")});else{var n=_omi2.default.$$("option",e)[0];n&&n.setAttribute("selected","selected")}})}},{key:"_replaceTags",value:function(e,t,n){var r=this;if(0!==_omi2.default.customTags.length){var i=e.join("|"),o=new RegExp("<("+i+"+)((?:\\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\\s*=\\s*(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>\\s]+))?)*)\\s*((\\/>)|>(([\\s\\S]*?)<\\/\\1>))","g"),a=0;return t.replace(o,function(e,t,i,o,s,l,u){if(n){var c=r.children[a];c&&c.___omi_constructor_name===t&&(c._omiChildStr=e)}else r._initComponentByString(t,e,u,a++,r)})}}},{key:"_createHiddenNode",value:function(){var e=document.createElement("input");return e.setAttribute("type","hidden"),e.setAttribute(this._omi_scoped_attr,""),e}},{key:"_mergeData",value:function(e){this.selfDataFirst?this.data=Object.assign({},this._getDataset(e),this.data):this.data=Object.assign({},this.data,this._getDataset(e))}},{key:"_generateHTMLCSS",value:function(){this.CSS=(this.style()||"").replace(/<\/?style>/g,"");var e=this.___omi_constructor_name?_omi2.default.STYLESCOPEDPREFIX+this.___omi_constructor_name.toLowerCase():this._omi_scoped_attr;this.CSS&&(!this._omi_scopedSelfCSS&&_omi2.default.style[e]||(this.CSS=_style2.default.scoper(this.CSS,this._omi_scopedSelfCSS?"["+this._omi_scoped_attr+"]":"["+e+"]"),_omi2.default.style[e]=this.CSS,this.CSS===this._preCSS||this._omi_server_rendering||(_style2.default.addStyle(this.CSS,this.id),this._preCSS=this.CSS)));var t=this.render();return this.HTML=this._scopedAttr(_omi2.default.template(t?t:"",this.data),this._omi_scoped_attr,e).trim(),this._omi_server_rendering&&(this.HTML='\r\n\r\n"+this.HTML,this.HTML+='\r\n\r\n"),e}},{key:"_scopedAttr",value:function(e,t,n){var r=this;return e.replace(/<[^\/]([A-Za-z]*)[^>]*>/g,function(e){var i=e.split(" ")[0].replace(">","");return r._omi_scopedSelfCSS||!r.___omi_constructor_name?e.replace(i,i+" "+t):e.replace(i,i+" "+t+" "+n)})}},{key:"_getDataset",value:function _getDataset(childStr){var _this12=this,json=(0,_html2json2.default)(childStr),attr=json.child[0].attr,baseData={};return Object.keys(attr).forEach(function(key){var value=attr[key];if(0===key.indexOf("on")){var handler=_this12.parent[value];handler&&(baseData[_this12._capitalize(key)]=handler.bind(_this12.parent))}else 0===key.indexOf("data-")?_this12._dataset[_this12._capitalize(key.replace("data-",""))]=value:0===key.indexOf(":data-")?_this12._dataset[_this12._capitalize(key.replace(":data-",""))]=eval("("+value+")"):":data"===key?_this12._dataset=eval("("+value+")"):"data"===key?_this12._dataset=_this12._extractPropertyFromString(value,_this12.parent):"group-data"===key&&(_this12._dataset=_this12._extractPropertyFromString(value,_this12.parent)[_this12._omi_groupDataIndex])}),Object.assign(baseData,this._dataset)}},{key:"_capitalize",value:function(e){return e=e.toLowerCase(),e=e.replace(/\b\w+\b/g,function(e){return e.substring(0,1).toUpperCase()+e.substring(1)}).replace(/-/g,""),e.substring(0,1).toLowerCase()+e.substring(1)}},{key:"_extractPropertyFromString",value:function(e,t){var n=e.replace(/['|"|\]]/g,"").replace(/\[/g,".").split("."),r=t;return n.forEach(function(e){r=r[e]}),n=null,r}},{key:"_extractChildrenString",value:function(e){this._replaceTags(_omi2.default.customTags,e.HTML,!0)}},{key:"_extractChildren",value:function(e){this._replaceTags(_omi2.default.customTags,e.HTML)}},{key:"_initComponentByString",value:function _initComponentByString(name,childStr,slotContent,i,child){var _this13=this,json=(0,_html2json2.default)(childStr),attr=json.child[0].attr,cmi=this.children[i];if(cmi&&cmi.___omi_constructor_name===name)cmi._omiChildStr=childStr,cmi._omi_slotContent=slotContent,Object.keys(attr).forEach(function(e){var t=attr[e];"group-data"===e&&(child._omiGroupDataCounter.hasOwnProperty(t)?child._omiGroupDataCounter[t]++:child._omiGroupDataCounter[t]=0,cmi._omi_groupDataIndex=child._omiGroupDataCounter[t])}),cmi._childRender(childStr);else{var baseData={},dataset={},groupDataIndex=null,omiID=null,instanceName=null,_omi_option={};Object.keys(attr).forEach(function(key){var value=attr[key];if(0===key.indexOf("on")){var handler=child[value];handler&&(baseData[_this13._capitalize(key)]=handler.bind(child))}else"omi-id"===key?omiID=value:"name"===key?instanceName=value:"group-data"===key?(child._omiGroupDataCounter.hasOwnProperty(value)?child._omiGroupDataCounter[value]++:child._omiGroupDataCounter[value]=0,groupDataIndex=child._omiGroupDataCounter[value],dataset=_this13._extractPropertyFromString(value,child)[groupDataIndex]):0===key.indexOf("data-")?dataset[_this13._capitalize(key.replace("data-",""))]=value:0===key.indexOf(":data-")?dataset[_this13._capitalize(key.replace(":data-",""))]=eval("("+value+")"):":data"===key?dataset=eval("("+value+")"):"data"===key?dataset=_this13._extractPropertyFromString(value,child):"preventSelfUpdate"===key||"psu"===key?_omi_option.preventSelfUpdate=!0:"selfDataFirst"===key||"sdf"===key?_omi_option.selfDataFirst=!0:"domDiffDisabled"===key||"ddd"===key?_omi_option.domDiffDisabled=!0:"ignoreStoreData"===key||"isd"===key?_omi_option.ignoreStoreData=!0:"scopedSelfCSS"!==key&&"ssc"!==key||(_omi_option.scopedSelfCSS=!0)});var ChildClass=_omi2.default.getClassFromString(name);if(!ChildClass)throw"Can't find Class called ["+name+"]";var sub_child=new ChildClass(Object.assign(baseData,dataset),_omi_option);sub_child._omi_groupDataIndex=groupDataIndex,sub_child._omiChildStr=childStr,sub_child._omi_slotContent=slotContent,sub_child.parent=child,sub_child.$store=child.$store,sub_child.___omi_constructor_name=name,sub_child._dataset={},sub_child.install(),omiID&&(_omi2.default.mapping[omiID]=sub_child),instanceName&&(child[instanceName]=sub_child),cmi?child.children[i]=sub_child:child.children.push(sub_child),sub_child._childRender(childStr)}}}]),Component}();exports.default=Component},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){e=e.replace(/\/\*[^*]*\*+([^\/][^*]*\*+)*\//g,"");var n=new RegExp("([^\r\n,{}:]+)(:[^\r\n,{}]+)?(,(?=[^{}]*{)|s*{)","g");return e=e.replace(n,function(e,n,r,i){if("undefined"==typeof r&&(r=""),n.match(/^\s*(@media|@keyframes|to|from|@font-face)/))return n+r+i;var o=n.replace(/(\s*)$/,"")+t+r,a=t+" "+n.trim()+r;return o+","+a+i})}function o(e,t){var n=document.getElementById(s.default.STYLEPREFIX+t),r=document.getElementsByTagName("head")[0];n&&n.parentNode===r&&r.removeChild(n);var i=document.createElement("style");r.appendChild(i),i.setAttribute("type","text/css"),i.setAttribute("id",s.default.STYLEPREFIX+t),window.ActiveXObject?i.styleSheet.cssText=e:i.textContent=e}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),s=r(a);t.default={scoper:i,addStyle:o}},function(e,t){"use strict";function n(e,t){return e.replace(/<[\s\S]*?>/g,function(e){return e.replace(/on(abort|blur|cancel|canplay|canplaythrough|change|click|close|contextmenu|cuechange|dblclick|drag|dragend|dragenter|dragleave|dragover|dragstart|drop|durationchange|emptied|ended|error|focus|input|invalid|keydown|keypress|keyup|load|loadeddata|loadedmetadata|loadstart|mousedown|mouseenter|mouseleave|mousemove|mouseout|mouseover|mouseup|mousewheel|pause|play|playing|progress|ratechange|reset|resize|scroll|seeked|seeking|select|show|stalled|submit|suspend|timeupdate|toggle|volumechange|waiting|autocomplete|autocompleteerror|beforecopy|beforecut|beforepaste|copy|cut|paste|search|selectstart|wheel|webkitfullscreenchange|webkitfullscreenerror|touchstart|touchmove|touchend|touchcancel|pointerdown|pointerup|pointercancel|pointermove|pointerover|pointerout|pointerenter|pointerleave|Abort|Blur|Cancel|CanPlay|CanPlayThrough|Change|Click|Close|ContextMenu|CueChange|DblClick|Drag|DragEnd|DragEnter|DragLeave|DragOver|DragStart|Drop|DurationChange|Emptied|Ended|Error|Focus|Input|Invalid|KeyDown|KeyPress|KeyUp|Load|LoadedData|LoadedMetadata|LoadStart|MouseDown|MouseEnter|MouseLeave|MouseMove|MouseOut|MouseOver|MouseUp|MouseWheel|Pause|Play|Playing|Progress|RateChange|Reset|Resize|Scroll|Seeked|Seeking|Select|Show|Stalled|Submit|Suspend|TimeUpdate|Toggle|VolumeChange|Waiting|AutoComplete|AutoCompleteError|BeforeCopy|BeforeCut|BeforePaste|Copy|Cut|Paste|Search|SelectStart|Wheel|WebkitFullScreenChange|WebkitFullScreenError|TouchStart|TouchMove|TouchEnd|TouchCancel|PointerDown|PointerUp|PointerCancel|PointerMove|PointerOver|PointerOut|PointerEnter|PointerLeave)=(('([\s\S]*?)')|("([\s\S]*?)"))/g,function(e,n,r){if(1===r.indexOf("Omi.instances["))return e;if(r.lastIndexOf(")")===r.length-2)return e.replace(/=(['|"])/,"=$1Omi.instances["+t+"].");var i=e.replace(/=(['|"])/,"=$1Omi.instances["+t+"].");return i.substr(0,i.length-1)+"(event)"+i.substr(i.length-1,1)})})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},function(e,t,n){var r,i,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(a,s){"object"===o(t)&&"undefined"!=typeof e?e.exports=s():(r=s,i="function"==typeof r?r.call(t,n,t,e):r,!(void 0!==i&&(e.exports=i)))}(void 0,function(){"use strict";function e(e){!c&&f.createRange&&(c=f.createRange(),c.selectNode(f.body));var t;return c&&c.createContextualFragment?t=c.createContextualFragment(e):(t=f.createElement("body"),t.innerHTML=e),t.childNodes[0]}function t(e){!c&&f.createRange&&(c=f.createRange(),c.selectNode(f.body));var t;c&&c.createContextualFragment?t=c.createContextualFragment(e):(t=f.createElement("body"),t.innerHTML=e);for(var n=[],r=0,i=t.childNodes.length;r90)&&n===r.toUpperCase()}function r(e,t){return t&&t!==h?f.createElementNS(t,e):f.createElement(e)}function i(e,t){for(var n=e.firstChild;n;){var r=n.nextSibling;t.appendChild(n),n=r}return t}function o(e,t){var n,r,i,o,a,s,l=t.attributes;for(n=l.length-1;n>=0;--n)r=l[n],i=r.name,o=r.namespaceURI,a=r.value,o?(i=r.localName||i,s=e.getAttributeNS(o,i),s!==a&&e.setAttributeNS(o,i,a)):(s=e.getAttribute(i),s!==a&&e.setAttribute(i,a));for(l=e.attributes,n=l.length-1;n>=0;--n)r=l[n],r.specified!==!1&&(i=r.name,o=r.namespaceURI,o?(i=r.localName||i,_(t,o,i)||e.removeAttributeNS(o,i)):_(t,null,i)||e.removeAttribute(i))}function a(e,t,n){e[n]!==t[n]&&(e[n]=t[n],e[n]?e.setAttribute(n,""):e.removeAttribute(n,""))}function s(){}function l(e){return e.id}function u(t){return function(o,a,u){function c(e){C?C.push(e):C=[e]}function d(e,t){if(e.nodeType===v)for(var n=e.firstChild;n;){var r=void 0;t&&(r=k(n))?c(r):(A(n),n.firstChild&&d(n,t)),n=n.nextSibling}}function h(e,t,n){D(e)!==!1&&(t&&t.removeChild(e),A(e),d(e,n))}function p(e){if(e.nodeType===v)for(var t=e.firstChild;t;){var n=k(t);n&&(M[n]=t),p(t),t=t.nextSibling}}function _(e){w(e);for(var t=e.firstChild;t;){var r=t.nextSibling,i=k(t);if(i){var o=M[i];o&&n(t,o)&&(t.parentNode.replaceChild(o,t),b(o,t))}_(t),t=r}}function b(e,r,i){if(L){for(var s=!1,l=!1,u=null,d=null,p=0,S=L.length;p\s]+))?)*)\s*(\/?)>/,r=/^<\/([-A-Za-z0-9_]+)[^>]*>/,i=/([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,o=function(e,t){function o(e,n,r,o){if(o=!!o,o||c.push(n),t.start){var a=[];r.replace(i,function(e,t){var n=arguments[2]?arguments[2]:arguments[3]?arguments[3]:arguments[4]?arguments[4]:"";a.push({name:t,value:n,escaped:n.replace(/(^|[^\\])"/g,'$1\\"')})}),t.start&&t.start(n,a,o)}}function a(e,n){if(n)for(var r=c.length-1;r>=0&&c[r]!=n;r--);else var r=0;if(r>=0){for(var i=c.length-1;i>=r;i--)t.end&&t.end(c[i]);c.length=r}}var s,l,u,c=[],d=e;for(c.last=function(){return this[this.length-1]};e;){if(l=!0,c.last())e=e.replace(new RegExp("([\\s\\S]*?)]*>"),function(e,n){return t.chars&&t.chars(n),""}),a("",c.last());else if(0==e.indexOf(">>0,i=0;if(2==arguments.length)t=arguments[1];else{for(;i=r)throw new TypeError("Reduce of empty array with no initial value");t=n[i++]}for(;i=0?s:a+s;var l=n?n:a;if(n<0&&(l=a+n),i=l-s,i>0)if(o=new Array(i),this.charAt)for(r=0;r2&&(u=a,c=t),s.componentConstructor[e]=function(t){function a(t,i){return n(this,a),this.___omi_constructor_name=e,r(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,t,i))}return i(a,t),l(a,o(u)),a}(c),s.customTags.push(e),s.componentConstructor[e]},s.createStore=function(e){var t=function(t){function a(t,i){return n(this,a),this.data=t,e.methods.install&&e.methods.install.call(this),r(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,t,i))}return i(a,t),l(a,o(e.methods)),a}(s.Store);return new t(e.data,!0)},s.mixIndex=function(e,t){for(var n=e.length,r=t||"index",i=0;i",this.HTML):(this._mergeData(e),this.parent._omi_autoStoreToData&&(this._omi_autoStoreToData=!0,this._omi_ignoreStoreData||(this.data=this.$store.data)),this.beforeRender(),this._fixSlot(this._generateHTMLCSS()),t?this._extractChildrenString(this):this._extractChildren(this),this.children.forEach(function(e){n.HTML=n.HTML.replace(e._omiChildStr,t?e.node.outerHTML:e.HTML)}),this.HTML=(0,_event2.default)(this.HTML,this.id),this.HTML)}},{key:"_fixSlot",value:function(e){var t=this;if(this._omi_slotContent){this._omi_slotContent=this._scopedAttr(this._omi_slotContent,this._omi_scoped_attr,e);var n=_morphdom2.default.toElements(this._omi_slotContent),r=this.HTML.match(//g);1===n.length&&r&&1===r.length?this.HTML=this.HTML.replace(//,this._omi_slotContent):(n.sort(function(e,t){return parseInt(e.getAttribute("slot-index"))-parseInt(t.getAttribute("slot-index"))}),n.forEach(function(e){t.HTML=t.HTML.replace(//,e.outerHTML)}))}}},{key:"_queryElements",value:function(e){e._mixRefs(),e._execPlugins(),e.children.forEach(function(t){t.node=e.node.querySelector("["+_omi2.default.STYLESCOPEDPREFIX+t.id+"]"),t.node&&e._queryElements(t)})}},{key:"_mixRefs",value:function(){var e=this,t=_omi2.default.$$("*[ref]",this.node);t.forEach(function(t){t.hasAttribute(e._omi_scoped_attr)&&(e.refs[t.getAttribute("ref")]=t)});var n=this.node.getAttribute("ref");n&&(this.refs[n]=this.node)}},{key:"_execPlugins",value:function(){var e=this;Object.keys(_omi2.default.plugins).forEach(function(t){var n=_omi2.default.$$("*["+t+"]",e.node);n.forEach(function(n){n.hasAttribute(e._omi_scoped_attr)&&_omi2.default.plugins[t](n,e)}),e.node.hasAttribute(t)&&_omi2.default.plugins[t](e.node,e)})}},{key:"_childrenInstalled",value:function(e){var t=this;e.children.forEach(function(e){t._childrenInstalled(e),e.installed(),e._execInstalledHandlers()})}},{key:"_fixForm",value:function(){_omi2.default.$$("input",this.node).forEach(function(e){var t=e.type.toLowerCase();""===e.getAttribute("value")&&(e.value=""),"checked"!==t&&"radio"!==t||(e.hasAttribute("checked")?e.checked="checked":e.checked=!1)}),_omi2.default.$$("textarea",this.node).forEach(function(e){e.value=e.getAttribute("value")}),_omi2.default.$$("select",this.node).forEach(function(e){var t=e.getAttribute("value");if(t)_omi2.default.$$("option",e).forEach(function(e){t===e.getAttribute("value")&&e.setAttribute("selected","selected")});else{var n=_omi2.default.$$("option",e)[0];n&&n.setAttribute("selected","selected")}})}},{key:"_replaceTags",value:function(e,t,n){var r=this;if(0!==_omi2.default.customTags.length){var i=e.join("|"),o=new RegExp("<("+i+"+)((?:\\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\\s*=\\s*(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>\\s]+))?)*)\\s*((\\/>)|>(([\\s\\S]*?)<\\/\\1>))","g"),a=0;return t.replace(o,function(e,t,i,o,s,l,u){if(n){var c=r.children[a];c&&c.___omi_constructor_name===t&&(c._omiChildStr=e)}else r._initComponentByString(t,e,u,a++,r)})}}},{key:"_createHiddenNode",value:function(){var e=document.createElement("input");return e.setAttribute("type","hidden"),e.setAttribute(this._omi_scoped_attr,""),e}},{key:"_mergeData",value:function(e){this.selfDataFirst?this.data=Object.assign({},this._getDataset(e),this.data):this.data=Object.assign({},this.data,this._getDataset(e))}},{key:"_generateHTMLCSS",value:function(){this.CSS=(this.style()||"").replace(/<\/?style>/g,"");var e=this.___omi_constructor_name?_omi2.default.STYLESCOPEDPREFIX+this.___omi_constructor_name.toLowerCase():this._omi_scoped_attr;this.CSS&&(!this._omi_scopedSelfCSS&&_omi2.default.style[e]||(this.CSS=_style2.default.scoper(this.CSS,this._omi_scopedSelfCSS?"["+this._omi_scoped_attr+"]":"["+e+"]"),_omi2.default.style[e]=this.CSS,this.CSS===this._preCSS||this._omi_server_rendering||(_style2.default.addStyle(this.CSS,this.id),this._preCSS=this.CSS)));var t=this.render();return this.HTML=this._scopedAttr(_omi2.default.template(t?t:"",this.data),this._omi_scoped_attr,e).trim(),this._omi_server_rendering&&(this.HTML='\r\n\r\n"+this.HTML,this.HTML+='\r\n\r\n"),e}},{key:"_scopedAttr",value:function(e,t,n){var r=this;return e.replace(/<[^\/]([A-Za-z]*)[^>]*>/g,function(e){var i=e.split(" ")[0].replace(">","");return r._omi_scopedSelfCSS||!r.___omi_constructor_name?e.replace(i,i+" "+t):e.replace(i,i+" "+t+" "+n)})}},{key:"_getDataset",value:function _getDataset(childStr){var _this12=this,json=(0,_html2json2.default)(childStr),attr=json.child[0].attr,baseData={};return Object.keys(attr).forEach(function(key){var value=attr[key];if(0===key.indexOf("on")){var handler=_this12.parent[value];handler&&(baseData[_this12._capitalize(key)]=handler.bind(_this12.parent))}else 0===key.indexOf("data-")?_this12._dataset[_this12._capitalize(key.replace("data-",""))]=value:0===key.indexOf(":data-")?_this12._dataset[_this12._capitalize(key.replace(":data-",""))]=eval("("+value+")"):0===key.indexOf("::data-")?_this12._dataset[_this12._capitalize(key.replace("::data-",""))]=_this12._extractPropertyFromString(value,_this12.parent):"data"===key?_this12._dataset=_this12._extractPropertyFromString(value,_this12.parent):":data"===key?_this12._dataset=eval("("+value+")"):"group-data"===key&&(_this12._dataset=_this12._extractPropertyFromString(value,_this12.parent)[_this12._omi_groupDataIndex])}),Object.assign(baseData,this._dataset)}},{key:"_capitalize",value:function(e){return e=e.toLowerCase(),e=e.replace(/\b\w+\b/g,function(e){return e.substring(0,1).toUpperCase()+e.substring(1)}).replace(/-/g,""),e.substring(0,1).toLowerCase()+e.substring(1)}},{key:"_extractPropertyFromString",value:function(e,t){var n=e.replace(/['|"|\]]/g,"").replace(/\[/g,".").split("."),r=t;return n.forEach(function(e){r=r[e]}),n=null,r}},{key:"_extractChildrenString",value:function(e){this._replaceTags(_omi2.default.customTags,e.HTML,!0)}},{key:"_extractChildren",value:function(e){this._replaceTags(_omi2.default.customTags,e.HTML)}},{key:"_initComponentByString",value:function _initComponentByString(name,childStr,slotContent,i,child){var _this13=this,json=(0,_html2json2.default)(childStr),attr=json.child[0].attr,cmi=this.children[i];if(cmi&&cmi.___omi_constructor_name===name)cmi._omiChildStr=childStr,cmi._omi_slotContent=slotContent,Object.keys(attr).forEach(function(e){var t=attr[e];"group-data"===e&&(child._omiGroupDataCounter.hasOwnProperty(t)?child._omiGroupDataCounter[t]++:child._omiGroupDataCounter[t]=0,cmi._omi_groupDataIndex=child._omiGroupDataCounter[t])}),cmi._childRender(childStr);else{var baseData={},dataset={},groupDataIndex=null,omiID=null,instanceName=null,_omi_option={};Object.keys(attr).forEach(function(key){var value=attr[key];if(0===key.indexOf("on")){var handler=child[value];handler&&(baseData[_this13._capitalize(key)]=handler.bind(child))}else"omi-id"===key?omiID=value:"name"===key?instanceName=value:"group-data"===key?(child._omiGroupDataCounter.hasOwnProperty(value)?child._omiGroupDataCounter[value]++:child._omiGroupDataCounter[value]=0,groupDataIndex=child._omiGroupDataCounter[value],dataset=_this13._extractPropertyFromString(value,child)[groupDataIndex]):0===key.indexOf("data-")?dataset[_this13._capitalize(key.replace("data-",""))]=value:0===key.indexOf(":data-")?dataset[_this13._capitalize(key.replace(":data-",""))]=eval("("+value+")"):0===key.indexOf("::data-")?dataset[_this13._capitalize(key.replace("::data-",""))]=_this13._extractPropertyFromString(value,child):"data"===key?dataset=_this13._extractPropertyFromString(value,child):":data"===key?dataset=eval("("+value+")"):"preventSelfUpdate"===key||"psu"===key?_omi_option.preventSelfUpdate=!0:"selfDataFirst"===key||"sdf"===key?_omi_option.selfDataFirst=!0:"domDiffDisabled"===key||"ddd"===key?_omi_option.domDiffDisabled=!0:"ignoreStoreData"===key||"isd"===key?_omi_option.ignoreStoreData=!0:"scopedSelfCSS"!==key&&"ssc"!==key||(_omi_option.scopedSelfCSS=!0)});var ChildClass=_omi2.default.getClassFromString(name);if(!ChildClass)throw"Can't find Class called ["+name+"]";var sub_child=new ChildClass(Object.assign(baseData,dataset),_omi_option);sub_child._omi_groupDataIndex=groupDataIndex,sub_child._omiChildStr=childStr,sub_child._omi_slotContent=slotContent,sub_child.parent=child,sub_child.$store=child.$store,sub_child.___omi_constructor_name=name,sub_child._dataset={},sub_child.install(),omiID&&(_omi2.default.mapping[omiID]=sub_child),instanceName&&(child[instanceName]=sub_child),cmi?child.children[i]=sub_child:child.children.push(sub_child),sub_child._childRender(childStr)}}}]),Component}();exports.default=Component},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){e=e.replace(/\/\*[^*]*\*+([^\/][^*]*\*+)*\//g,"");var n=new RegExp("([^\r\n,{}:]+)(:[^\r\n,{}]+)?(,(?=[^{}]*{)|s*{)","g");return e=e.replace(n,function(e,n,r,i){if("undefined"==typeof r&&(r=""),n.match(/^\s*(@media|@keyframes|to|from|@font-face)/))return n+r+i;var o=n.replace(/(\s*)$/,"")+t+r,a=t+" "+n.trim()+r;return o+","+a+i})}function o(e,t){var n=document.getElementById(s.default.STYLEPREFIX+t),r=document.getElementsByTagName("head")[0];n&&n.parentNode===r&&r.removeChild(n);var i=document.createElement("style");r.appendChild(i),i.setAttribute("type","text/css"),i.setAttribute("id",s.default.STYLEPREFIX+t),window.ActiveXObject?i.styleSheet.cssText=e:i.textContent=e}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),s=r(a);t.default={scoper:i,addStyle:o}},function(e,t){"use strict";function n(e,t){return e.replace(/<[\s\S]*?>/g,function(e){return e.replace(/on(abort|blur|cancel|canplay|canplaythrough|change|click|close|contextmenu|cuechange|dblclick|drag|dragend|dragenter|dragleave|dragover|dragstart|drop|durationchange|emptied|ended|error|focus|input|invalid|keydown|keypress|keyup|load|loadeddata|loadedmetadata|loadstart|mousedown|mouseenter|mouseleave|mousemove|mouseout|mouseover|mouseup|mousewheel|pause|play|playing|progress|ratechange|reset|resize|scroll|seeked|seeking|select|show|stalled|submit|suspend|timeupdate|toggle|volumechange|waiting|autocomplete|autocompleteerror|beforecopy|beforecut|beforepaste|copy|cut|paste|search|selectstart|wheel|webkitfullscreenchange|webkitfullscreenerror|touchstart|touchmove|touchend|touchcancel|pointerdown|pointerup|pointercancel|pointermove|pointerover|pointerout|pointerenter|pointerleave|Abort|Blur|Cancel|CanPlay|CanPlayThrough|Change|Click|Close|ContextMenu|CueChange|DblClick|Drag|DragEnd|DragEnter|DragLeave|DragOver|DragStart|Drop|DurationChange|Emptied|Ended|Error|Focus|Input|Invalid|KeyDown|KeyPress|KeyUp|Load|LoadedData|LoadedMetadata|LoadStart|MouseDown|MouseEnter|MouseLeave|MouseMove|MouseOut|MouseOver|MouseUp|MouseWheel|Pause|Play|Playing|Progress|RateChange|Reset|Resize|Scroll|Seeked|Seeking|Select|Show|Stalled|Submit|Suspend|TimeUpdate|Toggle|VolumeChange|Waiting|AutoComplete|AutoCompleteError|BeforeCopy|BeforeCut|BeforePaste|Copy|Cut|Paste|Search|SelectStart|Wheel|WebkitFullScreenChange|WebkitFullScreenError|TouchStart|TouchMove|TouchEnd|TouchCancel|PointerDown|PointerUp|PointerCancel|PointerMove|PointerOver|PointerOut|PointerEnter|PointerLeave)=(('([\s\S]*?)')|("([\s\S]*?)"))/g,function(e,n,r){if(1===r.indexOf("Omi.instances["))return e;if(r.lastIndexOf(")")===r.length-2)return e.replace(/=(['|"])/,"=$1Omi.instances["+t+"].");var i=e.replace(/=(['|"])/,"=$1Omi.instances["+t+"].");return i.substr(0,i.length-1)+"(event)"+i.substr(i.length-1,1)})})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},function(e,t,n){var r,i,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(a,s){"object"===o(t)&&"undefined"!=typeof e?e.exports=s():(r=s,i="function"==typeof r?r.call(t,n,t,e):r,!(void 0!==i&&(e.exports=i)))}(void 0,function(){"use strict";function e(e){!c&&f.createRange&&(c=f.createRange(),c.selectNode(f.body));var t;return c&&c.createContextualFragment?t=c.createContextualFragment(e):(t=f.createElement("body"),t.innerHTML=e),t.childNodes[0]}function t(e){!c&&f.createRange&&(c=f.createRange(),c.selectNode(f.body));var t;c&&c.createContextualFragment?t=c.createContextualFragment(e):(t=f.createElement("body"),t.innerHTML=e);for(var n=[],r=0,i=t.childNodes.length;r90)&&n===r.toUpperCase()}function r(e,t){return t&&t!==h?f.createElementNS(t,e):f.createElement(e)}function i(e,t){for(var n=e.firstChild;n;){var r=n.nextSibling;t.appendChild(n),n=r}return t}function o(e,t){var n,r,i,o,a,s,l=t.attributes;for(n=l.length-1;n>=0;--n)r=l[n],i=r.name,o=r.namespaceURI,a=r.value,o?(i=r.localName||i,s=e.getAttributeNS(o,i),s!==a&&e.setAttributeNS(o,i,a)):(s=e.getAttribute(i),s!==a&&e.setAttribute(i,a));for(l=e.attributes,n=l.length-1;n>=0;--n)r=l[n],r.specified!==!1&&(i=r.name,o=r.namespaceURI,o?(i=r.localName||i,_(t,o,i)||e.removeAttributeNS(o,i)):_(t,null,i)||e.removeAttribute(i))}function a(e,t,n){e[n]!==t[n]&&(e[n]=t[n],e[n]?e.setAttribute(n,""):e.removeAttribute(n,""))}function s(){}function l(e){return e.id}function u(t){return function(o,a,u){function c(e){C?C.push(e):C=[e]}function d(e,t){if(e.nodeType===v)for(var n=e.firstChild;n;){var r=void 0;t&&(r=k(n))?c(r):(A(n),n.firstChild&&d(n,t)),n=n.nextSibling}}function h(e,t,n){D(e)!==!1&&(t&&t.removeChild(e),A(e),d(e,n))}function p(e){if(e.nodeType===v)for(var t=e.firstChild;t;){var n=k(t);n&&(M[n]=t),p(t),t=t.nextSibling}}function _(e){x(e);for(var t=e.firstChild;t;){var r=t.nextSibling,i=k(t);if(i){var o=M[i];o&&n(t,o)&&(t.parentNode.replaceChild(o,t),b(o,t))}_(t),t=r}}function b(e,r,i){if(L){for(var s=!1,l=!1,u=null,d=null,p=0,S=L.length;p\s]+))?)*)\s*(\/?)>/,r=/^<\/([-A-Za-z0-9_]+)[^>]*>/,i=/([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,o=function(e,t){function o(e,n,r,o){if(o=!!o,o||c.push(n),t.start){var a=[];r.replace(i,function(e,t){var n=arguments[2]?arguments[2]:arguments[3]?arguments[3]:arguments[4]?arguments[4]:"";a.push({name:t,value:n,escaped:n.replace(/(^|[^\\])"/g,'$1\\"')})}),t.start&&t.start(n,a,o)}}function a(e,n){if(n)for(var r=c.length-1;r>=0&&c[r]!=n;r--);else var r=0;if(r>=0){for(var i=c.length-1;i>=r;i--)t.end&&t.end(c[i]);c.length=r}}var s,l,u,c=[],d=e;for(c.last=function(){return this[this.length-1]};e;){if(l=!0,c.last())e=e.replace(new RegExp("([\\s\\S]*?)]*>"),function(e,n){return t.chars&&t.chars(n),""}),a("",c.last());else if(0==e.indexOf(">>0,i=0;if(2==arguments.length)t=arguments[1];else{for(;i=r)throw new TypeError("Reduce of empty array with no initial value");t=n[i++]}for(;i"'`=\/]/g,function(e){return g[e]})}function u(t,n){function i(){if(v&&!y)for(;_.length;)delete p[_.pop()];else _=[];v=!1,y=!1}function o(e){if("string"==typeof e&&(e=e.split(S,2)),!m(e)||2!==e.length)throw new Error("Invalid tags: "+e);a=new RegExp(r(e[0])+"\\s*"),l=new RegExp("\\s*"+r(e[1])),u=new RegExp("\\s*"+r("}"+e[1]))}if(!t)return[];var a,l,u,f=[],p=[],_=[],v=!1,y=!1;o(n||e.tags);for(var g,w,E,x,D,A,O=new h(t);!O.eos();){if(g=O.pos,E=O.scanUntil(a))for(var I=0,L=E.length;I0?o[o.length-1][4]:r;break;default:i.push(t)}return r}function h(e){this.string=e,this.tail=e,this.pos=0}function f(e,t){this.view=e,this.cache={".":this.view},this.parent=t}function p(){this.cache={}}var _=Object.prototype.toString,m=Array.isArray||function(e){return"[object Array]"===_.call(e)},v=RegExp.prototype.test,y=/\S/,g={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="},b=/\s*/,S=/\s+/,C=/\s*=/,k=/\s*\}/,T=/#|\^|\/|>|\{|&|=|!/;h.prototype.eos=function(){return""===this.tail},h.prototype.scan=function(e){var t=this.tail.match(e);if(!t||0!==t.index)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n},h.prototype.scanUntil=function(e){var t,n=this.tail.search(e);switch(n){case-1:t=this.tail,this.tail="";break;case 0:t="";break;default:t=this.tail.substring(0,n),this.tail=this.tail.substring(n)}return this.pos+=t.length,t},f.prototype.push=function(e){return new f(e,this)},f.prototype.lookup=function(e){var n,r=this.cache;if(r.hasOwnProperty(e))n=r[e];else{for(var o,a,s=this,l=!1;s;){if(e.indexOf(".")>0)for(n=s.view,o=e.split("."),a=0;null!=n&&a"===o?a=this.renderPartial(i,t,n,r):"&"===o?a=this.unescapedValue(i,t):"name"===o?a=this.escapedValue(i,t):"text"===o&&(a=this.rawValue(i)),void 0!==a&&(s+=a);return s},p.prototype.renderSection=function(e,n,r,i){function o(e){return s.render(e,n,r)}var s=this,l="",u=n.lookup(e[1]);if(u){if(m(u))for(var c=0,d=u.length;c"'`=\/]/g,function(e){return g[e]})}function u(t,n){function i(){if(v&&!y)for(;_.length;)delete p[_.pop()];else _=[];v=!1,y=!1}function o(e){if("string"==typeof e&&(e=e.split(S,2)),!m(e)||2!==e.length)throw new Error("Invalid tags: "+e);a=new RegExp(r(e[0])+"\\s*"),l=new RegExp("\\s*"+r(e[1])),u=new RegExp("\\s*"+r("}"+e[1]))}if(!t)return[];var a,l,u,f=[],p=[],_=[],v=!1,y=!1;o(n||e.tags);for(var g,x,w,E,D,A,O=new h(t);!O.eos();){if(g=O.pos,w=O.scanUntil(a))for(var I=0,L=w.length;I0?o[o.length-1][4]:r;break;default:i.push(t)}return r}function h(e){this.string=e,this.tail=e,this.pos=0}function f(e,t){this.view=e,this.cache={".":this.view},this.parent=t}function p(){this.cache={}}var _=Object.prototype.toString,m=Array.isArray||function(e){return"[object Array]"===_.call(e)},v=RegExp.prototype.test,y=/\S/,g={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="},b=/\s*/,S=/\s+/,C=/\s*=/,k=/\s*\}/,T=/#|\^|\/|>|\{|&|=|!/;h.prototype.eos=function(){return""===this.tail},h.prototype.scan=function(e){var t=this.tail.match(e);if(!t||0!==t.index)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n},h.prototype.scanUntil=function(e){var t,n=this.tail.search(e);switch(n){case-1:t=this.tail,this.tail="";break;case 0:t="";break;default:t=this.tail.substring(0,n),this.tail=this.tail.substring(n)}return this.pos+=t.length,t},f.prototype.push=function(e){return new f(e,this)},f.prototype.lookup=function(e){var n,r=this.cache;if(r.hasOwnProperty(e))n=r[e];else{for(var o,a,s=this,l=!1;s;){if(e.indexOf(".")>0)for(n=s.view,o=e.split("."),a=0;null!=n&&a"===o?a=this.renderPartial(i,t,n,r):"&"===o?a=this.unescapedValue(i,t):"name"===o?a=this.escapedValue(i,t):"text"===o&&(a=this.rawValue(i)),void 0!==a&&(s+=a);return s},p.prototype.renderSection=function(e,n,r,i){function o(e){return s.render(e,n,r)}var s=this,l="",u=n.lookup(e[1]);if(u){if(m(u))for(var c=0,d=u.length;c