-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathclient.js
1 lines (1 loc) · 61.4 KB
/
client.js
1
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=2)}([function(t,e){var n={VERSION:"1.3.2",setTimeout:function(t,e){return setTimeout(function(){return e(),n.commit()},t)},setInterval:function(t,e){return setInterval(e,t)},clearInterval:function(t){return clearInterval(t)},clearTimeout:function(t){return clearTimeout(t)},subclass:function(t,e){for(let n in e){let r;r=e[n],e.hasOwnProperty(n)&&(t[n]=r)}return t.prototype=Object.create(e.prototype),t.__super__=t.prototype.__super__=e.prototype,t.prototype.initialize=t.prototype.constructor=t,t},iterable:function(t){return t?t.toArray?t.toArray():t:[]},await:function(t){return t instanceof Array?(console.warn("await (Array) is deprecated - use await Promise.all(Array)"),Promise.all(t)):t&&t.then?t:Promise.resolve(t)}},r=/-./g,i={};function o(t,e,n){for(var r,i;(r=n)&&(n=n.next);)(i=n.listener)&&(n.path&&i[n.path]?e?i[n.path].apply(i,e):i[n.path]():e?i.apply(n,e):i.call(n)),n.times&&--n.times<=0&&(r.next=n.next,n.listener=null)}n.toCamelCase=function(t){return t.indexOf("-")>=0?t.replace(r,function(t){return t.charAt(1).toUpperCase()}):t},n.toSetter=function(t){return i[t]||(i[t]=n.toCamelCase("set-"+t))},n.indexOf=function(t,e){return e&&e.indexOf?e.indexOf(t):[].indexOf.call(t,e)},n.len=function(t){return t&&(t.len instanceof Function?t.len.call(t):t.length)||0},n.prop=function(t,e,n){if(t.defineProperty)return t.defineProperty(e,n)},n.attr=function(t,e,r){if(void 0===r&&(r={}),t.defineAttribute)return t.defineAttribute(e,r);let i=n.toCamelCase(e),o=n.toCamelCase("set-"+e),s=t.prototype;r.dom?(s[i]=function(){return this.dom()[e]},s[o]=function(t){return t!=this[e]()&&(this.dom()[e]=t),this}):(s[i]=function(){return this.getAttribute(e)},s[o]=function(t){return this.setAttribute(e,t),this})},n.propDidSet=function(t,e,n,r){let i=e.watch;i instanceof Function?i.call(t,n,r,e):("string"==typeof i||i instanceof String)&&t[i]&&t[i](n,r,e)},n.listen=function(t,e,n,r){var i,o,s;return(s=(o=(i=t.__listeners__||(t.__listeners__={}))[e]||(i[e]={})).tail||(o.tail=o.next={})).listener=n,s.path=r,o.tail=s.next={},s},n.once=function(t,e,r){var i=n.listen(t,e,r);return i.times=1,i},n.unlisten=function(t,e,n,r){var i,o,s=t.__listeners__;if(s&&(i=s[e]))for(;(o=i)&&(i=i.next);)if(i==n||i.listener==n){o.next=i.next,i.listener=null;break}},n.emit=function(t,e,n){var r;(r=t.__listeners__)&&(r[e]&&o(0,n,r[e]),r.all&&o(0,[e,n],r.all))},n.observeProperty=function(t,e,r,i,o){return o&&"object"==typeof o&&n.unlisten(o,"all",t,r),i&&"object"==typeof i&&n.listen(i,"all",t,r),this},t.exports=n},function(t,e,n){var r=n(0);r.Pointer=function(){return this._button=-1,this._event={x:0,y:0,type:"uninitialized"},this},r.Pointer.prototype.button=function(){return this._button},r.Pointer.prototype.touch=function(){return this._touch},r.Pointer.prototype.update=function(t){return this._event=t,this._dirty=!0,this},r.Pointer.prototype.process=function(){var t=this._event;if(this._dirty)if(this._prevEvent=t,this._dirty=!1,"mousedown"==t.type){if(this._button=t.button,this._touch&&0!=this._button)return;this._touch&&this._touch.cancel(),this._touch=new r.Touch(t,this),this._touch.mousedown(t,t)}else"mousemove"==t.type?this._touch&&this._touch.mousemove(t,t):"mouseup"==t.type&&(this._button=-1,this._touch&&this._touch.button()==t.button&&(this._touch.mouseup(t,t),this._touch=null));else this._touch&&this._touch.idle();return this},r.Pointer.prototype.x=function(){return this._event.x},r.Pointer.prototype.y=function(){return this._event.y}},function(t,e,n){var r=n(3),i=r.createTagList,o=r.createElement,s=[{name:"[email protected]",path:"imba/index.html",color:"#709CB2",libSize:"16kb"},{name:"[email protected]",path:"react/index.html",color:"rgb(15, 203, 255)",libSize:"36kb"},{name:"[email protected]",path:"vue/index.html",color:"#4fc08d",libSize:"32kb"}];for(let t,e=0,n=s.length;e<n;e++)t=s[e],window[t.name.toUpperCase().split("@").shift()]=t;var u=r.defineTag("AppFrame","iframe",function(t){t.prototype.setup=function(){var t=this;return t.dom().onload=function(){return t.data().api=t.dom().contentWindow.API,t.data().ready=!0}}}),a={count:6,current:null,fastest:null,ins:1,rem:1,reset:function(){let t=[];for(let e=0,n=s.length;e<n;e++)t.push(s[e].api.reset(a.count,a));return t},step:function(t){for(let e,n=0,r=s.length;n<r;n++){e=s[n];let r=0;for(;r++<t;)e.api.step()}},run:function(){a.fastest=null;var t=a.bench=new Benchmark.Suite("benchmark");for(let e,n=0,r=s.length;n<r;n++)(e=s[n]).api.reset(a.count,a),t.add(e.name,e.api.step),e.bm=t[n];var e=0;return a.current=s[e],t.on("cycle",function(t){return a.current=s[++e],r.commit()}),t.on("complete",function(){return a.fastest=t.filter("fastest")[0],a.bench=null,r.commit()}),t.run({async:!0,queued:!1})}},h=r.defineTag("Stepper","button",function(t){t.prototype.ontouchstart=function(t){for(let t=0,e=s.length;t<e;t++)s[t].api.startObserver();return this._interval=setInterval(function(){return a.step(1)},1e3/60),a.step(1)},t.prototype.ontouchend=function(t){clearInterval(this._interval);for(let t=0,e=s.length;t<e;t++)s[t].api.stopObserver();return r.commit()},t.prototype.ontouchcancel=function(t){return this.ontouchend(t)}}),c=r.defineTag("App",function(t){t.prototype.run=function(){a.fastest=null;var t=a.bench=new Benchmark.Suite("benchmark"),e=[];for(let n,r=0,i=s.length;r<i;r++)(n=s[r]).api.reset(a.count,a),n.api.checkImplementation()?(t.add(n.name,n.api.step),e.push(n),n.bm=t[r]):console.warn(n.name,"not reconciling synchronously");var n=0;return a.current=e[n],t.on("cycle",function(t){return a.current=e[++n],r.commit()}),t.on("complete",function(){return a.fastest=t.filter("fastest")[0],a.bench=null,r.commit()}),t.run({async:!0,queued:!1}),this},t.prototype.profile=function(t){void 0===t&&(t=1e5);for(let e=0,n=s.length;e<n;e++)s[e].api.profile(t);return this},t.prototype.step=function(t){for(let t=0,e=s.length;t<e;t++)s[t].api.step();return this},t.prototype.reset=function(){for(let t=0,e=s.length;t<e;t++)s[t].api.reset(a.count,a);return this}});r.mount(APP=(t0=(t0=o(c)).flag("root")).setData(a).setTemplate(function(){var t=this.$,e=this;return r.static([(t[0]||o("header",t,0,void 0).setId("header").setContent([o("input",t,1,0).setType("number"),o("span",t,2,0).flag("flex").setText("todos"),o("button",t,3,0).on$(0,["tap","reset"],e).setText("reset"),o(h,t,4,0).setText("step"),o("button",t,5,0).flag("primary").on$(0,["tap","run"],e).setText("Run benchmark")],2)).end((t[1].bindData(a,"count").end(),t[4].end(),t[5].setDisabled(a.bench).end(),!0)),(t[6]||o("section",t,6,void 0).flag("apps")).setContent(function(t){var n;for(let i,a=0,h=t.taglen=s.length;a<h;a++)i=s[a],(n=t[a]||(n=o("div",t,a)).flag("app").setContent([o("header",n.$,"A",n),o(u,n.$,"B",n).css("minHeight","340px"),o("footer",n.$,"C",n)],2)).setData(i).css("color",i.color).end((n.$.A.setContent(String(i.bm||i.name),3),n.$.B.setData(i).setSrc("apps/"+i.path).setName(i.name).end(),n.$.C.setContent([i.api&&i.api.mutations?(n.$.D||o("div",n.$,"D","C").flag("muts").setContent([o("span",n.$,"E","D").flag("value"),o("i",n.$,"F","D").setText("muts")],2)).end((n.$.E.setContent(i.api.mutations,3),!0)):void 0,i.bm&&e.data().fastest?r.static([(n.$.G||o("div",n.$,"G","C").flag("ops").setContent([o("span",n.$,"H","G").flag("value"),o("i",n.$,"I","G").setText("ops/sec")],2)).end((n.$.H.setContent(Math.round(i.bm.hz),3),!0)),i.bm==e.data().fastest?n.$.J||o("div",n.$,"J","C").flag("small").flag("compare").setContent(n.$.K||o("span",n.$,"K","J").setText("baseline"),2):i.bm.hz<e.data().fastest.hz?(n.$.L||o("div",n.$,"L","C").flag("small").flag("compare").flag("slower").setContent([o("span",n.$,"M","L").flag("x").flag("s"),o("i",n.$,"N","L").setText("slower")],2)).end((n.$.M.setContent((e.data().fastest.hz/i.bm.hz).toFixed(2)+"x",3),!0)):void 0],1,1):void 0,(n.$.O||o("div",n.$,"O","C").flag("small").flag("size").setContent([o("i",n.$,"P","O").setText("size (gzipped)"),o("span",n.$,"Q","O").flag("value")],2)).end((n.$.Q.setContent(i.libSize,3),!0))],1),!0));return t}(t[7]||i(t,7,t[6])),4)],2,1)}).end())},function(t,e,n){t.exports=n(4)},function(t,e,n){var r=n(0),i=!1;"undefined"!=typeof window&&(window.Imba?(console.warn("Imba v"+window.Imba.VERSION+" is already loaded."),r=window.Imba):(window.Imba=r,i=!0,window.define&&window.define.amd&&window.define("imba",[],function(){return r}))),t.exports=r,n(5),n(6),i&&r.EventManager.activate()},function(t,e,n){var r,i,o=n(0);function s(){var t=this;t._queue=[],t._stage=-1,t._scheduled=!1,t._ticker=function(e){return t._scheduled=!1,t.tick(e)}}i=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitRequestAnimationFrame,(r=window.requestAnimationFrame)||(r=window.webkitRequestAnimationFrame),r||(r=window.mozRequestAnimationFrame),r||(r=function(t){return setTimeout(t,1e3/60)}),s.prototype.stage=function(t){return this._stage},s.prototype.setStage=function(t){return this._stage=t,this},s.prototype.queue=function(t){return this._queue},s.prototype.setQueue=function(t){return this._queue=t,this},s.prototype.add=function(t,e){if((e||-1==this._queue.indexOf(t))&&this._queue.push(t),!this._scheduled)return this.schedule()},s.prototype.tick=function(t){var e,n=this._queue;if(this._ts||(this._ts=t),this._dt=t-this._ts,this._ts=t,this._queue=[],this._stage=1,this.before(),n.length)for(let t,r=0,i=(e=n)?e.toArray?e.toArray():e:[],o=i.length;r<o;r++)(t=i[r])instanceof Function?t(this._dt,this):t.tick&&t.tick(this._dt,this);return this._stage=2,this.after(),this._stage=this._scheduled?0:-1,this},s.prototype.schedule=function(){return this._scheduled||(this._scheduled=!0,-1==this._stage&&(this._stage=0),r(this._ticker)),this},s.prototype.before=function(){return this},s.prototype.after=function(){return o.TagManager&&o.TagManager.refresh(),this},o.TICKER=new s,o.SCHEDULERS=[],o.ticker=function(){return o.TICKER},o.requestAnimationFrame=function(t){return r(t)},o.cancelAnimationFrame=function(t){return i(t)};var u=0;o.commit=function(t){u++,o.emit(o,"commit",null!=t?[t]:void 0),0==--u&&o.TagManager&&o.TagManager.refresh()},o.Scheduler=function(t){var e=this;e._id=a++,e._target=t,e._marked=!1,e._active=!1,e._marker=function(){return e.mark()},e._ticker=function(t){return e.tick(t)},e._dt=0,e._frame={},e._scheduled=!1,e._timestamp=0,e._ticks=0,e._flushes=0,e.onevent=e.onevent.bind(e)};var a=0;o.Scheduler.event=function(t){return o.emit(o,"event",t)},o.Scheduler.prototype.__raf={watch:"rafDidSet",name:"raf"},o.Scheduler.prototype.raf=function(t){return this._raf},o.Scheduler.prototype.setRaf=function(t){var e=this.raf();return t!=e&&(this._raf=t),t!=e&&this.rafDidSet&&this.rafDidSet(t,e,this.__raf),this},o.Scheduler.prototype.__interval={watch:"intervalDidSet",name:"interval"},o.Scheduler.prototype.interval=function(t){return this._interval},o.Scheduler.prototype.setInterval=function(t){var e=this.interval();return t!=e&&(this._interval=t),t!=e&&this.intervalDidSet&&this.intervalDidSet(t,e,this.__interval),this},o.Scheduler.prototype.__events={watch:"eventsDidSet",name:"events"},o.Scheduler.prototype.events=function(t){return this._events},o.Scheduler.prototype.setEvents=function(t){var e=this.events();return t!=e&&(this._events=t),t!=e&&this.eventsDidSet&&this.eventsDidSet(t,e,this.__events),this},o.Scheduler.prototype.marked=function(t){return this._marked},o.Scheduler.prototype.setMarked=function(t){return this._marked=t,this},o.Scheduler.prototype.rafDidSet=function(t){return t&&this._active&&this.requestTick(),this},o.Scheduler.prototype.intervalDidSet=function(t){return clearInterval(this._intervalId),this._intervalId=null,t&&this._active&&(this._intervalId=setInterval(this.oninterval.bind(this),t)),this},o.Scheduler.prototype.eventsDidSet=function(t,e){return this._active&&t&&!e?o.listen(o,"commit",this,"onevent"):!t&&e?o.unlisten(o,"commit",this,"onevent"):void 0},o.Scheduler.prototype.active=function(){return this._active},o.Scheduler.prototype.dt=function(){return this._dt},o.Scheduler.prototype.configure=function(t){return void 0===t&&(t={}),null!=t.raf&&this.setRaf(t.raf),null!=t.interval&&this.setInterval(t.interval),null!=t.events&&this.setEvents(t.events),this},o.Scheduler.prototype.mark=function(){return this._marked=!0,this._scheduled||this.requestTick(),this},o.Scheduler.prototype.flush=function(){return this._flushes++,this._target.tick(this),this._marked=!1,this},o.Scheduler.prototype.tick=function(t,e){return this._ticks++,this._dt=t,e&&(this._scheduled=!1),this.flush(),this._raf&&this._active&&this.requestTick(),this},o.Scheduler.prototype.requestTick=function(){return this._scheduled||(this._scheduled=!0,o.TICKER.add(this)),this},o.Scheduler.prototype.activate=function(t){return void 0===t&&(t=!0),this._active||(this._active=!0,this._commit=this._target.commit,this._target.commit=function(){return this},this._target&&this._target.flag&&this._target.flag("scheduled_"),o.SCHEDULERS.push(this),this._events&&o.listen(o,"commit",this,"onevent"),this._interval&&!this._intervalId&&(this._intervalId=setInterval(this.oninterval.bind(this),this._interval)),t?this.tick(0):this._raf&&this.requestTick()),this},o.Scheduler.prototype.deactivate=function(){if(this._active){this._active=!1,this._target.commit=this._commit;let t=o.SCHEDULERS.indexOf(this);t>=0&&o.SCHEDULERS.splice(t,1),this._events&&o.unlisten(o,"commit",this,"onevent"),this._intervalId&&(clearInterval(this._intervalId),this._intervalId=null),this._target&&this._target.unflag&&this._target.unflag("scheduled_")}return this},o.Scheduler.prototype.track=function(){return this._marker},o.Scheduler.prototype.oninterval=function(){return this.tick(),o.TagManager.refresh(),this},o.Scheduler.prototype.onevent=function(t){return!this._events||this._marked?this:(this._events instanceof Function?this._events(t,this)&&this.mark():this._events instanceof Array?this._events.indexOf(t&&t.type||t)>=0&&this.mark():this.mark(),this)}},function(t,e,n){var r=n(0);n(7),n(8),r.TagManager=new r.TagManagerClass,n(9),n(10),n(1),n(11),n(12),n(13)},function(t,e,n){function r(t){return t?t.toArray?t.toArray():t:[]}var i=n(0);i.TagManagerClass=function(){this._inserts=0,this._removes=0,this._mounted=[],this._hasMountables=!1},i.TagManagerClass.prototype.mounted=function(){return this._mounted},i.TagManagerClass.prototype.insert=function(t,e){this._inserts++,t&&t.mount&&(this._hasMountables=!0)},i.TagManagerClass.prototype.remove=function(t,e){return this._removes++},i.TagManagerClass.prototype.changes=function(){return this._inserts+this._removes},i.TagManagerClass.prototype.mount=function(t){return this._hasMountables=!0},i.TagManagerClass.prototype.refresh=function(t){if(void 0===t&&(t=!1),t||0!=this.changes())return(this._inserts&&this._hasMountables||t)&&this.tryMount(),(this._removes||t)&&this._mounted.length&&this.tryUnmount(),this._inserts=0,this._removes=0,this},i.TagManagerClass.prototype.unmount=function(t){return this},i.TagManagerClass.prototype.tryMount=function(){for(let t,e=0,n=r(document.body.querySelectorAll(".__mount")),i=n.length;e<i;e++)(t=n[e])&&t._tag&&-1==this._mounted.indexOf(t._tag)&&this.mountNode(t._tag);return this},i.TagManagerClass.prototype.mountNode=function(t){this._mounted.push(t),t.FLAGS|=i.TAG_MOUNTED,t.mount&&t.mount()},i.TagManagerClass.prototype.tryUnmount=function(){var t=0;document.body;for(let e,n=0,o=r(this._mounted),s=o.length;n<s;n++)e=o[n],document.documentElement.contains(e._dom)||(e.FLAGS=e.FLAGS&~i.TAG_MOUNTED,e.unmount&&e._dom?e.unmount():e._scheduler&&e.unschedule(),this._mounted[n]=null,t++);return t&&(this._mounted=this._mounted.filter(function(t){return t})),this}},function(t,e,n){function r(t){return t?t.toArray?t.toArray():t:[]}var i=n(0);n(1);var o=["keydown","keyup","keypress","textInput","input","change","submit","focusin","focusout","focus","blur","contextmenu","selectstart","dblclick","mousewheel","wheel","scroll","beforecopy","copy","beforepaste","paste","beforecut","cut","dragstart","drag","dragend","dragenter","dragover","dragleave","dragexit","drop","mouseup","mousedown","mouseenter","mouseleave","mouseout","mouseover","mousemove"];i.EventManager=function(t,e){var n=this;e&&e.constructor===Object||(e={});var i=void 0!==e.events?e.events:[];n._shimFocusEvents=window.netscape&&void 0===t.onfocusin,n.setRoot(t),n.setListeners([]),n.setDelegators({}),n.setDelegator(function(t){return n.delegate(t),!0});for(let t=0,e=r(i),o=e.length;t<o;t++)n.register(e[t]);return n},i.EventManager.prototype.root=function(t){return this._root},i.EventManager.prototype.setRoot=function(t){return this._root=t,this},i.EventManager.prototype.count=function(t){return this._count},i.EventManager.prototype.setCount=function(t){return this._count=t,this},i.EventManager.prototype.__enabled={default:!1,watch:"enabledDidSet",name:"enabled"},i.EventManager.prototype.enabled=function(t){return this._enabled},i.EventManager.prototype.setEnabled=function(t){var e=this.enabled();return t!=e&&(this._enabled=t),t!=e&&this.enabledDidSet&&this.enabledDidSet(t,e,this.__enabled),this},i.EventManager.prototype._enabled=!1,i.EventManager.prototype.listeners=function(t){return this._listeners},i.EventManager.prototype.setListeners=function(t){return this._listeners=t,this},i.EventManager.prototype.delegators=function(t){return this._delegators},i.EventManager.prototype.setDelegators=function(t){return this._delegators=t,this},i.EventManager.prototype.delegator=function(t){return this._delegator},i.EventManager.prototype.setDelegator=function(t){return this._delegator=t,this};var s=[];i.EventManager.prototype.enabledDidSet=function(t){return t?this.onenable():this.ondisable(),this},i.EventManager.bind=function(t){return i.Events?i.Events.autoregister(t):-1==s.indexOf(t)&&o.indexOf(t)>=0?s.push(t):void 0},i.EventManager.activate=function(){return i.Events?i.Events:(i.POINTER||(i.POINTER=new i.Pointer),i.Events=new i.EventManager(i.document(),{events:[]}),window&&void 0!==window.ontouchstart&&(i.Events.listen("touchstart",function(t){return i.Touch.ontouchstart(t)}),i.Events.listen("touchmove",function(t){return i.Touch.ontouchmove(t)}),i.Events.listen("touchend",function(t){return i.Touch.ontouchend(t)}),i.Events.listen("touchcancel",function(t){return i.Touch.ontouchcancel(t)})),i.Events.register("click",function(t){if(t.timeStamp-i.Touch.LastTimestamp>i.Touch.TapTimeout){t._imbaSimulatedTap=!0;var e=new i.Event(t);if(e.setType("tap"),e.process(),e._responder)return t.preventDefault()}return i.Events.delegate(t)}),i.Events.listen("mousedown",function(t){if(t.timeStamp-i.Touch.LastTimestamp>i.Touch.TapTimeout&&i.POINTER)return i.POINTER.update(t).process()}),i.Events.listen("mouseup",function(t){if(t.timeStamp-i.Touch.LastTimestamp>i.Touch.TapTimeout&&i.POINTER)return i.POINTER.update(t).process()}),i.Events.register(["mousedown","mouseup"]),i.Events.register(s),i.Events.setEnabled(!0),i.Events)},i.EventManager.prototype.register=function(t,e){if(void 0===e&&(e=!0),t instanceof Array){for(let n=0,i=r(t),o=i.length;n<o;n++)this.register(i[n],e);return this}if(this.delegators()[t])return this;var n=this.delegators()[t]=e instanceof Function?e:this.delegator();return this.enabled()?this.root().addEventListener(t,n,!0):void 0},i.EventManager.prototype.autoregister=function(t){return-1==o.indexOf(t)?this:this.register(t)},i.EventManager.prototype.listen=function(t,e,n){return void 0===n&&(n=!0),this.listeners().push([t,e,n]),this.enabled()&&this.root().addEventListener(t,e,n),this},i.EventManager.prototype.delegate=function(t){return i.Event.wrap(t).process(),this._shimFocusEvents&&("focus"==t.type?i.Event.wrap(t).setType("focusin").process():"blur"==t.type&&i.Event.wrap(t).setType("focusout").process()),this},i.EventManager.prototype.create=function(t,e,n){n&&n.constructor===Object||(n={});var r=void 0!==n.data?n.data:null,o=void 0!==n.source?n.source:null,s=i.Event.wrap({type:t,target:e});return r&&s.setData(r),o&&s.setSource(o),s},i.EventManager.prototype.trigger=function(){return this.create.apply(this,arguments).process()},i.EventManager.prototype.onenable=function(){for(let t,e,n=this.delegators(),r=0,i=Object.keys(n),o=i.length;r<o;r++)t=n[e=i[r]],this.root().addEventListener(e,t,!0);for(let t,e=0,n=r(this.listeners()),i=n.length;e<i;e++)t=n[e],this.root().addEventListener(t[0],t[1],t[2]);return window.addEventListener("hashchange",i.commit),window.addEventListener("popstate",i.commit),this},i.EventManager.prototype.ondisable=function(){for(let t,e,n=this.delegators(),r=0,i=Object.keys(n),o=i.length;r<o;r++)t=n[e=i[r]],this.root().removeEventListener(e,t,!0);for(let t,e=0,n=r(this.listeners()),i=n.length;e<i;e++)t=n[e],this.root().removeEventListener(t[0],t[1],t[2]);return window.removeEventListener("hashchange",i.commit),window.removeEventListener("popstate",i.commit),this}},function(t,e,n){function r(t){return t?t.toArray?t.toArray():t:[]}var i=n(0);function o(t){this._tag=t}function s(t,e,n){this.cache$=t,this.key$=e,this.par$=n,this.i$=0}i.CSSKeyMap={},i.TAG_BUILT=1,i.TAG_SETUP=2,i.TAG_MOUNTING=4,i.TAG_MOUNTED=8,i.TAG_SCHEDULED=16,i.TAG_AWAKENED=32,i.document=function(){return window.document},i.root=function(){return i.getTagForDom(i.document().body)},i.static=function(t,e,n){return t._type=e,t.static=n,t},i.mount=function(t,e){return e||(e=i.document().body),e.appendChild(t.dom()),i.TagManager.insert(t,e),t.scheduler().configure({events:!0}).activate(!1),i.TagManager.refresh(),t},i.createTextNode=function(t){return t&&3==t.nodeType?t:i.document().createTextNode(t)},i.Tag=function(t,e){this.setDom(t),this.$=o.build(this),this.$up=this._owner_=e,this._tree_=null,this.FLAGS=0,this.build()},i.Tag.buildNode=function(){var t=i.document().createElement(this._nodeType||"div");if(this._classes){var e=this._classes.join(" ");e&&(t.className=e)}return t},i.Tag.createNode=function(){return(this._protoDom||(this._protoDom=this.buildNode())).cloneNode(!1)},i.Tag.build=function(t){return new this(this.createNode(),t)},i.Tag.dom=function(){return this._protoDom||(this._protoDom=this.buildNode())},i.Tag.end=function(){return this.commit(0)},i.Tag.inherit=function(t){return t._protoDom=null,this._nodeType?(t._nodeType=this._nodeType,t._classes=this._classes.slice(),t._flagName?t._classes.push(t._flagName):void 0):(t._nodeType=t._name,t._flagName=null,t._classes=[])},i.Tag.prototype.optimizeTagStructure=function(){var t=this.constructor;let e=Object.keys(this);e.indexOf("mount")>=0&&(t._classes&&-1==t._classes.indexOf("__mount")&&t._classes.push("__mount"),t._protoDom&&t._protoDom.classList.add("__mount"));for(let t,n=0,o=r(e),s=o.length;n<s;n++)t=o[n],/^on/.test(t)&&i.EventManager.bind(t.slice(2));return this},i.attr(i.Tag,"name"),i.attr(i.Tag,"role"),i.attr(i.Tag,"tabindex"),i.Tag.prototype.title=function(t){return this.getAttribute("title")},i.Tag.prototype.setTitle=function(t){return this.setAttribute("title",t),this},i.Tag.prototype.dom=function(){return this._dom},i.Tag.prototype.setDom=function(t){return t._tag=this,this._dom=this._slot_=t,this},i.Tag.prototype.ref=function(){return this._ref},i.Tag.prototype.root=function(){return this._owner_?this._owner_.root():this},i.Tag.prototype.ref_=function(t){return this.flag(this._ref=t),this},i.Tag.prototype.setData=function(t){return this._data=t,this},i.Tag.prototype.data=function(){return this._data},i.Tag.prototype.bindData=function(t,e,n){return this.setData(n?t[e].apply(t,n):t[e])},i.Tag.prototype.setHtml=function(t){return this.html()!=t&&(this._dom.innerHTML=t),this},i.Tag.prototype.html=function(){return this._dom.innerHTML},i.Tag.prototype.on$=function(t,e,n){let r=this._on_||(this._on_=[]),o=r[t];return t<0&&(t=null==o?r[t]=r.length:o,o=r[t]),r[t]=e,o?e.state=o.state:(e.state={context:n},i.EventManager.bind(e[0])),this},i.Tag.prototype.setId=function(t){return null!=t&&(this.dom().id=t),this},i.Tag.prototype.id=function(){return this.dom().id},i.Tag.prototype.setAttribute=function(t,e){return this.dom().getAttribute(t)==e||(null!=e&&!1!==e?this.dom().setAttribute(t,e):this.dom().removeAttribute(t)),this},i.Tag.prototype.setNestedAttr=function(t,e,n){return this[t+"SetAttribute"]?this[t+"SetAttribute"](e,n):this.setAttributeNS(t,e,n),this},i.Tag.prototype.setAttributeNS=function(t,e,n){return this.getAttributeNS(t,e)!=n&&(null!=n&&!1!==n?this.dom().setAttributeNS(t,e,n):this.dom().removeAttributeNS(t,e)),this},i.Tag.prototype.removeAttribute=function(t){return this.dom().removeAttribute(t)},i.Tag.prototype.getAttribute=function(t){return this.dom().getAttribute(t)},i.Tag.prototype.getAttributeNS=function(t,e){return this.dom().getAttributeNS(t,e)},i.Tag.prototype.set=function(t,e,n){let r=i.toSetter(t);return this[r]instanceof Function?this[r](e,n):this._dom.setAttribute(t,e),this},i.Tag.prototype.get=function(t){return this._dom.getAttribute(t)},i.Tag.prototype.setContent=function(t,e){return this.setChildren(t,e),this},i.Tag.prototype.setChildren=function(t,e){return this._tree_=t,this},i.Tag.prototype.setTemplate=function(t){return this._template||this.render==i.Tag.prototype.render&&(this.render=this.renderTemplate),this.template=this._template=t,this},i.Tag.prototype.template=function(){return null},i.Tag.prototype.renderTemplate=function(){var t=this.template();return t!=this&&this.setChildren(t),this},i.Tag.prototype.removeChild=function(t){var e=this.dom(),n=t._slot_||t;return n&&n.parentNode==e&&(e.removeChild(n),i.TagManager.remove(n._tag||n,this)),this},i.Tag.prototype.removeAllChildren=function(){if(this._dom.firstChild){for(;this._dom.firstChild;)this._dom.removeChild(this._dom.firstChild);i.TagManager.remove(null,this)}return this._tree_=this._text_=null,this},i.Tag.prototype.appendChild=function(t){return"string"==typeof t||t instanceof String?this.dom().appendChild(i.document().createTextNode(t)):t&&(this.dom().appendChild(t._slot_||t),i.TagManager.insert(t._tag||t,this)),this},i.Tag.prototype.insertBefore=function(t,e){return("string"==typeof t||t instanceof String)&&(t=i.document().createTextNode(t)),t&&e&&(this.dom().insertBefore(t._slot_||t,e._slot_||e),i.TagManager.insert(t._tag||t,this)),this},i.Tag.prototype.detachFromParent=function(){return this._slot_==this._dom&&(this._slot_=this._dom._placeholder_||(this._dom._placeholder_=i.document().createComment("node")),this._slot_._tag||(this._slot_._tag=this),this._dom.parentNode&&(i.TagManager.remove(this),this._dom.parentNode.replaceChild(this._slot_,this._dom))),this},i.Tag.prototype.attachToParent=function(){if(this._slot_!=this._dom){let t=this._slot_;this._slot_=this._dom,t&&t.parentNode&&(i.TagManager.insert(this),t.parentNode.replaceChild(this._dom,t))}return this},i.Tag.prototype.orphanize=function(){var t;return(t=this.parent())&&t.removeChild(this),this},i.Tag.prototype.text=function(t){return this._dom.textContent},i.Tag.prototype.setText=function(t){return this._tree_=t,this._dom.textContent=null==t||!1===this.text()?"":t,this},i.Tag.prototype.dataset=function(t,e){if(t instanceof Object){for(let e,n,r=0,i=Object.keys(t),o=i.length;r<o;r++)e=t[n=i[r]],this.dataset(n,e);return this}if(2==arguments.length)return this.setAttribute("data-"+t,e),this;if(t)return this.getAttribute("data-"+t);var n=this.dom().dataset;if(!n){n={};for(let t,e=0,o=r(this.dom().attributes),s=o.length;e<s;e++)"data-"==(t=o[e]).name.substr(0,5)&&(n[i.toCamelCase(t.name.slice(5))]=t.value)}return n},i.Tag.prototype.render=function(){return this},i.Tag.prototype.build=function(){return this},i.Tag.prototype.setup=function(){return this},i.Tag.prototype.commit=function(){return!1!==this.beforeRender()&&this.render(),this},i.Tag.prototype.beforeRender=function(){return this},i.Tag.prototype.tick=function(){return!1!==this.beforeRender()&&this.render(),this},i.Tag.prototype.end=function(){return this.setup(),this.commit(0),this.end=i.Tag.end,this},i.Tag.prototype.$open=function(t){return t!=this._context_&&(this._tree_=null,this._context_=t),this},i.Tag.prototype.synced=function(){return this},i.Tag.prototype.awaken=function(){return this},i.Tag.prototype.flags=function(){return this._dom.classList},i.Tag.prototype.flag=function(t,e){return 2==arguments.length?this._dom.classList.contains(t)!=!!e&&this._dom.classList.toggle(t):this._dom.classList.contains(t)||this._dom.classList.add(t),this},i.Tag.prototype.unflag=function(t){return this._dom.classList.remove(t),this},i.Tag.prototype.toggleFlag=function(t){return this._dom.classList.toggle(t),this},i.Tag.prototype.hasFlag=function(t){return this._dom.classList.contains(t)},i.Tag.prototype.flagIf=function(t,e){var n=this._flags_||(this._flags_={});let r=n[t];return e&&!r?(this._dom.classList.add(t),n[t]=!0):r&&!e&&(this._dom.classList.remove(t),n[t]=!1),this},i.Tag.prototype.setFlag=function(t,e){let n=this._namedFlags_||(this._namedFlags_={}),r=n[t];return r!=e&&(r&&this.unflag(r),e&&this.flag(e),n[t]=e),this},i.Tag.prototype.scheduler=function(){return null==this._scheduler?this._scheduler=new i.Scheduler(this):this._scheduler},i.Tag.prototype.schedule=function(t){return void 0===t&&(t={events:!0}),this.scheduler().configure(t).activate(),this},i.Tag.prototype.unschedule=function(){return this._scheduler&&this.scheduler().deactivate(),this},i.Tag.prototype.parent=function(){return i.getTagForDom(this.dom().parentNode)},i.Tag.prototype.children=function(t){let e=[];for(let t,n=0,o=r(this._dom.children),s=o.length;n<s;n++)t=o[n],e.push(t._tag||i.getTagForDom(t));return e},i.Tag.prototype.querySelector=function(t){return i.getTagForDom(this._dom.querySelector(t))},i.Tag.prototype.querySelectorAll=function(t){var e=[];for(let n=0,o=r(this._dom.querySelectorAll(t)),s=o.length;n<s;n++)e.push(i.getTagForDom(o[n]));return e},i.Tag.prototype.matches=function(t){var e;return t instanceof Function?t(this):(t.query instanceof Function&&(t=t.query()),(e=this._dom.matches||this._dom.matchesSelector||this._dom.webkitMatchesSelector||this._dom.msMatchesSelector||this._dom.mozMatchesSelector)?e.call(this._dom,t):void 0)},i.Tag.prototype.closest=function(t){return i.getTagForDom(this._dom.closest(t))},i.Tag.prototype.contains=function(t){return this.dom().contains(t._dom||t)},i.Tag.prototype.log=function(){for(var t=arguments,e=t.length,n=new Array(e>0?e:0);e>0;)n[e-1]=t[--e];return n.unshift(console),Function.prototype.call.apply(console.log,n),this},i.Tag.prototype.css=function(t,e){if(t instanceof Object){for(let e,n,r=0,i=Object.keys(t),o=i.length;r<o;r++)e=t[n=i[r]],this.css(n,e);return this}var n=i.CSSKeyMap[t]||t;if(null==e)this.dom().style.removeProperty(n);else{if(null==e&&1==arguments.length)return this.dom().style[n];("number"==typeof e||e instanceof Number)&&n.match(/width|height|left|right|top|bottom/)?this.dom().style[n]=e+"px":this.dom().style[n]=e}return this},i.Tag.prototype.setStyle=function(t){return this.setAttribute("style",t)},i.Tag.prototype.style=function(){return this.getAttribute("style")},i.Tag.prototype.trigger=function(t,e){return void 0===e&&(e={}),i.Events.trigger(t,this,{data:e})},i.Tag.prototype.focus=function(){return this.dom().focus(),this},i.Tag.prototype.blur=function(){return this.dom().blur(),this},i.Tag.prototype.toString=function(){return this.dom().outerHTML},i.Tag.prototype.initialize=i.Tag,i.SVGTag=function(){return i.Tag.apply(this,arguments)},i.subclass(i.SVGTag,i.Tag),i.SVGTag.namespaceURI=function(){return"http://www.w3.org/2000/svg"},i.SVGTag.buildNode=function(){var t=i.document().createElementNS(this.namespaceURI(),this._nodeType);if(this._classes){var e=this._classes.join(" ");e&&(t.className.baseVal=e)}return t},i.SVGTag.inherit=function(t){if(t._protoDom=null,i.indexOf(t._name,i.SVG_TAGS)>=0||this==i.SVGTag)return t._nodeType=t._name,t._classes=[];t._nodeType=this._nodeType;var e="_"+t._name.replace(/_/g,"-");return t._classes=(this._classes||[]).concat(e)},i.HTML_TAGS="a abbr address area article aside audio b base bdi bdo big blockquote body br button canvas caption cite code col colgroup data datalist dd del details dfn div dl dt em embed fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 head header hr html i iframe img input ins kbd keygen label legend li link main map mark menu menuitem meta meter nav noscript object ol optgroup option output p param pre progress q rp rt ruby s samp script section select small source span strong style sub summary sup table tbody td textarea tfoot th thead time title tr track u ul var video wbr".split(" "),i.HTML_TAGS_UNSAFE="article aside header section".split(" "),i.SVG_TAGS="circle defs ellipse g line linearGradient mask path pattern polygon polyline radialGradient rect stop svg text tspan image".split(" "),i.HTML_ATTRS={a:"href target hreflang media download rel type",form:"method action enctype autocomplete target",button:"autofocus type",input:"accept disabled form list max maxlength min pattern required size step type",label:"accesskey for form",img:"src srcset",link:"rel type href media",iframe:"referrerpolicy src srcdoc sandbox",meta:"property content charset desc",optgroup:"label",option:"label",output:"for form",object:"type data width height",param:"name value",progress:"max",script:"src type async defer crossorigin integrity nonce language",select:"size form multiple",textarea:"rows cols"},i.HTML_PROPS={input:"autofocus autocomplete autocorrect value placeholder required disabled multiple checked readOnly",textarea:"autofocus autocomplete autocorrect value placeholder required disabled multiple checked readOnly",form:"novalidate",fieldset:"disabled",button:"disabled",select:"autofocus disabled required",option:"disabled selected value",optgroup:"disabled",progress:"value",fieldset:"disabled",canvas:"width height"},i.Tags=function(){},i.Tags.prototype.__clone=function(t){var e=Object.create(this);return e._parent=this,e},i.Tags.prototype.ns=function(t){return this["_"+t.toUpperCase()]||this.defineNamespace(t)},i.Tags.prototype.defineNamespace=function(t){var e=Object.create(this);return e._parent=this,e._ns=t,this["_"+t.toUpperCase()]=e,e},i.Tags.prototype.baseType=function(t,e){return i.indexOf(t,i.HTML_TAGS)>=0?"element":"div"},i.Tags.prototype.defineTag=function(t,e,n){var r;null==n&&"function"==typeof e&&(n=e,e=""),null==e&&(e=""),n&&n._nodeType&&(e=n,n=null),this[t]&&console.log("tag already exists?",t);var o=t;let s=o.indexOf(":");s>=0&&(r=t.substr(0,s),o=t.substr(s+1),"svg"!=r||e||(e="svg:element")),e||(e=this.baseType(t));let u="string"==typeof e||e instanceof String?this.findTagType(e):e,a=function(t,e){return this.initialize(t,e),this};return a._name=o,a._flagName=null,"#"==o[0]?(i.SINGLETONS[o.slice(1)]=a,this[o]=a):o[0]==o[0].toUpperCase()?a._flagName=o:(a._flagName="_"+t.replace(/[_\:]/g,"-"),this[t]=a),function(t,e){for(let n,r,i=0,o=Object.keys(e),s=o.length;i<s;i++)n=e[r=o[i]],null==t[r]?t[r]=n:t[r];t.prototype=Object.create(e.prototype),t.__super__=t.prototype.__super__=e.prototype,t.prototype.constructor=t,e.inherit&&e.inherit(t)}(a,u),n&&(n.call(a,a,a.TAGS||this),a.defined&&a.defined(),this.optimizeTag(a)),a},i.Tags.prototype.defineSingleton=function(t,e,n){return this.defineTag(t,e,n)},i.Tags.prototype.extendTag=function(t,e,n){null==n&&"function"==typeof e&&(n=e,e=""),null==e&&(e="");var r="string"==typeof t||t instanceof String?this.findTagType(t):t;return n&&n&&n.call(r,r,r.prototype),r.extended&&r.extended(),this.optimizeTag(r),r},i.Tags.prototype.optimizeTag=function(t){var e;return(e=t.prototype)&&e.optimizeTagStructure&&e.optimizeTagStructure()},i.Tags.prototype.findTagType=function(t){var e,n;let o=this[t];if(!o)if("svg:"==t.substr(0,4))o=this.defineTag(t,"svg:element");else if(i.HTML_TAGS.indexOf(t)>=0){if(o=this.defineTag(t,"element"),e=i.HTML_ATTRS[t])for(let t=0,n=r(e.split(" ")),s=n.length;t<s;t++)i.attr(o,n[t]);if(n=i.HTML_PROPS[t])for(let t=0,e=r(n.split(" ")),s=e.length;t<s;t++)i.attr(o,e[t],{dom:!0})}return o},i.Tags.prototype.createElement=function(t,e){return(t instanceof Function?t:this.findTagType(t)).build(e)},i.createElement=function(t,e,n,r){var o,u=t;u=t instanceof Function?t:i.TAGS.findTagType(t),o=e instanceof s?e.par$:r instanceof i.Tag?r:e&&null!=r?e[r]:e&&e._tag||e;var a=u.build(o);return e instanceof s&&(e.i$++,a.$key=n),e&&null!=n&&(e[n]=a),a},i.createTagCache=function(t){var e=[];return e._tag=t,e},i.createTagMap=function(t,e,n){var r=new s(t,e,null!=n?n:t._tag);return t[e]=r,r},i.createTagList=function(t,e,n){var r=[];return r._type=4,r._tag=null!=n?n:t._tag,t[e]=r,r},i.createTagLoopResult=function(t,e,n){var r=[];return r._type=5,r.cache={i$:0},r},o.build=function(t){var e=[];return e._tag=t,e},s.prototype.$iter=function(){var t=[];return t._type=5,t.cache=this,t},s.prototype.$prune=function(t){let e=this.cache$,n=this.key$,i=new s(e,n,this.par$);for(let e,n=0,o=r(t),s=o.length;n<s;n++)i[(e=o[n]).key$]=e;return i.i$=t.length,e[n]=i},i.TagMap=s,i.TagCache=o,i.SINGLETONS={},i.TAGS=new i.Tags,i.TAGS.element=i.TAGS.htmlelement=i.Tag,i.TAGS["svg:element"]=i.SVGTag,i.defineTag=function(t,e,n){return null==n&&"function"==typeof e&&(n=e,e=""),null==e&&(e=""),i.TAGS.defineTag(t,e,n)},i.defineSingletonTag=function(t,e,n){return null==n&&"function"==typeof e&&(n=e,e="div"),null==e&&(e="div"),i.TAGS.defineTag(this.name(),e,n)},i.extendTag=function(t,e){return i.TAGS.extendTag(t,e)},i.getTagSingleton=function(t){var e,n,r;return(e=i.SINGLETONS[t])?e&&e.Instance?e.Instance:(n=i.document().getElementById(t))?((r=e.Instance=new e(n)).awaken(n),r):((n=e.createNode()).id=t,(r=e.Instance=new e(n)).end().awaken(n),r):(n=i.document().getElementById(t))?i.getTagForDom(n):void 0};var u="undefined"!=typeof SVGElement;i.getTagForDom=function(t){if(!t)return null;if(t._dom)return t;if(t._tag)return t._tag;if(!t.nodeName)return null;var e=t.nodeName.toLowerCase(),n=i.TAGS;return t.id&&i.SINGLETONS[t.id]?i.getTagSingleton(t.id):new(u&&t instanceof SVGElement?n.findTagType("svg:"+e):i.HTML_TAGS.indexOf(e)>=0?n.findTagType(e):i.Tag)(t,null).awaken(t)},i.generateCSSPrefixes=function(){var t=window.getComputedStyle(document.documentElement,"");for(let o,s=0,u=r(t),a=u.length;s<a;s++){var e=(o=u[s]).replace(/^-(webkit|ms|moz|o|blink)-/,""),n=e.replace(/-(\w)/g,function(t,e){return e.toUpperCase()});o!=e&&t.hasOwnProperty(e)||(i.CSSKeyMap[e]=i.CSSKeyMap[n]=o)}},document&&i.generateCSSPrefixes(),document&&!document.documentElement.classList&&i.extendTag("element",function(t){t.prototype.hasFlag=function(t){return new RegExp("(^|\\s)"+t+"(\\s|$)").test(this._dom.className)},t.prototype.addFlag=function(t){return this.hasFlag(t)?this:(this._dom.className+=(this._dom.className?" ":"")+t,this)},t.prototype.unflag=function(t){if(!this.hasFlag(t))return this;var e=new RegExp("(^|\\s)*"+t+"(\\s|$)*","g");return this._dom.className=this._dom.className.replace(e,""),this},t.prototype.toggleFlag=function(t){return this.hasFlag(t)?this.unflag(t):this.flag(t)},t.prototype.flag=function(t,e){return 2==arguments.length&&!1==!!e?this.unflag(t):this.addFlag(t)}}),i.Tag},function(t,e,n){function r(t){return t?t.toArray?t.toArray():t:[]}var i=n(0);function o(t,e,n){this._node=t,this._path=e,this._args=n,this._args&&(this._setter=i.toSetter(this._path))}i.defineTag("fragment","element",function(t){t.createNode=function(){return i.document().createDocumentFragment()}}),i.extendTag("html",function(t){t.prototype.parent=function(){return null}}),i.extendTag("canvas",function(t){t.prototype.context=function(t){return void 0===t&&(t="2d"),this.dom().getContext(t)}}),o.bind=function(t,e,n,r){return(t._data||(t._data=new this(t,n,r))).bind(e,n,r),t},o.prototype.bind=function(t,e,n){return t!=this._data&&(this._data=t),this},o.prototype.getFormValue=function(){return this._setter?this._data[this._path]():this._data[this._path]},o.prototype.setFormValue=function(t){return this._setter?this._data[this._setter](t):this._data[this._path]=t};var s=function(t){return t&&t.splice&&t.sort};i.extendTag("input",function(t){t.prototype.lazy=function(t){return this._lazy},t.prototype.setLazy=function(t){return this._lazy=t,this},t.prototype.bindData=function(t,e,n){return o.bind(this,t,e,n),this},t.prototype.setValue=function(t){return null==this._localValue&&(this.dom().value=this._value=t),this},t.prototype.oninput=function(t){let e=this._dom.value;return this._localValue=e,this._data&&!this.lazy()?this._data.setFormValue(this.value(),this):t.silence()},t.prototype.onchange=function(t){if(this._modelValue=this._localValue=void 0,!this.data())return t.silence();if("radio"!=this.type()&&"checkbox"!=this.type())return this._data.setFormValue(this.value());{let t=this._dom.checked,e=this._data.getFormValue(this),n=null!=this._value?this._value:this.value();if("radio"==this.type())return this._data.setFormValue(n,this);if("on"==this.dom().value)return this._data.setFormValue(!!t,this);if(!s(e))return this._data.setFormValue(n,this);{let r=e.indexOf(n);if(t&&-1==r)return e.push(n);if(!t&&r>=0)return e.splice(r,1)}}},t.prototype.onblur=function(t){return this._localValue=void 0},t.prototype.end=function(){if(void 0!==this._localValue||!this._data)return this;let t=this._data.getFormValue(this);if(t==this._modelValue)return this;if(s(t)||(this._modelValue=t),"radio"==this.type()||"checkbox"==this.type()){let e=this._value,n=s(t)?t.indexOf(e)>=0:"on"==this.dom().value?!!t:t==this._value;this._dom.checked=n}else this._dom.value=t;return this}}),i.extendTag("textarea",function(t){t.prototype.lazy=function(t){return this._lazy},t.prototype.setLazy=function(t){return this._lazy=t,this},t.prototype.bindData=function(t,e,n){return o.bind(this,t,e,n),this},t.prototype.setValue=function(t){return null==this._localValue&&(this.dom().value=t),this},t.prototype.oninput=function(t){let e=this._dom.value;return this._localValue=e,this._data&&!this.lazy()?this._data.setFormValue(this.value(),this):t.silence()},t.prototype.onchange=function(t){return this._localValue=void 0,this._data?this._data.setFormValue(this.value(),this):t.silence()},t.prototype.onblur=function(t){return this._localValue=void 0},t.prototype.render=function(){if(null==this._localValue&&this._data){if(this._data){let t=this._data.getFormValue(this);this._dom.value=null!=t?t:""}return this}}}),i.extendTag("option",function(t){t.prototype.setValue=function(t){return t!=this._value&&(this.dom().value=this._value=t),this},t.prototype.value=function(){return this._value||this.dom().value}}),i.extendTag("select",function(t){t.prototype.bindData=function(t,e,n){return o.bind(this,t,e,n),this},t.prototype.setValue=function(t,e){this._value;return this._value=t,e||this.syncValue(t),this},t.prototype.syncValue=function(t){let e=this._syncValue;if(this.multiple()&&t instanceof Array){if(e instanceof Array&&function(t,e){let n=t.length,r=0;if(n!=e.length)return!1;for(;r++<n;)if(t[r]!=e[r])return!1;return!0}(e,t))return this;t=t.slice()}if(this._syncValue=t,"object"==typeof t){let e=this.multiple()&&t instanceof Array;for(let n,i=0,o=r(this.dom().options),s=o.length;i<s;i++){let r=(n=o[i])._tag?n._tag.value():n.value;if(e)n.selected=t.indexOf(r)>=0;else if(t==r){this.dom().selectedIndex=i;break}}}else this.dom().value=t;return this},t.prototype.value=function(){if(this.multiple()){let t=[];for(let e,n=0,i=r(this.dom().selectedOptions),o=i.length;n<o;n++)e=i[n],t.push(e._tag?e._tag.value():e.value);return t}{let t=this.dom().selectedOptions[0];return t?t._tag?t._tag.value():t.value:null}},t.prototype.onchange=function(t){return this._data?this._data.setFormValue(this.value(),this):t.silence()},t.prototype.end=function(){return this._data&&this.setValue(this._data.getFormValue(this),1),this._value!=this._syncValue&&this.syncValue(this._value),this}})},function(t,e,n){function r(t){return t?t.toArray?t.toArray():t:[]}var i=n(0);i.Touch=function(t,e){return this.setEvent(t),this.setData({}),this.setActive(!0),this._button=t&&t.button||0,this._suppress=!1,this._captured=!1,this.setBubble(!1),e=e,this.setUpdates(0),this},i.Touch.LastTimestamp=0,i.Touch.TapTimeout=50;var o=[],s=0,u={};i.Touch.count=function(){return s},i.Touch.lookup=function(t){return t&&(t.__touch__||u[t.identifier])},i.Touch.release=function(t,e){u[t.identifier],delete u[t.identifier],t.__touch__,delete t.__touch__},i.Touch.ontouchstart=function(t){for(let n,i=0,a=r(t.changedTouches),h=a.length;i<h;i++)if(n=a[i],!this.lookup(n)){var e=u[n.identifier]=new this(t);n.__touch__=e,o.push(e),s++,e.touchstart(t,n)}return this},i.Touch.ontouchmove=function(t){var e;for(let n,i=0,o=r(t.changedTouches),s=o.length;i<s;i++)n=o[i],(e=this.lookup(n))&&e.touchmove(t,n);return this},i.Touch.ontouchend=function(t){var e;for(let n,i=0,o=r(t.changedTouches),u=o.length;i<u;i++)n=o[i],(e=this.lookup(n))&&(e.touchend(t,n),this.release(n,e),s--);return this},i.Touch.ontouchcancel=function(t){var e;for(let n,i=0,o=r(t.changedTouches),u=o.length;i<u;i++)n=o[i],(e=this.lookup(n))&&(e.touchcancel(t,n),this.release(n,e),s--);return this},i.Touch.onmousedown=function(t){return this},i.Touch.onmousemove=function(t){return this},i.Touch.onmouseup=function(t){return this},i.Touch.prototype.phase=function(t){return this._phase},i.Touch.prototype.setPhase=function(t){return this._phase=t,this},i.Touch.prototype.active=function(t){return this._active},i.Touch.prototype.setActive=function(t){return this._active=t,this},i.Touch.prototype.event=function(t){return this._event},i.Touch.prototype.setEvent=function(t){return this._event=t,this},i.Touch.prototype.pointer=function(t){return this._pointer},i.Touch.prototype.setPointer=function(t){return this._pointer=t,this},i.Touch.prototype.target=function(t){return this._target},i.Touch.prototype.setTarget=function(t){return this._target=t,this},i.Touch.prototype.handler=function(t){return this._handler},i.Touch.prototype.setHandler=function(t){return this._handler=t,this},i.Touch.prototype.updates=function(t){return this._updates},i.Touch.prototype.setUpdates=function(t){return this._updates=t,this},i.Touch.prototype.suppress=function(t){return this._suppress},i.Touch.prototype.setSuppress=function(t){return this._suppress=t,this},i.Touch.prototype.data=function(t){return this._data},i.Touch.prototype.setData=function(t){return this._data=t,this},i.Touch.prototype.__bubble={chainable:!0,name:"bubble"},i.Touch.prototype.bubble=function(t){return void 0!==t?(this.setBubble(t),this):this._bubble},i.Touch.prototype.setBubble=function(t){return this._bubble=t,this},i.Touch.prototype.timestamp=function(t){return this._timestamp},i.Touch.prototype.setTimestamp=function(t){return this._timestamp=t,this},i.Touch.prototype.gestures=function(t){return this._gestures},i.Touch.prototype.setGestures=function(t){return this._gestures=t,this},i.Touch.prototype.capture=function(){return this._captured=!0,this._event&&this._event.stopPropagation(),this._selblocker||(this._selblocker=function(t){return t.preventDefault()},i.document().addEventListener("selectstart",this._selblocker,!0)),this},i.Touch.prototype.isCaptured=function(){return!!this._captured},i.Touch.prototype.extend=function(t){return this._gestures||(this._gestures=[]),this._gestures.push(t),this},i.Touch.prototype.redirect=function(t){return this._redirect=t,this},i.Touch.prototype.suppress=function(){return this._active=!1,this},i.Touch.prototype.setSuppress=function(t){return console.warn("Imba.Touch#suppress= is deprecated"),this._supress=t,this},i.Touch.prototype.touchstart=function(t,e){return this._event=t,this._touch=e,this._button=0,this._x=e.clientX,this._y=e.clientY,this.began(),this.update(),t&&this.isCaptured()&&t.preventDefault(),this},i.Touch.prototype.touchmove=function(t,e){return this._event=t,this._x=e.clientX,this._y=e.clientY,this.update(),t&&this.isCaptured()&&t.preventDefault(),this},i.Touch.prototype.touchend=function(t,e){if(this._event=t,this._x=e.clientX,this._y=e.clientY,this.ended(),i.Touch.LastTimestamp=t.timeStamp,this._maxdr<20){var n=new i.Event(t);n.setType("tap"),n.process(),n._responder&&t.preventDefault()}return t&&this.isCaptured()&&t.preventDefault(),this},i.Touch.prototype.touchcancel=function(t,e){return this.cancel()},i.Touch.prototype.mousedown=function(t,e){var n=this;return n._event=t,n._button=t.button,n._x=e.clientX,n._y=e.clientY,n.began(),n.update(),n._mousemove=function(t){return n.mousemove(t,t)},i.document().addEventListener("mousemove",n._mousemove,!0),n},i.Touch.prototype.mousemove=function(t,e){return this._x=e.clientX,this._y=e.clientY,this._event=t,this.isCaptured()&&t.preventDefault(),this.update(),this.move(),this},i.Touch.prototype.mouseup=function(t,e){return this._x=e.clientX,this._y=e.clientY,this.ended(),this},i.Touch.prototype.idle=function(){return this.update()},i.Touch.prototype.began=function(){this._timestamp=Date.now(),this._maxdr=this._dr=0,this._x0=this._x,this._y0=this._y;var t=this.event().target,e=null;for(this._sourceTarget=t&&i.getTagForDom(t);t&&(!(e=i.getTagForDom(t))||!e.ontouchstart||(this._bubble=!1,this.setTarget(e),this.target().ontouchstart(this),this._bubble));)t=t.parentNode;return this._updates++,this},i.Touch.prototype.update=function(){var t;if(!this._active||this._cancelled)return this;var e=Math.sqrt(this.dx()*this.dx()+this.dy()*this.dy());if(e>this._dr&&(this._maxdr=e),this._dr=e,this._redirect&&(this._target&&this._target.ontouchcancel&&this._target.ontouchcancel(this),this.setTarget(this._redirect),this._redirect=null,this.target().ontouchstart&&this.target().ontouchstart(this),this._redirect))return this.update();if(this._updates++,this._gestures)for(let t=0,e=r(this._gestures),n=e.length;t<n;t++)e[t].ontouchupdate(this);return(t=this.target())&&t.ontouchupdate&&t.ontouchupdate(this),this._redirect&&this.update(),this},i.Touch.prototype.move=function(){var t;if(!this._active||this._cancelled)return this;if(this._gestures)for(let t,e=0,n=r(this._gestures),i=n.length;e<i;e++)(t=n[e]).ontouchmove&&t.ontouchmove(this,this._event);return(t=this.target())&&t.ontouchmove&&t.ontouchmove(this,this._event),this},i.Touch.prototype.ended=function(){var t;if(!this._active||this._cancelled)return this;if(this._updates++,this._gestures)for(let t=0,e=r(this._gestures),n=e.length;t<n;t++)e[t].ontouchend(this);return(t=this.target())&&t.ontouchend&&t.ontouchend(this),this.cleanup_(),this},i.Touch.prototype.cancel=function(){return this._cancelled||(this._cancelled=!0,this.cancelled(),this.cleanup_()),this},i.Touch.prototype.cancelled=function(){var t;if(!this._active)return this;if(this._cancelled=!0,this._updates++,this._gestures)for(let t,e=0,n=r(this._gestures),i=n.length;e<i;e++)(t=n[e]).ontouchcancel&&t.ontouchcancel(this);return(t=this.target())&&t.ontouchcancel&&t.ontouchcancel(this),this},i.Touch.prototype.cleanup_=function(){return this._mousemove&&(i.document().removeEventListener("mousemove",this._mousemove,!0),this._mousemove=null),this._selblocker&&(i.document().removeEventListener("selectstart",this._selblocker,!0),this._selblocker=null),this},i.Touch.prototype.dr=function(){return this._dr},i.Touch.prototype.dx=function(){return this._x-this._x0},i.Touch.prototype.dy=function(){return this._y-this._y0},i.Touch.prototype.x0=function(){return this._x0},i.Touch.prototype.y0=function(){return this._y0},i.Touch.prototype.x=function(){return this._x},i.Touch.prototype.y=function(){return this._y},i.Touch.prototype.tx=function(){return this._targetBox||(this._targetBox=this._target.dom().getBoundingClientRect()),this._x-this._targetBox.left},i.Touch.prototype.ty=function(){return this._targetBox||(this._targetBox=this._target.dom().getBoundingClientRect()),this._y-this._targetBox.top},i.Touch.prototype.button=function(){return this._button},i.Touch.prototype.sourceTarget=function(){return this._sourceTarget},i.Touch.prototype.elapsed=function(){return Date.now()-this._timestamp},i.TouchGesture=function(){},i.TouchGesture.prototype.__active={default:!1,name:"active"},i.TouchGesture.prototype.active=function(t){return this._active},i.TouchGesture.prototype.setActive=function(t){return this._active=t,this},i.TouchGesture.prototype._active=!1,i.TouchGesture.prototype.ontouchstart=function(t){return this},i.TouchGesture.prototype.ontouchupdate=function(t){return this},i.TouchGesture.prototype.ontouchend=function(t){return this}},function(t,e,n){var r=n(0),i={esc:27,tab:9,enter:13,space:32,up:38,down:40},o=r.Tag.prototype;o.stopModifier=function(t){return t.stop()||!0},o.preventModifier=function(t){return t.prevent()||!0},o.silenceModifier=function(t){return t.silence()||!0},o.bubbleModifier=function(t){return t.bubble(!0)||!0},o.ctrlModifier=function(t){return 1==t.event().ctrlKey},o.altModifier=function(t){return 1==t.event().altKey},o.shiftModifier=function(t){return 1==t.event().shiftKey},o.metaModifier=function(t){return 1==t.event().metaKey},o.keyModifier=function(t,e){return!e.keyCode()||e.keyCode()==t},o.delModifier=function(t){return!t.keyCode()||(8==t.keyCode()||46==t.keyCode())},o.selfModifier=function(t){return t.event().target==this._dom},o.leftModifier=function(t){return null!=t.button()?0===t.button():o.keyModifier(37,t)},o.rightModifier=function(t){return null!=t.button()?2===t.button():o.keyModifier(39,t)},o.middleModifier=function(t){return null==t.button()||1===t.button()},o.getHandler=function(t,e){if(this[t])return this},r.Event=function(t){this.setEvent(t),this._bubble=!0},r.Event.prototype.event=function(t){return this._event},r.Event.prototype.setEvent=function(t){return this._event=t,this},r.Event.prototype.prefix=function(t){return this._prefix},r.Event.prototype.setPrefix=function(t){return this._prefix=t,this},r.Event.prototype.source=function(t){return this._source},r.Event.prototype.setSource=function(t){return this._source=t,this},r.Event.prototype.data=function(t){return this._data},r.Event.prototype.setData=function(t){return this._data=t,this},r.Event.prototype.responder=function(t){return this._responder},r.Event.prototype.setResponder=function(t){return this._responder=t,this},r.Event.wrap=function(t){return new this(t)},r.Event.prototype.setType=function(t){return this._type=t,this},r.Event.prototype.type=function(){return this._type||this.event().type},r.Event.prototype.native=function(){return this._event},r.Event.prototype.name=function(){return this._name||(this._name=this.type().toLowerCase().replace(/\:/g,""))},r.Event.prototype.bubble=function(t){return null!=t?(this.setBubble(t),this):this._bubble},r.Event.prototype.setBubble=function(t){return this._bubble=t,this},r.Event.prototype.stop=function(){return this.setBubble(!1),this},r.Event.prototype.stopPropagation=function(){return this.stop()},r.Event.prototype.halt=function(){return this.stop()},r.Event.prototype.prevent=function(){return this.event().preventDefault?this.event().preventDefault():this.event().defaultPrevented=!0,this.defaultPrevented=!0,this},r.Event.prototype.preventDefault=function(){return console.warn("Event#preventDefault is deprecated - use Event#prevent"),this.prevent()},r.Event.prototype.isPrevented=function(){return this.event()&&this.event().defaultPrevented||this._cancel},r.Event.prototype.cancel=function(){return console.warn("Event#cancel is deprecated - use Event#prevent"),this.prevent()},r.Event.prototype.silence=function(){return this._silenced=!0,this},r.Event.prototype.isSilenced=function(){return!!this._silenced},r.Event.prototype.target=function(){return r.getTagForDom(this.event()._target||this.event().target)},r.Event.prototype.responder=function(){return this._responder},r.Event.prototype.redirect=function(t){return this._redirect=t,this},r.Event.prototype.processHandlers=function(t,e){let n=1,o=e.length,s=this._bubble,u=e.state||(e.state={});for(s&&(this._bubble=1);n<o;){let o=!1,s=e[n++],a=null,h=t;if(s instanceof Array&&(a=s.slice(1),s=s[0]),"string"==typeof s){i[s]&&(a=[i[s]],s="key");let e=s+"Modifier";t[e]&&(o=!0,a=(a||[]).concat([this,u]),s=t[e])}if("string"==typeof s){let t=null,e=u.context;e&&(e.getHandler instanceof Function&&(e=e.getHandler(s,this)),e[s]instanceof Function&&(s=t=e[s],h=e)),t||console.warn("event "+this.type()+": could not find '"+s+"' in context",e)}if(s instanceof Function){let e=s.apply(h,a||[this]);if(o||this._responder||(this._responder=t),0==e)break;e&&!this._silenced&&e.then instanceof Function&&e.then(r.commit)}}return 1===this._bubble&&(this._bubble=s),null},r.Event.prototype.process=function(){for(var t,e,n,r=this.name(),i="on"+(this._prefix||"")+r,o=this.event()._target||this.event().target,s=o._responder||o;s;){this._redirect=null;let o=s._dom?s:s._tag;if(o){if(e=o._on_){for(let t,i=0,s=(n=e)?n.toArray?n.toArray():n:[],u=s.length;i<u;i++){if(!(t=s[i]))continue;t[0];r==t[0]&&this.bubble()&&this.processHandlers(o,t)}if(!this.bubble())break}this.bubble()&&o[i]instanceof Function&&(this._responder||(this._responder=o),this._silenced=!1,t=o[i](this,this.data())),o.onevent&&o.onevent(this)}if(!this.bubble()||!(s=this._redirect||(o?o.parent():s.parentNode)))break}return this.processed(),t&&t.then instanceof Function&&t.then(this.processed.bind(this)),this},r.Event.prototype.processed=function(){return!this._silenced&&this._responder&&(r.emit(r,"event",[this]),r.commit(this.event())),this},r.Event.prototype.x=function(){return this.native().x},r.Event.prototype.y=function(){return this.native().y},r.Event.prototype.button=function(){return this.native().button},r.Event.prototype.keyCode=function(){return this.native().keyCode},r.Event.prototype.ctrl=function(){return this.native().ctrlKey},r.Event.prototype.alt=function(){return this.native().altKey},r.Event.prototype.shift=function(){return this.native().shiftKey},r.Event.prototype.meta=function(){return this.native().metaKey},r.Event.prototype.key=function(){return this.native().key},r.Event.prototype.which=function(){return this.event().which}},function(t,e,n){function r(t){return t?t.toArray?t.toArray():t:[]}var i=n(0);function o(t,e,n){if(e instanceof Array)for(let i=0,s=r(e),u=s.length;i<u;i++)o(t,s[i],n);else if(e&&e._slot_)t.removeChild(e);else if(null!=e){let r=n?n.nextSibling:t._dom.firstChild;if(!(r instanceof Text&&r.textContent==e))throw"cannot remove string";t.removeChild(r)}return n}function s(t,e){if(e instanceof Array){let n=0,r=e.taglen,i=null!=r?e.domlen=r:e.length;for(;n<i;)s(t,e[n++])}else e&&e._dom?t.appendChild(e):null!=e&&!1!==e&&t.appendChild(i.createTextNode(e))}function u(t,e,n){var r=n?n.nextSibling:t._dom.firstChild;return r?(function t(e,n,r){if(n instanceof Array){let i=0,o=n.taglen,s=null!=o?n.domlen=o:n.length;for(;i<s;)t(e,n[i++],r)}else n&&n._dom?e.insertBefore(n,r):null!=n&&!1!==n&&e.insertBefore(i.createTextNode(n),r);return r}(t,e,r),r.previousSibling):(s(t,e),t._dom.lastChild)}function a(t,e,n,o){var s,a=e[e.length-1],h=[],c=[],l=[],p=0,d=0;for(let i,o=0,u=r(n),a=u.length;o<a;o++)if((i=u[o])&&3==i.nodeType?((s=e.indexOf(i.textContent))>=0&&(e[s]=i),!0):s=e.indexOf(i),h.push(s),-1!=s){for(var f=h.length-2;f>=0;)if(-1==h[f])f--;else{if(s>h[f])break;f=c[f]}c.push(f);var _=-1==f?0:l[f]+1;_>p&&(p=_,d=o),l.push(_)}else t.removeChild(i),c.push(-1),l.push(-1);for(var g=[],m=h.length-1;m>=0;)m==d&&-1!=h[m]&&(g[h[m]]=!0,d=c[d]),m-=1;for(let n,s=0,a=r(e),h=a.length;s<h;s++){if(n=a[s],!g[s]){n&&n._dom||(n=e[s]=i.createTextNode(n));var v=e[s-1];u(t,n,v&&v._slot_||v||o)}o=n._slot_||o&&o.nextSibling||t._dom.firstChild}return a&&a._slot_||o}function h(t,e,n,r){for(var i=e.length,o=n.length,s=e.cache.i$,u=0,h=i-o;u<o&&u<i&&e[u]===n[u];)u++;if(s>1e3&&s-i>500&&e.cache.$prune(e),!(h>0&&u==o)){if(h>0){let r=i;for(;r>u&&e[r-1]===n[r-1-h];)r--;if(h==r-u){let i=n[u]._slot_;for(;u<r;)t.insertBefore(e[u++],i);return}}else{if(h<0&&u==i){for(;u<o;)t.removeChild(n[u++]);return}if(h<0){let r=o;for(;r>u&&e[r-1+h]===n[r-1];)r--;if(h==u-r){for(;u<r;)t.removeChild(n[u++]);return}}else if(u==i)return}return a(t,e,n,r)}for(;u<i;)t.appendChild(e[u++])}function c(t,e,n,r){var i=e.taglen,o=e.domlen||0,s=i?e[i-1]:null;if(o>i)for(;o>i;){var u=e[--o];t.removeChild(u._slot_)}else if(i>o){let n=o?e[o-1]._slot_:r,s=n?n.nextSibling:t._dom.firstChild;for(;o<i;){let n=e[o++];s?t.insertBefore(n._slot_,s):t.appendChild(n._slot_)}}return e.domlen=i,s?s._slot_:r}function l(t,e,n,i){var s=null==e||!1===e,h=null==n||!1===n;if(e===n)return s?i:e._slot_?e._slot_:e instanceof Array&&null!=e.taglen?c(t,e,0,i):i?i.nextSibling:t._dom.firstChild;if(e instanceof Array){if(n instanceof Array){let s=e.static;if(!s&&!n.static)return function(t,e,n,r){var i=e.length,o=i,s=e[i-1];if(i==n.length&&e[0]===n[0])for(;o--&&e[o]===n[o];);return-1==o?s&&s._slot_||s||r:a(t,e,n,r)}(t,e,n,i);if(s==n.static){for(let o=0,s=r(e),u=s.length;o<u;o++)i=l(t,s[o],n[o],i);return i}o(t,n,i)}else h||(n._slot_?t.removeChild(n):t.removeChild(i?i.nextSibling:t._dom.firstChild));return u(t,e,i)}if(!s&&e._slot_)return h||o(t,n,i),u(t,e,i);if(s)return h||o(t,n,i),i;{let r;if(n instanceof Array)o(t,n,i);else if(n&&n._slot_)t.removeChild(n);else if(!h&&(r=i?i.nextSibling:t._dom.firstChild)instanceof Text&&r.textContent!=e)return r.textContent=e,r;return u(t,e,i)}}i.extendTag("element",function(t){t.prototype.setChildren=function(t,e){var n=this._tree_;if(t===n&&t&&null==t.taglen)return this;if(n||3==e)if(1==e){let e=null;for(let i=0,o=r(t),s=o.length;i<s;i++)e=l(this,o[i],n[i],e)}else{if(2==e)return this;if(3==e){if(t&&t._dom)this.removeAllChildren(),this.appendChild(t);else{if(!(t instanceof Array))return this.setText(t),this;5==t._type&&n&&5==n._type?h(this,t,n,null):n instanceof Array?l(this,t,n,null):(this.removeAllChildren(),s(this,t))}}else 4==e?c(this,t,0,null):5==e?h(this,t,n,null):t instanceof Array&&n instanceof Array?l(this,t,n,null):(this.removeAllChildren(),s(this,t))}else this.removeAllChildren(),s(this,t);return this._tree_=t,this},t.prototype.content=function(){return this._content||this.children().toArray()},t.prototype.setText=function(t){if(t!=this._tree_){var e=null===t||!1===t?"":t;(this._text_||this._dom).textContent=e,this._text_||(this._text_=this._dom.firstChild),this._tree_=t}return this}});var p=i.Tag.prototype;p.setContent=p.setChildren,"undefined"!=typeof navigator&&0==(navigator.vendor||"").indexOf("Apple")&&(p.setText=function(t){return t!=this._tree_&&(this._dom.textContent=null===t||!1===t?"":t,this._tree_=t),this})}]);