glass-easel 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -0
- package/dist/glass_easel.all.d.ts +1 -0
- package/dist/glass_easel.all.js +2 -0
- package/dist/glass_easel.all.js.map +1 -0
- package/dist/glass_easel.domlike.global.d.ts +1 -0
- package/dist/glass_easel.domlike.global.js +2 -0
- package/dist/glass_easel.domlike.global.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/types/src/backend/backend_protocol.d.ts +119 -0
- package/dist/types/src/backend/backend_protocol.d.ts.map +1 -0
- package/dist/types/src/backend/composed_backend_protocol.d.ts +90 -0
- package/dist/types/src/backend/composed_backend_protocol.d.ts.map +1 -0
- package/dist/types/src/backend/domlike_backend_protocol.d.ts +76 -0
- package/dist/types/src/backend/domlike_backend_protocol.d.ts.map +1 -0
- package/dist/types/src/backend/mode.d.ts +46 -0
- package/dist/types/src/backend/mode.d.ts.map +1 -0
- package/dist/types/src/backend/suggested_backend_protocol.d.ts +30 -0
- package/dist/types/src/backend/suggested_backend_protocol.d.ts.map +1 -0
- package/dist/types/src/behavior.d.ts +428 -0
- package/dist/types/src/behavior.d.ts.map +1 -0
- package/dist/types/src/class_list.d.ts +79 -0
- package/dist/types/src/class_list.d.ts.map +1 -0
- package/dist/types/src/component.d.ts +291 -0
- package/dist/types/src/component.d.ts.map +1 -0
- package/dist/types/src/component_params.d.ts +239 -0
- package/dist/types/src/component_params.d.ts.map +1 -0
- package/dist/types/src/component_space.d.ts +164 -0
- package/dist/types/src/component_space.d.ts.map +1 -0
- package/dist/types/src/data_path.d.ts +5 -0
- package/dist/types/src/data_path.d.ts.map +1 -0
- package/dist/types/src/data_proxy.d.ts +107 -0
- package/dist/types/src/data_proxy.d.ts.map +1 -0
- package/dist/types/src/data_utils.d.ts +3 -0
- package/dist/types/src/data_utils.d.ts.map +1 -0
- package/dist/types/src/element.d.ts +275 -0
- package/dist/types/src/element.d.ts.map +1 -0
- package/dist/types/src/element_iterator.d.ts +43 -0
- package/dist/types/src/element_iterator.d.ts.map +1 -0
- package/dist/types/src/event.d.ts +104 -0
- package/dist/types/src/event.d.ts.map +1 -0
- package/dist/types/src/external_shadow_tree.d.ts +20 -0
- package/dist/types/src/external_shadow_tree.d.ts.map +1 -0
- package/dist/types/src/func_arr.d.ts +39 -0
- package/dist/types/src/func_arr.d.ts.map +1 -0
- package/dist/types/src/global_options.d.ts +111 -0
- package/dist/types/src/global_options.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +43 -0
- package/dist/types/src/index.d.ts.map +1 -0
- package/dist/types/src/mutation_observer.d.ts +79 -0
- package/dist/types/src/mutation_observer.d.ts.map +1 -0
- package/dist/types/src/native_node.d.ts +8 -0
- package/dist/types/src/native_node.d.ts.map +1 -0
- package/dist/types/src/node.d.ts +49 -0
- package/dist/types/src/node.d.ts.map +1 -0
- package/dist/types/src/relation.d.ts +47 -0
- package/dist/types/src/relation.d.ts.map +1 -0
- package/dist/types/src/render.d.ts +3 -0
- package/dist/types/src/render.d.ts.map +1 -0
- package/dist/types/src/selector.d.ts +32 -0
- package/dist/types/src/selector.d.ts.map +1 -0
- package/dist/types/src/shadow_root.d.ts +136 -0
- package/dist/types/src/shadow_root.d.ts.map +1 -0
- package/dist/types/src/template_engine.d.ts +18 -0
- package/dist/types/src/template_engine.d.ts.map +1 -0
- package/dist/types/src/text_node.d.ts +32 -0
- package/dist/types/src/text_node.d.ts.map +1 -0
- package/dist/types/src/tmpl/index.d.ts +18 -0
- package/dist/types/src/tmpl/index.d.ts.map +1 -0
- package/dist/types/src/tmpl/native_rendering.d.ts +45 -0
- package/dist/types/src/tmpl/native_rendering.d.ts.map +1 -0
- package/dist/types/src/tmpl/proc_gen_wrapper.d.ts +80 -0
- package/dist/types/src/tmpl/proc_gen_wrapper.d.ts.map +1 -0
- package/dist/types/src/tmpl/proc_gen_wrapper_dom.d.ts +50 -0
- package/dist/types/src/tmpl/proc_gen_wrapper_dom.d.ts.map +1 -0
- package/dist/types/src/tmpl/range_list_diff.d.ts +19 -0
- package/dist/types/src/tmpl/range_list_diff.d.ts.map +1 -0
- package/dist/types/src/trait_behaviors.d.ts +38 -0
- package/dist/types/src/trait_behaviors.d.ts.map +1 -0
- package/dist/types/src/virtual_node.d.ts +10 -0
- package/dist/types/src/virtual_node.d.ts.map +1 -0
- package/dist/types/tests/backend/domlike.test.d.ts +2 -0
- package/dist/types/tests/backend/domlike.test.d.ts.map +1 -0
- package/dist/types/tests/base/env.d.ts +29 -0
- package/dist/types/tests/base/env.d.ts.map +1 -0
- package/dist/types/tests/base/match.d.ts +9 -0
- package/dist/types/tests/base/match.d.ts.map +1 -0
- package/dist/types/tests/core/backend.test.d.ts +2 -0
- package/dist/types/tests/core/backend.test.d.ts.map +1 -0
- package/dist/types/tests/core/behavior.test.d.ts +2 -0
- package/dist/types/tests/core/behavior.test.d.ts.map +1 -0
- package/dist/types/tests/core/component_space.test.d.ts +2 -0
- package/dist/types/tests/core/component_space.test.d.ts.map +1 -0
- package/dist/types/tests/core/data_update.test.d.ts +2 -0
- package/dist/types/tests/core/data_update.test.d.ts.map +1 -0
- package/dist/types/tests/core/misc.test.d.ts +2 -0
- package/dist/types/tests/core/misc.test.d.ts.map +1 -0
- package/dist/types/tests/core/placeholder.test.d.ts +2 -0
- package/dist/types/tests/core/placeholder.test.d.ts.map +1 -0
- package/dist/types/tests/core/slot.test.d.ts +2 -0
- package/dist/types/tests/core/slot.test.d.ts.map +1 -0
- package/dist/types/tests/core/trait_behaviors.test.d.ts +2 -0
- package/dist/types/tests/core/trait_behaviors.test.d.ts.map +1 -0
- package/dist/types/tests/tmpl/binding_map.test.d.ts +2 -0
- package/dist/types/tests/tmpl/binding_map.test.d.ts.map +1 -0
- package/dist/types/tests/tmpl/event.test.d.ts +2 -0
- package/dist/types/tests/tmpl/event.test.d.ts.map +1 -0
- package/dist/types/tests/tmpl/expression.test.d.ts +2 -0
- package/dist/types/tests/tmpl/expression.test.d.ts.map +1 -0
- package/dist/types/tests/tmpl/lvalue.test.d.ts +2 -0
- package/dist/types/tests/tmpl/lvalue.test.d.ts.map +1 -0
- package/dist/types/tests/tmpl/native_rendering.test.d.ts +2 -0
- package/dist/types/tests/tmpl/native_rendering.test.d.ts.map +1 -0
- package/dist/types/tests/tmpl/structure.test.d.ts +2 -0
- package/dist/types/tests/tmpl/structure.test.d.ts.map +1 -0
- package/dist/types/tests/types/chaining.test.d.ts +2 -0
- package/dist/types/tests/types/chaining.test.d.ts.map +1 -0
- package/dist/types/tests/types/createElement.test.d.ts +2 -0
- package/dist/types/tests/types/createElement.test.d.ts.map +1 -0
- package/dist/types/tests/types/definition.test.d.ts +2 -0
- package/dist/types/tests/types/definition.test.d.ts.map +1 -0
- package/guide/zh_CN/advanced/binding_map_update.md +32 -0
- package/guide/zh_CN/advanced/build_args.md +28 -0
- package/guide/zh_CN/advanced/component_filter.md +70 -0
- package/guide/zh_CN/advanced/component_space.md +124 -0
- package/guide/zh_CN/advanced/custom_backend.md +53 -0
- package/guide/zh_CN/advanced/error_listener.md +32 -0
- package/guide/zh_CN/advanced/external_component.md +73 -0
- package/guide/zh_CN/advanced/template_engine.md +61 -0
- package/guide/zh_CN/appendix/backend_protocol.md +501 -0
- package/guide/zh_CN/appendix/list_diff_algorithm.md +406 -0
- package/guide/zh_CN/basic/beginning.md +94 -0
- package/guide/zh_CN/basic/component.md +156 -0
- package/guide/zh_CN/basic/event.md +169 -0
- package/guide/zh_CN/basic/lifetime.md +66 -0
- package/guide/zh_CN/basic/method.md +62 -0
- package/guide/zh_CN/basic/template.md +135 -0
- package/guide/zh_CN/data_management/advanced_update.md +170 -0
- package/guide/zh_CN/data_management/data_deep_copy.md +157 -0
- package/guide/zh_CN/data_management/data_observer.md +154 -0
- package/guide/zh_CN/data_management/property_early_init.md +31 -0
- package/guide/zh_CN/data_management/pure_data_pattern.md +21 -0
- package/guide/zh_CN/index.md +93 -0
- package/guide/zh_CN/interaction/behavior.md +52 -0
- package/guide/zh_CN/interaction/component_path.md +37 -0
- package/guide/zh_CN/interaction/generic.md +73 -0
- package/guide/zh_CN/interaction/placeholder.md +40 -0
- package/guide/zh_CN/interaction/relation.md +151 -0
- package/guide/zh_CN/interaction/slot.md +137 -0
- package/guide/zh_CN/interaction/template_import.md +94 -0
- package/guide/zh_CN/interaction/trait_behavior.md +117 -0
- package/guide/zh_CN/styling/external_class.md +46 -0
- package/guide/zh_CN/styling/style_isolation.md +54 -0
- package/guide/zh_CN/styling/virtual_host.md +52 -0
- package/guide/zh_CN/tree/element_iterator.md +54 -0
- package/guide/zh_CN/tree/mutation_observer.md +52 -0
- package/guide/zh_CN/tree/node_tree.md +142 -0
- package/guide/zh_CN/tree/node_tree_modification.md +78 -0
- package/guide/zh_CN/tree/selector.md +66 -0
- package/jest.config.js +6 -0
- package/jest.dts.config.js +9 -0
- package/jest.unit.config.js +14 -0
- package/package.json +28 -0
- package/src/backend/backend_protocol.ts +313 -0
- package/src/backend/composed_backend_protocol.ts +252 -0
- package/src/backend/domlike_backend_protocol.ts +370 -0
- package/src/backend/mode.ts +51 -0
- package/src/backend/suggested_backend_protocol.ts +83 -0
- package/src/behavior.ts +1655 -0
- package/src/bootstrap_dom_dev.js +22 -0
- package/src/class_list.ts +376 -0
- package/src/component.ts +1309 -0
- package/src/component_params.ts +461 -0
- package/src/component_space.ts +547 -0
- package/src/data_path.ts +225 -0
- package/src/data_proxy.ts +670 -0
- package/src/data_utils.ts +50 -0
- package/src/element.ts +1966 -0
- package/src/element_iterator.ts +158 -0
- package/src/event.ts +401 -0
- package/src/external_shadow_tree.ts +27 -0
- package/src/func_arr.ts +198 -0
- package/src/global_options.ts +242 -0
- package/src/index.ts +187 -0
- package/src/mutation_observer.ts +252 -0
- package/src/native_node.ts +74 -0
- package/src/node.ts +174 -0
- package/src/relation.ts +380 -0
- package/src/render.ts +25 -0
- package/src/selector.ts +218 -0
- package/src/shadow_root.ts +766 -0
- package/src/template_engine.ts +45 -0
- package/src/text_node.ts +149 -0
- package/src/tmpl/index.ts +199 -0
- package/src/tmpl/native_rendering.ts +175 -0
- package/src/tmpl/proc_gen_wrapper.ts +954 -0
- package/src/tmpl/proc_gen_wrapper_dom.ts +230 -0
- package/src/tmpl/range_list_diff.ts +443 -0
- package/src/trait_behaviors.ts +51 -0
- package/src/virtual_node.ts +51 -0
- package/tests/backend/domlike.test.ts +254 -0
- package/tests/base/env.ts +78 -0
- package/tests/base/match.ts +185 -0
- package/tests/core/backend.test.ts +144 -0
- package/tests/core/behavior.test.ts +546 -0
- package/tests/core/component_space.test.ts +212 -0
- package/tests/core/data_update.test.ts +461 -0
- package/tests/core/misc.test.ts +339 -0
- package/tests/core/placeholder.test.ts +180 -0
- package/tests/core/slot.test.ts +1495 -0
- package/tests/core/trait_behaviors.test.ts +153 -0
- package/tests/legacy/README.md +3 -0
- package/tests/legacy/behavior.test.js +293 -0
- package/tests/legacy/component.test.js +1247 -0
- package/tests/legacy/data_path.test.js +149 -0
- package/tests/legacy/data_proxy.test.js +759 -0
- package/tests/legacy/element_iterator.test.js +148 -0
- package/tests/legacy/event.test.js +849 -0
- package/tests/legacy/external.test.js +510 -0
- package/tests/legacy/extra_info.test.js +109 -0
- package/tests/legacy/generics.test.js +176 -0
- package/tests/legacy/mutation_observer.test.js +210 -0
- package/tests/legacy/relation.test.js +517 -0
- package/tests/legacy/selector.test.js +263 -0
- package/tests/legacy/slot.test.js +915 -0
- package/tests/legacy/virtual.test.js +394 -0
- package/tests/tmpl/binding_map.test.ts +208 -0
- package/tests/tmpl/event.test.ts +206 -0
- package/tests/tmpl/expression.test.ts +429 -0
- package/tests/tmpl/lvalue.test.ts +160 -0
- package/tests/tmpl/native_rendering.test.ts +155 -0
- package/tests/tmpl/structure.test.ts +998 -0
- package/tests/types/chaining.test.ts +614 -0
- package/tests/types/createElement.test.ts +82 -0
- package/tests/types/definition.test.ts +442 -0
- package/tsconfig.json +11 -0
- package/webpack.config.js +270 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./types/src/index"
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var glassEasel;(()=>{"use strict";var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{BackendMode:()=>h,Behavior:()=>we,BehaviorBuilder:()=>Se,ClassList:()=>S,Component:()=>ve,ComponentDefinition:()=>pe,ComponentSpace:()=>ke,DataGroup:()=>W,DeepCopyKind:()=>We,Element:()=>ne,ElementIterator:()=>Ct,ElementIteratorType:()=>_t,Event:()=>Y,EventBubbleStatus:()=>R,FuncArr:()=>Qe,MutationObserver:()=>dt,NativeNode:()=>ft,Observer:()=>dt,ParsedSelector:()=>Q,RelationType:()=>te,ShadowRoot:()=>gt,StyleScopeManager:()=>C,StyleSegmentIndex:()=>Z,TextNode:()=>ht,TraitBehavior:()=>ae,VirtualNode:()=>ie,addGlobalErrorListener:()=>at,addGlobalWarningListener:()=>lt,backend:()=>n,composedBackend:()=>r,createElement:()=>Ot,dataPath:()=>i,dataUtils:()=>a,domlikeBackend:()=>o,dumpElement:()=>bt,dumpElementToString:()=>yt,dumpSingleElementToString:()=>mt,getDefaultComponentSpace:()=>Xe,glassEaselTemplate:()=>l,globalOptions:()=>Ze,mutationObserver:()=>c,registerBehavior:()=>wt,registerElement:()=>Et,removeGlobalErrorListener:()=>st,removeGlobalWarningListener:()=>ct,safeCallback:()=>it,template:()=>l,templateEngine:()=>d,triggerEvent:()=>Nt,triggerExternalEvent:()=>kt,triggerRender:()=>St,typeUtils:()=>s});var n={};e.r(n),e.d(n,{EmptyBackendContext:()=>p,EmptyBackendElement:()=>f,EmptyBackendShadowRootContext:()=>v});var r={};e.r(r),e.d(r,{EmptyComposedBackendContext:()=>_,EmptyComposedBackendElement:()=>$});var o={};e.r(o),e.d(o,{CurrentWindowBackendContext:()=>m});var i={};e.r(i),e.d(i,{parseMultiPaths:()=>x,parseSinglePath:()=>D});var a={};e.r(a),e.d(a,{deepCopy:()=>L,simpleDeepCopy:()=>T});var s={};e.r(s),e.d(s,{METHOD_TAG:()=>re});var l={};e.r(l),e.d(l,{DEFAULT_PROC_GEN_GROUP:()=>Ge,GlassEaselTemplateEngine:()=>Ve});var c={};e.r(c),e.d(c,{MutationObserver:()=>dt,MutationObserverTarget:()=>ut});var u,d={};e.r(d),function(e){e[e.Fragment=0]="Fragment",e[e.Element=1]="Element",e[e.TextNode=2]="TextNode",e[e.Component=3]="Component",e[e.VirtualNode=4]="VirtualNode"}(u||(u={}));var h,p=function(){function e(){this.mode=1,this._$styleSheetIdInc=1,this._$renderCallbacks=null,this._$rootNode=new f(3)}return e.prototype.destroy=function(){},e.prototype.getWindowWidth=function(){return 1},e.prototype.getWindowHeight=function(){return 1},e.prototype.getDevicePixelRatio=function(){return 1},e.prototype.getTheme=function(){return"light"},e.prototype.registerStyleSheetContent=function(e,t){},e.prototype.appendStyleSheetPath=function(e,t){var n=this._$styleSheetIdInc;return this._$styleSheetIdInc+=1,n},e.prototype.disableStyleSheet=function(e){},e.prototype.render=function(e){var t=this;if(this._$renderCallbacks)this._$renderCallbacks.push(e);else{var n=this._$renderCallbacks=[e];setTimeout((function(){t._$renderCallbacks=null,n.forEach((function(e){it("Render Callback",e,t,[null])}))}),16)}},e.prototype.getRootNode=function(){return this._$rootNode},e.prototype.createFragment=function(){return new f(0)},e.prototype.onEvent=function(e){},e}(),f=function(){function e(e){this.__wxElement=void 0,this._$shadowRoot=3===e?new v:null}return e.prototype.release=function(){},e.prototype.associateValue=function(e){},e.prototype.getShadowRoot=function(){return this._$shadowRoot||void 0},e.prototype.appendChild=function(e){},e.prototype.removeChild=function(e,t){},e.prototype.insertBefore=function(e,t,n){},e.prototype.replaceChild=function(e,t,n){},e.prototype.spliceBefore=function(e,t,n){},e.prototype.spliceAppend=function(e){},e.prototype.spliceRemove=function(e,t){},e.prototype.setId=function(e){},e.prototype.setSlotName=function(e){},e.prototype.setSlot=function(e,t){},e.prototype.setInheritSlots=function(){},e.prototype.setStyleScope=function(e){},e.prototype.setStyle=function(e){},e.prototype.addClass=function(e,t){},e.prototype.removeClass=function(e,t){},e.prototype.clearClasses=function(){},e.prototype.setAttribute=function(e,t){},e.prototype.removeAttribute=function(e){},e.prototype.setText=function(e){},e.prototype.getBoundingClientRect=function(e){setTimeout((function(){e({left:0,top:0,width:0,height:0})}),0)},e.prototype.getScrollOffset=function(e){setTimeout((function(){e({scrollLeft:0,scrollTop:0,scrollWidth:0,scrollHeight:0})}),0)},e.prototype.setEventDefaultPrevented=function(e,t){},e}(),v=function(){function e(){this._$rootNode=new f(4)}return e.prototype.getRootNode=function(){return this._$rootNode},e.prototype.createElement=function(e){return new f(1)},e.prototype.createTextNode=function(e){return new f(2)},e.prototype.createComponent=function(e,t){return new f(3)},e.prototype.createVirtualNode=function(){return new f(4)},e}(),_=function(){function e(){this.mode=2,this._$styleSheetIdInc=1,this._$renderCallbacks=null,this._$rootNode=new $}return e.prototype.destroy=function(){},e.prototype.getWindowWidth=function(){return 1},e.prototype.getWindowHeight=function(){return 1},e.prototype.getDevicePixelRatio=function(){return 1},e.prototype.getTheme=function(){return"light"},e.prototype.registerStyleSheetContent=function(e,t){},e.prototype.appendStyleSheetPath=function(e,t){var n=this._$styleSheetIdInc;return this._$styleSheetIdInc+=1,n},e.prototype.disableStyleSheet=function(e){},e.prototype.render=function(e){var t=this;if(this._$renderCallbacks)this._$renderCallbacks.push(e);else{var n=this._$renderCallbacks=[e];setTimeout((function(){t._$renderCallbacks=null,n.forEach((function(e){it("Render Callback",e,t,[null])}))}),16)}},e.prototype.getRootNode=function(){return this._$rootNode},e.prototype.createElement=function(e){return new $},e.prototype.createTextNode=function(e){return new $},e.prototype.createFragment=function(){return new $},e.prototype.onEvent=function(e){},e}(),$=function(){function e(){this.__wxElement=void 0}return e.prototype.release=function(){},e.prototype.associateValue=function(e){},e.prototype.appendChild=function(e){},e.prototype.removeChild=function(e,t){},e.prototype.insertBefore=function(e,t,n){},e.prototype.replaceChild=function(e,t,n){},e.prototype.spliceBefore=function(e,t,n){},e.prototype.spliceAppend=function(e){},e.prototype.spliceRemove=function(e,t){},e.prototype.setId=function(e){},e.prototype.setStyleScope=function(e){},e.prototype.setStyle=function(e){},e.prototype.addClass=function(e,t){},e.prototype.removeClass=function(e,t){},e.prototype.clearClasses=function(){},e.prototype.setAttribute=function(e,t){},e.prototype.removeAttribute=function(e){},e.prototype.setText=function(e){},e.prototype.getBoundingClientRect=function(e){setTimeout((function(){e({left:0,top:0,width:0,height:0})}),0)},e.prototype.getScrollOffset=function(e){setTimeout((function(){e({scrollLeft:0,scrollTop:0,scrollWidth:0,scrollHeight:0})}),0)},e.prototype.setEventDefaultPrevented=function(e,t){},e}(),g=["touchstart","touchmove","touchend","touchcancel","mousedown","mousemove","mouseout","mouseover","mouseup","click"],m=function(){function e(){this.mode=3,this.document=document,this._$styleSheets=[],this._$styleSheetRegistry=Object.create(null),this._$delegatedEventListeners=Object.create(null),this._$elementEventListeners=new WeakMap,this._$triggedEvents=new WeakSet}return e.prototype.destroy=function(){},e.prototype.getWindowWidth=function(){return document.documentElement.clientWidth},e.prototype.getWindowHeight=function(){return document.documentElement.clientHeight},e.prototype.getDevicePixelRatio=function(){return window.devicePixelRatio},e.prototype.getTheme=function(){return"light"},e.prototype.registerStyleSheetContent=function(e,t){this._$styleSheetRegistry[e]=String(t)},e.prototype.appendStyleSheetPath=function(e,t){var n=this._$styleSheetRegistry[e];if(void 0===n)throw new Error('No style sheet registry "'.concat(e,'"'));var r=document.createElement("style");r.innerText=n,void 0!==t&&r.setAttribute("wx-style-scope",String(t)),document.head.appendChild(r);var o=this._$styleSheets.length;return this._$styleSheets.push(r),o},e.prototype.disableStyleSheet=function(e){var t=this._$styleSheets[e];t&&document.head.removeChild(t)},e.prototype.render=function(e){var t=this;window.requestAnimationFrame((function(){it("Render Callback",e,t,[null])}))},e.prototype.getRootNode=function(){return document.body},e.prototype.onEvent=function(e){this._$eventListener||this._$initEvent(),this._$eventListener=e},e.prototype._$getEventDetail=function(e){for(var t={},n=e;Object.getPrototypeOf(n)!==Event.prototype;){for(var r=Object.keys(n),o=0;o<r.length;o+=1){var i=r[o];"function"!=typeof e[i]&&(t[i]=e[i])}n=Object.getPrototypeOf(n)}return t},e.prototype._$trigger=function(e,t,n,r,o){if(this._$eventListener){var i=e.target;1===this._$eventListener(i,t,n,{originalEvent:e,bubbles:r,composed:o})&&e.preventDefault()}},e.prototype._$initEvent=function(){var e=this,t=Object.create(null),n=!1,r=function(e,n){t[n.identifier]={x:n.clientX,y:n.clientY}},o=function(n,r){var o=r.identifier;if(t[o]){var i=t[o];(Math.abs(i.x-r.clientX)>10||Math.abs(i.y-r.clientY)>10)&&(delete t[o],e._$trigger(n,"canceltap",i,!0,!0))}},i=function(n,r){var o=r.identifier;if(t[o]){var i=t[o];delete t[o],Math.abs(i.x-r.clientX)>10||Math.abs(i.y-r.clientY)>10?e._$trigger(n,"canceltap",i,!0,!0):e._$trigger(n,"tap",i,!0,!0)}},a=function(n,r){var o=r.identifier;if(t[o]){var i=t[o];delete t[o],e._$trigger(n,"canceltap",i,!0,!0)}};document.body.addEventListener("touchstart",(function(t){e._$trigger(t,"touchstart",e._$getEventDetail(t),t.bubbles,t.composed),n=!0;for(var o=t.changedTouches,i=0;i<o.length;i+=1)r(0,o[i])}),{capture:!0}),document.body.addEventListener("touchmove",(function(t){e._$trigger(t,"touchmove",e._$getEventDetail(t),t.bubbles,t.composed);for(var n=t.changedTouches,r=0;r<n.length;r+=1)o(t,n[r])}),{capture:!0}),document.body.addEventListener("touchend",(function(t){e._$trigger(t,"touchend",e._$getEventDetail(t),t.bubbles,t.composed);for(var n=t.changedTouches,r=0;r<n.length;r+=1)i(t,n[r])}),{capture:!0}),document.body.addEventListener("touchcancel",(function(t){e._$trigger(t,"touchcancel",e._$getEventDetail(t),t.bubbles,t.composed);for(var n=t.changedTouches,r=0;r<n.length;r+=1)a(t,n[r])}),{capture:!0}),document.body.addEventListener("mousedown",(function(t){e._$trigger(t,"mousedown",e._$getEventDetail(t),t.bubbles,t.composed),n||r(0,{identifier:-1,clientX:t.clientX,clientY:t.clientY})}),{capture:!0}),document.body.addEventListener("mousemove",(function(t){e._$trigger(t,"mousemove",e._$getEventDetail(t),t.bubbles,t.composed),n||o(t,{identifier:-1,clientX:t.clientX,clientY:t.clientY})}),{capture:!0}),document.body.addEventListener("mouseup",(function(t){e._$trigger(t,"mouseup",e._$getEventDetail(t),t.bubbles,t.composed),n||i(t,{identifier:-1,clientX:t.clientX,clientY:t.clientY})}),{capture:!0});var s=this._$delegatedEventListeners;s.touchstart=!0,s.touchmove=!0,s.touchend=!0,s.mousedown=!0,s.mousemove=!0,s.mouseup=!0},e.prototype.setElementEventDefaultPrevented=function(e,t,n){var r=this;if(e){if(g.includes(t)){if(this._$delegatedEventListeners[t])return;return this._$delegatedEventListeners[t]=!0,void document.body.addEventListener(t,(function(e){r._$trigger(e,t,r._$getEventDetail(e),e.bubbles,e.composed)}),{capture:!0})}this._$elementEventListeners.has(e)||this._$elementEventListeners.set(e,Object.create(null));var o=this._$elementEventListeners.get(e);o[t]||(o[t]=!0,e.addEventListener(t,(function(e){r._$triggedEvents.has(e)||(r._$triggedEvents.add(e),r._$trigger(e,t,r._$getEventDetail(e),e.bubbles,e.composed))})))}},e}();!function(e){e[e.Shadow=1]="Shadow",e[e.Composed=2]="Composed",e[e.Domlike=3]="Domlike"}(h||(h={}));var y,b=/(~|\^+)?-?[_0-9a-z][-_0-9a-z]*/gi,C=function(){function e(){this._$names=[""]}return e.globalScope=function(){return 0},e.prototype.register=function(e){var t=this._$names.length;return this._$names.push(e),t},e.prototype.queryName=function(e){return this._$names[e]},e}(),S=function(){function e(e,t){var n,r;this._$aliasDirty=!1,this._$rawNames=[],this._$hasResolvedNames=!1,this._$elem=e;var o=null===(n=e.ownerShadowRoot)||void 0===n?void 0:n.getHostNode();if(o){var i=o.getComponentOptions();this._$owner=o.classList,this._$defaultScope=i.styleScope,this._$extraScope=null===i.extraStyleScope?void 0:i.extraStyleScope}else this._$owner=null,this._$defaultScope=C.globalScope(),this._$extraScope=void 0;if(this._$alias=t,t){var a=Object.create(null);Object.keys(t).forEach((function(e){a[e]=null})),this._$resolvedAlias=a}else this._$resolvedAlias=null;this._$prefixManager=null===(r=e.ownerShadowRoot)||void 0===r?void 0:r.getHostNode().getRootBehavior().ownerSpace.styleScopeManager}return e.prototype._$resolvePrefixes=function(e,t){var n,r=null===(n=this._$owner)||void 0===n?void 0:n._$resolvedAlias;if(r&&void 0!==r[e]){var o=r[e];if(this._$hasResolvedNames=!0,o)for(var i=0;i<o.length;i+=1){var a=o[i];t(a.scopeId,a.className)}}else if("~"===e[0])t(this._$extraScope,e.slice(1));else if("^"===e[0]){for(var s=e.slice(1),l=this._$owner;l&&"^"===s[0];)s=s.slice(1),l=l._$owner;t(l?l._$defaultScope:this._$extraScope,s)}else void 0!==this._$extraScope&&t(this._$extraScope,e),t(this._$defaultScope,e)},e.prototype._$updateResolvedAliases=function(e){var t=this,n=this._$alias[e],r=[];n&&n.forEach((function(e){t._$resolvePrefixes(e,(function(e,t){r.push({scopeId:e,className:t})}))}));var o=!1,i=this._$resolvedAlias[e];if(i)if(i.length!==r.length)o=!0;else for(var a=0;a<i.length;a+=1){var s=i[a],l=r[a];if(s.scopeId!==l.scopeId||s.className!==l.className){o=!0;break}}else r.length>0&&(o=!0);return this._$resolvedAlias[e]=r,o},e.prototype._$hasAlias=function(e){return!(!this._$alias||void 0===this._$alias[e])},e.prototype._$setAlias=function(e,t){if(this._$alias){var n=String(t).match(b)||null;this._$alias[e]=n,this._$updateResolvedAliases(e)&&(this._$aliasDirty=!0)}},e.prototype._$spreadAliasUpdate=function(){if(this._$aliasDirty){this._$aliasDirty=!1;var e=function(t){var n=t.classList;if(n){var r=n._$alias;if(r){var o=!1;if(Object.keys(r).forEach((function(e){n._$updateResolvedAliases(e)&&(o=!0)})),o){var i=t;!1===i._$external&&e(i.shadowRoot)}}n._$hasResolvedNames&&n._$updateResolvedNames()}t.childNodes.forEach((function(t){t instanceof ne&&e(t)}))},t=this._$elem;!1===t._$external&&e(t.shadowRoot)}},e.prototype._$updateResolvedNames=function(){var e=this,t=this._$elem.getBackendElement();t&&(this._$hasResolvedNames=!1,t.setAttribute("class",""),this._$rawNames.forEach((function(n){e._$addClassToBackend(n,t)})))},e.prototype._$classListAdd=function(e,t,n){var r,o=void 0===t?"":null===(r=this._$prefixManager)||void 0===r?void 0:r.queryName(t),i=o?"".concat(o,"--").concat(e):e;n.classList.add(i)},e.prototype._$classListRemove=function(e,t,n){var r,o=t&&(null===(r=this._$prefixManager)||void 0===r?void 0:r.queryName(t)),i=o?"".concat(o,"--").concat(e):e;n.classList.remove(i)},e.prototype._$addClassToBackend=function(e,t){var n=this;this._$resolvePrefixes(e,(function(e,r){n._$classListAdd(r,e,t)}))},e.prototype._$removeClassFromBackend=function(e,t){var n=this;this._$resolvePrefixes(e,(function(e,r){n._$classListRemove(r,e,t)}))},e.prototype.toggle=function(e,t){var n=this,r=String(e).match(b)||null;if(r){var o=this._$elem.getBackendElement();r.forEach((function(r){var i=n._$rawNames.indexOf(e),a=!1;if((void 0===t?i<0:t)?i<0&&(n._$rawNames.push(r),o&&n._$addClassToBackend(r,o),a=!0):i>=0&&(n._$rawNames.splice(i,1),o&&n._$removeClassFromBackend(r,o),a=!0),a){var s=n._$elem;s._$mutationObserverTarget&&ut.callAttrObservers(s,{type:"properties",target:s,attributeName:"class"})}}))}},e.prototype.contains=function(e){for(var t=0;t<this._$rawNames.length;t+=1){var n=this._$rawNames[t];if("~"===n[0]){if((r=n.slice(1))===e)return!0}else if("^"===n[0]){for(var r=n.slice(1);"^"===r[0];)r=r.slice(1);if(r===e)return!0}else if(n===e)return!0}return!1},e.prototype.setClassNames=function(e){var t;t=null==e?"":String(e),this._$rawNames=t.match(b)||[],this._$updateResolvedNames();var n=this._$elem;n._$mutationObserverTarget&&ut.callAttrObservers(n,{type:"properties",target:n,attributeName:"class"})},e.prototype.getClassNames=function(){return this._$rawNames?this._$rawNames.join(" "):""},e}(),w=function(e){for(var t=e.str;e.cur<t.length;){var n=t[e.cur];if(" "!==n&&"\n"!==n&&"\r"!==n&&"\t"!==n&&"\f"!==n)break;e.cur+=1}return e.cur<t.length},E=function(e){for(var t=e.str,n="";e.cur<t.length;){var r=t[e.cur];if(!(r>="0"&&r<="9"))break;n+=r,e.cur+=1}if(!n)throw new Error('data path descriptor "'.concat(t,'" is illegal at char ').concat(e.cur," (illegal index)"));return parseInt(n,10)},O=function(e){for(var t=e.str,n="";e.cur<t.length;){var r=t[e.cur];if("\\"===r)e.cur+1===t.length||(n+=t[e.cur+1],e.cur+=1);else if(/^[_a-zA-Z]$/.test(r))n+=r;else{if(!(r>="0"&&r<="9"))break;if(""===n)throw new Error('data path descriptor "'.concat(t,'" is illegal at char ').concat(e.cur," (field name cannot start with digits)"));n+=r}e.cur+=1}return n},N=function(e){for(var t=e.str,n="";e.cur<t.length;){var r=t[e.cur];if("\\"===r)if(e.cur+1===t.length)n+="\\",e.cur+=1;else{var o=t[e.cur+1];"."===o||"["===o||"]"===o||"\\"===o?(n+=o,e.cur+=2):(n+="\\",e.cur+=1)}else{if("."===r||"["===r)break;n+=r,e.cur+=1}}return n},k=function(e){var t=e.str;if(w(e),"*"===t[e.cur]&&"*"===t[e.cur+1])return e.cur+=2,["**"];var n=O(e);if(!n)throw new Error('data path descriptor "'.concat(t,'" is illegal at char ').concat(e.cur," (first field name illegal)"));for(var r=[n];e.cur<t.length&&w(e);){var o=t[e.cur];if("."===o){if(e.cur+=1,w(e),"*"===t[e.cur]&&"*"===t[e.cur+1]){r.push("**"),e.cur+=2;break}var i=O(e);if(!i)throw new Error('data path descriptor "'.concat(t,'" is illegal at char ').concat(e.cur," (field name illegal)"));r.push(i)}else{if("["!==o)break;e.cur+=1,w(e);var a=E(e);if(w(e),"]"!==t[e.cur])throw new Error('data path descriptor "'.concat(t,'" is illegal at char ').concat(e.cur," (illegal index)"));e.cur+=1,r.push(a)}}return r},D=function(e){try{var t=function(e){for(var t=e.str,n=[];e.cur<t.length;){var r=t[e.cur];if("."===r)e.cur+=1,""!==(i=N(e))&&n.push(i);else if("["===r){e.cur+=1;var o=E(e);if("]"!==t[e.cur]&&e.cur<t.length)throw new Error('data path descriptor "'.concat(t,'" is illegal at char ').concat(e.cur," (illegal index)"));e.cur+=1,n.push(o)}else{var i=N(e);n.push(i)}}return 0===n.length&&n.push(""),n}({str:e,cur:0});return t}catch(e){return et(e.message),null}},x=function(e){try{if(Array.isArray(e))return e.map((function(e){return k({str:e,cur:0})}));var t={str:e,cur:0},n=function(e){var t=[];for(t.push(k(e)),w(e);","===e.str[e.cur];)e.cur+=1,t.push(k(e)),w(e);return t}(t);if(t.cur!==e.length)throw new Error('data path descriptor "'.concat(e,'" is illegal at char ').concat(t.cur));return n}catch(e){return et(e.message),[]}},A=function(e,t){if("object"==typeof e&&null!==e){var n=t.get(e);if(void 0!==n)return n;if(Array.isArray(e)){var r=[];t.set(e,r);for(var o=0;o<e.length;o+=1)r[o]=A(e[o],t);return r}var i={};t.set(e,i);var a=Object.keys(e);for(o=0;o<a.length;o+=1){var s=a[o];i[s]=A(e[s],t)}return i}return"symbol"==typeof e?Symbol(e.description):e},T=function(e){if("object"==typeof e&&null!==e){if(Array.isArray(e)){for(var t=[],n=0;n<e.length;n+=1)t[n]=T(e[n]);return t}var r={},o=Object.keys(e);for(n=0;n<o.length;n+=1){var i=o[n];r[i]=T(e[i])}return r}return"symbol"==typeof e?Symbol(e.description):e},L=function(e,t){return t?A(e,new WeakMap):T(e)},M=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},P=Object.prototype.hasOwnProperty;!function(e){e[e.None=0]="None",e[e.Simple=1]="Simple",e[e.SimpleWithRecursion=2]="SimpleWithRecursion"}(y||(y={}));var R,j=function(){function e(e){this.observerTree={sub:{}},this.observers=[],this.propFields=e}return e.prototype.cloneSub=function(){var t=new e(this.propFields);return this.observers.length>0&&(t.observerTree=T(this.observerTree),t.observers=this.observers.slice()),t},e.prototype.addObserver=function(e,t){var n=this.observers.length;this.observers.push({path:t,f:e});for(var r=0;r<t.length;r+=1){for(var o=t[r],i=this.observerTree,a=!1,s=0;s<o.length;s+=1){var l=o[s];if("**"===l){a=!0;break}i.sub[l]||(i.sub[l]={sub:{}}),i=i.sub[l]}a?i.wildcard?i.wildcard.push(n):i.wildcard=[n]:i.listener?i.listener.push(n):i.listener=[n]}},e}(),B=function(e,t,n,r){for(var o=new Array(n.length),i=0;i<n.length;i+=1){for(var a=n[i],s=t,l=0;l<a.length;l+=1){var c=a[l];if("**"===c)break;if("object"!=typeof s||null===s){s=void 0;break}s=s[c]}o[i]=s}it("Data Observer",r,e.getMethodCaller(),o,e||void 0)},I=function(e,t){if(e.listener)for(var n=0;n<e.listener.length;n+=1)t[e.listener[n]]=!0;if(e.wildcard)for(n=0;n<e.wildcard.length;n+=1)t[e.wildcard[n]]=!0;var r=Object.keys(e.sub);for(n=0;n<r.length;n+=1){var o=r[n];I(e.sub[o],t)}},U=function(e,t,n){for(var r=e,o=!0,i=0;i<n.length;i+=1){var a=n[i];if(r.wildcard)for(var s=r.wildcard,l=0;l<s.length;l+=1)t[s[l]]=!0;if(!P.call(r.sub,a)){o=!1;break}r=r.sub[a]}o&&I(r,t)},F=function(e,t,n,r){for(var o=0;o<e.length;o+=1){var i=e[o],a=i.path,s=i.f;t[o]&&(t[o]=!1,n&&B(n,r,a,s))}},G=function(e){return e===We.Simple?1:e===We.SimpleWithRecursion?2:0},W=function(){function e(e,t,n,r,o,i,a){this._$modelBindingListener=null,this._$pendingChanges=[],this._$doingUpdates=null,this._$comp=e,this.data=t,this._$pureDataPattern=n,this._$dataDeepCopy=r,this._$propertyPassingDeepCopy=o,this._$reflectToAttributes=i&&!!e,this._$propFields=a.propFields,this._$observerTree=a.observerTree,this._$observers=a.observers,this._$observerStatus=new Array(a.observers.length),this.innerData=this._$generateInnerData(t)}return e.prototype._$generateInnerData=function(e){var t=this._$pureDataPattern,n=this._$dataDeepCopy;if(t||0!==n){for(var r={},o=Object.keys(e),i=0;i<o.length;i+=1){var a=o[i],s=e[a];t&&t.test(a)||(r[a]=0===n?s:2===n?L(s,!0):T(s))}return r}return null},e.create=function(t){return new e(null,t,null,0,0,!1,new j({}))},e.prototype.setUpdateListener=function(e){this._$updateListener=e},e.prototype.replaceWholeData=function(e){this.data=e,this.innerData=this._$generateInnerData(e)},e.prototype.replaceDataOnPath=function(e,t){this._$pendingChanges.push([e,t,void 0,void 0])},e.prototype.spliceArrayDataOnPath=function(e,t,n,r){Array.isArray(r)?this._$pendingChanges.push([e,r,null!=t?t:-1,n||0]):et('The splice insertion must be a string (on path "'.concat(e.join("."),'"). The change is ignored.'))},e.prototype.replaceProperty=function(e,t){var n=t;return!!this._$propFields[e]&&(0!==this._$propertyPassingDeepCopy&&(n=2===this._$propertyPassingDeepCopy?L(t,!0):T(t)),this._$pendingChanges.push([[e],n,void 0,void 0]),!0)},e.prototype.setChanges=function(e){this._$pendingChanges=e},e.prototype.getChanges=function(){return this._$pendingChanges},e.prototype.setModelBindingListener=function(e,t){this._$modelBindingListener?this._$modelBindingListener[e]=t:(this._$modelBindingListener=Object.create(null))[e]=t},e.prototype.applyDataUpdates=function(e){var t,n,r;void 0===e&&(e=!1);var o,i,a=this._$propFields,s=this._$comp,l=this._$pureDataPattern,c=this._$dataDeepCopy,u=!!this._$doingUpdates;this._$observers.length>0?this._$doingUpdates?(o=this._$doingUpdates.combined,i=this._$doingUpdates.prop):(this._$doingUpdates={prop:[],combined:[],count:0},o=this._$doingUpdates.combined,i=this._$doingUpdates.prop):(o=[],i=[]);var d=this._$pendingChanges;this._$pendingChanges=[];for(var h=0;h<d.length;h+=1){var p=d[h],f=p[0],v=p[1],_=p[2],$=p[3],g=void 0!==$,m=String(f[0]),y=!!l&&l.test(m);if((z=a[m])&&1===f.length){var b=this.data[m],C=void 0,S=void 0;if(g){if(Array.isArray(b)){var w=p;C=_>=0&&_<b.length?_:b.length,w[2]=C,b.splice.apply(b,M([C,$],v,!1))}else et('An array splice change cannot be applied to a non-array value (on path "'.concat(f.join("."),'"). The change is ignored.'));S=b}else S=ye(v,m,z);if(!y&&this.innerData){var E=void 0;if(0===c)p[1]=E=S;else if(void 0!==C){E=this.innerData[m];var O=void 0;p[1]=O=2===c?L(v,!0):T(v),(t=E).splice.apply(t,M([C,$],O,!1))}else p[1]=E=2===c?L(S,!0):T(S);this.innerData[m]=E}if(this.data[m]=S,this._$reflectToAttributes){var N=s.getBackendElement();if(N){var k=S;if(z.reflectIdPrefix){var D=s.ownerShadowRoot;if(D){var x=D.getHostNode()._$idPrefix;x&&(k="".concat(x,"--").concat(S))}}var A=m.replace(/[A-Z]/g,(function(e){return"-".concat(e.toLowerCase())})),R=typeof k;"boolean"===R?S?N.setAttribute(A,""):N.removeAttribute(A):"object"===R?N.setAttribute(A,JSON.stringify(k)):N.setAttribute(A,k)}}y||b===S||i.push({propName:m,prop:z,oldValue:b,newValue:S,skipModelListener:e})}else{for(var j=this.data,B=m,I=1;I<f.length;I+=1){var G=f[I];Number.isFinite(G)?P.call(j,B)&&Array.isArray(j[B])||(j[B]=[]):P.call(j,B)&&null!==j[B]&&"object"==typeof j[B]&&!Array.isArray(j[B])||(j[B]={}),j=j[B],B=G}if(C=void 0,g?(b=j[B],Array.isArray(b)?(w=p,C=_>=0&&_<b.length?_:b.length,w[2]=C,b.splice.apply(b,M([C,$],v,!1))):et('An array splice change cannot be applied to a non-array value (on path "'.concat(f.join("."),'"). The change is ignored.'))):j[B]=v,!y&&this.innerData){j=this.innerData,B=m;for(var W=1;W<f.length;W+=1)G=f[W],Number.isFinite(G)?P.call(j,B)&&Array.isArray(j[B])||(j[B]=[]):P.call(j,B)&&null!==j[B]&&"object"==typeof j[B]&&!Array.isArray(j[B])||(j[B]={}),j=j[B],B=G;E=void 0,0===c?p[1]=E=v:void 0!==C?(E=j[B],O=void 0,p[1]=O=2===c?L(v,!0):T(v),(n=E).splice.apply(n,M([C,$],O,!1))):p[1]=E=2===c?L(v,!0):T(v),j[B]=E}!y&&z&&i.push({propName:m,prop:z,oldValue:void 0,newValue:v,skipModelListener:e||!1})}U(this._$observerTree,this._$observerStatus,f),y||o.push(p),this._$doingUpdates&&(this._$doingUpdates.count+=1)}if(!u){if(this._$doingUpdates){var V=void 0;do{V=this._$doingUpdates.count,F(this._$observers,this._$observerStatus,s,this.data)}while(V!==this._$doingUpdates.count);this._$doingUpdates=null}if(null===(r=this._$updateListener)||void 0===r||r.call(this,this.innerData||this.data,o),s)for(h=0;h<i.length;h+=1){var H=i[h],z=(m=H.propName,H.prop),q=H.oldValue,X=H.newValue;if(!H.skipModelListener&&this._$modelBindingListener){var K=this._$modelBindingListener[m];K&&K(X)}z.observer&&it("Property Observer",z.observer,s.getMethodCaller(),[X,q],s),s._$mutationObserverTarget&&ut.callAttrObservers(s,{type:"properties",target:s,propertyName:m})}}},e}();!function(e){e[e.Normal=0]="Normal",e[e.NoDefault=1]="NoDefault"}(R||(R={}));var V,H,z=Date.now(),q=z;!function(e){e[e.None=0]="None",e[e.Mut=1]="Mut",e[e.Final=2]="Final"}(V||(V={})),function(e){e[e.NotChanged=0]="NotChanged",e[e.Failed=1]="Failed",e[e.Init=2]="Init",e[e.Added=3]="Added",e[e.Removed=4]="Removed"}(H||(H={}));var X,K=function(){function e(){this.listeners=Object.create(null),this.captureListeners=null}return e.prototype.addListener=function(e,t,n){void 0===n&&(n={});var r,o,i,a=n.final?2:n.mutated?1:0;return n.capture||n.useCapture?this.captureListeners?r=this.captureListeners:(r=Object.create(null),this.captureListeners=r):r=this.listeners,r[e]?(i=!0,o=r[e]):(i=!1,o=r[e]={mutCount:0,finalCount:0,funcArr:new ot}),o.funcArr.add(t,a),2===a?o.finalCount+=1:1===a&&(o.mutCount+=1),i?2===a&&1===o.finalCount?3:0:3},e.prototype.removeListener=function(e,t,n){void 0===n&&(n={});var r=n.capture||n.useCapture?this.captureListeners:this.listeners;if(!r)return 1;var o=r[e];if(!o)return 1;var i=o.funcArr.remove(t);return null===i?1:(2===i?o.finalCount-=1:1===i&&(o.mutCount-=1),2===i&&0===o.finalCount?4:0)},e}(),Y=function(){function e(e,t,n){void 0===n&&(n={});var r=function(){var e=Date.now();return e<q&&(z+=e-q),q=e,e-z}();this.type=e,this.timeStamp=r,this.detail=t,this.bubbles=n.bubbles||!1,this.composed=n.composed||!1,this._$capturePhase=n.capturePhase||!1,this._$eventBubblingControl={stopped:!1,mutated:!1,noDefault:!1},this._$originalEvent=n.originalEvent,this._$dispatched=!1,n.extraFields&&Object.assign(this,n.extraFields)}return e.prototype.getEventBubbleStatus=function(){return this._$eventBubblingControl.noDefault?1:0},e.prototype.wrapShadowedEvent=function(e,t,n){var r=Object.create(this);return r.target=e,r.mark=t,r.currentTarget=n,r},e.prototype.getOriginalEvent=function(){return this._$originalEvent},e.prototype.preventDefault=function(){this._$eventBubblingControl.noDefault=!0},e.prototype.defaultPrevented=function(){return this._$eventBubblingControl.noDefault},e.prototype.stopPropagation=function(){this._$eventBubblingControl.stopped=!0},e.prototype.propagationStopped=function(){return this._$eventBubblingControl.stopped},e.prototype.markMutated=function(){this._$eventBubblingControl.mutated=!0},e.prototype.mutatedMarked=function(){return this._$eventBubblingControl.mutated},e.prototype.dispatch=function(e,t){var n=this;if(this._$dispatched)throw new Error("Event cannot be dispatched twice");this._$dispatched=!0;var r=this.type,o=this.composed,i=this.bubbles,a=t&&!o,s=this._$eventBubblingControl,l=function(e,t,o,i){var a=o._$eventTarget;if(a){var s=i?a.captureListeners:a.listeners;if(s){var l=s[r];if(l){var c=n.mutatedMarked(),u=o instanceof ve,d=u?o.getMethodCaller():o,h=n.wrapShadowedEvent(e,t,d);!1===l.funcArr.call(d,[h],(function(e){return!c||1!==e}),u?o:void 0)||l.finalCount>0?(h.stopPropagation(),h.preventDefault()):l.mutCount>0&&h.markMutated()}}}},c=function(e,t){for(var n=function(e){for(var r=e,i=e instanceof ve?e.getMethodCaller():e,a=e.collectMarks();;){if(!1===t(r,i,a))return null;var s=void 0;if(o){if(r instanceof gt)return r.getHostNode();for(s=r.parentNode;null==s?void 0:s._$inheritSlots;)s=s.parentNode;if(s instanceof ve&&!s._$external){var l=s.shadowRoot.getContainingSlot(r);if(!l)return null;s=n(l)}}else s=r.parentNode;if(!s)return null;r=s}},r=e;;){var i=n(r);if(!i)break;r=i}};if(this._$capturePhase&&!s.stopped&&!a){var u=[];c(e,(function(e,t,n){u.push([e,t,n])}));for(var d=u.length-1;d>=0;d-=1){var h=u[d],p=h[0],f=h[1],v=h[2];if(p._$eventTarget&&(l(f,v,p,!0),s.stopped))break}}if(!s.stopped&&t&&e instanceof ve&&e._$external&&e.shadowRoot.handleEvent(t,this),!s.stopped&&!a){var _=!0;c(e,(function(e,t,r){if(!_&&e instanceof ve&&e._$external){var o=e.shadowRoot;o.handleEvent(o.slot,n)}return _=!1,e._$eventTarget&&l(t,r,e,!1),i&&!s.stopped}))}},e.dispatchEvent=function(e,t){return t.dispatch(e)},e.dispatchExternalEvent=function(e,t,n){return n.dispatch(e,t)},e.triggerEvent=function(t,n,r,o){var i=new e(n,r,o);e.dispatchEvent(t,i)},e.triggerExternalEvent=function(t,n,r,o,i){var a=new e(r,o,i);e.dispatchExternalEvent(t,n,a)},e}();!function(e){e[e.Child=0]="Child",e[e.Descendant=1]="Descendant",e[e.CrossShadowDescendant=2]="CrossShadowDescendant"}(X||(X={}));var Z,J=function(e){var t;return null===(t=e.ownerShadowRoot)||void 0===t?void 0:t.getHostNode().getRootBehavior().ownerSpace},Q=function(){function e(t){this.unions=[];for(var n=String(t||"").split(","),r=0;r<n.length;r+=1){for(var o=n[r].split(/( |\t|>+)/g),i=[],a=1,s=0;s<o.length;s+=1){var l=o[s];if(l&&" "!==l&&"\t"!==l&&">>"!==l)if(">"!==l[0]){var c=e._$parseSegment(l,a);if(a=1,!c)break;i.push(c)}else{if(1!==a)break;a=3===l.length?2:0}}s===o.length&&i.length&&this.unions.push(i)}}return e._$parseSegment=function(e,t){var n=/^(#[_a-zA-Z][-_a-zA-Z0-9:]*|)((?:\.-?[_a-zA-Z][-_a-zA-Z0-9]*)+|)$/.exec(e);if(!n)return null;var r=n[1].slice(1),o=n[2].split(".");return o.shift(),r||o.length?{id:r,classes:o,relation:t}:null},e.prototype.isEmpty=function(){return 0===this.unions.length},e._$testSelectorSegment=function(t,n,r,o,i,a){var s;if(r===t)return!1;var l=o[i],c=!0;(J(r)!==n||l.id&&l.id!==r.id)&&(c=!1);for(var u=l.classes,d=0;c&&d<u.length;d+=1)(null===(s=r.classList)||void 0===s?void 0:s.contains(u[d]))||(c=!1);if(!c&&0===a)return!1;var h=r;if(c&&0===i){if(null===t)return!0;for(h=h.parentNode;h;h=h.parentNode)if(h===t)return!0;if(2!==a)return!1;h=r,c=!1}var p=c?l.relation:a;do{h.parentNode?h=h.parentNode:2===p?h=h instanceof gt?h.getHostNode():null:2===a?(c=!1,h=h instanceof gt?h.getHostNode():null):h=null,h===t&&(h=null)}while(h instanceof ie);if(!h)return!1;if(c){if(e._$testSelectorSegment(t,n,h,o,i-1,p))return!0;if(2!==a)return!1}return e._$testSelectorSegment(t,n,h,o,i,a)},e.prototype.testSelector=function(t,n){if(n instanceof ie)return!1;var r,o=this.unions;if(void 0===(r=null!==t&&J(t)||J(n)))return!1;for(var i=0;i<o.length;i+=1){var a=o[i];if(e._$testSelectorSegment(t,r,n,a,a.length-1,0))return!0}return!1},e.prototype.query=function(e,t){var n=this,r=[],o=function(e,t,i){if(n.testSelector(e,t)){if(i)return t;r.push(t)}if(t instanceof ve){var a=t.getShadowRoot();if(a){var s=o(e,a,i);if(s&&i)return s}}for(var l=t.childNodes,c=0;c<l.length;c+=1){var u=l[c];if(u instanceof ne){var d=o(e,u,i);if(d&&i)return d}}return null},i=o(e,e,t);return t?i:r},e}();!function(e){e[e.MAIN=0]="MAIN",e[e.TEMPLATE_EXTRA=1]="TEMPLATE_EXTRA",e[e.ANIMATION_EXTRA=2]="ANIMATION_EXTRA",e[e.TEMP_EXTRA=3]="TEMP_EXTRA"}(Z||(Z={}));var ee,te,ne=function(){function e(){throw new Error("Element cannot be constructed directly")}return e.prototype._$initialize=function(e,t,n,r){this._$backendElement=t,t&&(t.__wxElement=this),this._$destroyOnDetach=!1,this._$nodeTreeContext=r||n._$nodeTreeContext,this._$nodeId="",this._$nodeAttributes=null,this._$nodeSlot="",this._$slotName=null,this._$slotValues=null,this._$nodeSlotElement=null,this._$subtreeSlotCount=0,this._$inheritSlots=!1,this._$placeholderHandler=void 0,this._$virtual=e,this.dataset=null,this._$marks=null,this._$attached=!1,this.classList=null,this._$styleSegments=[],this.parentNode=null,this.childNodes=[],this.ownerShadowRoot=n,this._$mutationObserverTarget=null,this._$eventTarget=new K},Object.defineProperty(e.prototype,"$$",{get:function(){return this._$backendElement},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._$nodeId},set:function(e){var t,n=String(e);if(this._$nodeId!==n){if(this._$nodeId=n,this.ownerShadowRoot){var r=this.ownerShadowRoot.getHostNode();if(this.ownerShadowRoot._$markIdCacheDirty(),!this._$virtual&&r.getComponentOptions().writeIdToDOM){var o=r._$idPrefix,i=o?"".concat(o,"--").concat(n):n,a=this._$backendElement;a&&(a.id=i)}}Ze.writeExtraInfoToAttr&&(null===(t=this._$backendElement)||void 0===t||t.setAttribute("exparser:info-attr-id",n)),this._$mutationObserverTarget&&ut.callAttrObservers(this,{type:"properties",target:this,attributeName:"id"})}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"slot",{get:function(){return this._$nodeSlot},set:function(t){var n=String(t),r=this._$nodeSlot;if(r!==n)if(this._$inheritSlots)et('slots-inherited nodes do not support "slot" attribute.');else{this._$nodeSlot=n;var o=this.parentNode;if(o){for(var i=o;null==i?void 0:i._$inheritSlots;)i=i.parentNode;if(i instanceof ve&&!i._$external){var a=i.shadowRoot;if(a.isDynamicSlots())return void et("nodes inside dynamic slots should change binding slots through Element#setSlotElement.");var s=a.getSlotElementFromName(r),l=a.getSlotElementFromName(n);e.insertChildReassignComposed(o,this,s,l,o.childNodes.indexOf(this)+1)}}this._$mutationObserverTarget&&ut.callAttrObservers(this,{type:"properties",target:this,attributeName:"slot"})}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attributes",{get:function(){var e=[];return this._$nodeAttributes&&Object.entries(this._$nodeAttributes).forEach((function(t){var n=t[0],r=t[1];e.push({name:n,value:r})})),e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"class",{get:function(){return this.classList?this.classList.getClassNames():""},set:function(e){this.classList&&this.classList.setClassNames(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"style",{get:function(){return this._$styleSegments[0]||""},set:function(e){this.setNodeStyle(e,0)},enumerable:!1,configurable:!0}),e.prototype.asTextNode=function(){return null},e.prototype.asElement=function(){return this},e.prototype.asNativeNode=function(){return this instanceof ft?this:null},e.prototype.asVirtualNode=function(){return this instanceof ie?this:null},e.prototype.asInstanceOf=function(e){return this instanceof ve?this.asInstanceOf(e):null},e.prototype.getBackendContext=function(){return this._$nodeTreeContext},e.prototype.getBackendMode=function(){return this._$nodeTreeContext.mode},e.prototype.getBackendElement=function(){return this._$backendElement},e.prototype.destroyBackendElement=function(){this._$backendElement&&(this._$backendElement=null)},e.prototype.destroyBackendElementOnDetach=function(){this._$destroyOnDetach=!0},e.prototype.isVirtual=function(){return this._$virtual},e.prototype.setNodeStyle=function(e,t){if(void 0===t&&(t=0),this._$styleSegments[t]!==e){this._$styleSegments[t]=e;var n=this._$styleSegments.join(";");this._$backendElement&&this._$backendElement.setAttribute("style",n),this._$mutationObserverTarget&&ut.callAttrObservers(this,{type:"properties",target:this,attributeName:"style"})}},e.checkAndCallAttached=function(t){!function t(n){var r;if(n instanceof e&&!n._$attached){if(n._$attached=!0,n instanceof ve){null===(r=n._$lifetimeFuncs.attached)||void 0===r||r.call(n.getMethodCaller(),[]),n._$relation&&(n._$relation.triggerLinkEvent(2,!1),n._$relation.triggerLinkEvent(4,!1),n._$relation.triggerLinkEvent(0,!1)),n._$mutationObserverTarget&&ut.callAttachObservers(n,{type:"attachStatus",target:n,status:"attached"});var o=n.getShadowRoot();o&&t(o)}n.childNodes.forEach(t)}}(t)},e.checkAndCallDetached=function(t){!function t(n){var r;if(n instanceof e&&n._$attached)if(n.childNodes.forEach(t),n instanceof ve){var o=n._$placeholderHandler;o&&o();var i=n.getShadowRoot();i&&t(i),n._$attached=!1,null===(r=n._$lifetimeFuncs.detached)||void 0===r||r.call(n.getMethodCaller(),[]),n._$relation&&(n._$relation.triggerLinkEvent(2,!0),n._$relation.triggerLinkEvent(4,!0),n._$relation.triggerLinkEvent(0,!0)),n._$mutationObserverTarget&&ut.callAttachObservers(n,{type:"attachStatus",target:n,status:"detached"})}else n._$attached=!1;n._$destroyOnDetach&&n.destroyBackendElement()}(t)},e.checkAndCallMoved=function(t){!function t(n){var r;if(n instanceof e&&n._$attached&&(n.childNodes.forEach(t),n instanceof ve)){var o=n.getShadowRoot();o&&t(o),null===(r=n._$lifetimeFuncs.moved)||void 0===r||r.call(n.getMethodCaller(),[]),n._$relation&&(n._$relation.triggerLinkEvent(2,!1),n._$relation.triggerLinkEvent(4,!1),n._$relation.triggerLinkEvent(0,!1))}}(t)},e.checkChildObservers=function(e,t,n){var r,o=e._$mutationObserverTarget;if(o&&(!(null===(r=o.childObservers)||void 0===r?void 0:r.empty)||o.hasSubtreeListeners())){var i,a=[n];i="add"===t?{type:"childList",target:e,addedNodes:a}:"remove"===t?{type:"childList",target:e,removedNodes:a}:{type:"childList",target:e,addedNodes:a,removedNodes:a},ut.callChildObservers(e,i)}},e.hasSubtreeMutationObservers=function(e){var t;return(null===(t=e._$mutationObserverTarget)||void 0===t?void 0:t.hasSubtreeListeners())||!1},e.updateSlotCount=function(e,t){for(var n=e;;){n._$subtreeSlotCount+=t;var r=n.parentNode;if(!r){n instanceof gt&&n._$markSlotCacheDirty();break}n=r}},e._$insertChildReassignSlot=function(t,n,r,o){var i=t.getHostNode(),a=i.childNodes.length;t.forEachNodeInSpecifiedSlot(n,(function(t,n){t instanceof e&&t._$inheritSlots||e.insertChildReassignComposed(i,t,r,o,a)}))},e.insertChildReassignComposed=function(t,n,r,o,i){if(r)if(o);else{var a=e.findNearestNonVirtual(r);if(a){var s=e.countNonVirtual(n);if(s){for(var l=s[0],c=s[1],u=l._$backendElement,d=1;d<c;d+=1){var h=u.nextSibling;h&&a.removeChild(h)}c>0&&a.removeChild(u)}}}o&&e.insertChildComposed(t,n,void 0,!1,i)},e.findNearestNonVirtual=function(e){for(var t=e;;){if(!t._$virtual)return t._$backendElement;if(t instanceof gt)t=t.getHostNode();else{var n=t.parentNode;if(!n)return null;if(n instanceof ve&&!n._$external){var r=n.shadowRoot.getContainingSlot(t);if(!r)return null;t=r}else t=n}}},e.countNonVirtual=function(t){var n=null,r=0,o=function(t){t instanceof e&&t._$virtual?t.forEachComposedChild(o):(0===r&&(n=t),r+=1)};return o(t),n?[n,r]:null},e.insertChildComposed=function(t,n,r,o,i){for(var a,s,l,c=!1,u=t;null==u?void 0:u._$inheritSlots;)c=!0,u=u.parentNode;if(u){var d,h=u,p=h._$nodeTreeContext,f=!1;if(h instanceof ve)if(h._$external){var v=h.shadowRoot.slot;d=v}else c=!0,void 0!==(v=h.shadowRoot.getSingleSlotElement())?d=v?e.findNearestNonVirtual(v):void 0:(h.shadowRoot.isDynamicSlots()&&(f=!0),d=void 0);else h._$virtual&&(c=!0),d=e.findNearestNonVirtual(h);var _=function(t,n,r,o){var i=function(t){return t instanceof e&&t._$inheritSlots?t.childNodes.every(i):o(t)},a=function(t){if(d){if(t instanceof e&&t._$inheritSlots)return t.childNodes.every(i)}else if(f){if(n!==t._$nodeSlotElement)return!0;if(t instanceof e&&t._$inheritSlots)return t.childNodes.every(i)}else{if(t instanceof e&&t._$inheritSlots)return t.childNodes.every(a);if(r!==(t instanceof e?t._$nodeSlot:""))return!0}return o(t)};a(t)},$=function(t,n,r,o){var i,a=t.childNodes;if(n>=0)for(var s=function(t){var n=null,i=function(t){return t instanceof e&&t._$virtual?t.forEachComposedChild(i):null===(n=t)};if(_(a[t],r,o,i),n)return{value:n}},l=n;l<a.length;l+=1){var c=s(l);if("object"==typeof c)return c.value}if(t instanceof gt)i=t.getHostNode();else if(t instanceof ve&&!t._$external){var u=null===r?t.shadowRoot.getSlotElementFromName(o):r;if(!u)return null;i=u}else i=t;if(!i._$virtual)return null;var d=i.parentNode;if(d){l=d.childNodes.lastIndexOf(i);var h=void 0,p=void 0;i._$inheritSlots?(h=r,p=o):d instanceof ve&&!d._$external?void 0!==d.shadowRoot.getSingleSlotElement()?(h=null,p=""):(h=d.shadowRoot.getContainingSlot(i),p=i._$slotName||""):(h=null,p="");var f=$(d,l+1,h,p);if(f)return f}return null},g=null,m=function(a,s){var l;if(void 0===s)l=d;else{var u=h;l=u._$external?u.shadowRoot.slot:a?e.findNearestNonVirtual(a):null}var f=s||"",v=0,m=null,y=null;if(n){var b=g||p.document.createDocumentFragment();g=y;var C=function(t){return t instanceof e&&t._$virtual?t.forEachComposedChild(C):(b.appendChild(t._$backendElement),y=b),!0};_(n,a,f,C)}if(l){if((r||c)&&(o&&r?(_(r,a,f,(function(t){if(t instanceof e){var n=e.countNonVirtual(t);n&&(m||(m=n[0]),v+=n[1])}else m||(m=t),v+=1;return!0})),0===v&&y&&(m=$(t,i+1,a,f))):y&&(m=$(t,i,a,f))),y)if(m){var S=m._$backendElement;l.insertBefore(y,S);for(var w=1;w<v;w+=1)(E=S.nextSibling)&&l.removeChild(E);v>0&&l.removeChild(S)}else l.appendChild(y);else if(v>0){for(S=m._$backendElement,w=1;w<v;w+=1){var E;(E=S.nextSibling)&&l.removeChild(E)}v>0&&l.removeChild(S)}}else g=null};if(void 0!==d)null===d||(c||n instanceof e&&n._$virtual||r instanceof e&&r._$virtual?m(null):o?n?d.replaceChild(n._$backendElement,r._$backendElement):d.removeChild(r._$backendElement):r?d.insertBefore(n._$backendElement,r._$backendElement):d.appendChild(n._$backendElement));else{var y=[],b=function(t){var n;if(t._$nodeSlotElement)n=t._$nodeSlotElement;else if(t instanceof e){if(t._$inheritSlots)return void t.childNodes.forEach(b);n=t._$nodeSlot}else n="";y.indexOf(n)<0&&y.push(n)};o&&r&&b(r),n&&b(n);for(var C=0;C<y.length;C+=1){var S=y[C];"string"==typeof S?m(h.shadowRoot.getSlotElementFromName(S),S):m(S,"")}}Ze.writeExtraInfoToAttr&&(o&&r instanceof e&&(null===(a=r._$backendElement)||void 0===a||a.removeAttribute("exparser:info-in-slot-of")),n instanceof e&&(t instanceof ve?null===(s=n._$backendElement)||void 0===s||s.setAttribute("exparser:info-in-slot-of",t._$componentInstanceId):null===(l=n._$backendElement)||void 0===l||l.removeAttribute("exparser:info-in-slot-of")))}},e.insertChildSingleOperation=function(t,n,r,o){var i,a,s,l,c;if(n&&t.ownerShadowRoot!==n.ownerShadowRoot)throw new Error("Cannot move the node from one shadow tree to another shadow tree.");var u,d=r,h=d>=0?t.childNodes[d]:void 0;if((u=!!o&&!!h&&n!==h)||n){var p,f=!1,v=0;if(n){if(p=n.parentNode){var _=p.childNodes.indexOf(n);p.childNodes.splice(_,1),p===t&&_<d&&(d-=1)}n.parentNode=t,n instanceof e&&(p!==t?(p&&(null===(i=p._$mutationObserverTarget)||void 0===i||i.detachChild(n),n._$subtreeSlotCount>0&&e.updateSlotCount(p,-n._$subtreeSlotCount)),null===(a=t._$mutationObserverTarget)||void 0===a||a.attachChild(n),n._$subtreeSlotCount>0&&(f=!0,v+=n._$subtreeSlotCount)):n._$subtreeSlotCount>0&&(f=!0))}else p=null;e.insertChildComposed(t,n,h,u,d),u&&h instanceof e&&(null===(s=t._$mutationObserverTarget)||void 0===s||s.detachChild(h),h.parentNode=null,h._$subtreeSlotCount>0&&(f=!0,v-=h._$subtreeSlotCount)),n?d<0?t.childNodes.push(n):u?t.childNodes[d]=n:t.childNodes.splice(d,0,n):u&&t.childNodes.splice(d,1),null===(l=t.ownerShadowRoot)||void 0===l||l._$markIdCacheDirty(),f&&(e.updateSlotCount(t,v),null===(c=t.ownerShadowRoot)||void 0===c||c._$checkSlotChanges()),u&&(e.checkAndCallDetached(h),e.checkChildObservers(t,"remove",h)),n&&((null==p?void 0:p._$attached)?t._$attached?e.checkAndCallMoved(n):e.checkAndCallDetached(n):t._$attached&&e.checkAndCallAttached(n),p===t?e.checkChildObservers(t,"move",n):(p&&e.checkChildObservers(p,"remove",n),e.checkChildObservers(t,"add",n)))}},e.insertChildBatchRemoval=function(t,n,r){t.childNodes[n];for(var o,i,a,s=!1,l=0,c=0;c<r;c+=1)e.insertChildComposed(t,null,t.childNodes[n+c],!0,n+c);for(c=0;c<r;c+=1){var u=t.childNodes[n+c];u.parentNode=null,u instanceof e&&(null===(o=t._$mutationObserverTarget)||void 0===o||o.detachChild(u),u._$subtreeSlotCount>0&&(s=!0,l-=u._$subtreeSlotCount))}var d=t.childNodes.splice(n,r);for(null===(i=t.ownerShadowRoot)||void 0===i||i._$markIdCacheDirty(),s&&(e.updateSlotCount(t,l),null===(a=t.ownerShadowRoot)||void 0===a||a._$checkSlotChanges()),c=0;c<r;c+=1){var h=d[c];e.checkAndCallDetached(h),e.checkChildObservers(t,"remove",h)}},e.insertChildBatchInsertion=function(t,n,r){for(var o,i,a,s,l,c=r>=0?t.childNodes[r]:void 0,u=!1,d=0,h=0;h<n.length;h+=1){var p=n[h];if(t.ownerShadowRoot!==p.ownerShadowRoot)throw new Error("Cannot move the node from one shadow tree to another shadow tree.");if(p.parentNode)throw new Error("Cannot batch-insert the node which already has a parent.");p.parentNode=t,p instanceof e&&(null===(a=t._$mutationObserverTarget)||void 0===a||a.attachChild(p),p._$subtreeSlotCount>0&&(u=!0,d+=p._$subtreeSlotCount))}for(h=0;h<n.length;h+=1)p=n[h],e.insertChildComposed(t,p,c,!1,r>=0?r:t.childNodes.length);for(c?(o=t.childNodes).splice.apply(o,function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([r,0],n,!1)):(i=t.childNodes).push.apply(i,n),null===(s=t.ownerShadowRoot)||void 0===s||s._$markIdCacheDirty(),u&&(e.updateSlotCount(t,d),null===(l=t.ownerShadowRoot)||void 0===l||l._$checkSlotChanges()),h=0;h<n.length;h+=1)p=n[h],t._$attached&&e.checkAndCallAttached(p),e.checkChildObservers(t,"add",p)},e.insertChildPlaceholerReplace=function(t,n,r){var o,i,a,s,l,c;if(r&&t.ownerShadowRoot!==r.ownerShadowRoot)throw new Error("Cannot move the node from one shadow tree to another shadow tree.");if(r.parentNode)throw new Error("Cannot replace with the node which already has a parent.");var u=t.childNodes[n];if(!(u instanceof e))throw new Error("Cannot replace on text nodes.");if(u!==r){for(var d=u.childNodes,h=0;h<d.length;h+=1)(p=d[h]).parentNode=r,p instanceof e&&(null===(i=u._$mutationObserverTarget)||void 0===i||i.detachChild(p),null===(a=t._$mutationObserverTarget)||void 0===a||a.attachChild(p));for(e.insertChildComposed(t,r,u,!0,n),h=0;h<d.length;h+=1){var p=d[h];e.insertChildComposed(r,p,void 0,!1,h)}if(null===(s=t._$mutationObserverTarget)||void 0===s||s.detachChild(u),u.parentNode=null,r.parentNode=t,null===(l=t._$mutationObserverTarget)||void 0===l||l.attachChild(r),t.childNodes[n]=r,(o=r.childNodes).push.apply(o,u.childNodes),u.childNodes=[],null===(c=t.ownerShadowRoot)||void 0===c||c._$markIdCacheDirty(),t._$attached)for(e.checkAndCallDetached(u),e.checkChildObservers(t,"remove",u),e.checkAndCallAttached(r),e.checkChildObservers(t,"add",r),h=0;h<d.length;h+=1)p=d[h],e.checkAndCallMoved(p),e.checkChildObservers(t,"move",p)}},e.prototype.appendChild=function(t){e.insertChildSingleOperation(this,t,this.childNodes.length,!1)},e.prototype.insertChildAt=function(t,n){e.insertChildSingleOperation(this,t,n,!1)},e.prototype.insertBefore=function(t,n){var r=this.childNodes.indexOf(n);e.insertChildSingleOperation(this,t,r,!1)},e.prototype.removeChildAt=function(t){e.insertChildSingleOperation(this,null,t,!0)},e.prototype.removeChild=function(t){var n=this.childNodes.indexOf(t);e.insertChildSingleOperation(this,null,n,!0)},e.prototype.replaceChildAt=function(t,n){e.insertChildSingleOperation(this,t,n,!0)},e.prototype.replaceChild=function(t,n){var r=this.childNodes.indexOf(n);e.insertChildSingleOperation(this,t,r,!0)},e.prototype.insertChildren=function(t,n){e.insertChildBatchInsertion(this,t,n)},e.prototype.removeChildren=function(t,n){e.insertChildBatchRemoval(this,t,n)},e.prototype.selfReplaceWith=function(t){var n=this.parentNode;n&&e.insertChildPlaceholerReplace(n,n.childNodes.indexOf(this),t)},e._$generateIdMap=function(t){var n=Object.create(null);return function t(r){if(r instanceof e){var o=r._$nodeId;o&&(n[o]||(n[o]=r)),r.childNodes.forEach(t)}}(t),n},e.prototype.triggerEvent=function(e,t,n){Y.triggerEvent(this,e,t,n)},e.prototype.dispatchEvent=function(e){Y.dispatchEvent(this,e)},e.prototype._$updateEventDefaultPrevented=function(e,t){this._$backendElement&&this._$nodeTreeContext.setElementEventDefaultPrevented(this._$backendElement,e,t)},e.prototype.addListener=function(e,t,n){var r=this._$eventTarget.addListener(e,t,n);2===r?this._$updateEventDefaultPrevented(e,!1):3===r&&this._$updateEventDefaultPrevented(e,!0),this instanceof ve&&this._$definition._$options.listenerChangeLifetimes&&this.triggerLifetime("listenerChanged",[!0,e,t,n])},e.prototype.removeListener=function(e,t,n){var r=this._$eventTarget.removeListener(e,t,n);1!==r&&(0!==r&&this._$updateEventDefaultPrevented(e,!1),this instanceof ve&&this._$definition._$options.listenerChangeLifetimes&&this.triggerLifetime("listenerChanged",[!1,e,t,n]))},e.prototype.getAttribute=function(e){return this._$nodeAttributes?this._$nodeAttributes[e]:null},e.prototype.updateAttribute=function(e,t){"boolean"==typeof t?!0===t?this.setAttribute(e,""):this.removeAttribute(e):this.setAttribute(e,null==t?"":String(t))},e.prototype.setAttribute=function(e,t){var n;this._$nodeAttributes?n=this._$nodeAttributes:(n=Object.create(null),this._$nodeAttributes=n),n[e]=t,this._$backendElement&&this._$backendElement.setAttribute(e,t)},e.prototype.removeAttribute=function(e){this._$nodeAttributes&&delete this._$nodeAttributes[e],this._$backendElement&&this._$backendElement.removeAttribute(e)},e.prototype.setMark=function(e,t){if(this._$marks)this._$marks[e]=t;else{var n={};n[e]=t,this._$marks=n}},e.prototype.collectMarks=function(){var e,t={},n=function(){var n=e._$marks;n&&Object.keys(n).forEach((function(e){Object.prototype.hasOwnProperty.call(t,e)||(t[e]=n[e])}))};for(e=this;e;e=e.parentNode)n();return t},e.replaceDocumentElement=function(t,n,r){if(t._$attached)throw new Error("An attached element cannot be attached again");t._$backendElement&&n.replaceChild(t._$backendElement,r),e.checkAndCallAttached(t)},e.pretendAttached=function(t){t._$attached||e.checkAndCallAttached(t)},e.pretendDetached=function(t){t._$attached&&e.checkAndCallDetached(t)},e.isAttached=function(e){return e._$attached},e.setSlotName=function(t,n){if(t._$inheritSlots)throw new Error("Slot-inherit mode is not usable in slot element");if(t._$inheritSlots)throw new Error("Component cannot be used as slot element");var r=n?String(n):"";if(t._$slotName!==r){var o=null===t._$slotName;t._$slotName=r;var i=t.ownerShadowRoot;i&&(o&&i.isDynamicSlots()&&(t._$slotValues=Object.create(null)),e.updateSlotCount(t,o?1:0),i._$checkSlotChanges())}},e.getSlotName=function(e){var t=e._$slotName;return null===t?void 0:t},e.setInheritSlots=function(e){if(null!==e._$slotName||0!==e.childNodes.length)throw new Error("Slot-inherit mode cannot be set when the element has any child node");e._$inheritSlots=!0},e.getInheritSlots=function(e){return e._$inheritSlots},e.setSlotElement=function(t,n){var r=t._$nodeSlotElement;if(r!==n){t._$nodeSlotElement=n,t instanceof e&&(t._$nodeSlot=n._$slotName||"");for(var o=t.parentNode,i=o;null==i?void 0:i._$inheritSlots;)i=i.parentNode;i instanceof ve&&!i._$external&&e.insertChildReassignComposed(o,t,r,n,o.childNodes.indexOf(t)+1)}},e.getSlotElement=function(e){if(e._$nodeSlotElement)return e._$nodeSlotElement;for(var t=e.parentNode;null==t?void 0:t._$inheritSlots;)t=t.parentNode;return t instanceof ve&&!t._$external?t.shadowRoot.getContainingSlot(e):void 0},e.prototype.getComposedParent=function(){if(this instanceof gt)return this.getHostNode();for(var e=this.parentNode;null==e?void 0:e._$inheritSlots;)e=e.parentNode;return e instanceof ve&&!e._$external?e.shadowRoot.getContainingSlot(this):e},e.prototype.getComposedChildren=function(){var e=[];return this.forEachComposedChild((function(t){e.push(t)})),e},e.prototype.forEachComposedChild=function(t){if(this._$inheritSlots)return!0;if(this instanceof ve&&!this._$external)return!1!==t(this.shadowRoot);if(null!==this._$slotName){var n=!0;return this.ownerShadowRoot&&this.ownerShadowRoot.forEachNodeInSpecifiedSlot(this,(function(e){return!1===t(e)&&(n=!1),n})),n}var r=function(n){for(var o=0;o<n.length;o+=1){var i=n[o];if(!1===t(i))return!1;if(i instanceof e&&i._$inheritSlots&&!r(i.childNodes))return!1}return!0};return!!r(this.childNodes)},e.parseSelector=function(e){return new Q(e)},e.prototype.querySelector=function(e){return(e instanceof Q?e:new Q(e)).query(this,!0)},e.prototype.querySelectorAll=function(e){return(e instanceof Q?e:new Q(e)).query(this,!1)},e.matchSelector=function(e,t){return(e instanceof Q?e:new Q(e)).testSelector(null,t)},e.prototype.matchSelector=function(e,t){return(e instanceof Q?e:new Q(e)).testSelector(this,t)},e.prototype.getBoundingClientRect=function(e){var t=this._$backendElement;if(t){var n=t.getBoundingClientRect();setTimeout((function(){e(n)}),0)}else setTimeout((function(){e({left:0,top:0,width:0,height:0})}),0)},e.prototype.getScrollOffset=function(e){var t=this._$backendElement;if(t){var n=t,r={scrollLeft:n.scrollLeft,scrollTop:n.scrollTop,scrollWidth:n.scrollWidth,scrollHeight:n.scrollHeight};setTimeout((function(){e(r)}),0)}else setTimeout((function(){e({scrollLeft:0,scrollTop:0,scrollWidth:0,scrollHeight:0})}),0)},e}(),re=Symbol("method"),oe=(ee=function(e,t){return ee=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},ee(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}ee(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),ie=function(e){function t(){throw new Error("Element cannot be constructed directly")}return oe(t,e),t.prototype._$initializeVirtual=function(e,t,n){this.is=String(e),t&&this._$initialize(!0,null,t)},t.create=function(e,n){var r=Object.create(t.prototype);return r._$initializeVirtual(e,n,n._$nodeTreeContext),r},t}(ne),ae=function(){function e(e,t){this.ownerSpace=e,this._$trans=t}return e.prototype._$implement=function(e){var t;return(null===(t=this._$trans)||void 0===t?void 0:t.call(this,e))||e},e}(),se=function(){function e(){this._$traits=new WeakMap}return e.prototype.implement=function(e,t){var n=e._$implement(t);this._$traits.set(e,n)},e.prototype.get=function(e){return this._$traits.get(e)},e}();!function(e){e[e.Ancestor=0]="Ancestor",e[e.Descendant=1]="Descendant",e[e.ParentNonVirtualNode=2]="ParentNonVirtualNode",e[e.ChildNonVirtualNode=3]="ChildNonVirtualNode",e[e.ParentComponent=4]="ParentComponent",e[e.ChildComponent=5]="ChildComponent"}(te||(te={}));var le,ce=function(){function e(e,t){this._$comp=e;var n=new Array(6);if(t)for(var r=0;r<6;r+=1){var o=t.definitions[r];if(o){for(var i=new Array(o.length),a=0;a<o.length;a+=1)i[a]=null;n[r]=i}}this._$group=t,this._$sharedGroup=!0,this._$links=n}return e.prototype.add=function(e){if(this._$sharedGroup){this._$sharedGroup=!1;var t=this._$group;this._$group=t?{definitions:t.definitions.slice(),keyMap:Object.assign(Object.create(null),t.keyMap)}:{definitions:new Array(6),keyMap:Object.create(null)}}var n=Symbol(""),r=this._$group.definitions,o=this._$group.keyMap,i=e.type;r[i]?(o[n]=[i,r[i].length],r[i].push(e)):(o[n]=[i,0],r[i]=[e]);var a=this._$links;return void 0===a[i]?a[i]=[null]:a[i].push(null),n},e.prototype.triggerLinkEvent=function(e,t){var n,r,o=this._$comp,i=this._$links,a=null===(n=this._$group)||void 0===n?void 0:n.definitions[e];if(a)for(var s=0;s<a.length;s+=1){var l=i[e],c=l[s],u=null,d=a[s],h=void 0;if(h=d.target instanceof we||d.target instanceof ae?d.target:(y=o.getRootBehavior().ownerSpace)&&y._$getBehavior(d.target,d.domain)||null){var p=h;if(!t)for(var f=o;;){var v=f.parentNode;if(!v)break;if(!((f=v)instanceof ie)){if(f instanceof ve){if(f.hasBehavior(p)){var _=f._$relation;if(_){var $;$=4===e?5:0===e?1:3;var g=null===(r=_._$group)||void 0===r?void 0:r.definitions[$];if(g)for(var m=0;m<g.length;m+=1){var y,b=g[m],C=void 0;if((C=b.target instanceof we||b.target instanceof ae?b.target:(y=f.getRootBehavior().ownerSpace)&&y._$getBehavior(b.target,b.domain)||null)&&this._$comp.hasBehavior(C)){u={target:f,def:b};break}}}}if(4===e)break}if(2===e)break}}}if(l[s]=u,c){var S=c.target,w=c.def;u&&c.target===u.target&&c.def===u.def?(w.linkChanged&&it("Relation Link Changed Callback",w.linkChanged,S.getMethodCaller(),[o.getMethodCaller()],S),d.linkChanged&&it("Relation Link Changed Callback",d.linkChanged,o.getMethodCaller(),[S.getMethodCaller()],o)):(w.unlinked&&it("Relation Unlinked Callback",w.unlinked,S.getMethodCaller(),[o.getMethodCaller()],S),d.unlinked&&it("Relation Unlinked Callback",d.unlinked,o.getMethodCaller(),[S.getMethodCaller()],o))}if(u){var E=u.target,O=u.def;c&&c.target===u.target&&c.def===u.def||(O.linked&&it("Relation Linked Callback",O.linked,E.getMethodCaller(),[o.getMethodCaller()],E),d.linked&&it("Relation Linked Callback",d.linked,o.getMethodCaller(),[E.getMethodCaller()],o))}t||u||!d.linkFailed||it("Relation Link Failed Callback",d.linkFailed,o.getMethodCaller(),[],o)}},e.prototype.getLinkedTargets=function(e){var t,n,r,o,i=null===(t=this._$group)||void 0===t?void 0:t.keyMap[e];if(!i)return et('no relation "'.concat(String(e),'" found.')),[];var a=i[0],s=i[1];if(4===a||2===a||0===a){var l=null===(n=this._$links[a])||void 0===n?void 0:n[s];return l?[l.target]:[]}var c=[],u=this._$comp,d=null===(o=null===(r=this._$group)||void 0===r?void 0:r.definitions[a])||void 0===o?void 0:o[s],h=function(e){for(var t=e.childNodes,n=0;n<t.length;n+=1){var r=t[n];if(r instanceof ne)if(r instanceof ie)h(r);else if(r instanceof ve){if(r._$relation){var o;if(o=5===a?r._$relation._$links[4]:1===a?r._$relation._$links[0]:r._$relation._$links[2])for(var i=0;i<o.length;i+=1){var s=o[i];if(s&&s.target===u&&s.def===d){c.push(r);break}}}1===a&&h(r)}else 5!==a&&1!==a||h(r)}};return h(this._$comp),c},e}(),ue=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),de=function(e,t,n,r){var o=null==n?void 0:n._$behavior._$using,i=null==n?void 0:n._$genericImpls;e._$detail||e.prepare();var a,s=e.behavior,l=s._$generics;if(l){var c=s._$genericDefaults;a=Object.create(null);for(var u=0;u<l.length;u+=1){var d=l[u];if(r&&Object.prototype.hasOwnProperty.call(r,d)){var h=r[d];if("string"==typeof h)if(null==o?void 0:o[h])a[d]=o[h];else if(i&&i[h])a[d]=i[h];else{var p=t.getComponentByUrlWithoutDefault(h,"");if(p)a[d]={final:p,placeholder:null,waiting:null};else{if(et('Generic "'.concat(d,'" value "').concat(h,'" is not valid (on component "').concat(e.is,'").')),!(f=t.getDefaultComponent()))throw new Error('Cannot find default component for generic "'.concat(d,'" (on component "').concat(e.is,'")'));a[d]={final:f,placeholder:null,waiting:null}}}else a[d]=h}else{var f;if(!(f=c[d]||t.getDefaultComponent()))throw new Error('Cannot find default component for generic "'.concat(d,'" (on component "').concat(e.is,'")'));a[d]={final:f,placeholder:null,waiting:null}}}}else a=null;return a},he=function(e,t,n,r){var o=n._$using[e]||r&&r[e],i=null;if(o&&(null===o.placeholder?i=o.final:et('Placeholder on generic implementation is not valid (on component "'.concat(n.is,'")'))),i)return i;var a=t.getDefaultComponent();if(!a)throw new Error('Cannot find default component for placeholder target "'.concat(e,'" (on component "').concat(n.is,'")'));return a},pe=function(){function e(e){this.behavior=e,this.is=this.behavior.is,this._$detail=null,this._$options=Je(e._$options,e.ownerSpace.getComponentOptions());var t=this._$options.templateEngine;this._$templateEngine=t}return e.prototype.general=function(){return this},e.prototype.getComponentOptions=function(){return this._$options},e.prototype.getComponentDependencies=function(){return this.behavior.getComponentDependencies()},e.prototype.isPrepared=function(){return!!this._$detail},e.prototype.prepare=function(){if(!this._$detail){this.behavior.prepare();var e=this.behavior,t=this._$options,n={};if(t.writeFieldsToNode){for(var r=Object.keys(e._$propertyMap),o=function(e){var t=r[e];n[t]={enumerable:!0,get:function(){return this._$dataGroup.data[t]},set:function(e){var n=this._$dataGroup;n.replaceDataOnPath([t],e),n.applyDataUpdates()}}},i=0;i<r.length;i+=1)o(i);var a=Object.keys(e._$methodMap);for(i=0;i<a.length;i+=1){var s=a[i];n[s]={enumerable:!0,value:e._$methodMap[s]}}}var l=function(){}.prototype=Object.create(ve.prototype,n);l._$behavior=e,l._$definition=this,l._$methodMap=e._$methodMap;var c=e._$generateObserverTree();l._$lifetimeFuncs=e._$getAllLifetimeFuncs(),l._$pageLifetimeFuncs=e._$getAllPageLifetimeFuncs();var u=function(e){if(void 0===e)return null;for(var t={definitions:new Array(6),keyMap:Object.create(null)},n=t.definitions,r=t.keyMap,o=Object.keys(e),i=0;i<o.length;i+=1){var a=o[i],s=e[a],l=s.type;n[l]?(r[a]=[l,n[l].length],n[l].push(s)):(r[a]=[l,0],n[l]=[s])}return t}(e._$relationMap),d=G(t.dataDeepCopy),h=G(t.propertyPassingDeepCopy),p=this._$templateEngine.create(e,t);this._$detail={proto:l,template:p,dataGroupObserverTree:c,dataDeepCopy:d,propertyPassingDeepCopy:h,relationDefinitionGroup:u}}},e}(),fe=1,ve=function(e){function t(){throw new Error("Element cannot be constructed directly")}return ue(t,e),t.prototype.general=function(){return this},t.prototype.asInstanceOf=function(e){return this._$behavior!==e.behavior?null:this},t.register=function(e,t){return(t||Xe()).defineComponent(e)},t._$tagMethod=function(e){var t=e;return t[re]=!0,t},t._$isTaggedMethod=function(e){return"function"==typeof e&&!!e[re]},t._$advancedCreate=function(e,n,r,o,i,a,s){var l,c;n._$detail||n.prepare();var u,d=n._$detail,h=d.proto,p=d.template,f=d.dataDeepCopy,v=d.propertyPassingDeepCopy,_=d.relationDefinitionGroup,$=n._$detail.dataGroupObserverTree,g=n._$options,m=n.behavior,y=r?r._$nodeTreeContext:o||Ze.backendContext||Ye(),b=g.externalComponent,C=g.propertyEarlyInit,w=Ze.writeExtraInfoToAttr,E=Object.create(h);E._$genericImpls=i,E._$placeholderHandler=a,E._$external=b,E.tagName=e,E._$methodCaller=E,g.virtualHost?(u=null,E._$initialize(!0,null,r,y)):r?(u=r._$nodeTreeContext.document.createElement(e),E._$initialize(!1,u,r,y)):(u=y.document.createElement(e),E._$initialize(!1,u,r,y));var O={};if(m._$externalClasses)for(var N=m._$externalClasses,k=0;k<N.length;k+=1)O[N[k]]=null;if(E.classList=new S(E,O),r&&u){var D=r.getHostNode()._$definition._$options.styleScope;if(w){var A=null===(l=r.getHostNode()._$behavior.ownerSpace)||void 0===l?void 0:l.styleScopeManager.queryName(D);A&&u.setAttribute("exparser:info-class-prefix","".concat(A,"--"))}}if(w&&u){var L=fe;fe+=1,E._$componentInstanceId=L,u.setAttribute("exparser:info-component-id",L)}E._$idPrefix=g.idPrefixGenerator?g.idPrefixGenerator.call(E):"";var M,P=m._$staticData,R=m._$data;if(void 0===P)if(1===R.length)M=(j=R[0])();else for(M={},k=0;k<R.length;k+=1){var j=R[k];Object.assign(M,j())}else for(M=T(P),k=0;k<R.length;k+=1)j=R[k],Object.assign(M,j());var B=E._$relation=new ce(E,_);E._$traitGroup=new se;var I=m._$traitBehaviors;if(void 0!==I)for(k=0;k<I.length;k+=1){var U=I[k],F=U.traitBehavior,G=U.impl;E._$traitGroup.implement(F,G)}if(m._$methodCallerInit){var V=m._$methodCallerInit.call(E);E._$methodCaller=V}var H=!1;if(m._$init.length>0){var z=!0,q=!0,X=!0,K=!0,Y={self:V=E.getMethodCaller(),data:M,setData:E.setData.bind(E),implement:function(e,t){if(H)throw new Error("Cannot execute init-time functions after initialization");E._$traitGroup.implement(e,t)},relation:function(e){if(H)throw new Error("Cannot execute init-time functions after initialization");var t,n=e.target,r=Ce(m.is,"undefined",e);return t=r?B.add(r):Symbol("invalid"),{list:function(){return B.getLinkedTargets(t).map((function(e){return e.getMethodCaller()}))},listAsTrait:n instanceof ae?function(){return B.getLinkedTargets(t).map((function(e){return e.traitBehavior(n)}))}:void 0}},observer:function(e,t){if(H)throw new Error("Cannot execute init-time functions after initialization");z&&(z=!1,$=$.cloneSub()),$.addObserver(t,x(e))},lifetime:function(e,t){if(H)throw new Error("Cannot execute init-time functions after initialization");q&&(q=!1,E._$lifetimeFuncs=m._$getAllLifetimeFuncs());var n=E._$lifetimeFuncs;n[e]?n[e].add(t):(n[e]=new Qe).add(t)},pageLifetime:function(e,t){if(H)throw new Error("Cannot execute init-time functions after initialization");X&&(X=!1,E._$pageLifetimeFuncs=m._$getAllPageLifetimeFuncs());var n=E._$pageLifetimeFuncs;n[e]?n[e].add(t):(n[e]=new Qe).add(t)},method:function(e){return t._$tagMethod(e)},listener:function(e){return t._$tagMethod(e)}},Z=m._$init;for(k=0;k<Z.length;k+=1){var J=Z[k].call(V,Y);if(J)for(var Q=Object.keys(J),ee=0;ee<Q.length;ee+=1){var te=Q[ee],ne=J[te];t._$isTaggedMethod(ne)&&(K&&(K=!1,E._$methodMap=Object.create(E._$methodMap)),E._$methodMap[te]=ne)}}}H=!0;var re=p.createInstance(E),oe=re.shadowRoot;E.shadowRoot=oe;var ie=new W(E,M,g.pureDataPattern||null,f,v,g.reflectToAttributes,$);E._$dataGroup=ie,C&&void 0!==s&&s(E),re.initValues(ie.innerData||ie.data),ie.setUpdateListener(re.updateValues.bind(re));var le=m._$listeners;if(void 0!==le){var ue=function(e){var t=le[e],n=t.id,r=t.ev,o=t.listener;if("this"===n)E.addListener(r,(function(e){return o.call(E._$methodCaller,e)}));else if(b)a=oe,(i=n?a.getIdMap()[n]:a.root)&&a.setListener(i,r,(function(e){return o.call(E._$methodCaller,e)}));else{var i,a=oe;(i=n?a.getElementById(n):a)&&i.addListener(r,(function(e){return o.call(E._$methodCaller,e)}))}};for(k=0;k<le.length;k+=1)ue(k)}return null===(c=E._$lifetimeFuncs.created)||void 0===c||c.call(E._$methodCaller,[],E),C||void 0===s||s(E),E},t.createWithGenericsAndContext=function(e,n,r,o,i){var a=function(e){var t,n=e.behavior.ownerSpace;return r&&(t=Object.create(null),Object.entries(r).forEach((function(e){var n=e[0],r=e[1];t[n]={final:r,placeholder:null,waiting:null}}))),de(e,n,void 0,t)};if(n)return t._$advancedCreate(String(e),n,null,o,a(n),void 0,i);if(e instanceof pe)return t._$advancedCreate(e.is,e,null,o,a(e),void 0);var s=Xe().getComponentByUrl(e,"");return t._$advancedCreate(e,s,null,o,a(s),void 0)},t.createWithGenerics=function(e,n,r,o){return t.createWithGenericsAndContext(e,n,r,null,o)},t.createWithContext=function(e,n,r,o){return t.createWithGenericsAndContext(e,n,null,r,o)},t.create=function(e,n,r){return t.createWithGenericsAndContext(e,n,null,null,r)},Object.defineProperty(t.prototype,"is",{get:function(){return this._$definition.is},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"properties",{get:function(){return this._$dataGroup.data},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){return this._$dataGroup.data},set:function(e){var t=this._$dataGroup;Object.entries(e).forEach((function(e){var n=e[0],r=e[1];return t.replaceDataOnPath([n],r)})),t.applyDataUpdates()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"$",{get:function(){return this._$external?this.shadowRoot.getIdMap():this.shadowRoot._$getIdMap()},enumerable:!1,configurable:!0}),t.prototype.getShadowRoot=function(){return this._$external?null:this.shadowRoot},t.listProperties=function(e){return Object.keys(e._$behavior._$propertyMap)},t.hasProperty=function(e,t){return!!e._$behavior._$propertyMap[t]},t.getMethodsFromDef=function(e){return e.behavior._$methodMap},t.getMethod=function(e,t){return e._$behavior._$methodMap[t]},t.prototype.getComponentDefinition=function(){return this._$definition},t.prototype.getComponentOptions=function(){return this._$definition._$options},t.prototype.hasBehavior=function(e){return e instanceof ae?void 0!==this._$traitGroup.get(e):this._$behavior.hasBehavior(e)},t.prototype.getRootBehavior=function(){return this._$behavior},t.prototype.traitBehavior=function(e){return this._$traitGroup.get(e)},t.prototype.setMethodCaller=function(e){this._$methodCaller=e},t.prototype.getMethodCaller=function(){return this._$methodCaller},t.prototype.triggerLifetime=function(e,t){var n=this._$lifetimeFuncs[e];n&&n.call(this._$methodCaller,t)},t.prototype.triggerLifeTime=function(e,t){return this.triggerLifetime(e,t)},t.prototype.triggerPageLifetime=function(e,n){var r=function(o){if(o instanceof t){if(o._$pageLifetimeFuncs){var i=o._$pageLifetimeFuncs[e];i&&i.call(o._$methodCaller,n)}o._$external||r(o.shadowRoot)}for(var a=o.childNodes,s=0;s<a.length;s+=1){var l=a[s];l instanceof ne&&r(l)}};r(this)},t.prototype.triggerPageLifeTime=function(e,t){return this.triggerPageLifetime(e,t)},t.prototype.getRelationNodes=function(e){var t;return(null===(t=this._$relation)||void 0===t?void 0:t.getLinkedTargets(e))||[]},t.prototype.hasExternalClass=function(e){return this.classList._$hasAlias(e)},t.prototype.setExternalClass=function(e,t){var n=this.classList;n._$setAlias(e,t),n._$spreadAliasUpdate()},t.prototype.scheduleExternalClassChange=function(e,t){this.classList._$setAlias(e,t)},t.prototype.applyExternalClassChanges=function(){this.classList._$spreadAliasUpdate()},t.prototype.isInnerDataExcluded=function(e){var t;return(null===(t=this._$definition._$options.pureDataPattern)||void 0===t?void 0:t.test(e))||!1},t.getInnerData=function(e){return e._$dataGroup.innerData},t.getDataProxy=function(e){return e._$dataGroup},t.replaceWholeData=function(e,t){e._$dataGroup.replaceWholeData(t)},t.prototype.replaceDataOnPath=function(e,t){var n=this._$dataGroup;if(void 0===n)throw new Error("Cannot update data before component created");n.replaceDataOnPath(e,t)},t.prototype.spliceArrayDataOnPath=function(e,t,n,r){var o=this._$dataGroup;if(void 0===o)throw new Error("Cannot update data before component created");o.spliceArrayDataOnPath(e,t,n,r)},t.prototype.hasPendingChanges=function(){var e=this._$dataGroup;return void 0!==e&&e.getChanges().length>0},t.prototype.applyDataUpdates=function(){var e=this._$dataGroup;if(void 0===e)throw new Error("Cannot update data before component created");e.applyDataUpdates()},t.prototype.groupUpdates=function(e){var t=this._$dataGroup;if(void 0===t)throw new Error("Cannot update data before component created");var n=e();return t.applyDataUpdates(),n},t.prototype.updateData=function(e){var t=this._$dataGroup;if(void 0===t)throw new Error("Cannot update data before component created");for(var n=Object.keys(e),r=0;r<n.length;r+=1){var o=n[r],i=D(o);i&&t.replaceDataOnPath(i,e[o])}},t.prototype.setData=function(e){var t=this._$dataGroup;if(void 0===t)throw new Error("Cannot update data before component created");for(var n=Object.keys(e),r=0;r<n.length;r+=1){var o=n[r],i=D(o);i&&t.replaceDataOnPath(i,e[o])}t.applyDataUpdates()},t}(ne),_e=function(){return _e=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},_e.apply(this,arguments)};!function(e){e[e.Invalid=0]="Invalid",e[e.Any=1]="Any",e[e.String=2]="String",e[e.Number=3]="Number",e[e.Boolean=4]="Boolean",e[e.Object=5]="Object",e[e.Array=6]="Array",e[e.Function=7]="Function"}(le||(le={}));var $e,ge=function(e,t){for(var n=Object.keys(t),r=0;r<n.length;r+=1){var o=n[r];if(Object.prototype.hasOwnProperty.call(e,o))if("_"===o[0]&&et('data field "'.concat(o,'" from different behaviors is overriding or merging.')),"object"!=typeof e[o]||"object"!=typeof t[o]||null===t[o]||Array.isArray(t[o]))e[o]=t[o];else{if(Array.isArray(e[o]))e[o]=e[o].slice();else{for(var i=e[o],a={},s=Object.keys(i),l=0;l<s.length;l+=1){var c=s[l];a[c]=i[c]}e[o]=a}ge(e[o],t[o])}else e[o]=t[o]}},me=function(e){return e===String?2:e===Number?3:e===Boolean?4:e===Object?5:e===Array?6:e===Function?7:null==e?1:0},ye=function(e,t,n){var r=n.type,o=n.default,i=n.optionalTypes;if(i)for(var a=0;a<i.length;a+=1)if(be(i[a],e))return e;return 2===r?null==e?(et('property "'.concat(t,'" received type-incompatible value: expected <String> but get null value. Used default value instead.')),void 0===o?"":o()):("object"==typeof e&&et('property "'.concat(t,'" received type-incompatible value: expected <String> but got object-typed value. Force converted.')),String(e)):3===r?isFinite(e)?Number(e):(et('property "'.concat(t,"number"==typeof e?'" received type-incompatible value: expected <Number> but got NaN or Infinity. Used default value instead.':'" received type-incompatible value: expected <Number> but got non-number value. Used default value instead.')),void 0===o?0:o()):4===r?!!e:6===r?Array.isArray(e)?e:(et('property "'.concat(t,'" received type-incompatible value: expected <Array> but got non-array value. Used default value instead.')),void 0===o?[]:o()):5===r?"object"==typeof e?e:(et('property "'.concat(t,'" received type-incompatible value: expected <Object> but got non-object value. Used default value instead.')),void 0===o?null:o()):7===r?"function"==typeof e?e:(et('property "'.concat(t,'" received type-incompatible value: expected <Function> but got non-function value. Used default value instead.')),void 0===o?function(){}:o()):void 0===e?void 0===o?null:o():e},be=function(e,t){if(2===e){if("string"!=typeof t)return!1}else if(3===e){if(!Number.isFinite(t))return!1}else if(4===e){if("boolean"!=typeof t)return!1}else if(5===e){if("object"!=typeof t||Array.isArray(t))return!1}else if(6===e){if("object"!=typeof t||!Array.isArray(t))return!1}else if(7===e){if("function"!=typeof t)return!1}else if(void 0===t)return!1;return!0},Ce=function(e,t,n){var r,o,i=function(n){return"function"==typeof n?n:(void 0!==n&&et('the "'.concat(t,'" relation listener is not a function (when preparing behavior "').concat(e,'").')),null)};if("parent"===n.type)r=4;else if("child"===n.type)r=5;else if("parent-common-node"===n.type)r=2;else if("child-common-node"===n.type)r=3;else if("ancestor"===n.type)r=0;else{if("descendant"!==n.type){var a=n.type;return et('the "'.concat(t,'" relation has an invalid relation type "').concat(a,'" (when preparing behavior "').concat(e,'").')),null}r=1}var s=null;if(n.target instanceof pe)o=n.target.behavior;else if(n.target instanceof we||n.target instanceof ae)o=n.target;else{var l=Oe(n.target||t,e),c=l.domain;o=l.absPath,s=c}return o?{target:o,domain:s,type:r,linked:i(n.linked),linkChanged:i(n.linkChanged),unlinked:i(n.unlinked),linkFailed:i(n.linkFailed)}:(et('the target of relation "'.concat(t,'" is not a valid behavior or component (when preparing behavior "').concat(e,'").')),null)},Se=function(){function e(e,t){this._$behaviors=[],this._$traitBehaviors=[],this._$staticData=void 0,this._$data=[],this._$methods=[],this._$lifetimes=[],this._$pageLifetimes=[],this._$init=[],this._$is=e,this._$ownerSpace=t}return e.prototype.methodCallerInit=function(e){return this._$methodCallerInit=e,this},e.prototype.behavior=function(e){return this._$behaviors.push(e),e._$chainingFilter?e._$chainingFilter(this):this},e.prototype.chainingFilter=function(e){return this._$chainingFilter=e,this},e.prototype.options=function(e){var t=this._$options;return this._$options=t?_e(_e({},t),e):e,this},e.prototype.implement=function(e,t){return this._$traitBehaviors.push({traitBehavior:e,impl:t}),this},e.prototype.template=function(e){return this._$template=e,this},e.prototype.usingComponents=function(e){return this._$using?this._$using=_e(_e({},this._$using),e):this._$using=e,this},e.prototype.placeholders=function(e){return this._$placeholders?this._$placeholders=_e(_e({},this._$placeholders),e):this._$placeholders=e,this},e.prototype.generics=function(e){return this._$generics?this._$generics=_e(_e({},this._$generics),e):this._$generics=e,this},e.prototype.externalClasses=function(e){return this._$externalClasses?this._$externalClasses=this._$externalClasses.concat(e):this._$externalClasses=e,this},e.prototype.data=function(e){return this._$data.push(e),this},e.prototype.staticData=function(e){return this._$staticData=e,this},e.prototype.property=function(e,t){return this._$properties||(this._$properties=[]),this._$properties.push({name:e,def:t}),this},e.prototype.methods=function(e){for(var t=Object.keys(e),n=0;n<t.length;n+=1){var r=t[n],o=e[r];this._$methods.push({name:r,func:o})}return this},e.prototype.observer=function(e,t,n){return void 0===n&&(n=!1),this._$observers||(this._$observers=[]),this._$observers.push({dataPaths:x(e),func:t,once:n}),this},e.prototype.lifetime=function(e,t,n){return void 0===n&&(n=!1),this._$lifetimes.push({name:e,func:t,once:n}),this},e.prototype.pageLifetime=function(e,t,n){return void 0===n&&(n=!1),this._$pageLifetimes||(this._$pageLifetimes=[]),this._$pageLifetimes.push({name:e,func:t,once:n}),this},e.prototype.relation=function(e,t){return this._$relations||(this._$relations=[]),this._$relations.push({name:e,rel:t}),this},e.prototype.init=function(e){return this._$init.push(e),this},e.prototype.definition=function(e){var t;e.behaviors&&(t=this._$behaviors).push.apply(t,e.behaviors),e.options&&this.options(e.options),e.template&&this.template(e.template),e.using&&this.usingComponents(e.using),e.placeholders&&this.placeholders(e.placeholders),e.generics&&this.generics(e.generics),e.externalClasses&&this.externalClasses(e.externalClasses);var n=e.data;void 0!==n&&("function"==typeof n?this._$data.push(n):this._$staticData=n);var r=e.properties;if(void 0!==r){this._$properties||(this._$properties=[]);for(var o=Object.keys(r),i=0;i<o.length;i+=1){var a=o[i],s=r[a];this._$properties.push({name:a,def:s})}}var l=e.methods;if(void 0!==l)for(o=Object.keys(l),i=0;i<o.length;i+=1){var c=o[i],u=l[c];this._$methods.push({name:c,func:u})}var d=e.observers;if(void 0!==d)if(this._$observers||(this._$observers=[]),Array.isArray(d))for(i=0;i<d.length;i+=1){var h=d[i],p=h.fields,f=h.observer;this._$observers.push({dataPaths:x(null!=p?p:"**"),func:f,once:!1})}else for(o=Object.keys(d),i=0;i<o.length;i+=1)f=d[p=o[i]],this._$observers.push({dataPaths:x(p),func:f,once:!1});var v=e.lifetimes;if(void 0===(null==v?void 0:v.created)&&"function"==typeof e.created&&this._$lifetimes.push({name:"created",func:e.created,once:!0}),void 0===(null==v?void 0:v.attached)&&"function"==typeof e.attached&&this._$lifetimes.push({name:"attached",func:e.attached,once:!0}),void 0===(null==v?void 0:v.moved)&&"function"==typeof e.moved&&this._$lifetimes.push({name:"moved",func:e.moved,once:!0}),void 0===(null==v?void 0:v.detached)&&"function"==typeof e.detached&&this._$lifetimes.push({name:"detached",func:e.detached,once:!0}),void 0===(null==v?void 0:v.ready)&&"function"==typeof e.ready&&this._$lifetimes.push({name:"ready",func:e.ready,once:!0}),v)for(o=Object.keys(v),i=0;i<o.length;i+=1){var _=o[i];u=v[_],this._$lifetimes.push({name:_,func:u,once:!0})}var $=e.pageLifetimes;if($)for(this._$pageLifetimes||(this._$pageLifetimes=[]),o=Object.keys($),i=0;i<o.length;i+=1){var g=o[i];u=$[g],this._$pageLifetimes.push({name:g,func:u,once:!0})}this._$listeners=e.listeners;var m=e.relations;if(m)for(this._$relations||(this._$relations=[]),o=Object.keys(m),i=0;i<o.length;i+=1){var y=o[i],b=m[y];this._$relations.push({name:y,rel:b})}return this},e.prototype.registerBehavior=function(){var e=this._$is,t=new we(this);return void 0!==e&&this._$ownerSpace._$registerBehavior(e,t),t},e.prototype.registerComponent=function(){var e=this._$is,t=new we(this),n=new pe(t);return void 0!==e&&this._$ownerSpace._$registerComponent(e,n),n},e}(),we=function(){function e(e){this._$unprepared=!0,this.is=e._$is||"",this.ownerSpace=e._$ownerSpace,this._$builder=e,this._$flatAncestors=new Set,this._$chainingFilter=e._$chainingFilter,this._$options=e._$options,this._$traitBehaviors=void 0,this._$template=e._$template,this._$using=Object.create(null),this._$generics=void 0,this._$genericDefaults=void 0,this._$externalClasses=e._$externalClasses,this._$staticData=void 0,this._$data=[],this._$propertyMap=Object.create(null),this._$methodMap=Object.create(null),this._$observers=[],this._$lifetimes=[],this._$pageLifetimes=void 0,this._$listeners=void 0,this._$relationMap=void 0,this._$init=[],this._$methodCallerInit=e._$methodCallerInit}return e.create=function(e,t){return new Se(e.is,t||Xe()).definition(e).registerBehavior()},e.prototype.general=function(){return this},e.prototype.getComponentDependencies=function(e){var t=new Set,n=function(e){e._$unprepared&&e.prepare();for(var r=Object.keys(e._$using),o=0;o<r.length;o+=1){var i=r[o],a=e._$using[i].final;a&&!t.has(a)&&(t.add(a),n(a.behavior))}};if(n(this.general()),e)for(var r=Object.values(e),o=0;o<r.length;o+=1){var i=r[o];t.has(i)||(t.add(i),n(i.behavior))}return t},e.prepare=function(e){e.prepare()},e.prototype.prepare=function(){var t,n,r,o,i,a,s,l,c,u;if(this._$unprepared){this._$unprepared=!1;var d=this.is,h=this.ownerSpace,p=this._$builder,f=this._$flatAncestors;if(Array.isArray(p._$behaviors))for(var v=0;v<p._$behaviors.length;v+=1){var _=p._$behaviors[v],$=null;if(_ instanceof e)$=_;else{var g=String(_);h&&($=h.getBehaviorByUrl(g,d)),$||et('behavior "'.concat(g,'" is not found (when preparing behavior "').concat(d,'").'))}if($){$._$unprepared&&e.prepare($);var m=$._$traitBehaviors;void 0!==m&&(this._$traitBehaviors||(this._$traitBehaviors=[]),(t=this._$traitBehaviors).push.apply(t,m));var y=$._$staticData;y&&(this._$staticData||(this._$staticData={}),ge(this._$staticData,y)),Object.assign(this._$methodMap,$._$methodMap),Object.assign(this._$propertyMap,$._$propertyMap),(n=this._$data).push.apply(n,$._$data);for(var b=$._$observers,C=0;C<b.length;C+=1)(N=b[C]).once&&this._$observers.indexOf(N)>=0||this._$observers.push(N);for(var S=$._$lifetimes,w=0;w<S.length;w+=1)(N=S[w]).once&&this._$lifetimes.indexOf(N)>=0||this._$lifetimes.push(N);var E=$._$pageLifetimes;if(void 0!==E)if(this._$pageLifetimes)for(var O=0;O<E.length;O+=1){var N;(N=E[O]).once&&this._$pageLifetimes.indexOf(N)>=0||this._$pageLifetimes.push(N)}else this._$pageLifetimes=E.slice();var k=$._$listeners;void 0!==k&&(this._$listeners||(this._$listeners=[]),(r=this._$listeners).push.apply(r,k));var D=$._$relationMap;void 0!==D&&(this._$relationMap||(this._$relationMap=Object.create(null)),Object.assign(this._$relationMap,D)),(o=this._$init).push.apply(o,$._$init),$._$flatAncestors.forEach((function(e){f.add(e)}))}}var x=p._$traitBehaviors;if(void 0!==x&&(this._$traitBehaviors||(this._$traitBehaviors=[]),(i=this._$traitBehaviors).push.apply(i,x)),"object"==typeof p._$using&&null!==p._$using){var A="object"==typeof p._$placeholders&&null!==p._$placeholders,L=Object.keys(p._$using),M=function(e){var t=L[e],n=p._$using[t],r=null;if(A&&(r=null!==(u=p._$placeholders[t])&&void 0!==u?u:null),n instanceof pe)P._$using[t]={final:n,placeholder:r,waiting:null};else if(h){var o=String(n),i=h.getComponentByUrlWithoutDefault(o,d);if(i)P._$using[t]={final:i,placeholder:null,waiting:null};else if(null!==r){var a={final:null,placeholder:r,waiting:null},s=h._$componentWaitingList(o,d);s&&(s.add((function(e){a.final=e,a.placeholder=null,a.waiting=null})),a.waiting=s),P._$using[t]=a}else P._$using[t]={final:h.getDefaultComponent(),placeholder:null,waiting:null}}else et('cannot find component "'.concat(String(n),'" (when preparing behavior "').concat(d,'").'))},P=this;for(v=0;v<L.length;v+=1)M(v)}if("object"==typeof p._$generics&&null!==p._$generics){var R=this._$generics=[],j=Object.create(null);this._$genericDefaults=j;var B=Object.keys(p._$generics);for(v=0;v<B.length;v+=1){var I=B[v],U=p._$generics[I],F=null,G=!0===U||null==U?void 0:U.default;void 0!==G&&(G instanceof pe?F=G:h?F=h.getComponentByUrl(String(G),d):et('cannot define generic "'.concat(I,'" without a default implementor (when preparing behavior "').concat(d,'").'))),R.push(I),j[I]=F}}var W=p._$staticData;W&&(this._$staticData?ge(this._$staticData,W):this._$staticData=W);var V=p._$methods;for(v=0;v<V.length;v+=1){var H=V[v],z=H.name,q=H.func;this._$methodMap[z]=q}var X=p._$properties;if(void 0!==X){var K=[],Y=function(e){var t,n=X[e],r=n.name,o=n.def,i=function(e){return e===String?{type:2,optionalTypes:null,value:"",default:void 0,observer:null,reflectIdPrefix:!1}:e===Number?{type:3,optionalTypes:null,value:0,default:void 0,observer:null,reflectIdPrefix:!1}:e===Boolean?{type:4,optionalTypes:null,value:!1,default:void 0,observer:null,reflectIdPrefix:!1}:e===Object?{type:5,optionalTypes:null,value:null,default:void 0,observer:null,reflectIdPrefix:!1}:e===Array?{type:6,optionalTypes:null,value:[],default:void 0,observer:null,reflectIdPrefix:!1}:e===Function?{type:7,optionalTypes:null,value:function(){},default:void 0,observer:null,reflectIdPrefix:!1}:null==e?{type:1,optionalTypes:null,value:null,default:void 0,observer:null,reflectIdPrefix:!1}:null}(o);if(null!==i)t=i;else{var a=o,s=me(a.type),l=null;Array.isArray(a.optionalTypes)&&(l=a.optionalTypes.map(me)).length>0&&(0!==s&&1!==s||(s=l[0])),0===s&&et('the type of property "'.concat(r,'" is illegal (when preparing behavior "').concat(d,'").'));var c=a.value;void 0===a.value&&(c=2===s?"":3===s?0:4!==s&&(6===s?[]:null));var u=void 0;"function"==typeof a.observer?u=a.observer:a.observer?u=Z._$methodMap[a.observer]||null:(u=null,void 0!==a.observer&&et('the observer of property "'.concat(r,'" is not a function (when preparing behavior "').concat(d,'").')));var h=!!a.reflectIdPrefix;t={type:s,optionalTypes:l,value:c,default:a.default,observer:u,reflectIdPrefix:h}}Z._$propertyMap[r]=t,K.push({name:r,func:void 0===t.default?function(){return T(t.value)}:t.default})},Z=this;for(v=0;v<X.length;v+=1)Y(v);this._$data.push((function(){for(var e={},t=0;t<K.length;t+=1){var n=K[t],r=n.name,o=n.func;e[r]=o()}return e}))}(a=this._$data).push.apply(a,p._$data);var J=p._$observers;if(void 0!==J)for(v=0;v<J.length;v+=1){var Q=J[v],ee=Q.dataPaths,te=(q=Q.func,Q.once),ne="function"==typeof q?q:this._$methodMap[q];"function"==typeof ne?this._$observers.push({dataPaths:ee,observer:ne,once:te}):et('the "'.concat(String(ne),'" observer is not a function (when preparing behavior "').concat(d,'").'))}var re=p._$lifetimes;(s=this._$lifetimes).push.apply(s,re);var oe=p._$pageLifetimes;oe&&(this._$pageLifetimes||(this._$pageLifetimes=[]),(l=this._$pageLifetimes).push.apply(l,oe));var ie=p._$listeners;if(void 0!==ie&&(L=Object.keys(ie)).length>0)for(this._$listeners=[],v=0;v<L.length;v+=1){var ae=ie[I=L[v]],se="function"==typeof ae?ae:this._$methodMap[ae];if(se){var le=I.indexOf("."),ce=void 0,ue=void 0;le>=0?(ce=I.slice(0,le),ue=I.slice(le+1)):(ce="",ue=I),this._$listeners.push({id:ce,ev:ue,listener:se})}else et('the "'.concat(I,'" listener is not a function or a method name (when preparing behavior "').concat(d,'").'))}var de=p._$relations;if(void 0!==de)for(this._$relationMap||(this._$relationMap=Object.create(null)),v=0;v<de.length;v+=1){var he=de[v],fe=he.name,ve=he.rel;if(null!=ve){var _e=Ce(d,fe,ve);_e&&(this._$relationMap[fe]=_e)}}(c=this._$init).push.apply(c,p._$init),f.add(this)}},e.prototype.getTemplate=function(){return this._$template},e.prototype.hasBehavior=function(t){if(this._$unprepared&&this.prepare(),t instanceof e)return this._$flatAncestors.has(t);if(this.ownerSpace){var n=this.ownerSpace.getBehaviorByUrl(t,this.is);return!!n&&this._$flatAncestors.has(n)}return!1},e.prototype.getMethods=function(){return this._$methodMap},e.prototype._$generateObserverTree=function(){for(var e=new j(this._$propertyMap),t=this._$observers,n=0;n<t.length;n+=1){var r=t[n],o=r.dataPaths,i=r.observer;e.addObserver(i,o)}return e},e.prototype._$getAllLifetimeFuncs=function(){for(var e=Object.create(null),t=this._$lifetimes,n=0;n<t.length;n+=1){var r=t[n],o=r.name,i=r.func;e[o]?e[o].add(i):(e[o]=new Qe).add(i)}return e},e.prototype._$getAllPageLifetimeFuncs=function(){var e=Object.create(null),t=this._$pageLifetimes;if(!t)return e;for(var n=0;n<t.length;n+=1){var r=t[n],o=r.name,i=r.func;e[o]?e[o].add(i):(e[o]=new Qe).add(i)}return e},e}(),Ee=function(e,t){var n;n="/"!==e[0]?t.split("/").slice(0,-1).concat(e.split("/")):e.split("/");for(var r=[],o=0;o<n.length;o+=1){var i=n[o];""!==i&&"."!==i&&(".."!==i?r.push(i):r.pop())}return r.join("/")},Oe=function(e,t){var n=e.indexOf("://");if(n>0){var r=e.indexOf("/",n+3);return r>0?{domain:e.slice(0,r),absPath:Ee(e.slice(r+1),"")}:{domain:e.slice(0,n+3),absPath:Ee(e.slice(n+3),"")}}return{domain:null,absPath:Ee(e,t)}},Ne=function(){function e(){this._$callbacks=[]}return e.prototype.add=function(e){this._$callbacks.push(e)},e.prototype.remove=function(e){var t=this._$callbacks.indexOf(e);this._$callbacks.splice(t,1)},e.prototype.call=function(e){var t=this._$callbacks;this._$callbacks=[];for(var n=0;n<t.length;n+=1)(0,t[n])(e)},e}(),ke=function(){function e(e,t,n){this._$behaviorList=Object.create(null),this._$pubBehaviorList=Object.create(null),this._$list=Object.create(null),this._$pubList=Object.create(null),this._$importedSpaces=Object.create(null),this._$listWaiting=Object.create(null),this._$pubListWaiting=Object.create(null),t&&(Object.assign(this._$list,t._$pubList),Object.assign(this._$behaviorList,t._$pubBehaviorList)),this._$defaultComponent=null!=e?e:"",this._$componentOptions=Je({},null==t?void 0:t._$componentOptions),this.styleScopeManager=n||new C}return e.prototype.updateComponentOptions=function(e){this._$componentOptions=Je(e,this._$componentOptions)},e.prototype.getComponentOptions=function(){return this._$componentOptions},e.prototype.updateBaseSpace=function(e){this._$list=Object.assign(Object.create(null),e._$pubList,this._$list),this._$behaviorList=Object.assign(Object.create(null),e._$pubBehaviorList,this._$behaviorList)},e.prototype.importSpace=function(e,t,n){this._$importedSpaces[e]={space:t,privateUse:n}},e.prototype.getComponentByUrl=function(e,t){var n=Oe(e,t),r=n.domain,o=n.absPath,i=this.getComponent(o,!0,r);if(!i)throw new Error('There is no component "'.concat(o,'" in the space and no default component can be used'));return i},e.prototype.getComponentByUrlWithoutDefault=function(e,t){var n=Oe(e,t),r=n.domain,o=n.absPath;return this.getComponent(o,!1,r)||null},e.prototype.getComponent=function(e,t,n){var r;if(void 0===t&&(t=!0),void 0===n&&(n=null),n){var o=this._$importedSpaces[n];if(o){var i=o.space;r=o.privateUse?i._$list:i._$pubList}}else r=this._$list;if(r){var a=r[e];if(a)return a}if(t)return this._$list[this._$defaultComponent]},e.prototype.getDefaultComponent=function(){return this._$list[this._$defaultComponent]||null},e.prototype.isDefaultComponent=function(e){return this._$list[this._$defaultComponent]===e},e.prototype.getBehaviorByUrl=function(e,t){var n=Oe(e,t),r=n.domain,o=n.absPath;return this._$getBehavior(o,r)||null},e.prototype._$getBehavior=function(e,t){var n;if(void 0===t&&(t=null),t){var r=this._$importedSpaces[t];if(r){var o=r.space;n=r.privateUse?o._$behaviorList:o._$pubBehaviorList}}else n=this._$behaviorList;if(n){var i=n[e];if(i)return i}},e.prototype.defineComponent=function(e){var t=e.is;return new Se(t,this).definition(e).registerComponent()},e.prototype.defineBehavior=function(e){var t=e.is;return new Se(t,this).definition(e).registerBehavior()},e.prototype.define=function(e){return new Se(e,this)},e.prototype.defineWithMethodCaller=function(e){return new Se(e,this)},e.prototype._$registerComponent=function(e,t){this._$list[e]=t,this._$behaviorList[e]=t.behavior;var n=this._$listWaiting[e];n&&(delete this._$listWaiting[e],n.call(t))},e.prototype._$registerBehavior=function(e,t){this._$behaviorList[e]=t},e.prototype.exportComponent=function(e,t){var n=this._$list[t];if(!n)throw new Error('There is no component "'.concat(t,'" for aliasing'));this._$pubList[e]=n;var r=this._$pubListWaiting[t];r&&(delete this._$pubListWaiting[t],r.call(n))},e.prototype.exportBehavior=function(e,t){var n=this._$behaviorList[t];if(!n)throw new Error('There is no behavior "'.concat(t,'" for aliasing'));this._$pubBehaviorList[e]=n},e.prototype._$componentWaitingList=function(e,t){var n,r=Oe(e,t),o=r.domain,i=r.absPath;if(o){var a=this._$importedSpaces[o];if(!a)return null;var s=a.space;if(a.privateUse){if(s._$list[i])return null;n=s._$listWaiting}else{if(s._$pubList[i])return null;n=s._$pubListWaiting}}else{if(this._$list[i])return null;n=this._$listWaiting}var l=n[i];return l||(n[i]=new Ne)},e.prototype.getWaitingComponents=function(){return Object.keys(this._$listWaiting)},e.prototype.createComponentByUrl=function(e,t,n,r){var o=this,i=t,a=null,s=i.indexOf("#");s>=0&&(i=i.slice(0,s));var l=i.indexOf("?");l>=0&&(a=i.slice(l+1),i=i.slice(0,l));var c=this.getComponentByUrl(i,""),u=null;return n&&(u=Object.create(null),Object.keys(n).forEach((function(e){var t=n[e],r=o.getComponentByUrl(t,"");u[e]=r}))),ve.createWithGenericsAndContext(e,c,u,r,(function(e){if(a){var t=!1;a.split("&").forEach((function(n){var r=n.indexOf("=");if(r>=0){var o=decodeURIComponent(n.slice(0,r)),i=decodeURIComponent(n.slice(r+1));e._$dataGroup.replaceProperty(o,i)&&(t=!0)}})),t&&e.applyDataUpdates()}}))},e.prototype.defineTraitBehavior=function(e){return new ae(this,e)},e}(),De=function(){function e(e,t,n,r){this.keyName=e,this.updateKeys(t);for(var o=this.items,i=this.indexes,a=[],s=0;s<o.length;s+=1){var l=o[s],c=null===i?s:i[s];a.push(r(l,c))}n.insertChildren(a,-1)}return e.prototype.updateKeys=function(e){var t,n;if(Array.isArray(e))t=e,n=null;else if("object"==typeof e&&null!==e){var r=Object.keys(e);t=new Array(r.length),n=new Array(r.length);for(var o=0;o<r.length;o+=1){var i=e[p=r[o]];t[o]=i,n[o]=p}}else if("string"==typeof e)for(et("Use string as for-list is generally for testing. Each character is treated as an item."),t=new Array(e.length),n=null,o=0;o<e.length;o+=1)t[o]=e[o];else if("number"==typeof e)for(et("Use number as for-list is generally for testing. The number is used as the repeated times of the item."),t=new Array(e),n=null,o=0;o<e;o+=1)t[o]=o;else et("The for-list data is invalid. Use empty array instead."),t=[],n=null;this.items=t,this.indexes=n;var a,s=this.keyName,l=new Array(t.length),c=Object.create(null);if(null!==s){for(o=0;o<t.length;o+=1){i=t[o];var u="*this"===s?i:null==i?void 0:i[s],d=null!=u?String(u):"";l[o]=d,void 0!==c[d]?(a||(a=Object.create(null)),a[d]=[c[d],o],delete c[d]):c[d]=o}if(a){var h=Object.keys(a);for(et('Some keys are not unique while list updates: "'.concat(h.join('", "'),'".')),o=0;o<h.length;o+=1)for(var p,f=a[p=h[o]],v=0,_=0;_<f.length;_+=1){for(var $=f[_];void 0!==c["".concat(p,"--").concat(v)];)v+=1;c[r="".concat(p,"--").concat(v)]=$,l[$]=r}}}this.rawKeys=l,this.keyMap=c,this.sharedKeyMap=a},e.prototype.diff=function(e,t,n,r,o){var i=this.rawKeys,a=this.keyMap,s=this.sharedKeyMap,l=this.indexes;this.updateKeys(e);var c,u,d=this.rawKeys,h=this.sharedKeyMap,p=this.items,f=this.indexes,v=this.keyName;if(!0===t)u=!0,c=null===v;else if(void 0===t)u=t,c=!0;else if(null===v)u=!0,c=!0;else{var _=!1;if(Array.isArray(t))_=!0;else for(var $=Object.keys(t),g=0;g<$.length;g+=1)if(!0===(m=t[y=$[g]])||("*this"===v?m:null==m?void 0:m[v])){_=!0;break}if(_){for(u=new Array(d.length),g=0;g<d.length;g+=1){var m,y=d[g];void 0!==(null==s?void 0:s[y])||void 0!==(null==h?void 0:h[y])?u[g]=!0:void 0===(m=t[g])||(!0===m||("*this"===v?m:null==m?void 0:m[v])?u[g]=!0:u[g]=m)}c=!1}else u=t,c=!1}if(c){var b;for(b=!!Array.isArray(t)||t,g=0;g<i.length&&g<d.length;){var C=p[g],S=null===f?g:f[g],w=null===l?g:l[g];o(C,S,!0===b||void 0===b?b:b[g],S!==w,n.childNodes[g]),g+=1}if(g<i.length)n.removeChildren(g,i.length-g);else if(g<d.length){for(var E=[];g<d.length;g+=1)C=p[g],S=null===f?g:f[g],E.push(r(C,S));n.insertChildren(E,-1)}}else{var O=[],N=[],k=new Array(d.length),D=new Array(d.length),x=-1,A=-1;for(g=0;g<d.length;g+=1){var T=d[g];if(i[x+1]!==T)if(void 0!==(w=a[T])){for(var L=0,M=O.length;L<M;){var P=Math.floor((L+M)/2);w<O[P]?M=P:L=P+1}O[M]=w,N[M]=g,k[g]=M>0?N[M-1]:-1,D[g]=w,x=w,A=M}else D[g]=-1;else x+=1,O[A+=1]=x,N[A]=g,k[g]=A>0?N[A-1]:-1,D[g]=x}var R=N.length;if(R!==d.length||R!==i.length){for(var j=R>0?N[R-1]:-1,B=R;-1!==j;)O[B-=1]=j,j=k[j];var I,U=O;!function(e){e[e.Stable=0]="Stable",e[e.ForwardMove=1]="ForwardMove",e[e.BackwardMove=2]="BackwardMove"}(I||(I={}));var F=new Array(i.length),G=new Array(d.length),W=U[B];for(g=0;g<D.length;g+=1){var V=D[g];g!==U[B]?-1!==V?(F[V]=V>W?2:1,G[g]=n.childNodes[V]):(C=p[g],S=null===f?g:f[g],G[g]=r(C,S)):(W=V,B+=1,F[V]=0)}var H=0,z=0,q=0;B=0;do{for(var X=B<U.length?U[B]:G.length,K=B<U.length?D[X]:F.length;z<K;)if(void 0===F[z]){var Y=z;z+=1;for(var Z=1;z<K&&void 0===F[z];)z+=1,Z+=1;n.removeChildren(Y+H,Z),H-=Z}else 2===F[z]&&(H-=1),z+=1;for(;q<X;){var J=G[q];if(-1===(V=D[q])){for(Y=q,q+=1,Z=1;q<X&&-1===D[q];)q+=1,Z+=1;n.insertChildren(G.slice(Y,Y+Z),K+H),H+=Z}else n.insertChildAt(J,K+H),C=p[q],S=null===f?q:f[q],w=null===l?V:l[V],o(C,S,!0===u||void 0===u?u:u[q],S!==w,J),2===F[V]&&(H+=1),q+=1}B<U.length&&(C=p[X],S=null===f?X:f[X],w=null===l?K:l[K],o(C,S,!0===u||void 0===u?u:u[X],S!==w,n.childNodes[K+H])),z=K+1,q=X+1,B+=1}while(B<=U.length)}else for(g=0;g<i.length&&g<d.length;){C=p[g],S=null===f?g:f[g],w=null===l?g:l[g];o(C,S,!0===u||void 0===u?u:u[g],S!==w,n.childNodes[g]),g+=1}}},e}(),xe=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},Ae=function(e){var t=e;return t._$wxTmplArgs=t._$wxTmplArgs||{}},Te=function(e){return null==e?"":String(e)},Le=function(){function e(e,t,n){this.bindingMapDisabled=!1,this.shadowRoot=e,this.procGen=t,this.disallowNativeNode=n}return e.prototype.create=function(e){var t=this.shadowRoot,n=(0,this.procGen)(this,!0,e,void 0);return this.handleChildrenCreation(n.C,t,void 0,void 0),n.B},e.prototype.update=function(e,t){var n=this.shadowRoot,r=(0,this.procGen)(this,!1,e,t);this.handleChildrenUpdate(r.C,n,void 0,void 0)},e.prototype.bindingMapUpdate=function(e,t,n){if(this.bindingMapDisabled)return!1;var r=n[e];if(!r)return!1;for(var o=null,i=0;i<r.length;i+=1)(0,r[i])(t,(function(e){null!==o&&e!==o&&o instanceof ve&&o.hasPendingChanges()&&ve.getDataProxy(o).applyDataUpdates(!0),o=e}),(function(e,t){e.textContent=t}));var a=o;return null!==a&&a instanceof ve&&a.hasPendingChanges()&&ve.getDataProxy(a).applyDataUpdates(!0),!0},e.prototype.handleChildrenCreation=function(e,t,n,r){var o=this;e(!0,(function(e,i){if(n&&""!==r){var a=o.createDynamicPlaceholder(n);t.appendChild(a)}else{var s=o.shadowRoot.createTextNode(e);s.destroyBackendElementOnDetach(),n&&ne.setSlotElement(s,n),i&&i(s),t.appendChild(s)}}),(function(e,i,a,s,l,c){if(n&&r!==(l||"")){var u=o.createDynamicPlaceholder(n);t.appendChild(u)}else{var d=o.createCommonElement(e,i,a,s,c);n?(ne.setSlotElement(d,n),Ae(d).dynamicSlotNameMatched=!0):void 0!==l&&(d.slot=l),t.appendChild(d)}}),(function(e,i){var a=o.shadowRoot.createVirtualNode("wx:if");a.destroyBackendElementOnDetach(),ne.setInheritSlots(a),n&&ne.setSlotElement(a,n),Ae(a).key=e,o.handleChildrenCreation(i,a,n,r),t.appendChild(a)}),(function(e,i,a,s,l){var c=o.shadowRoot,u=c.createVirtualNode("wx:for");u.destroyBackendElementOnDetach(),ne.setInheritSlots(u),n&&ne.setSlotElement(u,n),Ae(u).keyList=new De(i,e,u,(function(e,t){var i=c.createVirtualNode("wx:for-item");return i.destroyBackendElementOnDetach(),ne.setInheritSlots(i),n&&ne.setSlotElement(u,n),o.handleChildrenCreation((function(n,r,o,i,a,c,u){l(!0,e,t,void 0,void 0,s?xe(xe([],s,!0),[t],!1):null,r,o,i,a,c,u)}),i,n,r),i})),t.appendChild(u)}),(function(e,r){var i=o.shadowRoot.createVirtualNode("slot");i.destroyBackendElementOnDetach(),ne.setSlotName(i,Te(e)),n&&ne.setSlotElement(i,n),r&&r(i),t.appendChild(i)}),(function(e,i){if(void 0!==i)if(n)if(r===i)(a=o.shadowRoot.createVirtualNode("virtual")).destroyBackendElementOnDetach(),ne.setSlotElement(a,n),Ae(a).dynamicSlotNameMatched=!0,o.handleChildrenCreation(e,a,void 0,void 0),t.appendChild(a);else{var a=o.createDynamicPlaceholder(n);t.appendChild(a)}else(a=o.shadowRoot.createVirtualNode("virtual")).destroyBackendElementOnDetach(),a.slot=i,o.handleChildrenCreation(e,a,void 0,void 0),t.appendChild(a);else(a=o.shadowRoot.createVirtualNode("virtual")).destroyBackendElementOnDetach(),ne.setInheritSlots(a),n&&ne.setSlotElement(a,n),o.handleChildrenCreation(e,a,n,r),t.appendChild(a)}),void 0,void 0)},e.prototype.handleChildrenUpdate=function(e,t,n,r){var o=this,i=0,a=n?t.childNodes.filter((function(e){return e._$nodeSlotElement===n})):t.childNodes;e(!1,(function(e){var t=a[i];i+=1,(!n||Ae(t).dynamicSlotNameMatched)&&void 0!==e&&(t.textContent=e)}),(function(e,s,l,c,u,d){var h=a[i];if(i+=1,n){var p=Ae(h);if(r!==(u||""))return void(p.dynamicSlotNameMatched&&(f=o.createDynamicPlaceholder(n),t.replaceChild(f,h)));if(!p.dynamicSlotNameMatched){var f=o.createCommonElement(e,s,l,c,d);return ne.setSlotElement(f,n),Ae(f).dynamicSlotNameMatched=!0,void t.replaceChild(f,h)}}l(h,!1);var v=!1;if(h instanceof ve){var _=o.dynamicSlotUpdate(h,d,c);_&&(v=!0),h.hasPendingChanges()&&ve.getDataProxy(h).applyDataUpdates(!0),null==_||_.applySlotUpdates()}n||void 0!==u&&(h.slot=u),v||o.handleChildrenUpdate(c,h,void 0,void 0)}),(function(e,s){var l=a[i];if(i+=1,Ae(l).key===e)o.handleChildrenUpdate(s,l,n,r);else{var c=o.shadowRoot.createVirtualNode("wx:if");c.destroyBackendElementOnDetach(),ne.setInheritSlots(c),n&&ne.setSlotElement(c,n),Ae(c).key=e,o.handleChildrenCreation(s,c,n,r),n?t.replaceChild(c,l):t.replaceChildAt(c,i-1)}}),(function(e,t,s,l,c){var u=a[i];i+=1,Ae(u).keyList.diff(e,s,u,(function(e,t){var i=o.shadowRoot.createVirtualNode("wx:for-item");return i.destroyBackendElementOnDetach(),ne.setInheritSlots(i),n&&ne.setSlotElement(u,n),o.handleChildrenCreation((function(n,r,o,i,a,s,u){c(!0,e,t,void 0,void 0,l?xe(xe([],l,!0),[t],!1):null,r,o,i,a,s,u)}),i,n,r),i}),(function(e,t,i,a,s){o.handleChildrenUpdate((function(n,r,o,s,u,d,h){c(!1,e,t,i,!!a||void 0,l?xe(xe([],l,!0),[t],!1):null,r,o,s,u,d,h)}),s,n,r)}))}),(function(e,t){var n=a[i];i+=1,void 0!==e&&ne.setSlotName(n,Te(e)),t&&t(n),o.shadowRoot.applySlotValueUpdates(n)}),(function(e,s){var l=a[i];if(i+=1,void 0!==s)if(n){var c=Ae(l);if(r===s)c.dynamicSlotNameMatched?o.handleChildrenUpdate(e,l,void 0,void 0):((u=o.shadowRoot.createVirtualNode("virtual")).destroyBackendElementOnDetach(),ne.setSlotElement(u,n),Ae(u).dynamicSlotNameMatched=!0,o.handleChildrenCreation(e,u,void 0,void 0),t.replaceChild(u,l));else if(c.dynamicSlotNameMatched){var u=o.createDynamicPlaceholder(n);t.replaceChild(u,l)}}else l.slot=s,o.handleChildrenUpdate(e,l,void 0,void 0);else o.handleChildrenUpdate(e,l,n,r)}),void 0,void 0)},e.prototype.dynamicSlotUpdate=function(e,t,n){var r=this,o=e.getShadowRoot();return(null==o?void 0:o.isDynamicSlots())?(o.setDynamicSlotHandler(t||[],(function(t,o,i){r.handleChildrenCreation((function(e,t,r,o,a,s,l){n(!0,t,r,o,a,s,l,i,void 0)}),e,t,o)}),(function(t){for(var n=[],r=0;r<e.childNodes.length;r+=1){var i=e.childNodes[r];o.getContainingSlot(i)===t&&n.push(r)}for(r=0;r<n.length;r+=1){var a=n[r];e.removeChildAt(a-r)}}),(function(t,o,i){var a=t._$slotName||"";r.handleChildrenUpdate((function(e,t,r,a,s,l,c){n(!1,t,r,a,s,l,c,o,i)}),e,t,a)})),o):null},e.prototype.createDynamicPlaceholder=function(e){var t=this.shadowRoot.createVirtualNode("virtual");return t.destroyBackendElementOnDetach(),ne.setSlotElement(t,e),Ae(t).dynamicSlotNameMatched=!1,t},e.prototype.createCommonElement=function(e,t,n,r,o){var i,a=this,s=this.shadowRoot.checkComponentPlaceholder(e),l=!1;if(this.disallowNativeNode||void 0!==s){var c=function(e){var t=a.dynamicSlotUpdate(e,o,r);t&&(l=!0),n(e,!0),e.hasPendingChanges()&&ve.getDataProxy(e).applyDataUpdates(!0),null==t||t.applySlotUpdates()},u=void 0;s&&(u=function(){var n,r=a.shadowRoot.createComponent(e,e,t,void 0,c);r.destroyBackendElementOnDetach();var o=r.getShadowRoot(),s=i.getShadowRoot();if(null==o?void 0:o.isDynamicSlots()){if(!(null==s?void 0:s.isDynamicSlots()))throw new Error('The "dynamicSlots" option of the component and its placeholder should be the same.');s.useDynamicSlotHandlerFrom(o),null===(n=i.parentNode)||void 0===n||n.replaceChild(r,i)}else{if(null==s?void 0:s.isDynamicSlots())throw new Error('The "dynamicSlots" option of the component and its placeholder should be the same.');i.selfReplaceWith(r)}}),(i=this.shadowRoot.createComponent(e,e,t,u,c)).destroyBackendElementOnDetach()}else(i=this.shadowRoot.createComponentOrNativeNode(e,t,(function(e){var t=e instanceof ve?a.dynamicSlotUpdate(e,o,r):null;t&&(l=!0),n(e,!0),e instanceof ve&&(e.hasPendingChanges()&&ve.getDataProxy(e).applyDataUpdates(!0),null==t||t.applySlotUpdates())}))).destroyBackendElementOnDetach();return l?this.bindingMapDisabled=!0:this.handleChildrenCreation(r,i,void 0,void 0),i},e.prototype.s=function(e,t){e.slot=t},e.prototype.l=function(e,t,n){this.shadowRoot.replaceSlotValue(e,t,n)},e.prototype.i=function(e,t){e.id=t},e.prototype.c=function(e,t){e instanceof ve?(e.hasExternalClass("class")&&e.setExternalClass("class",Te(t)),e.class=Te(t)):e.class=Te(t)},e.prototype.y=function(e,t){e.setNodeStyle(Te(t),0)},e.prototype.d=function(e,t,n){(e.dataset?e.dataset:e.dataset={})[t]=n},e.prototype.m=function(e,t,n){e.setMark(t,n)},e.prototype.v=function(e,t,n,r,o,i,a){var s=Te(n),l=function(t){var n,r=e.ownerShadowRoot.getHostNode(),o=r.getMethodCaller(),i=r._$methodMap[s];return"function"==typeof i&&(n=i.call(o,t)),n},c={final:r,mutated:o,capture:i};if(a){var u=Ae(e);u.dynEvListeners||(u.dynEvListeners={});var d=u.dynEvListeners;d[t]&&e.removeListener(t,d[t],c),d[t]=l}s&&e.addListener(t,l,c)},e.prototype.sd=function(e,t){Ae(e).scopeData=t},e.prototype.r=function(t,n,r,o){if(t instanceof ve){var i=ve.getDataProxy(t),a=(s=n).indexOf("-")<=0?s:s.replace(/-[a-z]/g,(function(e){return e[1].toUpperCase()}));i.replaceProperty(a,r)?o&&i.setModelBindingListener(a,(function(e){var n=t.ownerShadowRoot.getHostNode(),r=ve.getDataProxy(n);r.replaceDataOnPath(o,e),r.applyDataUpdates(!1)})):t.hasExternalClass(n)?t.setExternalClass(n,Te(r)):a.startsWith("bind")?e.prototype.v(t,a.slice("bind".length),Te(r),!1,!1,!1,!0):a.startsWith("captureBind")?e.prototype.v(t,a.slice("captureBind".length),Te(r),!1,!1,!0,!0):a.startsWith("catch")?e.prototype.v(t,a.slice("catch".length),Te(r),!0,!1,!1,!0):a.startsWith("captureCatch")?e.prototype.v(t,a.slice("captureCatch".length),Te(r),!0,!1,!0,!0):a.startsWith("on")&&e.prototype.v(t,a.slice("on".length),Te(r),!1,!1,!1,!0)}else t.updateAttribute(n,r);var s},e}(),Me=function(){},Pe=function(){function e(e,t){this.shadowRoot=e,this.procGen=t}return e.prototype.create=function(e){var t=this.shadowRoot,n=(0,this.procGen)(this,!0,e,void 0);return this.handleChildrenCreation(n.C,t.shadowRootElement),n.B},e.prototype.bindingMapUpdate=function(e,t,n){var r=n[e];if(void 0!==r)for(var o=0;o<r.length;o+=1)(0,r[o])(t,(function(){}),(function(e,t){e.textContent=t}))},e.prototype.handleChildrenCreation=function(e,t){var n=this,r=!0,o=!1,i=function(){r=!1,o=!1;var e=document.createElement("virtual");t.appendChild(e),n.shadowRoot.slot=e};e(!0,(function(e,n){o?i():r=!1;var a=document.createTextNode(e||"");n&&n(a),t.appendChild(a)}),(function(e,a,s,l){o?i():r=!1;var c=document.createElement(e);s(c,!0),n.handleChildrenCreation(l,c),t.appendChild(c)}),Me,Me,(function(){r?(o=!0,n.shadowRoot.slot=t):i()}),(function(e){o?i():r=!1;var a=document.createElement("virtual");n.handleChildrenCreation(e,a),t.appendChild(a)}))},e.prototype.s=function(){},e.prototype.i=function(e,t){this.shadowRoot.idMap[t]=e},e.prototype.c=function(e,t){e.setAttribute("class",t)},e.prototype.y=function(e,t){e.setAttribute("style",t)},e.prototype.d=function(e,t,n){e.dataset[t]=Te(n)},e.prototype.m=function(){},e.prototype.v=function(e,t,n,r){var o=this;this.shadowRoot.setListener(e,t,(function(e){var t=o.shadowRoot.template.methods[n],i=null==t?void 0:t(e);return!r&&i}))},e.prototype.sd=function(){},e.prototype.r=function(e,t,n){"boolean"==typeof n?n?e.setAttribute(t,""):e.removeAttribute(t):e.setAttribute(t,Te(n))},e}(),Re=function(){return{C:function(e,t,n,r,o,i){i("")},B:Object.create(null)}},je=function(){return Re},Be=function(){function e(e){if("object"!=typeof e._$template&&void 0!==e._$template)throw new Error("Component template of ".concat(e.is,' must be a valid compiled template (or "null" for default template).'));var t=e._$template||{content:je};this.genObjectGroupEnv={list:t.groupList||Object.create(null),group:t.content},this.updateMode="",this.methods=e._$methodMap}return e.prototype.createInstance=function(e){return new Ie(this,e)},e}(),Ie=function(){function e(e,t){if(3!==t.getBackendMode())throw new Error("Component template of ".concat(t.is," cannot be initialized since external rendering is only supported in Domlike backend currently."));var n=t.getBackendElement();if(!n)throw new Error("Component template of ".concat(t.is," cannot be initialized as external components since no suitable backend element found."));this.comp=t,this.shadowRoot=this,this.shadowRootElement=n,this.root=n,this.slot=n,this.template=e;var r=e.genObjectGroupEnv.group("")||je();this.procGenWrapper=new Pe(this,r),this.idMap=Object.create(null),this.listeners=[]}return e.prototype.initValues=function(e){if(this.bindingMapGen=this.procGenWrapper.create(e),!this.bindingMapGen)throw new Error("The component template does not support binding-map-update, so it cannot be used as external components.");var t=this.shadowRootElement;if(this.slot===t&&t.childNodes.length>0){var n=document.createElement("virtual");t.appendChild(n),this.slot=n}},e.prototype.getIdMap=function(){return this.idMap},e.prototype.updateValues=function(e,t){for(var n=this.bindingMapGen,r=0;r<t.length;r+=1){var o=t[r][0];this.procGenWrapper.bindingMapUpdate(o[0],e,n)}},e.prototype.setListener=function(e,t,n){var r,o=e;o._$wxTmplEv?o._$wxTmplEv[t]=n:o._$wxTmplEv=((r={})[t]=n,r)},e.prototype.handleEvent=function(e,t){for(var n,r=e,o=r,i=this.shadowRootElement,a=t.type,s=t.bubbles;;){var l=t.wrapShadowedEvent(r,null,o),c=null===(n=o._$wxTmplEv)||void 0===n?void 0:n[a];if(c&&!1===c.call(o,l)&&(t.preventDefault(),t.stopPropagation()),!s||t.propagationStopped())break;if(o===i)break;var u=o.parentNode;if(!u)break;o=u}},e}(),Ue=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},Fe=function(){return{C:function(e,t,n,r,o,i){i("")},B:Object.create(null)}},Ge=function(){return Fe};!function(e){e[e.Disabled=0]="Disabled",e[e.Enabled=1]="Enabled",e[e.Forced=2]="Forced"}($e||($e={}));var We,Ve=function(){function e(){}return e.prototype.create=function(e,t){return t.externalComponent?new Be(e):new He(e)},e}(),He=function(){function e(e){if("object"!=typeof e._$template&&void 0!==e._$template)throw new Error("Component template of ".concat(e.is,' must be a valid compiled template (or "null" for default template).'));var t=e._$template||{content:Ge};this.genObjectGroupEnv={list:t.groupList||Object.create(null),group:t.content},this.updateMode=t.updateMode||"",this.disallowNativeNode=t.disallowNativeNode||!1}return e.prototype.createInstance=function(e){return new ze(this,e)},e}(),ze=function(){function e(e,t){this.template=e;var n=e.genObjectGroupEnv.group("")||Ge("");"bindingMap"===e.updateMode?this.forceBindingMapUpdate=2:"virtualTree"===e.updateMode?this.forceBindingMapUpdate=0:this.forceBindingMapUpdate=1,this.comp=t,this.shadowRoot=gt.createShadowRoot(t),this.shadowRoot.destroyBackendElementOnDetach(),this.procGenWrapper=new Le(this.shadowRoot,n,e.disallowNativeNode)}return e.prototype.initValues=function(e){return this.bindingMapGen=this.procGenWrapper.create(e),this.shadowRoot},e.prototype.updateValues=function(e,t){if(2!==this.forceBindingMapUpdate){if(!(1===this.forceBindingMapUpdate&&t.length<=1&&this.bindingMapGen&&this.tryBindingMapUpdate(e,t[0]))){var n=Object.create(null);for(C=0;C<t.length;C+=1)for(var r=t[C],o=r[0],i=r[1],a=r[2],s=r[3],l=n,c=0;c<o.length;c+=1){var u=o[c],d=l[u];if(!0===d)break;if(c===o.length-1){if(void 0===s)l[u]=!0;else{var h=a;if(void 0===d)l[u]=new Array(h);else if(!Array.isArray(d)){for(var p=new Array(h),f=Object.keys(d),v=0;v<f.length;v+=1){var _=f[v],$=d[_],g=Number(_);p.length<g&&(p.length=g),p[_]=$}l[u]=p}var m=l[u];m.length<h&&(m.length=h);var y=new Array(i.length);y.fill(!0),m.splice.apply(m,Ue([a,s],y,!1))}break}if(void 0===d){var b=Object.create(null);l[u]=b,l=b}else l=d}this.procGenWrapper.update(e,n)}}else for(var C=0;C<t.length;C+=1)this.tryBindingMapUpdate(e,t[C])},e.prototype.tryBindingMapUpdate=function(e,t){if(!t)return!0;var n=this.bindingMapGen;if(!n)return!1;var r=t[0];return 1===r.length&&this.procGenWrapper.bindingMapUpdate(r[0],e,n)},e}();!function(e){e.None="none",e.Simple="simple",e.SimpleWithRecursion="simple-recursion"}(We||(We={}));var qe=null,Xe=function(){if(qe)return qe;var e=new ke;return qe=e,e},Ke=null,Ye=function(){return Ke||(e=new m,Ke=e,e);var e},Ze={defaultComponentSpace:null,externalComponent:!1,templateEngine:new Ve,styleScope:C.globalScope(),extraStyleScope:null,multipleSlots:!1,dynamicSlots:!1,reflectToAttributes:!1,writeFieldsToNode:!0,writeIdToDOM:!1,idPrefixGenerator:null,pureDataPattern:null,dataDeepCopy:We.Simple,propertyPassingDeepCopy:We.Simple,listenerChangeLifetimes:!1,virtualHost:!1,propertyEarlyInit:!1,throwGlobalError:!1,writeExtraInfoToAttr:!1,backendContext:null},Je=function(e,t){var n=void 0===t?Ze:t;if(void 0===e&&n!==Ze)return n;var r=null!=e?e:{};return{externalComponent:void 0!==r.externalComponent?r.externalComponent:n.externalComponent,templateEngine:void 0!==r.templateEngine?r.templateEngine:n.templateEngine,styleScope:void 0!==r.styleScope?r.styleScope:n.styleScope,extraStyleScope:void 0!==r.extraStyleScope?r.extraStyleScope:n.extraStyleScope,multipleSlots:void 0!==r.multipleSlots?r.multipleSlots:n.multipleSlots,dynamicSlots:void 0!==r.dynamicSlots?r.dynamicSlots:n.dynamicSlots,reflectToAttributes:void 0!==r.reflectToAttributes?r.reflectToAttributes:n.reflectToAttributes,writeFieldsToNode:void 0!==r.writeFieldsToNode?r.writeFieldsToNode:n.writeFieldsToNode,writeIdToDOM:void 0!==r.writeIdToDOM?r.writeIdToDOM:n.writeIdToDOM,idPrefixGenerator:void 0!==r.idPrefixGenerator?r.idPrefixGenerator:n.idPrefixGenerator,pureDataPattern:void 0!==r.pureDataPattern?r.pureDataPattern:n.pureDataPattern,dataDeepCopy:void 0!==r.dataDeepCopy?r.dataDeepCopy:n.dataDeepCopy,propertyPassingDeepCopy:void 0!==r.propertyPassingDeepCopy?r.propertyPassingDeepCopy:n.propertyPassingDeepCopy,listenerChangeLifetimes:void 0!==r.listenerChangeLifetimes?r.listenerChangeLifetimes:n.listenerChangeLifetimes,virtualHost:void 0!==r.virtualHost?r.virtualHost:n.virtualHost,propertyEarlyInit:void 0!==r.propertyEarlyInit?r.propertyEarlyInit:n.propertyEarlyInit}},Qe=function(){function e(){this.empty=!0,this._$type="",this._$arr=null,this._$avoidErrorHandler=!1}return e.prototype.add=function(e){this._$arr?this._$arr=this._$arr.concat(e):this._$arr=[e],this.empty=!1},e.prototype.remove=function(e){var t=null;if(this._$arr){for(var n=[],r=this._$arr,o=0;o<r.length;o+=1){if(r[o]===e){n.push.apply(n,r.slice(o+1)),t=e;break}n.push(r[o])}this._$arr=n,this.empty=0===this._$arr.length}return t},e.prototype.call=function(e,t,n){var r=this._$arr,o=!0;if(r)for(var i=0;i<r.length;i+=1)!1===it(this._$type,r[i],e,t,n,this._$avoidErrorHandler)&&(o=!1);return o},e.safeCallback=function(e,t,n,r,o,i){void 0===i&&(i=!1);try{return t.apply(n,r)}catch(s){var a="[Error] [Component] ".concat(e||"Error Listener"," Error @ ");return n instanceof ve&&(a+=n.is),a+="#".concat(t.name||"(anonymous)"),o&&o.triggerLifetime("error",[s]),void function(e,t,n){if(n||!1!==tt.call(e,[e,t])){if(Ze.throwGlobalError)throw e;console.error(e instanceof Error?"".concat(e.message,"\n").concat(e.stack||""):String(e))}}(s,{message:a,type:e,element:n,method:t,args:r},i)}},e.addGlobalErrorListener=function(e){tt.add(e)},e.removeGlobalErrorListener=function(e){tt.remove(e)},e.addGlobalWarningListener=function(e){rt.add(e)},e.removeGlobalWarningListener=function(e){rt.remove(e)},e}();function et(e){var t="[Warning] [Component] ".concat(e);rt.call(t,[t])&&console.warn(t)}var tt=new Qe;tt._$avoidErrorHandler=!0;var nt,rt=new Qe,ot=function(){function e(){this.empty=!0,this._$type="",this._$arr=null}return e.prototype.add=function(e,t){var n={f:e,data:t};this._$arr?this._$arr=this._$arr.concat(n):this._$arr=[n],this.empty=!1},e.prototype.remove=function(e){var t=null;if(this._$arr){for(var n=[],r=this._$arr,o=0;o<r.length;o+=1){var i=r[o];if(i.f===e){n.push.apply(n,r.slice(o+1)),t=i.data;break}n.push(i)}this._$arr=n,this.empty=0===this._$arr.length}return t},e.prototype.call=function(e,t,n,r){var o=this._$arr,i=!0;if(o)for(var a=0;a<o.length;a+=1){var s=o[a],l=s.f;n(s.data)&&!1===Qe.safeCallback(this._$type,l,e,t,r)&&(i=!1)}return i},e}(),it=Qe.safeCallback,at=Qe.addGlobalErrorListener,st=Qe.removeGlobalErrorListener,lt=Qe.addGlobalWarningListener,ct=Qe.removeGlobalWarningListener,ut=function(){function e(e){this._$subtreeObserversCount=0,this.attrObservers=null,this.textObservers=null,this.childObservers=null,this.attachObservers=null,this._$bindedElement=e}return e.prototype.attachChild=function(t){t._$mutationObserverTarget||(t._$mutationObserverTarget=new e(t)),this._$subtreeObserversCount>0&&t._$mutationObserverTarget.updateSubtreeCount(this._$subtreeObserversCount)},e.prototype.detachChild=function(e){e._$mutationObserverTarget&&e._$mutationObserverTarget.updateSubtreeCount(-this._$subtreeObserversCount)},e.prototype.updateSubtreeCount=function(t){this._$subtreeObserversCount+=t,this._$bindedElement.childNodes.forEach((function(n){n instanceof ne&&(n._$mutationObserverTarget||(n._$mutationObserverTarget=new e(n)),n._$mutationObserverTarget.updateSubtreeCount(t))}))},e.prototype.hasSubtreeListeners=function(){return this._$subtreeObserversCount>0},e.callAttrObservers=function(e,t){var n,r=e;do{var o=r._$mutationObserverTarget;null===(n=null==o?void 0:o.attrObservers)||void 0===n||n.call(r,[t]);var i=r.parentNode;if(!i)break;if(!(r=i)._$mutationObserverTarget)break}while(r._$mutationObserverTarget._$subtreeObserversCount>0)},e.callTextObservers=function(e,t){for(var n,r=e.parentNode;r;){var o=r._$mutationObserverTarget;if(!o||0===o._$subtreeObserversCount)break;null===(n=o.textObservers)||void 0===n||n.call(r,[t]),r=r.parentNode}},e.callChildObservers=function(e,t){var n,r=e;do{var o=r._$mutationObserverTarget;null===(n=null==o?void 0:o.childObservers)||void 0===n||n.call(r,[t]);var i=r.parentNode;if(!i)break;if(!(r=i)._$mutationObserverTarget)break}while(r._$mutationObserverTarget._$subtreeObserversCount>0)},e.callAttachObservers=function(e,t){var n,r=e._$mutationObserverTarget;null===(n=null==r?void 0:r.attachObservers)||void 0===n||n.call(e,[t])},e}(),dt=function(){function e(e){this._$subtreeListenersCount=0,this._$bindedFuncArrs=[],this._$bindedTarget=null,this._$listener=e,this._$normalizedListener=null}return e.create=function(t){return new e(t)},e.prototype.observe=function(e,t){void 0===t&&(t={properties:!1,childList:!1,characterData:!1,subtree:!1,attachStatus:!1});var n,r=this._$listener;if(!r)throw new Error("A MutationObserver can only observe once");e._$mutationObserverTarget?n=e._$mutationObserverTarget:(n=new ut(e),e._$mutationObserverTarget=n),this._$listener=null;var o=t.subtree?r:function(e){e.target===this&&r.call(this,e)};this._$normalizedListener=o,this._$bindedTarget=n,t.properties&&(n.attrObservers||(n.attrObservers=new Qe),n.attrObservers.add(o),this._$bindedFuncArrs.push(n.attrObservers),this._$subtreeListenersCount+=1),t.childList&&(n.childObservers||(n.childObservers=new Qe),n.childObservers.add(o),this._$bindedFuncArrs.push(n.childObservers),this._$subtreeListenersCount+=1),t.characterData&&(n.textObservers||(n.textObservers=new Qe),n.textObservers.add(o),this._$bindedFuncArrs.push(n.textObservers),this._$subtreeListenersCount+=1),t.subtree&&n.updateSubtreeCount(this._$subtreeListenersCount),t.attachStatus&&(n.attachObservers||(n.attachObservers=new Qe),n.attachObservers.add(o),this._$bindedFuncArrs.push(n.attachObservers))},e.prototype.disconnect=function(){var e;null===(e=this._$bindedTarget)||void 0===e||e.updateSubtreeCount(-this._$subtreeListenersCount);var t=this._$bindedFuncArrs;this._$bindedFuncArrs=[];var n=this._$normalizedListener;n&&t.forEach((function(e){e.remove(n)}))},e}(),ht=function(){function e(e,t){var n;this._$destroyOnDetach=!1,this._$text=String(e),n=t._$nodeTreeContext.document.createTextNode(e),this._$backendElement=n,n&&(n.__wxElement=this),this.ownerShadowRoot=t,this.parentNode=null,this._$nodeSlotElement=null}return e.create=function(t,n){return new e(t,n)},e.prototype.asTextNode=function(){return this},e.prototype.asElement=function(){return null},e.prototype.asNativeNode=function(){return null},e.prototype.asVirtualNode=function(){return null},e.prototype.asInstanceOf=function(){return null},e.prototype.destroyBackendElement=function(){this._$backendElement&&(this._$backendElement=null)},e.prototype.destroyBackendElementOnDetach=function(){this._$destroyOnDetach=!0},e.prototype.getBackendElement=function(){return this._$backendElement},e.prototype.getComposedParent=function(){for(var e=this.parentNode;null==e?void 0:e._$inheritSlots;)e=e.parentNode;return e instanceof ve&&!e._$external?e.shadowRoot.getContainingSlot(this):e},Object.defineProperty(e.prototype,"$$",{get:function(){return this._$backendElement},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textContent",{get:function(){return this._$text},set:function(e){this._$text=String(e),this._$backendElement&&(this._$backendElement.textContent=this._$text),ut.callTextObservers(this,{type:"characterData",target:this})},enumerable:!1,configurable:!0}),e}(),pt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ft=function(e){function t(){throw new Error("Element cannot be constructed directly")}return pt(t,e),t.create=function(e,n){var r,o,i=Object.create(t.prototype);if(i.is=e,o=n._$nodeTreeContext.document.createElement(e),i._$initialize(!1,o,n),i.classList=new S(i,null),n&&o){var a=n.getHostNode()._$definition._$options.styleScope;if(Ze.writeExtraInfoToAttr){var s=null===(r=n.getHostNode()._$behavior.ownerSpace)||void 0===r?void 0:r.styleScopeManager.queryName(a);s&&o.setAttribute("exparser:info-class-prefix","".concat(s,"--"))}}return i},t}(ne),vt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(e){e[e.Single=0]="Single",e[e.Multiple=1]="Multiple",e[e.Dynamic=2]="Dynamic"}(nt||(nt={}));var _t,$t=function(e,t){var n=t.waiting;if(n)return n.add(e),function(){n.remove(e)}},gt=function(e){function t(){throw new Error("Element cannot be constructed directly")}return vt(t,e),t.createShadowRoot=function(e){var n,r=Object.create(t.prototype);r._$initializeVirtual("shadow",null,e._$nodeTreeContext),r._$idMap=null;var o=0;e._$definition._$options.multipleSlots?o=1:e._$definition._$options.dynamicSlots&&(o=2),r._$slotCacheDirty=!1,r._$appliedSlotCacheDirty=!1,0===o?(r._$singleSlot=null,r._$appliedSingleSlot=null):1===o?r._$slots=r._$appliedSlots=Object.create(null):2===o&&(r._$dynamicSlotSet=new Set,r._$appliedDynamicSlots=void 0,r._$requiredSlotValueNames=[],r._$propertyPassingDeepCopy=G(e.getComponentOptions().propertyPassingDeepCopy),r._$insertDynamicSlotHandler=void 0,r._$removeDynamicSlotHandler=void 0,r._$updateDynamicSlotHandler=void 0),r._$backendShadowRoot=null;var i=(null===(n=r._$backendShadowRoot)||void 0===n?void 0:n.getRootNode())||null;return r._$initialize(!0,i,r,e._$nodeTreeContext),r._$host=e,e.shadowRoot=r,r},t.prototype.getHostNode=function(){return this._$host},t.prototype.createTextNode=function(e){return void 0===e&&(e=""),new ht(e,this)},t.prototype.createNativeNode=function(e){return ft.create(e,this)},t.prototype.createVirtualNode=function(e){return void 0===e&&(e="virtual"),ie.create(e,this)},t.prototype.createComponent=function(e,t,n,r,o){var i=this._$host,a=i._$behavior,s=i._$genericImpls,l=a.ownerSpace,c=void 0===t?e:t,u=a._$using[c]||a._$using[c];if(u){var d=u.final||null!==u.placeholder&&he(u.placeholder,l,a,s),h=r?$t(r,u):void 0;if(d)return ve._$advancedCreate(e,d,this,null,de(d,l,i,n),h,o)}var p=s&&s[c];if(p){var f=p.final||null!==p.placeholder&&he(p.placeholder,l,a,s);if(h=r?$t(r,p):void 0,f)return ve._$advancedCreate(e,f,this,null,de(f,l,i,n),h,o)}var v=l.getComponentByUrl(c,"");if(!v)throw new Error('Cannot find component "'.concat(c,'"'));return ve._$advancedCreate(e,v,this,null,de(v,l,i,n),void 0,o)},t.prototype.createComponentOrNativeNode=function(e,t,n){var r=this._$host,o=r._$behavior.ownerSpace,i=o.getComponentByUrlWithoutDefault(e,"");if(i)return ve._$advancedCreate(e,i,this,null,de(i,o,r,t),void 0,n);var a=ft.create(e,this);return null==n||n(a),a},t.prototype.checkComponentPlaceholder=function(e){var t,n,r=this._$host._$behavior._$using[e];if(void 0!==r)n=r;else{var o=null===(t=this._$host._$genericImpls)||void 0===t?void 0:t[e];if(!o)return;n=o}return!n.final&&null!==n.placeholder},t.prototype.getElementById=function(e){return this._$getIdMap()[e]},t.prototype._$markIdCacheDirty=function(){this._$idMap=null},t.prototype._$getIdMap=function(){if(this._$idMap)return this._$idMap;var e=ne._$generateIdMap(this);return this._$idMap=e,e},t.prototype.getSingleSlotElement=function(){return this._$singleSlot},t.prototype.getSlotElementFromName=function(e){if(void 0!==this._$singleSlot)return this._$singleSlot;if(this._$slots)return this._$slots[e]||null;if(this._$dynamicSlotSet){for(var t=[],n=this._$dynamicSlotSet.values(),r=n.next();!r.done;r=n.next()){var o=r.value;(o._$slotName||"")===e&&t.push(o)}return t}return null},t.prototype.getContainingSlot=function(e){var t,n;if(void 0!==this._$singleSlot)return this._$singleSlot;if(this._$dynamicSlotSet){if(!e)return null;for(var r=e;null===(t=r.parentNode)||void 0===t?void 0:t._$inheritSlots;)r=r.parentNode;var o=r._$nodeSlotElement;if((null==o?void 0:o.ownerShadowRoot)===this)return o}return this._$slots?(n=e instanceof ne?e._$nodeSlot:"",this._$slots[n]||null):null},t.prototype.getSlotContentArray=function(e){if(null===e._$slotName)return null;var t=[];return this.forEachNodeInSpecifiedSlot(e,(function(e){t.push(e)})),t},t.prototype.forEachSlot=function(e){if(this._$singleSlot)e(this._$singleSlot);else if(this._$slots)for(var t=Object.values(this._$slots),n=0;n<t.length&&!1!==e(t[n]);n+=1);else if(this._$dynamicSlotSet)for(var r=this._$dynamicSlotSet.values(),o=r.next();!o.done&&!1!==e(o.value);o=r.next());},t.prototype.forEachNodeInSlot=function(e){var t=this;if(this._$singleSlot){var n=this._$singleSlot,r=function(t){return!1!==e(t,n)&&!(t instanceof ne&&t._$inheritSlots&&!1===t.childNodes.every(r))};this._$host.childNodes.every(r)}else if(this._$dynamicSlotSet){var o=function(n){return!1!==e(n,t.getContainingSlot(n)||void 0)&&!(n instanceof ne&&n._$inheritSlots&&!1===n.childNodes.every((function(e){return o(e)})))};this._$host.childNodes.every(o)}else if(this._$slots){var i=this._$slots,a=function(t){if(t instanceof ne){if(!1===e(t,i[t._$nodeSlot]))return!1;if(t._$inheritSlots&&!1===t.childNodes.every(a))return!1}else if(!1===e(t,i[""]))return!1;return!0};this._$host.childNodes.every(a)}},t.prototype.forEachNodeInSpecifiedSlot=function(e,t){var n=this;if(this._$singleSlot){if(""!==e&&this._$singleSlot!==e)return;var r=function(e,n){t(e,n),e instanceof ne&&e._$inheritSlots&&e.childNodes.forEach(r)};this._$host.childNodes.forEach(r)}else if(this._$dynamicSlotSet){if("string"==typeof e)return;var o=function(e,n){t(e,n),e instanceof ne&&e._$inheritSlots&&e.childNodes.forEach(o)};this._$host.childNodes.forEach((function(r,i){n.getContainingSlot(r)===e&&(t(r,i),r instanceof ne&&r._$inheritSlots&&r.childNodes.forEach(o))}))}else if(this._$slots){if("string"!=typeof e&&this._$slots[e._$slotName]!==e)return;var i="string"==typeof e?e:e._$slotName,a=function(e,n){e instanceof ne?(e._$nodeSlot===i&&t(e,n),e._$inheritSlots&&e.childNodes.forEach(a)):""===i&&t(e,n)};this._$host.childNodes.forEach(a)}},t.prototype._$markSlotCacheDirty=function(){this._$slotCacheDirty=!0,this._$appliedSlotCacheDirty=!0},t.prototype._$checkSlotChanges=function(){if(this._$appliedSlotCacheDirty)if(this._$appliedSlotCacheDirty=!1,this._$slotCacheDirty&&this._$updateSlotCache(),this._$dynamicSlotSet){var e=this._$appliedDynamicSlots;if(!e)return;for(var t=this._$dynamicSlotSet,n=this._$insertDynamicSlotHandler,r=this._$removeDynamicSlotHandler,o=e.keys(),i=o.next();!i.done;i=o.next()){var a=i.value;t.has(a)||(null==r||r(a),e.delete(a))}for(var s=t.values(),l=s.next();!l.done;l=s.next()){var c=(a=l.value)._$slotName||"",u=e.get(a);void 0!==u?u.slotName!==c&&(null==r||r(a),null==n||n(a,c,a._$slotValues),e.set(a,{slotName:c,updatePathTree:void 0})):(null==n||n(a,c,a._$slotValues),e.set(a,{slotName:c,updatePathTree:void 0}))}}else if(void 0===this._$singleSlot){var d=this._$appliedSlots,h=this._$slots;this._$appliedSlots=h;for(var p=Object.keys(d),f=0;f<p.length;f+=1)($=d[_=p[f]])!==(g=h[_])&&ne._$insertChildReassignSlot(this,_,$,g||null);var v=Object.keys(h);for(f=0;f<v.length;f+=1){var _,$=d[_=v[f]],g=h[_];void 0===$&&ne._$insertChildReassignSlot(this,_,null,g||null)}}else{var m=this._$appliedSingleSlot;m!==this._$singleSlot&&(this._$appliedSingleSlot=this._$singleSlot,ne._$insertChildReassignSlot(this,"",m,this._$singleSlot))}},t.prototype._$updateSlotCache=function(){if(this._$slotCacheDirty=!1,void 0!==this._$singleSlot){var e,t=function(n){if(n instanceof ne){if(null!==n._$slotName)return e=n,!1;if(!1===n.childNodes.every(t))return!1}return!0};return this.childNodes.every(t),void(this._$singleSlot=e||null)}if(this._$dynamicSlotSet){var n=new Set,r=function(e){e instanceof ne&&(null!==e._$slotName&&n.add(e),e.childNodes.forEach(r))};return this.childNodes.forEach(r),void(this._$dynamicSlotSet=n)}var o=Object.create(null),i=function(e){e instanceof ne&&(null!==e._$slotName&&(o[e._$slotName]||(o[e._$slotName]=e)),e.childNodes.forEach(i))};this.childNodes.forEach(i),this._$slots=o},t.prototype.isMultipleSlots=function(){return void 0!==this._$slots},t.prototype.isDynamicSlots=function(){return void 0!==this._$dynamicSlotSet},t.prototype.setDynamicSlotHandler=function(e,t,n,r){if(this._$requiredSlotValueNames=e,this._$insertDynamicSlotHandler=t,this._$removeDynamicSlotHandler=n,this._$updateDynamicSlotHandler=r,this._$appliedDynamicSlots)for(var o=this._$appliedDynamicSlots.values(),i=o.next();!i.done;i=o.next()){var a=i.value;a.updatePathTree||(a.updatePathTree=Object.create(null))}},t.prototype.useDynamicSlotHandlerFrom=function(e){e._$insertDynamicSlotHandler&&this.setDynamicSlotHandler(e._$requiredSlotValueNames.slice(),e._$insertDynamicSlotHandler,e._$removeDynamicSlotHandler,e._$updateDynamicSlotHandler)},t.prototype.replaceSlotValue=function(e,t,n){var r,o=e._$slotValues;if(o){var i=o[t],a=n;if(0!==this._$propertyPassingDeepCopy&&(a=2===this._$propertyPassingDeepCopy?L(n,!0):T(n)),i!==a&&(o[t]=a,this._$requiredSlotValueNames.indexOf(t)>=0)){var s=null===(r=this._$appliedDynamicSlots)||void 0===r?void 0:r.get(e);s&&(s.updatePathTree||(s.updatePathTree=Object.create(null)),s.updatePathTree[t]=!0)}}},t.prototype.applySlotValueUpdates=function(e){var t,n,r=null===(t=this._$appliedDynamicSlots)||void 0===t?void 0:t.get(e),o=null==r?void 0:r.updatePathTree;o&&(r.updatePathTree=void 0,null===(n=this._$updateDynamicSlotHandler)||void 0===n||n.call(this,e,e._$slotValues,o))},t.prototype.applySlotUpdates=function(){var e;if(this._$appliedDynamicSlots)for(var t=this._$appliedDynamicSlots.entries(),n=t.next();!n.done;n=t.next()){var r=n.value,o=r[0],i=r[1],a=null==i?void 0:i.updatePathTree;a&&(i.updatePathTree=void 0,null===(e=this._$updateDynamicSlotHandler)||void 0===e||e.call(this,o,o._$slotValues,a))}else this._$appliedDynamicSlots=new Map,this._$appliedSlotCacheDirty=!0,this._$checkSlotChanges()},t}(ie),mt=function(e){if(e instanceof ne){var t;return t=e instanceof ie?"(virtual):".concat(e.is):e instanceof ve?"".concat(e.tagName,":").concat(e.is):e instanceof ft?e.is:"(unknown)","<".concat(t).concat(function(e){var t="";if(e instanceof ne){null!==e._$slotName&&(t+=' (slot) name="'.concat(e._$slotName,'"')),e.id&&(t+=' id="'.concat(e.id,'"')),e.slot&&(t+=' slot="'.concat(e.slot,'"'));var n=e.class;n&&(t+=' class="'.concat(n,'"')),e.style&&(t+=' style="'.concat(e.style,'"'))}return e instanceof ie||(e instanceof ve?ve.listProperties(e).forEach((function(n){t+=" ".concat(n,'="').concat(String(e.data[n]),'"')})):e.attributes.forEach((function(e){t+=" ".concat(e.name,'="').concat(String(e.value),'"')}))),t}(e),">")}return e instanceof ht?e.textContent.trim():null===e?"<(null)>":void 0===e?"<(undefined)>":"<(unknown)>"},yt=function(e,t,n){void 0===n&&(n=0);for(var r="",o=n;o;o-=1)r+=" ";var i=r+mt(e),a=!1;return e instanceof ne&&(e instanceof ve&&(a=e.getComponentOptions().externalComponent),t?a?(i+="\n".concat(r," <(external)>"),e.childNodes.forEach((function(e){i+="\n".concat(yt(e,t,n+2))}))):e.forEachComposedChild((function(e){i+="\n".concat(yt(e,t,n+1))})):e.childNodes.forEach((function(e){i+="\n".concat(yt(e,t,n+1))}))),i},bt=function(e,t){console.log(yt(e,t))};!function(e){e.ShadowAncestors="shadow-ancestors",e.ComposedAncestors="composed-ancestors",e.ShadowDescendantsRootFirst="shadow-descendants-root-first",e.ShadowDescendantsRootLast="shadow-descendants-root-last",e.ComposedDescendantsRootFirst="composed-descendants-root-first",e.ComposedDescendantsRootLast="composed-descendants-root-last"}(_t||(_t={}));var Ct=function(){function e(e,t,n){if(void 0===n&&(n=ne),!(e instanceof ne||e instanceof ht))throw new Error("Element iterators can only be used in elements or text nodes");if(this._$node=e,this._$nodeTypeLimit=n||ne,"shadow-ancestors"===t||"shadow-descendants-root-first"===t||"shadow-descendants-root-last"===t)this._$composed=!1;else{if("composed-ancestors"!==t&&"composed-descendants-root-first"!==t&&"composed-descendants-root-last"!==t)throw new Error('Unrecognized iterator type "'.concat(String(t),'"'));this._$composed=!0}this._$isAncestor="shadow-ancestors"===t||"composed-ancestors"===t,this._$rootFirst="shadow-descendants-root-first"===t||"composed-descendants-root-first"===t}return e.create=function(t,n,r){return new e(t,n,r)},e.prototype.forEach=function(e){var t=this._$nodeTypeLimit,n=this._$composed;if(this._$isAncestor){var r=function(o){for(var i=null,a=o;;){if(n&&i&&a instanceof ve&&!a._$external){var s=a.getShadowRoot().getContainingSlot(i);if(!s)return!1;if(!1===r(s))break}if(a instanceof t&&!1===e(a))return!1;if(!a.parentNode)break;i=a,a=a.parentNode}return!0};r(this._$node)}else{var o=this._$rootFirst,i=function(r){if(o&&r instanceof t&&!1===e(r))return!1;if(r instanceof ne){var a=!1,s=function(e){return!1!==i(e)||(a=!0,!1)};if(n?r.forEachComposedChild(s):r.childNodes.forEach(s),a)return!1}return!(!o&&r instanceof t&&!1===e(r))};i(this._$node)}},e}(),St=function(e,t){var n,r;n=e.getBackendContext(),r=t||null,n.render((function(){"function"==typeof r&&it("render",r,n,[null])}))},wt=function(e){return Xe().defineBehavior(e)},Et=function(e){return Xe().defineComponent(e)};function Ot(e,t){return ve.create(e,t||null)}var Nt=Y.triggerEvent,kt=Y.triggerExternalEvent;glassEasel=t})();
|
|
2
|
+
//# sourceMappingURL=glass_easel.domlike.global.js.map
|