glass-easel 0.1.1 → 0.2.1

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.
Files changed (152) hide show
  1. package/dist/glass_easel.all.js +1 -1
  2. package/dist/glass_easel.all.js.map +1 -1
  3. package/dist/glass_easel.domlike.global.js +1 -1
  4. package/dist/glass_easel.domlike.global.js.map +1 -1
  5. package/dist/types/src/backend/backend_protocol.d.ts +57 -35
  6. package/dist/types/src/backend/backend_protocol.d.ts.map +1 -1
  7. package/dist/types/src/backend/composed_backend_protocol.d.ts +34 -22
  8. package/dist/types/src/backend/composed_backend_protocol.d.ts.map +1 -1
  9. package/dist/types/src/backend/domlike_backend_protocol.d.ts +31 -7
  10. package/dist/types/src/backend/domlike_backend_protocol.d.ts.map +1 -1
  11. package/dist/types/src/backend/mode.d.ts +21 -2
  12. package/dist/types/src/backend/mode.d.ts.map +1 -1
  13. package/dist/types/src/backend/suggested_backend_protocol.d.ts +3 -3
  14. package/dist/types/src/behavior.d.ts +19 -13
  15. package/dist/types/src/behavior.d.ts.map +1 -1
  16. package/dist/types/src/class_list.d.ts +6 -2
  17. package/dist/types/src/class_list.d.ts.map +1 -1
  18. package/dist/types/src/component.d.ts +42 -8
  19. package/dist/types/src/component.d.ts.map +1 -1
  20. package/dist/types/src/component_params.d.ts +17 -20
  21. package/dist/types/src/component_params.d.ts.map +1 -1
  22. package/dist/types/src/component_space.d.ts +55 -8
  23. package/dist/types/src/component_space.d.ts.map +1 -1
  24. package/dist/types/src/data_path.d.ts.map +1 -1
  25. package/dist/types/src/data_proxy.d.ts.map +1 -1
  26. package/dist/types/src/element.d.ts +112 -22
  27. package/dist/types/src/element.d.ts.map +1 -1
  28. package/dist/types/src/element_iterator.d.ts +1 -1
  29. package/dist/types/src/element_iterator.d.ts.map +1 -1
  30. package/dist/types/src/event.d.ts +5 -4
  31. package/dist/types/src/event.d.ts.map +1 -1
  32. package/dist/types/src/external_shadow_tree.d.ts.map +1 -1
  33. package/dist/types/src/func_arr.d.ts.map +1 -1
  34. package/dist/types/src/global_options.d.ts +9 -0
  35. package/dist/types/src/global_options.d.ts.map +1 -1
  36. package/dist/types/src/index.d.ts +20 -20
  37. package/dist/types/src/index.d.ts.map +1 -1
  38. package/dist/types/src/mutation_observer.d.ts +4 -4
  39. package/dist/types/src/mutation_observer.d.ts.map +1 -1
  40. package/dist/types/src/native_node.d.ts +4 -1
  41. package/dist/types/src/native_node.d.ts.map +1 -1
  42. package/dist/types/src/node.d.ts +2 -3
  43. package/dist/types/src/node.d.ts.map +1 -1
  44. package/dist/types/src/relation.d.ts +1 -2
  45. package/dist/types/src/relation.d.ts.map +1 -1
  46. package/dist/types/src/render.d.ts.map +1 -1
  47. package/dist/types/src/selector.d.ts.map +1 -1
  48. package/dist/types/src/shadow_root.d.ts +70 -32
  49. package/dist/types/src/shadow_root.d.ts.map +1 -1
  50. package/dist/types/src/template_engine.d.ts +40 -2
  51. package/dist/types/src/template_engine.d.ts.map +1 -1
  52. package/dist/types/src/text_node.d.ts +14 -2
  53. package/dist/types/src/text_node.d.ts.map +1 -1
  54. package/dist/types/src/tmpl/index.d.ts +2 -1
  55. package/dist/types/src/tmpl/index.d.ts.map +1 -1
  56. package/dist/types/src/tmpl/native_rendering.d.ts.map +1 -1
  57. package/dist/types/src/tmpl/proc_gen_wrapper.d.ts +17 -8
  58. package/dist/types/src/tmpl/proc_gen_wrapper.d.ts.map +1 -1
  59. package/dist/types/src/tmpl/proc_gen_wrapper_dom.d.ts +2 -2
  60. package/dist/types/src/tmpl/proc_gen_wrapper_dom.d.ts.map +1 -1
  61. package/dist/types/src/tmpl/range_list_diff.d.ts.map +1 -1
  62. package/dist/types/src/trait_behaviors.d.ts.map +1 -1
  63. package/dist/types/src/virtual_node.d.ts +2 -2
  64. package/dist/types/src/virtual_node.d.ts.map +1 -1
  65. package/dist/types/tests/base/composed_backend.d.ts +123 -0
  66. package/dist/types/tests/base/composed_backend.d.ts.map +1 -0
  67. package/dist/types/tests/base/env.d.ts +2 -1
  68. package/dist/types/tests/base/env.d.ts.map +1 -1
  69. package/dist/types/tests/base/match.d.ts.map +1 -1
  70. package/guide/zh_CN/advanced/component_filter.md +1 -1
  71. package/guide/zh_CN/advanced/component_space.md +29 -1
  72. package/guide/zh_CN/appendix/backend_protocol.md +11 -1
  73. package/guide/zh_CN/basic/component.md +17 -0
  74. package/guide/zh_CN/data_management/data_observer.md +6 -4
  75. package/guide/zh_CN/index.md +1 -1
  76. package/guide/zh_CN/interaction/behavior.md +1 -1
  77. package/guide/zh_CN/interaction/slot.md +2 -2
  78. package/guide/zh_CN/interaction/template_import.md +49 -1
  79. package/jest.config.js +1 -4
  80. package/jest.unit.config.js +1 -3
  81. package/package.json +3 -3
  82. package/src/backend/backend_protocol.ts +149 -64
  83. package/src/backend/composed_backend_protocol.ts +102 -48
  84. package/src/backend/domlike_backend_protocol.ts +308 -118
  85. package/src/backend/mode.ts +24 -2
  86. package/src/backend/suggested_backend_protocol.ts +13 -13
  87. package/src/behavior.ts +264 -222
  88. package/src/class_list.ts +56 -38
  89. package/src/component.ts +311 -235
  90. package/src/component_params.ts +152 -202
  91. package/src/component_space.ts +138 -73
  92. package/src/data_path.ts +16 -8
  93. package/src/data_proxy.ts +106 -108
  94. package/src/element.ts +1344 -596
  95. package/src/element_iterator.ts +26 -45
  96. package/src/event.ts +104 -92
  97. package/src/external_shadow_tree.ts +2 -7
  98. package/src/func_arr.ts +16 -21
  99. package/src/global_options.ts +52 -71
  100. package/src/index.ts +33 -77
  101. package/src/mutation_observer.ts +35 -47
  102. package/src/native_node.ts +58 -30
  103. package/src/node.ts +12 -36
  104. package/src/relation.ts +68 -107
  105. package/src/render.ts +3 -9
  106. package/src/selector.ts +2 -11
  107. package/src/shadow_root.ts +594 -374
  108. package/src/template_engine.ts +50 -33
  109. package/src/text_node.ts +38 -46
  110. package/src/tmpl/index.ts +54 -36
  111. package/src/tmpl/native_rendering.ts +23 -32
  112. package/src/tmpl/proc_gen_wrapper.ts +351 -235
  113. package/src/tmpl/proc_gen_wrapper_dom.ts +32 -49
  114. package/src/tmpl/range_list_diff.ts +40 -40
  115. package/src/trait_behaviors.ts +7 -8
  116. package/src/virtual_node.ts +17 -29
  117. package/tests/backend/domlike.test.ts +22 -19
  118. package/tests/base/composed_backend.ts +583 -0
  119. package/tests/base/env.ts +9 -4
  120. package/tests/base/match.ts +118 -80
  121. package/tests/core/backend.test.ts +34 -25
  122. package/tests/core/behavior.test.ts +153 -84
  123. package/tests/core/component_space.test.ts +78 -22
  124. package/tests/core/data_update.test.ts +239 -61
  125. package/tests/core/misc.test.ts +277 -104
  126. package/tests/core/placeholder.test.ts +232 -4
  127. package/tests/core/slot.test.ts +163 -100
  128. package/tests/core/trait_behaviors.test.ts +18 -12
  129. package/tests/legacy/behavior.test.js +86 -66
  130. package/tests/legacy/component.test.js +1451 -1247
  131. package/tests/legacy/data_path.test.js +47 -49
  132. package/tests/legacy/data_proxy.test.js +169 -161
  133. package/tests/legacy/element_iterator.test.js +111 -60
  134. package/tests/legacy/event.test.js +481 -280
  135. package/tests/legacy/external.test.js +184 -129
  136. package/tests/legacy/extra_info.test.js +46 -28
  137. package/tests/legacy/generics.test.js +48 -43
  138. package/tests/legacy/mutation_observer.test.js +37 -36
  139. package/tests/legacy/relation.test.js +178 -74
  140. package/tests/legacy/selector.test.js +100 -60
  141. package/tests/legacy/slot.test.js +136 -72
  142. package/tests/legacy/virtual.test.js +236 -94
  143. package/tests/tmpl/binding_map.test.ts +38 -19
  144. package/tests/tmpl/event.test.ts +120 -8
  145. package/tests/tmpl/expression.test.ts +163 -133
  146. package/tests/tmpl/lvalue.test.ts +92 -15
  147. package/tests/tmpl/native_rendering.test.ts +20 -4
  148. package/tests/tmpl/structure.test.ts +859 -330
  149. package/tests/types/chaining.test.ts +31 -23
  150. package/tests/types/createElement.test.ts +11 -9
  151. package/tests/types/definition.test.ts +15 -1
  152. package/webpack.config.js +30 -25
@@ -1,2 +1,2 @@
1
- (()=>{"use strict";var e={d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},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:()=>Ne,DataGroup:()=>W,DeepCopyKind:()=>We,Element:()=>ne,ElementIterator:()=>Ct,ElementIteratorType:()=>_t,Event:()=>Y,EventBubbleStatus:()=>R,FuncArr:()=>Qe,MutationObserver:()=>ut,NativeNode:()=>ft,Observer:()=>ut,ParsedSelector:()=>Q,RelationType:()=>te,ShadowRoot:()=>gt,StyleScopeManager:()=>C,StyleSegmentIndex:()=>Z,TextNode:()=>ht,TraitBehavior:()=>ae,VirtualNode:()=>ie,addGlobalErrorListener:()=>at,addGlobalWarningListener:()=>lt,backend:()=>n,composedBackend:()=>o,createElement:()=>kt,dataPath:()=>i,dataUtils:()=>a,domlikeBackend:()=>r,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:()=>u,triggerEvent:()=>Ot,triggerExternalEvent:()=>Nt,triggerRender:()=>St,typeUtils:()=>s});var n={};e.r(n),e.d(n,{EmptyBackendContext:()=>p,EmptyBackendElement:()=>f,EmptyBackendShadowRootContext:()=>v});var o={};e.r(o),e.d(o,{EmptyComposedBackendContext:()=>_,EmptyComposedBackendElement:()=>$});var r={};e.r(r),e.d(r,{CurrentWindowBackendContext:()=>m});var i={};e.r(i),e.d(i,{parseMultiPaths:()=>x,parseSinglePath:()=>D});var a={};e.r(a),e.d(a,{deepCopy:()=>T,simpleDeepCopy:()=>M});var s={};e.r(s),e.d(s,{METHOD_TAG:()=>oe});var l={};e.r(l),e.d(l,{DEFAULT_PROC_GEN_GROUP:()=>Ge,GlassEaselTemplateEngine:()=>Ve});var c={};e.r(c),e.d(c,{MutationObserver:()=>ut,MutationObserverTarget:()=>dt});var d,u={};e.r(u),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"}(d||(d={}));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 o=document.createElement("style");o.innerText=n,void 0!==t&&o.setAttribute("wx-style-scope",String(t)),document.head.appendChild(o);var r=this._$styleSheets.length;return this._$styleSheets.push(o),r},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 o=Object.keys(n),r=0;r<o.length;r+=1){var i=o[r];"function"!=typeof e[i]&&(t[i]=e[i])}n=Object.getPrototypeOf(n)}return t},e.prototype._$trigger=function(e,t,n,o,r){if(this._$eventListener){var i=e.target;1===this._$eventListener(i,t,n,{originalEvent:e,bubbles:o,composed:r})&&e.preventDefault()}},e.prototype._$initEvent=function(){var e=this,t=Object.create(null),n=!1,o=function(e,n){t[n.identifier]={x:n.clientX,y:n.clientY}},r=function(n,o){var r=o.identifier;if(t[r]){var i=t[r];(Math.abs(i.x-o.clientX)>10||Math.abs(i.y-o.clientY)>10)&&(delete t[r],e._$trigger(n,"canceltap",i,!0,!0))}},i=function(n,o){var r=o.identifier;if(t[r]){var i=t[r];delete t[r],Math.abs(i.x-o.clientX)>10||Math.abs(i.y-o.clientY)>10?e._$trigger(n,"canceltap",i,!0,!0):e._$trigger(n,"tap",i,!0,!0)}},a=function(n,o){var r=o.identifier;if(t[r]){var i=t[r];delete t[r],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 r=t.changedTouches,i=0;i<r.length;i+=1)o(0,r[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,o=0;o<n.length;o+=1)r(t,n[o])}),{capture:!0}),document.body.addEventListener("touchend",(function(t){e._$trigger(t,"touchend",e._$getEventDetail(t),t.bubbles,t.composed);for(var n=t.changedTouches,o=0;o<n.length;o+=1)i(t,n[o])}),{capture:!0}),document.body.addEventListener("touchcancel",(function(t){e._$trigger(t,"touchcancel",e._$getEventDetail(t),t.bubbles,t.composed);for(var n=t.changedTouches,o=0;o<n.length;o+=1)a(t,n[o])}),{capture:!0}),document.body.addEventListener("mousedown",(function(t){e._$trigger(t,"mousedown",e._$getEventDetail(t),t.bubbles,t.composed),n||o(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||r(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 o=this;if(e){if(g.includes(t)){if(this._$delegatedEventListeners[t])return;return this._$delegatedEventListeners[t]=!0,void document.body.addEventListener(t,(function(e){o._$trigger(e,t,o._$getEventDetail(e),e.bubbles,e.composed)}),{capture:!0})}this._$elementEventListeners.has(e)||this._$elementEventListeners.set(e,Object.create(null));var r=this._$elementEventListeners.get(e);r[t]||(r[t]=!0,e.addEventListener(t,(function(e){o._$triggedEvents.has(e)||(o._$triggedEvents.add(e),o._$trigger(e,t,o._$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,o;this._$aliasDirty=!1,this._$rawNames=[],this._$hasResolvedNames=!1,this._$elem=e;var r=null===(n=e.ownerShadowRoot)||void 0===n?void 0:n.getHostNode();if(r){var i=r.getComponentOptions();this._$owner=r.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;3===e.getBackendMode()&&(this._$prefixManager=null===(o=e.ownerShadowRoot)||void 0===o?void 0:o.getHostNode().getRootBehavior().ownerSpace.styleScopeManager)}return e.prototype._$resolvePrefixes=function(e,t){var n,o=null===(n=this._$owner)||void 0===n?void 0:n._$resolvedAlias;if(o&&void 0!==o[e]){var r=o[e];if(this._$hasResolvedNames=!0,r)for(var i=0;i<r.length;i+=1){var a=r[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],o=[];n&&n.forEach((function(e){t._$resolvePrefixes(e,(function(e,t){o.push({scopeId:e,className:t})}))}));var r=!1,i=this._$resolvedAlias[e];if(i)if(i.length!==o.length)r=!0;else for(var a=0;a<i.length;a+=1){var s=i[a],l=o[a];if(s.scopeId!==l.scopeId||s.className!==l.className){r=!0;break}}else o.length>0&&(r=!0);return this._$resolvedAlias[e]=o,r},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 o=n._$alias;if(o){var r=!1;if(Object.keys(o).forEach((function(e){n._$updateResolvedAliases(e)&&(r=!0)})),r){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,3===this._$elem.getBackendMode()?t.setAttribute("class",""):t.clearClasses(),this._$rawNames.forEach((function(n){e._$addClassToBackend(n,t)})))},e.prototype._$classListAdd=function(e,t,n){var o;if(3===this._$elem.getBackendMode()){var r=void 0===t?"":null===(o=this._$prefixManager)||void 0===o?void 0:o.queryName(t),i=r?"".concat(r,"--").concat(e):e;n.classList.add(i)}else n.addClass(e,t)},e.prototype._$classListRemove=function(e,t,n){var o;if(3===this._$elem.getBackendMode()){var r=t&&(null===(o=this._$prefixManager)||void 0===o?void 0:o.queryName(t)),i=r?"".concat(r,"--").concat(e):e;n.classList.remove(i)}else n.removeClass(e,t)},e.prototype._$addClassToBackend=function(e,t){var n=this;this._$resolvePrefixes(e,(function(e,o){n._$classListAdd(o,e,t)}))},e.prototype._$removeClassFromBackend=function(e,t){var n=this;this._$resolvePrefixes(e,(function(e,o){n._$classListRemove(o,e,t)}))},e.prototype.toggle=function(e,t){var n=this,o=String(e).match(b)||null;if(o){var r=this._$elem.getBackendElement();o.forEach((function(o){var i=n._$rawNames.indexOf(e),a=!1;if((void 0===t?i<0:t)?i<0&&(n._$rawNames.push(o),r&&n._$addClassToBackend(o,r),a=!0):i>=0&&(n._$rawNames.splice(i,1),r&&n._$removeClassFromBackend(o,r),a=!0),a){var s=n._$elem;s._$mutationObserverTarget&&dt.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((o=n.slice(1))===e)return!0}else if("^"===n[0]){for(var o=n.slice(1);"^"===o[0];)o=o.slice(1);if(o===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&&dt.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 o=t[e.cur];if(!(o>="0"&&o<="9"))break;n+=o,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)},k=function(e){for(var t=e.str,n="";e.cur<t.length;){var o=t[e.cur];if("\\"===o)e.cur+1===t.length||(n+=t[e.cur+1],e.cur+=1);else if(/^[_a-zA-Z]$/.test(o))n+=o;else{if(!(o>="0"&&o<="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+=o}e.cur+=1}return n},O=function(e){for(var t=e.str,n="";e.cur<t.length;){var o=t[e.cur];if("\\"===o)if(e.cur+1===t.length)n+="\\",e.cur+=1;else{var r=t[e.cur+1];"."===r||"["===r||"]"===r||"\\"===r?(n+=r,e.cur+=2):(n+="\\",e.cur+=1)}else{if("."===o||"["===o)break;n+=o,e.cur+=1}}return n},N=function(e){var t=e.str;if(w(e),"*"===t[e.cur]&&"*"===t[e.cur+1])return e.cur+=2,["**"];var n=k(e);if(!n)throw new Error('data path descriptor "'.concat(t,'" is illegal at char ').concat(e.cur," (first field name illegal)"));for(var o=[n];e.cur<t.length&&w(e);){var r=t[e.cur];if("."===r){if(e.cur+=1,w(e),"*"===t[e.cur]&&"*"===t[e.cur+1]){o.push("**"),e.cur+=2;break}var i=k(e);if(!i)throw new Error('data path descriptor "'.concat(t,'" is illegal at char ').concat(e.cur," (field name illegal)"));o.push(i)}else{if("["!==r)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,o.push(a)}}return o},D=function(e){try{var t=function(e){for(var t=e.str,n=[];e.cur<t.length;){var o=t[e.cur];if("."===o)e.cur+=1,""!==(i=O(e))&&n.push(i);else if("["===o){e.cur+=1;var r=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(r)}else{var i=O(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 N({str:e,cur:0})}));var t={str:e,cur:0},n=function(e){var t=[];for(t.push(N(e)),w(e);","===e.str[e.cur];)e.cur+=1,t.push(N(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 o=[];t.set(e,o);for(var r=0;r<e.length;r+=1)o[r]=A(e[r],t);return o}var i={};t.set(e,i);var a=Object.keys(e);for(r=0;r<a.length;r+=1){var s=a[r];i[s]=A(e[s],t)}return i}return"symbol"==typeof e?Symbol(e.description):e},M=function(e){if("object"==typeof e&&null!==e){if(Array.isArray(e)){for(var t=[],n=0;n<e.length;n+=1)t[n]=M(e[n]);return t}var o={},r=Object.keys(e);for(n=0;n<r.length;n+=1){var i=r[n];o[i]=M(e[i])}return o}return"symbol"==typeof e?Symbol(e.description):e},T=function(e,t){return t?A(e,new WeakMap):M(e)},L=function(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},B=Object.prototype.hasOwnProperty;!function(e){e[e.None=0]="None",e[e.Simple=1]="Simple",e[e.SimpleWithRecursion=2]="SimpleWithRecursion"}(y||(y={}));var R,P=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=M(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 o=0;o<t.length;o+=1){for(var r=t[o],i=this.observerTree,a=!1,s=0;s<r.length;s+=1){var l=r[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}(),j=function(e,t,n,o){for(var r=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]}r[i]=s}it("Data Observer",o,e.getMethodCaller(),r,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 o=Object.keys(e.sub);for(n=0;n<o.length;n+=1){var r=o[n];I(e.sub[r],t)}},U=function(e,t,n){for(var o=e,r=!0,i=0;i<n.length;i+=1){var a=n[i];if(o.wildcard)for(var s=o.wildcard,l=0;l<s.length;l+=1)t[s[l]]=!0;if(!B.call(o.sub,a)){r=!1;break}o=o.sub[a]}r&&I(o,t)},F=function(e,t,n,o){for(var r=0;r<e.length;r+=1){var i=e[r],a=i.path,s=i.f;t[r]&&(t[r]=!1,n&&j(n,o,a,s))}},G=function(e){return e===We.Simple?1:e===We.SimpleWithRecursion?2:0},W=function(){function e(e,t,n,o,r,i,a){this._$modelBindingListener=null,this._$pendingChanges=[],this._$doingUpdates=null,this._$comp=e,this.data=t,this._$pureDataPattern=n,this._$dataDeepCopy=o,this._$propertyPassingDeepCopy=r,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 o={},r=Object.keys(e),i=0;i<r.length;i+=1){var a=r[i],s=e[a];t&&t.test(a)||(o[a]=0===n?s:2===n?T(s,!0):M(s))}return o}return null},e.create=function(t){return new e(null,t,null,0,0,!1,new P({}))},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,o){Array.isArray(o)?this._$pendingChanges.push([e,o,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?T(t,!0):M(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,o;void 0===e&&(e=!1);var r,i,a=this._$propFields,s=this._$comp,l=this._$pureDataPattern,c=this._$dataDeepCopy,d=!!this._$doingUpdates;this._$observers.length>0?this._$doingUpdates?(r=this._$doingUpdates.combined,i=this._$doingUpdates.prop):(this._$doingUpdates={prop:[],combined:[],count:0},r=this._$doingUpdates.combined,i=this._$doingUpdates.prop):(r=[],i=[]);var u=this._$pendingChanges;this._$pendingChanges=[];for(var h=0;h<u.length;h+=1){var p=u[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,L([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 k=void 0;p[1]=k=2===c?T(v,!0):M(v),(t=E).splice.apply(t,L([C,$],k,!1))}else p[1]=E=2===c?T(S,!0):M(S);this.innerData[m]=E}if(this.data[m]=S,this._$reflectToAttributes){var O=s.getBackendElement();if(O){var N=S;if(z.reflectIdPrefix){var D=s.ownerShadowRoot;if(D){var x=D.getHostNode()._$idPrefix;x&&(N="".concat(x,"--").concat(S))}}var A=m.replace(/[A-Z]/g,(function(e){return"-".concat(e.toLowerCase())})),R=typeof N;"boolean"===R?S?O.setAttribute(A,""):O.removeAttribute(A):"object"===R?O.setAttribute(A,JSON.stringify(N)):O.setAttribute(A,N)}}y||b===S||i.push({propName:m,prop:z,oldValue:b,newValue:S,skipModelListener:e})}else{for(var P=this.data,j=m,I=1;I<f.length;I+=1){var G=f[I];Number.isFinite(G)?B.call(P,j)&&Array.isArray(P[j])||(P[j]=[]):B.call(P,j)&&null!==P[j]&&"object"==typeof P[j]&&!Array.isArray(P[j])||(P[j]={}),P=P[j],j=G}if(C=void 0,g?(b=P[j],Array.isArray(b)?(w=p,C=_>=0&&_<b.length?_:b.length,w[2]=C,b.splice.apply(b,L([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.'))):P[j]=v,!y&&this.innerData){P=this.innerData,j=m;for(var W=1;W<f.length;W+=1)G=f[W],Number.isFinite(G)?B.call(P,j)&&Array.isArray(P[j])||(P[j]=[]):B.call(P,j)&&null!==P[j]&&"object"==typeof P[j]&&!Array.isArray(P[j])||(P[j]={}),P=P[j],j=G;E=void 0,0===c?p[1]=E=v:void 0!==C?(E=P[j],k=void 0,p[1]=k=2===c?T(v,!0):M(v),(n=E).splice.apply(n,L([C,$],k,!1))):p[1]=E=2===c?T(v,!0):M(v),P[j]=E}!y&&z&&i.push({propName:m,prop:z,oldValue:void 0,newValue:v,skipModelListener:e||!1})}U(this._$observerTree,this._$observerStatus,f),y||r.push(p),this._$doingUpdates&&(this._$doingUpdates.count+=1)}if(!d){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===(o=this._$updateListener)||void 0===o||o.call(this,this.innerData||this.data,r),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&&dt.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 o,r,i,a=n.final?2:n.mutated?1:0;return n.capture||n.useCapture?this.captureListeners?o=this.captureListeners:(o=Object.create(null),this.captureListeners=o):o=this.listeners,o[e]?(i=!0,r=o[e]):(i=!1,r=o[e]={mutCount:0,finalCount:0,funcArr:new rt}),r.funcArr.add(t,a),2===a?r.finalCount+=1:1===a&&(r.mutCount+=1),i?2===a&&1===r.finalCount?3:0:3},e.prototype.removeListener=function(e,t,n){void 0===n&&(n={});var o=n.capture||n.useCapture?this.captureListeners:this.listeners;if(!o)return 1;var r=o[e];if(!r)return 1;var i=r.funcArr.remove(t);return null===i?1:(2===i?r.finalCount-=1:1===i&&(r.mutCount-=1),2===i&&0===r.finalCount?4:0)},e}(),Y=function(){function e(e,t,n){void 0===n&&(n={});var o=function(){var e=Date.now();return e<q&&(z+=e-q),q=e,e-z}();this.type=e,this.timeStamp=o,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 o=Object.create(this);return o.target=e,o.mark=t,o.currentTarget=n,o},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 o=this.type,r=this.composed,i=this.bubbles,a=t&&!r,s=this._$eventBubblingControl,l=function(e,t,r,i){var a=r._$eventTarget;if(a){var s=i?a.captureListeners:a.listeners;if(s){var l=s[o];if(l){var c=n.mutatedMarked(),d=r instanceof ve,u=d?r.getMethodCaller():r,h=n.wrapShadowedEvent(e,t,u);!1===l.funcArr.call(u,[h],(function(e){return!c||1!==e}),d?r: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 o=e,i=e instanceof ve?e.getMethodCaller():e,a=e.collectMarks();;){if(!1===t(o,i,a))return null;var s=void 0;if(r){if(o instanceof gt)return o.getHostNode();for(s=o.parentNode;null==s?void 0:s._$inheritSlots;)s=s.parentNode;if(s instanceof ve&&!s._$external){var l=s.shadowRoot.getContainingSlot(o);if(!l)return null;s=n(l)}}else s=o.parentNode;if(!s)return null;o=s}},o=e;;){var i=n(o);if(!i)break;o=i}};if(this._$capturePhase&&!s.stopped&&!a){var d=[];c(e,(function(e,t,n){d.push([e,t,n])}));for(var u=d.length-1;u>=0;u-=1){var h=d[u],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,o){if(!_&&e instanceof ve&&e._$external){var r=e.shadowRoot;r.handleEvent(r.slot,n)}return _=!1,e._$eventTarget&&l(t,o,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,o,r){var i=new e(n,o,r);e.dispatchEvent(t,i)},e.triggerExternalEvent=function(t,n,o,r,i){var a=new e(o,r,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(","),o=0;o<n.length;o+=1){for(var r=n[o].split(/( |\t|>+)/g),i=[],a=1,s=0;s<r.length;s+=1){var l=r[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===r.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 o=n[1].slice(1),r=n[2].split(".");return r.shift(),o||r.length?{id:o,classes:r,relation:t}:null},e.prototype.isEmpty=function(){return 0===this.unions.length},e._$testSelectorSegment=function(t,n,o,r,i,a){var s;if(o===t)return!1;var l=r[i],c=!0;(J(o)!==n||l.id&&l.id!==o.id)&&(c=!1);for(var d=l.classes,u=0;c&&u<d.length;u+=1)(null===(s=o.classList)||void 0===s?void 0:s.contains(d[u]))||(c=!1);if(!c&&0===a)return!1;var h=o;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=o,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,r,i-1,p))return!0;if(2!==a)return!1}return e._$testSelectorSegment(t,n,h,r,i,a)},e.prototype.testSelector=function(t,n){if(n instanceof ie)return!1;var o,r=this.unions;if(void 0===(o=null!==t&&J(t)||J(n)))return!1;for(var i=0;i<r.length;i+=1){var a=r[i];if(e._$testSelectorSegment(t,o,n,a,a.length-1,0))return!0}return!1},e.prototype.query=function(e,t){var n=this,o=[],r=function(e,t,i){if(n.testSelector(e,t)){if(i)return t;o.push(t)}if(t instanceof ve){var a=t.getShadowRoot();if(a){var s=r(e,a,i);if(s&&i)return s}}for(var l=t.childNodes,c=0;c<l.length;c+=1){var d=l[c];if(d instanceof ne){var u=r(e,d,i);if(u&&i)return u}}return null},i=r(e,e,t);return t?i:o},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,o){this._$backendElement=t,t&&(t.__wxElement=this),this._$destroyOnDetach=!1,this._$nodeTreeContext=o||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,o=String(e);if(this._$nodeId!==o){if(this._$nodeId=o,this.ownerShadowRoot){var r=this.ownerShadowRoot.getHostNode();if(this.ownerShadowRoot._$markIdCacheDirty(),!this._$virtual&&r.getComponentOptions().writeIdToDOM){var i=r._$idPrefix,a=i?"".concat(i,"--").concat(o):o;if(3===this.getBackendMode()){var s=this._$backendElement;s&&(s.id=a)}else null===(t=this._$backendElement)||void 0===t||t.setId(a)}}Ze.writeExtraInfoToAttr&&(null===(n=this._$backendElement)||void 0===n||n.setAttribute("exparser:info-attr-id",o)),this._$mutationObserverTarget&&dt.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),o=this._$nodeSlot;if(o!==n)if(this._$inheritSlots)et('slots-inherited nodes do not support "slot" attribute.');else{if(this._$nodeSlot=n,1===this.getBackendMode())this._$backendElement.setSlot(n,this._$inheritSlots);else{var r=this.parentNode;if(r){for(var i=r;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(o),l=a.getSlotElementFromName(n);e.insertChildReassignComposed(r,this,s,l,r.childNodes.indexOf(this)+1)}}}this._$mutationObserverTarget&&dt.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],o=t[1];e.push({name:n,value:o})})),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&&(3!==this.getBackendMode()&&this._$backendElement.release(),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&&(3===this.getBackendMode()?this._$backendElement.setAttribute("style",n):this._$backendElement.setStyle(n)),this._$mutationObserverTarget&&dt.callAttrObservers(this,{type:"properties",target:this,attributeName:"style"})}},e.checkAndCallAttached=function(t){!function t(n){var o;if(n instanceof e&&!n._$attached){if(n._$attached=!0,n instanceof ve){null===(o=n._$lifetimeFuncs.attached)||void 0===o||o.call(n.getMethodCaller(),[]),n._$relation&&(n._$relation.triggerLinkEvent(2,!1),n._$relation.triggerLinkEvent(4,!1),n._$relation.triggerLinkEvent(0,!1)),n._$mutationObserverTarget&&dt.callAttachObservers(n,{type:"attachStatus",target:n,status:"attached"});var r=n.getShadowRoot();r&&t(r)}n.childNodes.forEach(t)}}(t)},e.checkAndCallDetached=function(t){!function t(n){var o;if(n instanceof e&&n._$attached)if(n.childNodes.forEach(t),n instanceof ve){var r=n._$placeholderHandler;r&&r();var i=n.getShadowRoot();i&&t(i),n._$attached=!1,null===(o=n._$lifetimeFuncs.detached)||void 0===o||o.call(n.getMethodCaller(),[]),n._$relation&&(n._$relation.triggerLinkEvent(2,!0),n._$relation.triggerLinkEvent(4,!0),n._$relation.triggerLinkEvent(0,!0)),n._$mutationObserverTarget&&dt.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 o;if(n instanceof e&&n._$attached&&(n.childNodes.forEach(t),n instanceof ve)){var r=n.getShadowRoot();r&&t(r),null===(o=n._$lifetimeFuncs.moved)||void 0===o||o.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 o,r=e._$mutationObserverTarget;if(r&&(!(null===(o=r.childObservers)||void 0===o?void 0:o.empty)||r.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},dt.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 o=n.parentNode;if(!o){n instanceof gt&&n._$markSlotCacheDirty();break}n=o}},e._$insertChildReassignSlot=function(t,n,o,r){var i=t.getHostNode(),a=i.childNodes.length;t.forEachNodeInSpecifiedSlot(n,(function(t,n){t instanceof e&&t._$inheritSlots||e.insertChildReassignComposed(i,t,o,r,a)}))},e.insertChildReassignComposed=function(t,n,o,r,i){if(o)if(r&&3===t.getBackendMode());else{var a=e.findNearestNonVirtual(o);if(a){var s=e.countNonVirtual(n);if(s){var l=s[0],c=s[1];if(3===t.getBackendContext().mode){for(var d=l._$backendElement,u=1;u<c;u+=1){var h=d.nextSibling;h&&a.removeChild(h)}c>0&&a.removeChild(d)}else a.spliceRemove(l._$backendElement,c)}}}r&&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 o=n.shadowRoot.getContainingSlot(t);if(!o)return null;t=o}else t=n}}},e.countNonVirtual=function(t){var n=null,o=0,r=function(t){t instanceof e&&t._$virtual?t.forEachComposedChild(r):(0===o&&(n=t),o+=1)};return r(t),n?[n,o]:null},e.insertChildComposed=function(t,n,o,r,i){for(var a,s,l,c=!1,d=t;null==d?void 0:d._$inheritSlots;)c=!0,d=d.parentNode;if(d){var u,h=d,p=h._$nodeTreeContext,f=!1;if(h instanceof ve)if(h._$external){var v=h.shadowRoot.slot;u=v}else c=!0,void 0!==(v=h.shadowRoot.getSingleSlotElement())?u=v?e.findNearestNonVirtual(v):void 0:(h.shadowRoot.isDynamicSlots()&&(f=!0),u=void 0);else h._$virtual&&(c=!0),u=e.findNearestNonVirtual(h);var _=function(t,n,o,r){var i=function(t){return t instanceof e&&t._$inheritSlots?t.childNodes.every(i):r(t)},a=function(t){if(u){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(o!==(t instanceof e?t._$nodeSlot:""))return!0}return r(t)};a(t)},$=function(t,n,o,r){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],o,r,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 d=null===o?t.shadowRoot.getSlotElementFromName(r):o;if(!d)return null;i=d}else i=t;if(!i._$virtual)return null;var u=i.parentNode;if(u){l=u.childNodes.lastIndexOf(i);var h=void 0,p=void 0;i._$inheritSlots?(h=o,p=r):u instanceof ve&&!u._$external?void 0!==u.shadowRoot.getSingleSlotElement()?(h=null,p=""):(h=u.shadowRoot.getContainingSlot(i),p=i._$slotName||""):(h=null,p="");var f=$(u,l+1,h,p);if(f)return f}return null},g=null,m=function(a,s){var l;if(void 0===s)l=u;else{var d=h;l=d._$external?d.shadowRoot.slot:a?e.findNearestNonVirtual(a):null}if(3===t.getBackendMode()||l){var f=s||"",v=0,m=null,y=null;if(n){var b=g||(3===p.mode?p.document.createDocumentFragment():p.createFragment());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(3!==t.getBackendMode()||l){if((o||c)&&(r&&o?(_(o,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)if(3===p.mode){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.spliceBefore(m._$backendElement,v,y);else 3===p.mode?l.appendChild(y):l.spliceAppend(y);else if(v>0)if(3===p.mode){for(S=m._$backendElement,w=1;w<v;w+=1){var E;(E=S.nextSibling)&&l.removeChild(E)}v>0&&l.removeChild(S)}else l.spliceRemove(m._$backendElement,v)}else g=null}};if(void 0!==u)null===u||(c||n instanceof e&&n._$virtual||o instanceof e&&o._$virtual?m(null):r?n?u.replaceChild(n._$backendElement,o._$backendElement):u.removeChild(o._$backendElement):o?u.insertBefore(n._$backendElement,o._$backendElement):u.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)};r&&o&&b(o),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,"")}}3!==p.mode&&g&&g.release(),Ze.writeExtraInfoToAttr&&(r&&o instanceof e&&(null===(a=o._$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,o,r){var i,a,s,l,c,d;if(n&&t.ownerShadowRoot!==n.ownerShadowRoot)throw new Error("Cannot move the node from one shadow tree to another shadow tree.");var u,h=o,p=h>=0?t.childNodes[h]:void 0;if((u=!!r&&!!p&&n!==p)||n){var f,v=!1,_=0;if(n){if(f=n.parentNode){var $=f.childNodes.indexOf(n);f.childNodes.splice($,1),f===t&&$<h&&(h-=1),3===t.getBackendMode()||(1===t.getBackendMode()?null===(i=f._$backendElement)||void 0===i||i.removeChild(n._$backendElement,$):e.insertChildComposed(t,null,n,!0,$))}n.parentNode=t,n instanceof e&&(f!==t?(f&&(null===(a=f._$mutationObserverTarget)||void 0===a||a.detachChild(n),n._$subtreeSlotCount>0&&e.updateSlotCount(f,-n._$subtreeSlotCount)),null===(s=t._$mutationObserverTarget)||void 0===s||s.attachChild(n),n._$subtreeSlotCount>0&&(v=!0,_+=n._$subtreeSlotCount)):n._$subtreeSlotCount>0&&(v=!0))}else f=null;1===t.getBackendMode()?t._$backendElement&&(u?n?t._$backendElement.replaceChild(n._$backendElement,p._$backendElement,h):t._$backendElement.removeChild(p._$backendElement,h):p?t._$backendElement.insertBefore(n._$backendElement,p._$backendElement,h):t._$backendElement.appendChild(n._$backendElement)):e.insertChildComposed(t,n,p,u,h),u&&p instanceof e&&(null===(l=t._$mutationObserverTarget)||void 0===l||l.detachChild(p),p.parentNode=null,p._$subtreeSlotCount>0&&(v=!0,_-=p._$subtreeSlotCount)),n?h<0?t.childNodes.push(n):u?t.childNodes[h]=n:t.childNodes.splice(h,0,n):u&&t.childNodes.splice(h,1),null===(c=t.ownerShadowRoot)||void 0===c||c._$markIdCacheDirty(),v&&(e.updateSlotCount(t,_),null===(d=t.ownerShadowRoot)||void 0===d||d._$checkSlotChanges()),u&&(e.checkAndCallDetached(p),e.checkChildObservers(t,"remove",p)),n&&((null==f?void 0:f._$attached)?t._$attached?e.checkAndCallMoved(n):e.checkAndCallDetached(n):t._$attached&&e.checkAndCallAttached(n),f===t?e.checkChildObservers(t,"move",n):(f&&e.checkChildObservers(f,"remove",n),e.checkChildObservers(t,"add",n)))}},e.insertChildBatchRemoval=function(t,n,o){var r,i,a,s=t.childNodes[n],l=!1,c=0;if(1===t.getBackendMode())t._$backendElement&&t._$backendElement.spliceRemove(s._$backendElement,o);else for(var d=0;d<o;d+=1)e.insertChildComposed(t,null,t.childNodes[n+d],!0,n+d);for(d=0;d<o;d+=1){var u=t.childNodes[n+d];u.parentNode=null,u instanceof e&&(null===(r=t._$mutationObserverTarget)||void 0===r||r.detachChild(u),u._$subtreeSlotCount>0&&(l=!0,c-=u._$subtreeSlotCount))}var h=t.childNodes.splice(n,o);for(null===(i=t.ownerShadowRoot)||void 0===i||i._$markIdCacheDirty(),l&&(e.updateSlotCount(t,c),null===(a=t.ownerShadowRoot)||void 0===a||a._$checkSlotChanges()),d=0;d<o;d+=1){var p=h[d];e.checkAndCallDetached(p),e.checkChildObservers(t,"remove",p)}},e.insertChildBatchInsertion=function(t,n,o){var r,i,a,s,l,c,d=o>=0?t.childNodes[o]:void 0,u=!1,h=0;c=1===t.getBackendMode()?t.getBackendContext().createFragment():null;for(var p=0;p<n.length;p+=1){var f=n[p];if(t.ownerShadowRoot!==f.ownerShadowRoot)throw new Error("Cannot move the node from one shadow tree to another shadow tree.");if(f.parentNode)throw new Error("Cannot batch-insert the node which already has a parent.");if(f.parentNode=t,f instanceof e&&(null===(a=t._$mutationObserverTarget)||void 0===a||a.attachChild(f),f._$subtreeSlotCount>0&&(u=!0,h+=f._$subtreeSlotCount)),1===t.getBackendMode()){var v=f._$backendElement;c.appendChild(v)}}if(1===t.getBackendMode())t._$backendElement&&(d?t._$backendElement.spliceBefore(d._$backendElement,0,c):t._$backendElement.spliceAppend(c)),c.release();else for(p=0;p<n.length;p+=1)f=n[p],e.insertChildComposed(t,f,d,!1,o>=0?o:t.childNodes.length);for(d?(r=t.childNodes).splice.apply(r,function(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}([o,0],n,!1)):(i=t.childNodes).push.apply(i,n),null===(s=t.ownerShadowRoot)||void 0===s||s._$markIdCacheDirty(),u&&(e.updateSlotCount(t,h),null===(l=t.ownerShadowRoot)||void 0===l||l._$checkSlotChanges()),p=0;p<n.length;p+=1)f=n[p],t._$attached&&e.checkAndCallAttached(f),e.checkChildObservers(t,"add",f)},e.insertChildPlaceholerReplace=function(t,n,o){var r,i,a,s,l,c,d,u;if(o&&t.ownerShadowRoot!==o.ownerShadowRoot)throw new Error("Cannot move the node from one shadow tree to another shadow tree.");if(o.parentNode)throw new Error("Cannot replace with the node which already has a parent.");var h=t.childNodes[n];if(!(h instanceof e))throw new Error("Cannot replace on text nodes.");if(h!==o){var p;p=1===t.getBackendMode()?t.getBackendContext().createFragment():null;var f=h.childNodes;1===t.getBackendMode()&&f.length>0&&(null===(i=h._$backendElement)||void 0===i||i.spliceRemove(f[0]._$backendElement,f.length));for(var v=0;v<f.length;v+=1){var _=f[v];if(3===t.getBackendMode());else if(1===t.getBackendMode()){var $=_._$backendElement;p.appendChild($)}else e.insertChildComposed(h,null,_,!0,v);_.parentNode=o,_ instanceof e&&(null===(a=h._$mutationObserverTarget)||void 0===a||a.detachChild(_),null===(s=t._$mutationObserverTarget)||void 0===s||s.attachChild(_))}if(1===t.getBackendMode())t._$backendElement&&(t._$backendElement.replaceChild(o._$backendElement,h._$backendElement,n),null===(l=o._$backendElement)||void 0===l||l.spliceAppend(p)),p.release();else for(e.insertChildComposed(t,o,h,!0,n),v=0;v<f.length;v+=1)_=f[v],e.insertChildComposed(o,_,void 0,!1,v);if(null===(c=t._$mutationObserverTarget)||void 0===c||c.detachChild(h),h.parentNode=null,o.parentNode=t,null===(d=t._$mutationObserverTarget)||void 0===d||d.attachChild(o),t.childNodes[n]=o,(r=o.childNodes).push.apply(r,h.childNodes),h.childNodes=[],null===(u=t.ownerShadowRoot)||void 0===u||u._$markIdCacheDirty(),t._$attached)for(e.checkAndCallDetached(h),e.checkChildObservers(t,"remove",h),e.checkAndCallAttached(o),e.checkChildObservers(t,"add",o),v=0;v<f.length;v+=1)_=f[v],e.checkAndCallMoved(_),e.checkChildObservers(t,"move",_)}},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 o=this.childNodes.indexOf(n);e.insertChildSingleOperation(this,t,o,!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 o=this.childNodes.indexOf(n);e.insertChildSingleOperation(this,t,o,!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(o){if(o instanceof e){var r=o._$nodeId;r&&(n[r]||(n[r]=o)),o.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&&(3===this.getBackendMode()?this._$nodeTreeContext.setElementEventDefaultPrevented(this._$backendElement,e,t):this._$backendElement.setEventDefaultPrevented(e,t))},e.prototype.addListener=function(e,t,n){var o=this._$eventTarget.addListener(e,t,n);2===o?this._$updateEventDefaultPrevented(e,!1):3===o&&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 o=this._$eventTarget.removeListener(e,t,n);1!==o&&(0!==o&&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){3===this.getBackendMode()?"boolean"==typeof t?!0===t?this.setAttribute(e,""):this.removeAttribute(e):this.setAttribute(e,null==t?"":String(t)):void 0===t?this.removeAttribute(e):this.setAttribute(e,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,o){if(t._$attached)throw new Error("An attached element cannot be attached again");t._$backendElement&&(t.getBackendMode(),n.replaceChild(t._$backendElement,o)),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){var o;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 i=null===t._$slotName;t._$slotName=r,1===t.getBackendMode()&&(null===(o=t._$backendElement)||void 0===o||o.setSlotName(r));var a=t.ownerShadowRoot;a&&(i&&a.isDynamicSlots()&&(t._$slotValues=Object.create(null)),e.updateSlotCount(t,i?1:0),a._$checkSlotChanges())}},e.getSlotName=function(e){var t=e._$slotName;return null===t?void 0:t},e.setInheritSlots=function(e){var t;if(null!==e._$slotName||0!==e.childNodes.length)throw new Error("Slot-inherit mode cannot be set when the element has any child node");1===e.getBackendMode()&&(null===(t=e._$backendElement)||void 0===t||t.setSlot(e._$nodeSlot,e._$inheritSlots)),e._$inheritSlots=!0},e.getInheritSlots=function(e){return e._$inheritSlots},e.setSlotElement=function(t,n){var o=t._$nodeSlotElement;if(o!==n){t._$nodeSlotElement=n,t instanceof e&&(t._$nodeSlot=n._$slotName||"");for(var r=t.parentNode,i=r;null==i?void 0:i._$inheritSlots;)i=i.parentNode;i instanceof ve&&!i._$external&&e.insertChildReassignComposed(r,t,o,n,r.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 o=function(n){for(var r=0;r<n.length;r+=1){var i=n[r];if(!1===t(i))return!1;if(i instanceof e&&i._$inheritSlots&&!o(i.childNodes))return!1}return!0};return!!o(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)if(3===this.getBackendMode()){var n=t.getBoundingClientRect();setTimeout((function(){e(n)}),0)}else t.getBoundingClientRect(e);else setTimeout((function(){e({left:0,top:0,width:0,height:0})}),0)},e.prototype.getScrollOffset=function(e){var t=this._$backendElement;if(t)if(3===this.getBackendMode()){var n=t,o={scrollLeft:n.scrollLeft,scrollTop:n.scrollTop,scrollWidth:n.scrollWidth,scrollHeight:n.scrollHeight};setTimeout((function(){e(o)}),0)}else t.getScrollOffset(e);else setTimeout((function(){e({scrollLeft:0,scrollTop:0,scrollWidth:0,scrollHeight:0})}),0)},e}(),oe=Symbol("method"),re=(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 re(t,e),t.prototype._$initializeVirtual=function(e,t,n){this.is=String(e);var o=null;if(t)if(1===n.mode){var r=t._$backendShadowRoot;o=(null==r?void 0:r.createVirtualNode())||null,this._$initialize(!0,o,t),null==o||o.associateValue(this)}else this._$initialize(!0,null,t)},t.create=function(e,n){var o=Object.create(t.prototype);return o._$initializeVirtual(e,n,n._$nodeTreeContext),o},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 o=0;o<6;o+=1){var r=t.definitions[o];if(r){for(var i=new Array(r.length),a=0;a<r.length;a+=1)i[a]=null;n[o]=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(""),o=this._$group.definitions,r=this._$group.keyMap,i=e.type;o[i]?(r[n]=[i,o[i].length],o[i].push(e)):(r[n]=[i,0],o[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,o,r=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],d=null,u=a[s],h=void 0;if(h=u.target instanceof we||u.target instanceof ae?u.target:(y=r.getRootBehavior().ownerSpace)&&y._$getBehavior(u.target,u.domain)||null){var p=h;if(!t)for(var f=r;;){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===(o=_._$group)||void 0===o?void 0:o.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)){d={target:f,def:b};break}}}}if(4===e)break}if(2===e)break}}}if(l[s]=d,c){var S=c.target,w=c.def;d&&c.target===d.target&&c.def===d.def?(w.linkChanged&&it("Relation Link Changed Callback",w.linkChanged,S.getMethodCaller(),[r.getMethodCaller()],S),u.linkChanged&&it("Relation Link Changed Callback",u.linkChanged,r.getMethodCaller(),[S.getMethodCaller()],r)):(w.unlinked&&it("Relation Unlinked Callback",w.unlinked,S.getMethodCaller(),[r.getMethodCaller()],S),u.unlinked&&it("Relation Unlinked Callback",u.unlinked,r.getMethodCaller(),[S.getMethodCaller()],r))}if(d){var E=d.target,k=d.def;c&&c.target===d.target&&c.def===d.def||(k.linked&&it("Relation Linked Callback",k.linked,E.getMethodCaller(),[r.getMethodCaller()],E),u.linked&&it("Relation Linked Callback",u.linked,r.getMethodCaller(),[E.getMethodCaller()],r))}t||d||!u.linkFailed||it("Relation Link Failed Callback",u.linkFailed,r.getMethodCaller(),[],r)}},e.prototype.getLinkedTargets=function(e){var t,n,o,r,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=[],d=this._$comp,u=null===(r=null===(o=this._$group)||void 0===o?void 0:o.definitions[a])||void 0===r?void 0:r[s],h=function(e){for(var t=e.childNodes,n=0;n<t.length;n+=1){var o=t[n];if(o instanceof ne)if(o instanceof ie)h(o);else if(o instanceof ve){if(o._$relation){var r;if(r=5===a?o._$relation._$links[4]:1===a?o._$relation._$links[0]:o._$relation._$links[2])for(var i=0;i<r.length;i+=1){var s=r[i];if(s&&s.target===d&&s.def===u){c.push(o);break}}}1===a&&h(o)}else 5!==a&&1!==a||h(o)}};return h(this._$comp),c},e}(),de=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 o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ue=function(e,t,n,o){var r=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 d=0;d<l.length;d+=1){var u=l[d];if(o&&Object.prototype.hasOwnProperty.call(o,u)){var h=o[u];if("string"==typeof h)if(null==r?void 0:r[h])a[u]=r[h];else if(i&&i[h])a[u]=i[h];else{var p=t.getComponentByUrlWithoutDefault(h,"");if(p)a[u]={final:p,placeholder:null,waiting:null};else{if(et('Generic "'.concat(u,'" value "').concat(h,'" is not valid (on component "').concat(e.is,'").')),!(f=t.getDefaultComponent()))throw new Error('Cannot find default component for generic "'.concat(u,'" (on component "').concat(e.is,'")'));a[u]={final:f,placeholder:null,waiting:null}}}else a[u]=h}else{var f;if(!(f=c[u]||t.getDefaultComponent()))throw new Error('Cannot find default component for generic "'.concat(u,'" (on component "').concat(e.is,'")'));a[u]={final:f,placeholder:null,waiting:null}}}}else a=null;return a},he=function(e,t,n,o){var r=n._$using[e]||o&&o[e],i=null;if(r&&(null===r.placeholder?i=r.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 o=Object.keys(e._$propertyMap),r=function(e){var t=o[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<o.length;i+=1)r(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 d=function(e){if(void 0===e)return null;for(var t={definitions:new Array(6),keyMap:Object.create(null)},n=t.definitions,o=t.keyMap,r=Object.keys(e),i=0;i<r.length;i+=1){var a=r[i],s=e[a],l=s.type;n[l]?(o[a]=[l,n[l].length],n[l].push(s)):(o[a]=[l,0],n[l]=[s])}return t}(e._$relationMap),u=G(t.dataDeepCopy),h=G(t.propertyPassingDeepCopy),p=this._$templateEngine.create(e,t);this._$detail={proto:l,template:p,dataGroupObserverTree:c,dataDeepCopy:u,propertyPassingDeepCopy:h,relationDefinitionGroup:d}}},e}(),fe=1,ve=function(e){function t(){throw new Error("Element cannot be constructed directly")}return de(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[oe]=!0,t},t._$isTaggedMethod=function(e){return"function"==typeof e&&!!e[oe]},t._$advancedCreate=function(e,n,o,r,i,a,s){var l,c;n._$detail||n.prepare();var d,u=n._$detail,h=u.proto,p=u.template,f=u.dataDeepCopy,v=u.propertyPassingDeepCopy,_=u.relationDefinitionGroup,$=n._$detail.dataGroupObserverTree,g=n._$options,m=n.behavior,y=o?o._$nodeTreeContext:r||Ze.backendContext||Ye(),b=g.externalComponent,C=g.propertyEarlyInit,w=Ze.writeExtraInfoToAttr,E=Object.create(h);if(E._$genericImpls=i,E._$placeholderHandler=a,E._$external=b,E.tagName=e,E._$methodCaller=E,g.virtualHost){if(d=null,E._$initialize(!0,null,o,y),1===y.mode)if(o){var k=o._$backendShadowRoot;d=(null==k?void 0:k.createComponent(e,!0))||null}else{if(!(N=y.getRootNode().getShadowRoot()))throw new Error("Failed getting backend shadow tree");d=N.createComponent(e,!1)||null}}else if(o){if(3===y.mode)d=o._$nodeTreeContext.document.createElement(e);else if(1===y.mode){var O=o._$backendShadowRoot;d=(null==O?void 0:O.createComponent(e,!1))||null}else d=o._$nodeTreeContext.createElement(e);E._$initialize(!1,d,o,y)}else{if(3===y.mode)d=y.document.createElement(e);else if(1===y.mode){var N;if(!(N=y.getRootNode().getShadowRoot()))throw new Error("Failed getting backend shadow tree");d=N.createComponent(e,!1)||null}else d=y.createElement(e)||null;E._$initialize(!1,d,o,y)}var D={};if(m._$externalClasses)for(var A=m._$externalClasses,T=0;T<A.length;T+=1)D[A[T]]=null;if(E.classList=new S(E,D),o&&d){var L=o.getHostNode()._$definition._$options.styleScope;if(L&&3!==y.mode&&d.setStyleScope(L),w){var B=null===(l=o.getHostNode()._$behavior.ownerSpace)||void 0===l?void 0:l.styleScopeManager.queryName(L);B&&d.setAttribute("exparser:info-class-prefix","".concat(B,"--"))}}if(3!==y.mode&&d&&d.associateValue(E),w&&d){var R=fe;fe+=1,E._$componentInstanceId=R,d.setAttribute("exparser:info-component-id",R)}E._$idPrefix=g.idPrefixGenerator?g.idPrefixGenerator.call(E):"";var P,j=m._$staticData,I=m._$data;if(void 0===j)if(1===I.length)P=(U=I[0])();else for(P={},T=0;T<I.length;T+=1){var U=I[T];Object.assign(P,U())}else for(P=M(j),T=0;T<I.length;T+=1)U=I[T],Object.assign(P,U());var F=E._$relation=new ce(E,_);E._$traitGroup=new se;var G=m._$traitBehaviors;if(void 0!==G)for(T=0;T<G.length;T+=1){var V=G[T],H=V.traitBehavior,z=V.impl;E._$traitGroup.implement(H,z)}if(m._$methodCallerInit){var q=m._$methodCallerInit.call(E);E._$methodCaller=q}var X=!1;if(m._$init.length>0){var K=!0,Y=!0,Z=!0,J=!0,Q={self:q=E.getMethodCaller(),data:P,setData:E.setData.bind(E),implement:function(e,t){if(X)throw new Error("Cannot execute init-time functions after initialization");E._$traitGroup.implement(e,t)},relation:function(e){if(X)throw new Error("Cannot execute init-time functions after initialization");var t,n=e.target,o=Ce(m.is,"undefined",e);return t=o?F.add(o):Symbol("invalid"),{list:function(){return F.getLinkedTargets(t).map((function(e){return e.getMethodCaller()}))},listAsTrait:n instanceof ae?function(){return F.getLinkedTargets(t).map((function(e){return e.traitBehavior(n)}))}:void 0}},observer:function(e,t){if(X)throw new Error("Cannot execute init-time functions after initialization");K&&(K=!1,$=$.cloneSub()),$.addObserver(t,x(e))},lifetime:function(e,t){if(X)throw new Error("Cannot execute init-time functions after initialization");Y&&(Y=!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(X)throw new Error("Cannot execute init-time functions after initialization");Z&&(Z=!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)}},ee=m._$init;for(T=0;T<ee.length;T+=1){var te=ee[T].call(q,Q);if(te)for(var ne=Object.keys(te),oe=0;oe<ne.length;oe+=1){var re=ne[oe],ie=te[re];t._$isTaggedMethod(ie)&&(J&&(J=!1,E._$methodMap=Object.create(E._$methodMap)),E._$methodMap[re]=ie)}}}X=!0;var le=p.createInstance(E),de=le.shadowRoot;E.shadowRoot=de;var ue=new W(E,P,g.pureDataPattern||null,f,v,g.reflectToAttributes,$);E._$dataGroup=ue,C&&void 0!==s&&s(E),le.initValues(ue.innerData||ue.data),ue.setUpdateListener(le.updateValues.bind(le));var he=m._$listeners;if(void 0!==he){var pe=function(e){var t=he[e],n=t.id,o=t.ev,r=t.listener;if("this"===n)E.addListener(o,(function(e){return r.call(E._$methodCaller,e)}));else if(b)a=de,(i=n?a.getIdMap()[n]:a.root)&&a.setListener(i,o,(function(e){return r.call(E._$methodCaller,e)}));else{var i,a=de;(i=n?a.getElementById(n):a)&&i.addListener(o,(function(e){return r.call(E._$methodCaller,e)}))}};for(T=0;T<he.length;T+=1)pe(T)}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,o,r,i){var a=function(e){var t,n=e.behavior.ownerSpace;return o&&(t=Object.create(null),Object.entries(o).forEach((function(e){var n=e[0],o=e[1];t[n]={final:o,placeholder:null,waiting:null}}))),ue(e,n,void 0,t)};if(n)return t._$advancedCreate(String(e),n,null,r,a(n),void 0,i);if(e instanceof pe)return t._$advancedCreate(e.is,e,null,r,a(e),void 0);var s=Xe().getComponentByUrl(e,"");return t._$advancedCreate(e,s,null,r,a(s),void 0)},t.createWithGenerics=function(e,n,o,r){return t.createWithGenericsAndContext(e,n,o,null,r)},t.createWithContext=function(e,n,o,r){return t.createWithGenericsAndContext(e,n,null,o,r)},t.create=function(e,n,o){return t.createWithGenericsAndContext(e,n,null,null,o)},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],o=e[1];return t.replaceDataOnPath([n],o)})),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 o=function(r){if(r instanceof t){if(r._$pageLifetimeFuncs){var i=r._$pageLifetimeFuncs[e];i&&i.call(r._$methodCaller,n)}r._$external||o(r.shadowRoot)}for(var a=r.childNodes,s=0;s<a.length;s+=1){var l=a[s];l instanceof ne&&o(l)}};o(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,o){var r=this._$dataGroup;if(void 0===r)throw new Error("Cannot update data before component created");r.spliceArrayDataOnPath(e,t,n,o)},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),o=0;o<n.length;o+=1){var r=n[o],i=D(r);i&&t.replaceDataOnPath(i,e[r])}},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),o=0;o<n.length;o+=1){var r=n[o],i=D(r);i&&t.replaceDataOnPath(i,e[r])}t.applyDataUpdates()},t}(ne),_e=function(){return _e=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);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),o=0;o<n.length;o+=1){var r=n[o];if(Object.prototype.hasOwnProperty.call(e,r))if("_"===r[0]&&et('data field "'.concat(r,'" from different behaviors is overriding or merging.')),"object"!=typeof e[r]||"object"!=typeof t[r]||null===t[r]||Array.isArray(t[r]))e[r]=t[r];else{if(Array.isArray(e[r]))e[r]=e[r].slice();else{for(var i=e[r],a={},s=Object.keys(i),l=0;l<s.length;l+=1){var c=s[l];a[c]=i[c]}e[r]=a}ge(e[r],t[r])}else e[r]=t[r]}},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 o=n.type,r=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===o?null==e?(et('property "'.concat(t,'" received type-incompatible value: expected <String> but get null value. Used default value instead.')),void 0===r?"":r()):("object"==typeof e&&et('property "'.concat(t,'" received type-incompatible value: expected <String> but got object-typed value. Force converted.')),String(e)):3===o?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===r?0:r()):4===o?!!e:6===o?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===r?[]:r()):5===o?"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===r?null:r()):7===o?"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===r?function(){}:r()):void 0===e?void 0===r?null:r():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 o,r,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)o=4;else if("child"===n.type)o=5;else if("parent-common-node"===n.type)o=2;else if("child-common-node"===n.type)o=3;else if("ancestor"===n.type)o=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}o=1}var s=null;if(n.target instanceof pe)r=n.target.behavior;else if(n.target instanceof we||n.target instanceof ae)r=n.target;else{var l=ke(n.target||t,e),c=l.domain;r=l.absPath,s=c}return r?{target:r,domain:s,type:o,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 o=t[n],r=e[o];this._$methods.push({name:o,func:r})}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 o=e.properties;if(void 0!==o){this._$properties||(this._$properties=[]);for(var r=Object.keys(o),i=0;i<r.length;i+=1){var a=r[i],s=o[a];this._$properties.push({name:a,def:s})}}var l=e.methods;if(void 0!==l)for(r=Object.keys(l),i=0;i<r.length;i+=1){var c=r[i],d=l[c];this._$methods.push({name:c,func:d})}var u=e.observers;if(void 0!==u)if(this._$observers||(this._$observers=[]),Array.isArray(u))for(i=0;i<u.length;i+=1){var h=u[i],p=h.fields,f=h.observer;this._$observers.push({dataPaths:x(null!=p?p:"**"),func:f,once:!1})}else for(r=Object.keys(u),i=0;i<r.length;i+=1)f=u[p=r[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(r=Object.keys(v),i=0;i<r.length;i+=1){var _=r[i];d=v[_],this._$lifetimes.push({name:_,func:d,once:!0})}var $=e.pageLifetimes;if($)for(this._$pageLifetimes||(this._$pageLifetimes=[]),r=Object.keys($),i=0;i<r.length;i+=1){var g=r[i];d=$[g],this._$pageLifetimes.push({name:g,func:d,once:!0})}this._$listeners=e.listeners;var m=e.relations;if(m)for(this._$relations||(this._$relations=[]),r=Object.keys(m),i=0;i<r.length;i+=1){var y=r[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 o=Object.keys(e._$using),r=0;r<o.length;r+=1){var i=o[r],a=e._$using[i].final;a&&!t.has(a)&&(t.add(a),n(a.behavior))}};if(n(this.general()),e)for(var o=Object.values(e),r=0;r<o.length;r+=1){var i=o[r];t.has(i)||(t.add(i),n(i.behavior))}return t},e.prepare=function(e){e.prepare()},e.prototype.prepare=function(){var t,n,o,r,i,a,s,l,c,d;if(this._$unprepared){this._$unprepared=!1;var u=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,u)),$||et('behavior "'.concat(g,'" is not found (when preparing behavior "').concat(u,'").'))}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)(O=b[C]).once&&this._$observers.indexOf(O)>=0||this._$observers.push(O);for(var S=$._$lifetimes,w=0;w<S.length;w+=1)(O=S[w]).once&&this._$lifetimes.indexOf(O)>=0||this._$lifetimes.push(O);var E=$._$pageLifetimes;if(void 0!==E)if(this._$pageLifetimes)for(var k=0;k<E.length;k+=1){var O;(O=E[k]).once&&this._$pageLifetimes.indexOf(O)>=0||this._$pageLifetimes.push(O)}else this._$pageLifetimes=E.slice();var N=$._$listeners;void 0!==N&&(this._$listeners||(this._$listeners=[]),(o=this._$listeners).push.apply(o,N));var D=$._$relationMap;void 0!==D&&(this._$relationMap||(this._$relationMap=Object.create(null)),Object.assign(this._$relationMap,D)),(r=this._$init).push.apply(r,$._$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,T=Object.keys(p._$using),L=function(e){var t=T[e],n=p._$using[t],o=null;if(A&&(o=null!==(d=p._$placeholders[t])&&void 0!==d?d:null),n instanceof pe)B._$using[t]={final:n,placeholder:o,waiting:null};else if(h){var r=String(n),i=h.getComponentByUrlWithoutDefault(r,u);if(i)B._$using[t]={final:i,placeholder:null,waiting:null};else if(null!==o){var a={final:null,placeholder:o,waiting:null},s=h._$componentWaitingList(r,u);s&&(s.add((function(e){a.final=e,a.placeholder=null,a.waiting=null})),a.waiting=s),B._$using[t]=a}else B._$using[t]={final:h.getDefaultComponent(),placeholder:null,waiting:null}}else et('cannot find component "'.concat(String(n),'" (when preparing behavior "').concat(u,'").'))},B=this;for(v=0;v<T.length;v+=1)L(v)}if("object"==typeof p._$generics&&null!==p._$generics){var R=this._$generics=[],P=Object.create(null);this._$genericDefaults=P;var j=Object.keys(p._$generics);for(v=0;v<j.length;v+=1){var I=j[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),u):et('cannot define generic "'.concat(I,'" without a default implementor (when preparing behavior "').concat(u,'").'))),R.push(I),P[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],o=n.name,r=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}(r);if(null!==i)t=i;else{var a=r,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(o,'" is illegal (when preparing behavior "').concat(u,'").'));var c=a.value;void 0===a.value&&(c=2===s?"":3===s?0:4!==s&&(6===s?[]:null));var d=void 0;"function"==typeof a.observer?d=a.observer:a.observer?d=Z._$methodMap[a.observer]||null:(d=null,void 0!==a.observer&&et('the observer of property "'.concat(o,'" is not a function (when preparing behavior "').concat(u,'").')));var h=!!a.reflectIdPrefix;t={type:s,optionalTypes:l,value:c,default:a.default,observer:d,reflectIdPrefix:h}}Z._$propertyMap[o]=t,K.push({name:o,func:void 0===t.default?function(){return M(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],o=n.name,r=n.func;e[o]=r()}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(u,'").'))}var oe=p._$lifetimes;(s=this._$lifetimes).push.apply(s,oe);var re=p._$pageLifetimes;re&&(this._$pageLifetimes||(this._$pageLifetimes=[]),(l=this._$pageLifetimes).push.apply(l,re));var ie=p._$listeners;if(void 0!==ie&&(T=Object.keys(ie)).length>0)for(this._$listeners=[],v=0;v<T.length;v+=1){var ae=ie[I=T[v]],se="function"==typeof ae?ae:this._$methodMap[ae];if(se){var le=I.indexOf("."),ce=void 0,de=void 0;le>=0?(ce=I.slice(0,le),de=I.slice(le+1)):(ce="",de=I),this._$listeners.push({id:ce,ev:de,listener:se})}else et('the "'.concat(I,'" listener is not a function or a method name (when preparing behavior "').concat(u,'").'))}var ue=p._$relations;if(void 0!==ue)for(this._$relationMap||(this._$relationMap=Object.create(null)),v=0;v<ue.length;v+=1){var he=ue[v],fe=he.name,ve=he.rel;if(null!=ve){var _e=Ce(u,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 P(this._$propertyMap),t=this._$observers,n=0;n<t.length;n+=1){var o=t[n],r=o.dataPaths,i=o.observer;e.addObserver(i,r)}return e},e.prototype._$getAllLifetimeFuncs=function(){for(var e=Object.create(null),t=this._$lifetimes,n=0;n<t.length;n+=1){var o=t[n],r=o.name,i=o.func;e[r]?e[r].add(i):(e[r]=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 o=t[n],r=o.name,i=o.func;e[r]?e[r].add(i):(e[r]=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 o=[],r=0;r<n.length;r+=1){var i=n[r];""!==i&&"."!==i&&(".."!==i?o.push(i):o.pop())}return o.join("/")},ke=function(e,t){var n=e.indexOf("://");if(n>0){var o=e.indexOf("/",n+3);return o>0?{domain:e.slice(0,o),absPath:Ee(e.slice(o+1),"")}:{domain:e.slice(0,n+3),absPath:Ee(e.slice(n+3),"")}}return{domain:null,absPath:Ee(e,t)}},Oe=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}(),Ne=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=ke(e,t),o=n.domain,r=n.absPath,i=this.getComponent(r,!0,o);if(!i)throw new Error('There is no component "'.concat(r,'" in the space and no default component can be used'));return i},e.prototype.getComponentByUrlWithoutDefault=function(e,t){var n=ke(e,t),o=n.domain,r=n.absPath;return this.getComponent(r,!1,o)||null},e.prototype.getComponent=function(e,t,n){var o;if(void 0===t&&(t=!0),void 0===n&&(n=null),n){var r=this._$importedSpaces[n];if(r){var i=r.space;o=r.privateUse?i._$list:i._$pubList}}else o=this._$list;if(o){var a=o[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=ke(e,t),o=n.domain,r=n.absPath;return this._$getBehavior(r,o)||null},e.prototype._$getBehavior=function(e,t){var n;if(void 0===t&&(t=null),t){var o=this._$importedSpaces[t];if(o){var r=o.space;n=o.privateUse?r._$behaviorList:r._$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 o=this._$pubListWaiting[t];o&&(delete this._$pubListWaiting[t],o.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,o=ke(e,t),r=o.domain,i=o.absPath;if(r){var a=this._$importedSpaces[r];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 Oe)},e.prototype.getWaitingComponents=function(){return Object.keys(this._$listWaiting)},e.prototype.createComponentByUrl=function(e,t,n,o){var r=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,""),d=null;return n&&(d=Object.create(null),Object.keys(n).forEach((function(e){var t=n[e],o=r.getComponentByUrl(t,"");d[e]=o}))),ve.createWithGenericsAndContext(e,c,d,o,(function(e){if(a){var t=!1;a.split("&").forEach((function(n){var o=n.indexOf("=");if(o>=0){var r=decodeURIComponent(n.slice(0,o)),i=decodeURIComponent(n.slice(o+1));e._$dataGroup.replaceProperty(r,i)&&(t=!0)}})),t&&e.applyDataUpdates()}}))},e.prototype.defineTraitBehavior=function(e){return new ae(this,e)},e}(),De=function(){function e(e,t,n,o){this.keyName=e,this.updateKeys(t);for(var r=this.items,i=this.indexes,a=[],s=0;s<r.length;s+=1){var l=r[s],c=null===i?s:i[s];a.push(o(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 o=Object.keys(e);t=new Array(o.length),n=new Array(o.length);for(var r=0;r<o.length;r+=1){var i=e[p=o[r]];t[r]=i,n[r]=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,r=0;r<e.length;r+=1)t[r]=e[r];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,r=0;r<e;r+=1)t[r]=r;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(r=0;r<t.length;r+=1){i=t[r];var d="*this"===s?i:null==i?void 0:i[s],u=null!=d?String(d):"";l[r]=u,void 0!==c[u]?(a||(a=Object.create(null)),a[u]=[c[u],r],delete c[u]):c[u]=r}if(a){var h=Object.keys(a);for(et('Some keys are not unique while list updates: "'.concat(h.join('", "'),'".')),r=0;r<h.length;r+=1)for(var p,f=a[p=h[r]],v=0,_=0;_<f.length;_+=1){for(var $=f[_];void 0!==c["".concat(p,"--").concat(v)];)v+=1;c[o="".concat(p,"--").concat(v)]=$,l[$]=o}}}this.rawKeys=l,this.keyMap=c,this.sharedKeyMap=a},e.prototype.diff=function(e,t,n,o,r){var i=this.rawKeys,a=this.keyMap,s=this.sharedKeyMap,l=this.indexes;this.updateKeys(e);var c,d,u=this.rawKeys,h=this.sharedKeyMap,p=this.items,f=this.indexes,v=this.keyName;if(!0===t)d=!0,c=null===v;else if(void 0===t)d=t,c=!0;else if(null===v)d=!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(d=new Array(u.length),g=0;g<u.length;g+=1){var m,y=u[g];void 0!==(null==s?void 0:s[y])||void 0!==(null==h?void 0:h[y])?d[g]=!0:void 0===(m=t[g])||(!0===m||("*this"===v?m:null==m?void 0:m[v])?d[g]=!0:d[g]=m)}c=!1}else d=t,c=!1}if(c){var b;for(b=!!Array.isArray(t)||t,g=0;g<i.length&&g<u.length;){var C=p[g],S=null===f?g:f[g],w=null===l?g:l[g];r(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<u.length){for(var E=[];g<u.length;g+=1)C=p[g],S=null===f?g:f[g],E.push(o(C,S));n.insertChildren(E,-1)}}else{var k=[],O=[],N=new Array(u.length),D=new Array(u.length),x=-1,A=-1;for(g=0;g<u.length;g+=1){var M=u[g];if(i[x+1]!==M)if(void 0!==(w=a[M])){for(var T=0,L=k.length;T<L;){var B=Math.floor((T+L)/2);w<k[B]?L=B:T=B+1}k[L]=w,O[L]=g,N[g]=L>0?O[L-1]:-1,D[g]=w,x=w,A=L}else D[g]=-1;else x+=1,k[A+=1]=x,O[A]=g,N[g]=A>0?O[A-1]:-1,D[g]=x}var R=O.length;if(R!==u.length||R!==i.length){for(var P=R>0?O[R-1]:-1,j=R;-1!==P;)k[j-=1]=P,P=N[P];var I,U=k;!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(u.length),W=U[j];for(g=0;g<D.length;g+=1){var V=D[g];g!==U[j]?-1!==V?(F[V]=V>W?2:1,G[g]=n.childNodes[V]):(C=p[g],S=null===f?g:f[g],G[g]=o(C,S)):(W=V,j+=1,F[V]=0)}var H=0,z=0,q=0;j=0;do{for(var X=j<U.length?U[j]:G.length,K=j<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],r(C,S,!0===d||void 0===d?d:d[q],S!==w,J),2===F[V]&&(H+=1),q+=1}j<U.length&&(C=p[X],S=null===f?X:f[X],w=null===l?K:l[K],r(C,S,!0===d||void 0===d?d:d[X],S!==w,n.childNodes[K+H])),z=K+1,q=X+1,j+=1}while(j<=U.length)}else for(g=0;g<i.length&&g<u.length;){C=p[g],S=null===f?g:f[g],w=null===l?g:l[g];r(C,S,!0===d||void 0===d?d:d[g],S!==w,n.childNodes[g]),g+=1}}},e}(),xe=function(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Ae=function(e){var t=e;return t._$wxTmplArgs=t._$wxTmplArgs||{}},Me=function(e){return null==e?"":String(e)},Te=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,o=(0,this.procGen)(this,!1,e,t);this.handleChildrenUpdate(o.C,n,void 0,void 0)},e.prototype.bindingMapUpdate=function(e,t,n){if(this.bindingMapDisabled)return!1;var o=n[e];if(!o)return!1;for(var r=null,i=0;i<o.length;i+=1)(0,o[i])(t,(function(e){null!==r&&e!==r&&r instanceof ve&&r.hasPendingChanges()&&ve.getDataProxy(r).applyDataUpdates(!0),r=e}),(function(e,t){e.textContent=t}));var a=r;return null!==a&&a instanceof ve&&a.hasPendingChanges()&&ve.getDataProxy(a).applyDataUpdates(!0),!0},e.prototype.handleChildrenCreation=function(e,t,n,o){var r=this;e(!0,(function(e,i){if(n&&""!==o){var a=r.createDynamicPlaceholder(n);t.appendChild(a)}else{var s=r.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&&o!==(l||"")){var d=r.createDynamicPlaceholder(n);t.appendChild(d)}else{var u=r.createCommonElement(e,i,a,s,c);n?(ne.setSlotElement(u,n),Ae(u).dynamicSlotNameMatched=!0):void 0!==l&&(u.slot=l),t.appendChild(u)}}),(function(e,i){var a=r.shadowRoot.createVirtualNode("wx:if");a.destroyBackendElementOnDetach(),ne.setInheritSlots(a),n&&ne.setSlotElement(a,n),Ae(a).key=e,r.handleChildrenCreation(i,a,n,o),t.appendChild(a)}),(function(e,i,a,s,l){var c=r.shadowRoot,d=c.createVirtualNode("wx:for");d.destroyBackendElementOnDetach(),ne.setInheritSlots(d),n&&ne.setSlotElement(d,n),Ae(d).keyList=new De(i,e,d,(function(e,t){var i=c.createVirtualNode("wx:for-item");return i.destroyBackendElementOnDetach(),ne.setInheritSlots(i),n&&ne.setSlotElement(d,n),r.handleChildrenCreation((function(n,o,r,i,a,c,d){l(!0,e,t,void 0,void 0,s?xe(xe([],s,!0),[t],!1):null,o,r,i,a,c,d)}),i,n,o),i})),t.appendChild(d)}),(function(e,o){var i=r.shadowRoot.createVirtualNode("slot");i.destroyBackendElementOnDetach(),ne.setSlotName(i,Me(e)),n&&ne.setSlotElement(i,n),o&&o(i),t.appendChild(i)}),(function(e,i){if(void 0!==i)if(n)if(o===i)(a=r.shadowRoot.createVirtualNode("virtual")).destroyBackendElementOnDetach(),ne.setSlotElement(a,n),Ae(a).dynamicSlotNameMatched=!0,r.handleChildrenCreation(e,a,void 0,void 0),t.appendChild(a);else{var a=r.createDynamicPlaceholder(n);t.appendChild(a)}else(a=r.shadowRoot.createVirtualNode("virtual")).destroyBackendElementOnDetach(),a.slot=i,r.handleChildrenCreation(e,a,void 0,void 0),t.appendChild(a);else(a=r.shadowRoot.createVirtualNode("virtual")).destroyBackendElementOnDetach(),ne.setInheritSlots(a),n&&ne.setSlotElement(a,n),r.handleChildrenCreation(e,a,n,o),t.appendChild(a)}),void 0,void 0)},e.prototype.handleChildrenUpdate=function(e,t,n,o){var r=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,d,u){var h=a[i];if(i+=1,n){var p=Ae(h);if(o!==(d||""))return void(p.dynamicSlotNameMatched&&(f=r.createDynamicPlaceholder(n),t.replaceChild(f,h)));if(!p.dynamicSlotNameMatched){var f=r.createCommonElement(e,s,l,c,u);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 _=r.dynamicSlotUpdate(h,u,c);_&&(v=!0),h.hasPendingChanges()&&ve.getDataProxy(h).applyDataUpdates(!0),null==_||_.applySlotUpdates()}n||void 0!==d&&(h.slot=d),v||r.handleChildrenUpdate(c,h,void 0,void 0)}),(function(e,s){var l=a[i];if(i+=1,Ae(l).key===e)r.handleChildrenUpdate(s,l,n,o);else{var c=r.shadowRoot.createVirtualNode("wx:if");c.destroyBackendElementOnDetach(),ne.setInheritSlots(c),n&&ne.setSlotElement(c,n),Ae(c).key=e,r.handleChildrenCreation(s,c,n,o),n?t.replaceChild(c,l):t.replaceChildAt(c,i-1)}}),(function(e,t,s,l,c){var d=a[i];i+=1,Ae(d).keyList.diff(e,s,d,(function(e,t){var i=r.shadowRoot.createVirtualNode("wx:for-item");return i.destroyBackendElementOnDetach(),ne.setInheritSlots(i),n&&ne.setSlotElement(d,n),r.handleChildrenCreation((function(n,o,r,i,a,s,d){c(!0,e,t,void 0,void 0,l?xe(xe([],l,!0),[t],!1):null,o,r,i,a,s,d)}),i,n,o),i}),(function(e,t,i,a,s){r.handleChildrenUpdate((function(n,o,r,s,d,u,h){c(!1,e,t,i,!!a||void 0,l?xe(xe([],l,!0),[t],!1):null,o,r,s,d,u,h)}),s,n,o)}))}),(function(e,t){var n=a[i];i+=1,void 0!==e&&ne.setSlotName(n,Me(e)),t&&t(n),r.shadowRoot.applySlotValueUpdates(n)}),(function(e,s){var l=a[i];if(i+=1,void 0!==s)if(n){var c=Ae(l);if(o===s)c.dynamicSlotNameMatched?r.handleChildrenUpdate(e,l,void 0,void 0):((d=r.shadowRoot.createVirtualNode("virtual")).destroyBackendElementOnDetach(),ne.setSlotElement(d,n),Ae(d).dynamicSlotNameMatched=!0,r.handleChildrenCreation(e,d,void 0,void 0),t.replaceChild(d,l));else if(c.dynamicSlotNameMatched){var d=r.createDynamicPlaceholder(n);t.replaceChild(d,l)}}else l.slot=s,r.handleChildrenUpdate(e,l,void 0,void 0);else r.handleChildrenUpdate(e,l,n,o)}),void 0,void 0)},e.prototype.dynamicSlotUpdate=function(e,t,n){var o=this,r=e.getShadowRoot();return(null==r?void 0:r.isDynamicSlots())?(r.setDynamicSlotHandler(t||[],(function(t,r,i){o.handleChildrenCreation((function(e,t,o,r,a,s,l){n(!0,t,o,r,a,s,l,i,void 0)}),e,t,r)}),(function(t){for(var n=[],o=0;o<e.childNodes.length;o+=1){var i=e.childNodes[o];r.getContainingSlot(i)===t&&n.push(o)}for(o=0;o<n.length;o+=1){var a=n[o];e.removeChildAt(a-o)}}),(function(t,r,i){var a=t._$slotName||"";o.handleChildrenUpdate((function(e,t,o,a,s,l,c){n(!1,t,o,a,s,l,c,r,i)}),e,t,a)})),r):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,o,r){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,r,o);t&&(l=!0),n(e,!0),e.hasPendingChanges()&&ve.getDataProxy(e).applyDataUpdates(!0),null==t||t.applySlotUpdates()},d=void 0;s&&(d=function(){var n,o=a.shadowRoot.createComponent(e,e,t,void 0,c);o.destroyBackendElementOnDetach();var r=o.getShadowRoot(),s=i.getShadowRoot();if(null==r?void 0:r.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(r),null===(n=i.parentNode)||void 0===n||n.replaceChild(o,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(o)}}),(i=this.shadowRoot.createComponent(e,e,t,d,c)).destroyBackendElementOnDetach()}else(i=this.shadowRoot.createComponentOrNativeNode(e,t,(function(e){var t=e instanceof ve?a.dynamicSlotUpdate(e,r,o):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(o,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",Me(t)),e.class=Me(t)):e.class=Me(t)},e.prototype.y=function(e,t){e.setNodeStyle(Me(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,o,r,i,a){var s=Me(n),l=function(t){var n,o=e.ownerShadowRoot.getHostNode(),r=o.getMethodCaller(),i=o._$methodMap[s];return"function"==typeof i&&(n=i.call(r,t)),n},c={final:o,mutated:r,capture:i};if(a){var d=Ae(e);d.dynEvListeners||(d.dynEvListeners={});var u=d.dynEvListeners;u[t]&&e.removeListener(t,u[t],c),u[t]=l}s&&e.addListener(t,l,c)},e.prototype.sd=function(e,t){Ae(e).scopeData=t},e.prototype.r=function(t,n,o,r){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,o)?r&&i.setModelBindingListener(a,(function(e){var n=t.ownerShadowRoot.getHostNode(),o=ve.getDataProxy(n);o.replaceDataOnPath(r,e),o.applyDataUpdates(!1)})):t.hasExternalClass(n)?t.setExternalClass(n,Me(o)):a.startsWith("bind")?e.prototype.v(t,a.slice("bind".length),Me(o),!1,!1,!1,!0):a.startsWith("captureBind")?e.prototype.v(t,a.slice("captureBind".length),Me(o),!1,!1,!0,!0):a.startsWith("catch")?e.prototype.v(t,a.slice("catch".length),Me(o),!0,!1,!1,!0):a.startsWith("captureCatch")?e.prototype.v(t,a.slice("captureCatch".length),Me(o),!0,!1,!0,!0):a.startsWith("on")&&e.prototype.v(t,a.slice("on".length),Me(o),!1,!1,!1,!0)}else t.updateAttribute(n,o);var s},e}(),Le=function(){},Be=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 o=n[e];if(void 0!==o)for(var r=0;r<o.length;r+=1)(0,o[r])(t,(function(){}),(function(e,t){e.textContent=t}))},e.prototype.handleChildrenCreation=function(e,t){var n=this,o=!0,r=!1,i=function(){o=!1,r=!1;var e=document.createElement("virtual");t.appendChild(e),n.shadowRoot.slot=e};e(!0,(function(e,n){r?i():o=!1;var a=document.createTextNode(e||"");n&&n(a),t.appendChild(a)}),(function(e,a,s,l){r?i():o=!1;var c=document.createElement(e);s(c,!0),n.handleChildrenCreation(l,c),t.appendChild(c)}),Le,Le,(function(){o?(r=!0,n.shadowRoot.slot=t):i()}),(function(e){r?i():o=!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]=Me(n)},e.prototype.m=function(){},e.prototype.v=function(e,t,n,o){var r=this;this.shadowRoot.setListener(e,t,(function(e){var t=r.shadowRoot.template.methods[n],i=null==t?void 0:t(e);return!o&&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,Me(n))},e}(),Re=function(){return{C:function(e,t,n,o,r,i){i("")},B:Object.create(null)}},Pe=function(){return Re},je=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:Pe};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 o=e.genObjectGroupEnv.group("")||Pe();this.procGenWrapper=new Be(this,o),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,o=0;o<t.length;o+=1){var r=t[o][0];this.procGenWrapper.bindingMapUpdate(r[0],e,n)}},e.prototype.setListener=function(e,t,n){var o,r=e;r._$wxTmplEv?r._$wxTmplEv[t]=n:r._$wxTmplEv=((o={})[t]=n,o)},e.prototype.handleEvent=function(e,t){for(var n,o=e,r=o,i=this.shadowRootElement,a=t.type,s=t.bubbles;;){var l=t.wrapShadowedEvent(o,null,r),c=null===(n=r._$wxTmplEv)||void 0===n?void 0:n[a];if(c&&!1===c.call(r,l)&&(t.preventDefault(),t.stopPropagation()),!s||t.propagationStopped())break;if(r===i)break;var d=r.parentNode;if(!d)break;r=d}},e}(),Ue=function(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Fe=function(){return{C:function(e,t,n,o,r,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 je(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 Te(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 o=t[C],r=o[0],i=o[1],a=o[2],s=o[3],l=n,c=0;c<r.length;c+=1){var d=r[c],u=l[d];if(!0===u)break;if(c===r.length-1){if(void 0===s)l[d]=!0;else{var h=a;if(void 0===u)l[d]=new Array(h);else if(!Array.isArray(u)){for(var p=new Array(h),f=Object.keys(u),v=0;v<f.length;v+=1){var _=f[v],$=u[_],g=Number(_);p.length<g&&(p.length=g),p[_]=$}l[d]=p}var m=l[d];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===u){var b=Object.create(null);l[d]=b,l=b}else l=u}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 o=t[0];return 1===o.length&&this.procGenWrapper.bindingMapUpdate(o[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 Ne;return qe=e,e},Ke=null,Ye=function(){return Ke||(e=new p,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 o=null!=e?e:{};return{externalComponent:void 0!==o.externalComponent?o.externalComponent:n.externalComponent,templateEngine:void 0!==o.templateEngine?o.templateEngine:n.templateEngine,styleScope:void 0!==o.styleScope?o.styleScope:n.styleScope,extraStyleScope:void 0!==o.extraStyleScope?o.extraStyleScope:n.extraStyleScope,multipleSlots:void 0!==o.multipleSlots?o.multipleSlots:n.multipleSlots,dynamicSlots:void 0!==o.dynamicSlots?o.dynamicSlots:n.dynamicSlots,reflectToAttributes:void 0!==o.reflectToAttributes?o.reflectToAttributes:n.reflectToAttributes,writeFieldsToNode:void 0!==o.writeFieldsToNode?o.writeFieldsToNode:n.writeFieldsToNode,writeIdToDOM:void 0!==o.writeIdToDOM?o.writeIdToDOM:n.writeIdToDOM,idPrefixGenerator:void 0!==o.idPrefixGenerator?o.idPrefixGenerator:n.idPrefixGenerator,pureDataPattern:void 0!==o.pureDataPattern?o.pureDataPattern:n.pureDataPattern,dataDeepCopy:void 0!==o.dataDeepCopy?o.dataDeepCopy:n.dataDeepCopy,propertyPassingDeepCopy:void 0!==o.propertyPassingDeepCopy?o.propertyPassingDeepCopy:n.propertyPassingDeepCopy,listenerChangeLifetimes:void 0!==o.listenerChangeLifetimes?o.listenerChangeLifetimes:n.listenerChangeLifetimes,virtualHost:void 0!==o.virtualHost?o.virtualHost:n.virtualHost,propertyEarlyInit:void 0!==o.propertyEarlyInit?o.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=[],o=this._$arr,r=0;r<o.length;r+=1){if(o[r]===e){n.push.apply(n,o.slice(r+1)),t=e;break}n.push(o[r])}this._$arr=n,this.empty=0===this._$arr.length}return t},e.prototype.call=function(e,t,n){var o=this._$arr,r=!0;if(o)for(var i=0;i<o.length;i+=1)!1===it(this._$type,o[i],e,t,n,this._$avoidErrorHandler)&&(r=!1);return r},e.safeCallback=function(e,t,n,o,r,i){void 0===i&&(i=!1);try{return t.apply(n,o)}catch(s){var a="[Error] [Component] ".concat(e||"Error Listener"," Error @ ");return n instanceof ve&&(a+=n.is),a+="#".concat(t.name||"(anonymous)"),r&&r.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:o},i)}},e.addGlobalErrorListener=function(e){tt.add(e)},e.removeGlobalErrorListener=function(e){tt.remove(e)},e.addGlobalWarningListener=function(e){ot.add(e)},e.removeGlobalWarningListener=function(e){ot.remove(e)},e}();function et(e){var t="[Warning] [Component] ".concat(e);ot.call(t,[t])&&console.warn(t)}var tt=new Qe;tt._$avoidErrorHandler=!0;var nt,ot=new Qe,rt=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=[],o=this._$arr,r=0;r<o.length;r+=1){var i=o[r];if(i.f===e){n.push.apply(n,o.slice(r+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,o){var r=this._$arr,i=!0;if(r)for(var a=0;a<r.length;a+=1){var s=r[a],l=s.f;n(s.data)&&!1===Qe.safeCallback(this._$type,l,e,t,o)&&(i=!1)}return i},e}(),it=Qe.safeCallback,at=Qe.addGlobalErrorListener,st=Qe.removeGlobalErrorListener,lt=Qe.addGlobalWarningListener,ct=Qe.removeGlobalWarningListener,dt=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,o=e;do{var r=o._$mutationObserverTarget;null===(n=null==r?void 0:r.attrObservers)||void 0===n||n.call(o,[t]);var i=o.parentNode;if(!i)break;if(!(o=i)._$mutationObserverTarget)break}while(o._$mutationObserverTarget._$subtreeObserversCount>0)},e.callTextObservers=function(e,t){for(var n,o=e.parentNode;o;){var r=o._$mutationObserverTarget;if(!r||0===r._$subtreeObserversCount)break;null===(n=r.textObservers)||void 0===n||n.call(o,[t]),o=o.parentNode}},e.callChildObservers=function(e,t){var n,o=e;do{var r=o._$mutationObserverTarget;null===(n=null==r?void 0:r.childObservers)||void 0===n||n.call(o,[t]);var i=o.parentNode;if(!i)break;if(!(o=i)._$mutationObserverTarget)break}while(o._$mutationObserverTarget._$subtreeObserversCount>0)},e.callAttachObservers=function(e,t){var n,o=e._$mutationObserverTarget;null===(n=null==o?void 0:o.attachObservers)||void 0===n||n.call(e,[t])},e}(),ut=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,o=this._$listener;if(!o)throw new Error("A MutationObserver can only observe once");e._$mutationObserverTarget?n=e._$mutationObserverTarget:(n=new dt(e),e._$mutationObserverTarget=n),this._$listener=null;var r=t.subtree?o:function(e){e.target===this&&o.call(this,e)};this._$normalizedListener=r,this._$bindedTarget=n,t.properties&&(n.attrObservers||(n.attrObservers=new Qe),n.attrObservers.add(r),this._$bindedFuncArrs.push(n.attrObservers),this._$subtreeListenersCount+=1),t.childList&&(n.childObservers||(n.childObservers=new Qe),n.childObservers.add(r),this._$bindedFuncArrs.push(n.childObservers),this._$subtreeListenersCount+=1),t.characterData&&(n.textObservers||(n.textObservers=new Qe),n.textObservers.add(r),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(r),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;if(this._$destroyOnDetach=!1,this._$text=String(e),3===t.getBackendMode())n=t._$nodeTreeContext.document.createTextNode(e);else if(1===t.getBackendMode()){var o=t._$backendShadowRoot;n=(null==o?void 0:o.createTextNode(e))||null}else n=t._$nodeTreeContext.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&&(3!==this.ownerShadowRoot.getBackendMode()&&this._$backendElement.release(),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&&(3===this.ownerShadowRoot.getBackendMode()?this._$backendElement.textContent=this._$text:this._$backendElement.setText(this._$text)),dt.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 o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ft=function(e){function t(){throw new Error("Element cannot be constructed directly")}return pt(t,e),t.create=function(e,n){var o,r,i=Object.create(t.prototype);if(i.is=e,3===n.getBackendMode())r=n._$nodeTreeContext.document.createElement(e);else if(1===n.getBackendMode()){var a=n._$backendShadowRoot;r=(null==a?void 0:a.createElement(e))||null}else r=n._$nodeTreeContext.createElement(e);if(i._$initialize(!1,r,n),i.classList=new S(i,null),n&&r){var s=n.getHostNode()._$definition._$options.styleScope;if(s&&3!==n.getBackendMode()&&r.setStyleScope(s),Ze.writeExtraInfoToAttr){var l=null===(o=n.getHostNode()._$behavior.ownerSpace)||void 0===o?void 0:o.styleScopeManager.queryName(s);l&&r.setAttribute("exparser:info-class-prefix","".concat(l,"--"))}}return 3!==n.getBackendMode()&&r&&r.associateValue(i),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 o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();!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,o,r=Object.create(t.prototype);r._$initializeVirtual("shadow",null,e._$nodeTreeContext),r._$idMap=null;var i=0;e._$definition._$options.multipleSlots?i=1:e._$definition._$options.dynamicSlots&&(i=2),r._$slotCacheDirty=!1,r._$appliedSlotCacheDirty=!1,0===i?(r._$singleSlot=null,r._$appliedSingleSlot=null):1===i?r._$slots=r._$appliedSlots=Object.create(null):2===i&&(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);var a=1===e.getBackendMode()&&(null===(n=e.getBackendElement())||void 0===n?void 0:n.getShadowRoot())||null;r._$backendShadowRoot=a;var s=(null===(o=r._$backendShadowRoot)||void 0===o?void 0:o.getRootNode())||null;return r._$initialize(!0,s,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,o,r){var i=this._$host,a=i._$behavior,s=i._$genericImpls,l=a.ownerSpace,c=void 0===t?e:t,d=a._$using[c]||a._$using[c];if(d){var u=d.final||null!==d.placeholder&&he(d.placeholder,l,a,s),h=o?$t(o,d):void 0;if(u)return ve._$advancedCreate(e,u,this,null,ue(u,l,i,n),h,r)}var p=s&&s[c];if(p){var f=p.final||null!==p.placeholder&&he(p.placeholder,l,a,s);if(h=o?$t(o,p):void 0,f)return ve._$advancedCreate(e,f,this,null,ue(f,l,i,n),h,r)}var v=l.getComponentByUrl(c,"");if(!v)throw new Error('Cannot find component "'.concat(c,'"'));return ve._$advancedCreate(e,v,this,null,ue(v,l,i,n),void 0,r)},t.prototype.createComponentOrNativeNode=function(e,t,n){var o=this._$host,r=o._$behavior.ownerSpace,i=r.getComponentByUrlWithoutDefault(e,"");if(i)return ve._$advancedCreate(e,i,this,null,ue(i,r,o,t),void 0,n);var a=ft.create(e,this);return null==n||n(a),a},t.prototype.checkComponentPlaceholder=function(e){var t,n,o=this._$host._$behavior._$using[e];if(void 0!==o)n=o;else{var r=null===(t=this._$host._$genericImpls)||void 0===t?void 0:t[e];if(!r)return;n=r}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(),o=n.next();!o.done;o=n.next()){var r=o.value;(r._$slotName||"")===e&&t.push(r)}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 o=e;null===(t=o.parentNode)||void 0===t?void 0:t._$inheritSlots;)o=o.parentNode;var r=o._$nodeSlotElement;if((null==r?void 0:r.ownerShadowRoot)===this)return r}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 o=this._$dynamicSlotSet.values(),r=o.next();!r.done&&!1!==e(r.value);r=o.next());},t.prototype.forEachNodeInSlot=function(e){var t=this;if(this._$singleSlot){var n=this._$singleSlot,o=function(t){return!1!==e(t,n)&&!(t instanceof ne&&t._$inheritSlots&&!1===t.childNodes.every(o))};this._$host.childNodes.every(o)}else if(this._$dynamicSlotSet){var r=function(n){return!1!==e(n,t.getContainingSlot(n)||void 0)&&!(n instanceof ne&&n._$inheritSlots&&!1===n.childNodes.every((function(e){return r(e)})))};this._$host.childNodes.every(r)}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 o=function(e,n){t(e,n),e instanceof ne&&e._$inheritSlots&&e.childNodes.forEach(o)};this._$host.childNodes.forEach(o)}else if(this._$dynamicSlotSet){if("string"==typeof e)return;var r=function(e,n){t(e,n),e instanceof ne&&e._$inheritSlots&&e.childNodes.forEach(r)};this._$host.childNodes.forEach((function(o,i){n.getContainingSlot(o)===e&&(t(o,i),o instanceof ne&&o._$inheritSlots&&o.childNodes.forEach(r))}))}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&&(this._$appliedSlotCacheDirty=!1,this._$slotCacheDirty&&this._$updateSlotCache(),1!==this.getBackendMode()))if(this._$dynamicSlotSet){var e=this._$appliedDynamicSlots;if(!e)return;for(var t=this._$dynamicSlotSet,n=this._$insertDynamicSlotHandler,o=this._$removeDynamicSlotHandler,r=e.keys(),i=r.next();!i.done;i=r.next()){var a=i.value;t.has(a)||(null==o||o(a),e.delete(a))}for(var s=t.values(),l=s.next();!l.done;l=s.next()){var c=(a=l.value)._$slotName||"",d=e.get(a);void 0!==d?d.slotName!==c&&(null==o||o(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 u=this._$appliedSlots,h=this._$slots;this._$appliedSlots=h;for(var p=Object.keys(u),f=0;f<p.length;f+=1)($=u[_=p[f]])!==(g=h[_])&&ne._$insertChildReassignSlot(this,_,$,g||null);var v=Object.keys(h);for(f=0;f<v.length;f+=1){var _,$=u[_=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,o=function(e){e instanceof ne&&(null!==e._$slotName&&n.add(e),e.childNodes.forEach(o))};return this.childNodes.forEach(o),void(this._$dynamicSlotSet=n)}var r=Object.create(null),i=function(e){e instanceof ne&&(null!==e._$slotName&&(r[e._$slotName]||(r[e._$slotName]=e)),e.childNodes.forEach(i))};this.childNodes.forEach(i),this._$slots=r},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,o){if(this._$requiredSlotValueNames=e,this._$insertDynamicSlotHandler=t,this._$removeDynamicSlotHandler=n,this._$updateDynamicSlotHandler=o,this._$appliedDynamicSlots)for(var r=this._$appliedDynamicSlots.values(),i=r.next();!i.done;i=r.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 o,r=e._$slotValues;if(r){var i=r[t],a=n;if(0!==this._$propertyPassingDeepCopy&&(a=2===this._$propertyPassingDeepCopy?T(n,!0):M(n)),i!==a&&(r[t]=a,this._$requiredSlotValueNames.indexOf(t)>=0)){var s=null===(o=this._$appliedDynamicSlots)||void 0===o?void 0:o.get(e);s&&(s.updatePathTree||(s.updatePathTree=Object.create(null)),s.updatePathTree[t]=!0)}}},t.prototype.applySlotValueUpdates=function(e){var t,n,o=null===(t=this._$appliedDynamicSlots)||void 0===t?void 0:t.get(e),r=null==o?void 0:o.updatePathTree;r&&(o.updatePathTree=void 0,null===(n=this._$updateDynamicSlotHandler)||void 0===n||n.call(this,e,e._$slotValues,r))},t.prototype.applySlotUpdates=function(){var e;if(this._$appliedDynamicSlots)for(var t=this._$appliedDynamicSlots.entries(),n=t.next();!n.done;n=t.next()){var o=n.value,r=o[0],i=o[1],a=null==i?void 0:i.updatePathTree;a&&(i.updatePathTree=void 0,null===(e=this._$updateDynamicSlotHandler)||void 0===e||e.call(this,r,r._$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 o="",r=n;r;r-=1)o+=" ";var i=o+mt(e),a=!1;return e instanceof ne&&(e instanceof ve&&(a=e.getComponentOptions().externalComponent),t?a?(i+="\n".concat(o," <(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,o){return new e(t,n,o)},e.prototype.forEach=function(e){var t=this._$nodeTypeLimit,n=this._$composed;if(this._$isAncestor){var o=function(r){for(var i=null,a=r;;){if(n&&i&&a instanceof ve&&!a._$external){var s=a.getShadowRoot().getContainingSlot(i);if(!s)return!1;if(!1===o(s))break}if(a instanceof t&&!1===e(a))return!1;if(!a.parentNode)break;i=a,a=a.parentNode}return!0};o(this._$node)}else{var r=this._$rootFirst,i=function(o){if(r&&o instanceof t&&!1===e(o))return!1;if(o instanceof ne){var a=!1,s=function(e){return!1!==i(e)||(a=!0,!1)};if(n?o.forEachComposedChild(s):o.childNodes.forEach(s),a)return!1}return!(!r&&o instanceof t&&!1===e(o))};i(this._$node)}},e}(),St=function(e,t){var n,o;n=e.getBackendContext(),o=t||null,n.render((function(){"function"==typeof o&&it("render",o,n,[null])}))},wt=function(e){return Xe().defineBehavior(e)},Et=function(e){return Xe().defineComponent(e)};function kt(e,t){return ve.create(e,t||null)}var Ot=Y.triggerEvent,Nt=Y.triggerExternalEvent;module.exports=t})();
1
+ (()=>{"use strict";var e={d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},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:()=>u,Behavior:()=>ke,BehaviorBuilder:()=>Ne,ClassList:()=>E,Component:()=>$e,ComponentDefinition:()=>ge,ComponentSpace:()=>Me,DataGroup:()=>H,DeepCopyKind:()=>qe,Element:()=>re,ElementIterator:()=>Nt,ElementIteratorType:()=>yt,Event:()=>Q,EventBubbleStatus:()=>P,EventMutLevel:()=>z,FuncArr:()=>ot,MutationObserver:()=>vt,NativeNode:()=>$t,NormalizedPropertyType:()=>le,Observer:()=>vt,ParsedSelector:()=>te,RelationType:()=>oe,ShadowRoot:()=>St,StyleScopeManager:()=>w,StyleSegmentIndex:()=>J,TextNode:()=>gt,TraitBehavior:()=>ue,VirtualNode:()=>se,addGlobalErrorListener:()=>ut,addGlobalWarningListener:()=>pt,backend:()=>n,composedBackend:()=>o,createElement:()=>At,dataPath:()=>i,dataUtils:()=>a,domlikeBackend:()=>r,dumpElement:()=>Et,dumpElementToString:()=>wt,dumpSingleElementToString:()=>Ct,getDefaultComponentSpace:()=>Qe,glassEaselTemplate:()=>l,globalOptions:()=>tt,mutationObserver:()=>c,registerBehavior:()=>Ot,registerElement:()=>xt,removeGlobalErrorListener:()=>dt,removeGlobalWarningListener:()=>ht,safeCallback:()=>ct,template:()=>l,templateEngine:()=>d,triggerEvent:()=>Mt,triggerExternalEvent:()=>Lt,triggerRender:()=>kt,typeUtils:()=>s});var n={};e.r(n),e.d(n,{BackendMode:()=>u,EmptyBackendContext:()=>g,EmptyBackendElement:()=>_,EmptyBackendElementType:()=>h,EmptyBackendShadowRootContext:()=>$});var o={};e.r(o),e.d(o,{EmptyComposedBackendContext:()=>m,EmptyComposedBackendElement:()=>y});var r={};e.r(r),e.d(r,{CurrentWindowBackendContext:()=>S});var i={};e.r(i),e.d(i,{parseMultiPaths:()=>L,parseSinglePath:()=>M});var a={};e.r(a),e.d(a,{deepCopy:()=>I,simpleDeepCopy:()=>T});var s={};e.r(s),e.d(s,{METHOD_TAG:()=>ie});var l={};e.r(l),e.d(l,{DEFAULT_PROC_GEN_GROUP:()=>ze,GlassEaselTemplateEngine:()=>Xe});var c={};e.r(c),e.d(c,{MutationObserver:()=>vt,MutationObserverTarget:()=>ft});var u,d={};e.r(d),function(e){e[e.Shadow=1]="Shadow",e[e.Composed=2]="Composed",e[e.Domlike=3]="Domlike"}(u||(u={}));var p,h,f=(p=function(e,t){return p=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])},p(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}p(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});!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"}(h||(h={}));var v,g=function(){function e(){this.mode=1,this._$styleSheetIdInc=1,this._$renderCallbacks=null,this._$shadowRoot=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){ct("Render Callback",e,t,[null])}))}),16)}},e.prototype.getRootNode=function(){return this._$shadowRoot},e.prototype.createFragment=function(){return new _(0)},e.prototype.onEvent=function(e){},e.prototype.createMediaQueryObserver=function(e,t){return{disconnect:function(){}}},e}(),_=function(){function e(e){this._$shadowRoot=3===e?new $: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.setContainingSlot=function(e){},e.prototype.reassignContainingSlot=function(e,t){},e.prototype.spliceBeforeSlotNodes=function(e,t,n){},e.prototype.spliceRemoveSlotNodes=function(e,t){},e.prototype.spliceAppendSlotNodes=function(e){},e.prototype.setInheritSlots=function(){},e.prototype.setVirtualHost=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.setDataset=function(e,t){},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.setListenerStats=function(e,t,n){},e.prototype.setModelBindingStat=function(e,t){},e.prototype.createIntersectionObserver=function(e,t,n,o){return{disconnect:function(){}}},e.prototype.getContext=function(e){e(null)},e}(),$=function(e){function t(){return e.call(this,4)||this}return f(t,e),t.prototype.createElement=function(e,t){return new _(1)},t.prototype.createTextNode=function(e){return new _(2)},t.prototype.createComponent=function(e){return new _(3)},t.prototype.createVirtualNode=function(e){return new _(4)},t}(_),m=function(){function e(){this.mode=2,this._$styleSheetIdInc=1,this._$renderCallbacks=null,this._$rootNode=new y}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){ct("Render Callback",e,t,[null])}))}),16)}},e.prototype.getRootNode=function(){return this._$rootNode},e.prototype.createElement=function(e,t){return new y},e.prototype.createTextNode=function(e){return new y},e.prototype.createFragment=function(){return new y},e.prototype.onEvent=function(e){},e.prototype.createMediaQueryObserver=function(e,t){return{disconnect:function(){}}},e}(),y=function(){function e(){}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.setListenerStats=function(e,t,n){},e.prototype.setModelBindingStat=function(e,t){},e.prototype.createIntersectionObserver=function(e,t,n,o){return{disconnect:function(){}}},e.prototype.getContext=function(e){e(null)},e}(),b=["touchstart","touchmove","touchend","touchcancel","mousedown","mousemove","mouseout","mouseover","mouseup","click"],S=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._$elementCaptureEventListeners=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 o=document.createElement("style");o.innerText=n,void 0!==t&&o.setAttribute("wx-style-scope",String(t)),document.head.appendChild(o);var r=this._$styleSheets.length;return this._$styleSheets.push(o),r},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(){ct("Render Callback",e,t,[null])}))},e.prototype.getRootNode=function(){return document.body},e.prototype.associateValue=function(e,t){e.__wxElement=t},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 o=Object.keys(n),r=0;r<o.length;r+=1){var i=o[r];"function"!=typeof e[i]&&(t[i]=e[i])}n=Object.getPrototypeOf(n)}return t},e.prototype._$trigger=function(e,t,n,o,r){if(this._$eventListener&&e.target){for(var i=e.target;i&&!i.__wxElement;)i=i.parentNode;i&&1===this._$eventListener(i.__wxElement,t,n,{originalEvent:e,bubbles:o,composed:r,capturePhase:!0})&&e.preventDefault()}},e.prototype._$initEvent=function(){var e=this,t=Object.create(null),n=!1,o=function(e,n){t[n.identifier]={x:n.clientX,y:n.clientY}},r=function(n,o){var r=o.identifier;if(t[r]){var i=t[r];(Math.abs(i.x-o.clientX)>10||Math.abs(i.y-o.clientY)>10)&&(delete t[r],e._$trigger(n,"canceltap",i,!0,!0))}},i=function(n,o){var r=o.identifier;if(t[r]){var i=t[r];delete t[r],Math.abs(i.x-o.clientX)>10||Math.abs(i.y-o.clientY)>10?e._$trigger(n,"canceltap",i,!0,!0):e._$trigger(n,"tap",i,!0,!0)}},a=function(n,o){var r=o.identifier;if(t[r]){var i=t[r];delete t[r],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 r=t.changedTouches,i=0;i<r.length;i+=1)o(0,r[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,o=0;o<n.length;o+=1)r(t,n[o])}),{capture:!0}),document.body.addEventListener("touchend",(function(t){e._$trigger(t,"touchend",e._$getEventDetail(t),t.bubbles,t.composed);for(var n=t.changedTouches,o=0;o<n.length;o+=1)i(t,n[o])}),{capture:!0}),document.body.addEventListener("touchcancel",(function(t){e._$trigger(t,"touchcancel",e._$getEventDetail(t),t.bubbles,t.composed);for(var n=t.changedTouches,o=0;o<n.length;o+=1)a(t,n[o])}),{capture:!0}),document.body.addEventListener("mousedown",(function(t){e._$trigger(t,"mousedown",e._$getEventDetail(t),t.bubbles,t.composed),n||o(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||r(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.setListenerStats=function(e,t,n,o){var r=this;if(e){var i=b.includes(t),a=2===o;if(i){if(this._$delegatedEventListeners[t])return;return this._$delegatedEventListeners[t]=!0,void document.body.addEventListener(t,(function(e){a&&e.preventDefault(),r._$trigger(e,t,r._$getEventDetail(e),e.bubbles,e.composed)}),{capture:!0})}var s=n?this._$elementCaptureEventListeners:this._$elementEventListeners;s.has(e)||s.set(e,Object.create(null));var l=s.get(e);l[t]||(l[t]=!0,e.addEventListener(t,(function(e){r._$triggedEvents.has(e)||(r._$triggedEvents.add(e),a&&e.preventDefault(),r._$trigger(e,t,r._$getEventDetail(e),e.bubbles,e.composed))})))}},e.prototype.setModelBindingStat=function(e,t,n){var o=function(o,r){if(e._$wxArgs||(e._$wxArgs={modelListeners:Object.create(null)}),void 0===e._$wxArgs.modelListeners[t]){if(!n)return;e._$wxArgs.modelListeners[t]=n,e.addEventListener(o,(function(){var n,o=null===(n=e._$wxArgs)||void 0===n?void 0:n.modelListeners[t];null==o||o(r())}))}e._$wxArgs.modelListeners[t]=n},r=e.tagName,i=!1;if("INPUT"===r){var a=e,s=a.type;"checkbox"===s||"radio"===s?"checked"===t&&(i=!0,o("change",(function(){return a.checked}))):"value"===t&&(i=!0,o("input",(function(){return a.value})))}else if("TEXTAREA"===r){var l=e;"value"===t&&(i=!0,o("input",(function(){return l.value})))}else if("SELECT"===r){var c=e;"value"===t&&(i=!0,o("change",(function(){return c.value})))}i||rt('unsupported model binding on "'.concat(t,'" of "').concat(r.toLowerCase(),'" element.'))},e.prototype.createIntersectionObserver=function(e,t,n,o,r){var i=new IntersectionObserver((function(e){e.forEach((function(e){r({intersectionRatio:e.intersectionRatio,boundingClientRect:e.boundingClientRect,intersectionRect:e.intersectionRect,relativeRect:e.rootBounds,time:e.time})}))}),{root:t,rootMargin:n,threshold:o});return i.observe(e),{disconnect:function(){i.disconnect()}}},e.prototype.createMediaQueryObserver=function(e,t){var n=null,o=function(){var o,r,i=(o=document.documentElement.clientWidth,r=document.documentElement.clientHeight,!(void 0!==e.width&&o!==e.width||void 0!==e.maxWidth&&o>e.maxWidth||void 0!==e.minWidth&&o<e.minWidth||void 0!==e.width&&r!==e.height||void 0!==e.maxHeight&&r>e.maxHeight||void 0!==e.minHeight&&r<e.minHeight||(o>r?"landscape":"portrait")!==e.orientation));n!==i&&(n=i,t({matches:i}))};return setTimeout(o,0),window.addEventListener("resize",o),{disconnect:function(){window.removeEventListener("resize",o)}}},e.prototype.getContext=function(e,t){t(null)},e}(),C=/(~|\^+)?-?[_0-9a-z][-_0-9a-z]*/gi,w=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}(),E=function(){function e(e,t){var n,o,r;this._$aliasDirty=!1,this._$rawNames=[],this._$rawNamesSegmentSep=[],this._$hasResolvedNames=!1,this._$elem=e;var i=null===(n=e.ownerShadowRoot)||void 0===n?void 0:n.getHostNode();if(i){var a=i.getComponentOptions();this._$owner=i.classList,this._$defaultScope=a.styleScope,this._$extraScope=null===a.extraStyleScope?void 0:a.extraStyleScope,this._$rootScope=null!==(o=i.classList._$rootScope)&&void 0!==o?o:this._$defaultScope}else this._$owner=null,this._$defaultScope=w.globalScope(),this._$extraScope=void 0,this._$rootScope=void 0;if(this._$alias=t,t){var s=Object.create(null);Object.keys(t).forEach((function(e){s[e]=null})),this._$resolvedAlias=s}else this._$resolvedAlias=null;3===e.getBackendMode()&&(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,o=null===(n=this._$owner)||void 0===n?void 0:n._$resolvedAlias;if(o&&void 0!==o[e]){var r=o[e];if(this._$hasResolvedNames=!0,r)for(var i=0;i<r.length;i+=1){var a=r[i];t(a.scopeId,a.className)}}else if("~"===e[0])t(this._$rootScope,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._$rootScope,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],o=[];n&&n.forEach((function(e){t._$resolvePrefixes(e,(function(e,t){o.push({scopeId:e,className:t})}))}));var r=!1,i=this._$resolvedAlias[e];if(i)if(i.length!==o.length)r=!0;else for(var a=0;a<i.length;a+=1){var s=i[a],l=o[a];if(s.scopeId!==l.scopeId||s.className!==l.className){r=!0;break}}else o.length>0&&(r=!0);return this._$resolvedAlias[e]=o,r},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(C)||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 o=n._$alias;if(o){var r=!1;if(Object.keys(o).forEach((function(e){n._$updateResolvedAliases(e)&&(r=!0)})),r){var i=t;!1===i._$external&&e(i.shadowRoot)}}n._$hasResolvedNames&&n._$updateResolvedNames()}t.childNodes.forEach((function(t){t instanceof re&&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,3===this._$elem.getBackendMode()?t.setAttribute("class",""):t.clearClasses(),this._$rawNames.forEach((function(n){e._$addClassToBackend(n,t)})))},e.prototype._$classListAdd=function(e,t,n){var o;if(3===this._$elem.getBackendMode()){var r=void 0===t?"":null===(o=this._$prefixManager)||void 0===o?void 0:o.queryName(t),i=r?"".concat(r,"--").concat(e):e;n.classList.add(i)}else n.addClass(e,t)},e.prototype._$classListRemove=function(e,t,n){var o;if(3===this._$elem.getBackendMode()){var r=t&&(null===(o=this._$prefixManager)||void 0===o?void 0:o.queryName(t)),i=r?"".concat(r,"--").concat(e):e;n.classList.remove(i)}else n.removeClass(e,t)},e.prototype._$addClassToBackend=function(e,t){var n=this;this._$resolvePrefixes(e,(function(e,o){n._$classListAdd(o,e,t)}))},e.prototype._$removeClassFromBackend=function(e,t){var n=this;this._$resolvePrefixes(e,(function(e,o){n._$classListRemove(o,e,t)}))},e.prototype.toggle=function(e,t){var n=this,o=String(e).match(C)||null;if(o){var r=this._$elem.getBackendElement();o.forEach((function(o){var i=n._$rawNames.indexOf(e),a=!1;if((void 0===t?i<0:t)?i<0&&(n._$rawNames.push(o),r&&n._$addClassToBackend(o,r),a=!0):i>=0&&(n._$rawNames.splice(i,1),r&&n._$removeClassFromBackend(o,r),a=!0),a){var s=n._$elem;s._$mutationObserverTarget&&ft.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((o=n.slice(1))===e)return!0}else if("^"===n[0]){for(var o=n.slice(1);"^"===o[0];)o=o.slice(1);if(o===e)return!0}else if(n===e)return!0}return!1},e.prototype.setClassNames=function(e,t){var n;void 0===t&&(t=0);for(var o=(null==e?"":String(e)).match(C)||[];this._$rawNamesSegmentSep.length<t;)this._$rawNamesSegmentSep.push(this._$rawNamesSegmentSep.length>0?this._$rawNamesSegmentSep[this._$rawNamesSegmentSep.length-1]:this._$rawNames.length);if(0===this._$rawNamesSegmentSep.length)this._$rawNames=o;else{for(var r=t<this._$rawNamesSegmentSep.length?this._$rawNamesSegmentSep[t]:this._$rawNames.length,i=t>0?this._$rawNamesSegmentSep[t-1]:0,a=r-i,s=o.length-a,l=t;l<this._$rawNamesSegmentSep.length;l+=1)this._$rawNamesSegmentSep[l]+=s;(n=this._$rawNames).splice.apply(n,function(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}([i,a],o,!1))}this._$updateResolvedNames();var c=this._$elem;c._$mutationObserverTarget&&ft.callAttrObservers(c,{type:"properties",target:c,attributeName:"class"})},e.prototype.getClassNames=function(){return this._$rawNames?this._$rawNames.join(" "):""},e}(),N=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},k=function(e){for(var t=e.str,n="";e.cur<t.length;){var o=t[e.cur];if(!(o>="0"&&o<="9"))break;n+=o,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 o=t[e.cur];if("\\"===o)e.cur+1===t.length||(n+=t[e.cur+1],e.cur+=1);else if(/^[_a-zA-Z]$/.test(o))n+=o;else{if(!(o>="0"&&o<="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+=o}e.cur+=1}return n},x=function(e){for(var t=e.str,n="";e.cur<t.length;){var o=t[e.cur];if("\\"===o)if(e.cur+1===t.length)n+="\\",e.cur+=1;else{var r=t[e.cur+1];"."===r||"["===r||"]"===r||"\\"===r?(n+=r,e.cur+=2):(n+="\\",e.cur+=1)}else{if("."===o||"["===o)break;n+=o,e.cur+=1}}return n},A=function(e){var t=e.str;if(N(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 o=[n];e.cur<t.length&&N(e);){var r=t[e.cur];if("."===r){if(e.cur+=1,N(e),"*"===t[e.cur]&&"*"===t[e.cur+1]){o.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)"));o.push(i)}else{if("["!==r)break;e.cur+=1,N(e);var a=k(e);if(N(e),"]"!==t[e.cur])throw new Error('data path descriptor "'.concat(t,'" is illegal at char ').concat(e.cur," (illegal index)"));e.cur+=1,o.push(a)}}return o},M=function(e){try{var t=function(e){for(var t=e.str,n=[];e.cur<t.length;){var o=t[e.cur];if("."===o)e.cur+=1,""!==(i=x(e))&&n.push(i);else if("["===o){e.cur+=1;var r=k(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(r)}else{var i=x(e);n.push(i)}}return 0===n.length&&n.push(""),n}({str:e,cur:0});return t}catch(e){return rt(e.message),null}},L=function(e){try{if(Array.isArray(e))return e.map((function(e){return A({str:e,cur:0})}));var t={str:e,cur:0},n=function(e){var t=[];for(t.push(A(e)),N(e);","===e.str[e.cur];)e.cur+=1,t.push(A(e)),N(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 rt(e.message),[]}},D=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 o=[];t.set(e,o);for(var r=0;r<e.length;r+=1)o[r]=D(e[r],t);return o}var i={};t.set(e,i);var a=Object.keys(e);for(r=0;r<a.length;r+=1){var s=a[r];i[s]=D(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 o={},r=Object.keys(e);for(n=0;n<r.length;n+=1){var i=r[n];o[i]=T(e[i])}return o}return"symbol"==typeof e?Symbol(e.description):e},I=function(e,t){return t?D(e,new WeakMap):T(e)},R=function(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},B=Object.prototype.hasOwnProperty;!function(e){e[e.None=0]="None",e[e.Simple=1]="Simple",e[e.SimpleWithRecursion=2]="SimpleWithRecursion"}(v||(v={}));var P,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 o=0;o<t.length;o+=1){for(var r=t[o],i=this.observerTree,a=!1,s=0;s<r.length;s+=1){var l=r[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}(),F=function(e,t,n,o){for(var r=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]}r[i]=s}ct("Data Observer",o,e.getMethodCaller(),r,e||void 0)},U=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 o=Object.keys(e.sub);for(n=0;n<o.length;n+=1){var r=o[n];U(e.sub[r],t)}},G=function(e,t,n){for(var o=e,r=!0,i=0;i<n.length;i+=1){var a=n[i];if(o.wildcard)for(var s=o.wildcard,l=0;l<s.length;l+=1)t[s[l]]=!0;if(!B.call(o.sub,a)){r=!1;break}o=o.sub[a]}r&&U(o,t)},W=function(e,t,n,o){for(var r=0;r<e.length;r+=1){var i=e[r],a=i.path,s=i.f;t[r]&&(t[r]=!1,n&&F(n,o,a,s))}},V=function(e){return e===qe.Simple?1:e===qe.SimpleWithRecursion?2:0},H=function(){function e(e,t,n,o,r,i,a){this._$modelBindingListener=null,this._$pendingChanges=[],this._$doingUpdates=null,this._$comp=e,this.data=t,this._$pureDataPattern=n,this._$dataDeepCopy=o,this._$propertyPassingDeepCopy=r,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 o={},r=Object.keys(e),i=0;i<r.length;i+=1){var a=r[i],s=e[a];t&&t.test(a)||(o[a]=0===n?s:2===n?I(s,!0):T(s))}return o}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,o){Array.isArray(o)?this._$pendingChanges.push([e,o,null!=t?t:-1,n||0]):rt('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?I(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,o;void 0===e&&(e=!1);var r,i,a=this._$propFields,s=this._$comp,l=this._$pureDataPattern,c=this._$dataDeepCopy,u=!!this._$doingUpdates;this._$observers.length>0?this._$doingUpdates?(r=this._$doingUpdates.combined,i=this._$doingUpdates.prop):(this._$doingUpdates={prop:[],combined:[],count:0},r=this._$doingUpdates.combined,i=this._$doingUpdates.prop):(r=[],i=[]);var d=this._$pendingChanges;this._$pendingChanges=[];for(var p=0;p<d.length;p+=1){var h=d[p],f=h[0],v=h[1],g=h[2],_=h[3],$=void 0!==_,m=String(f[0]),y=!!l&&l.test(m),b=!0;if((q=a[m])&&1===f.length){var S=this.data[m],C=void 0,w=void 0;if($){if(Array.isArray(S)){var E=h;C=g>=0&&g<S.length?g:S.length,E[2]=C,S.splice.apply(S,R([C,_],v,!1))}else rt('An array splice change cannot be applied to a non-array value (on path "'.concat(f.join("."),'"). The change is ignored.'));w=S}else w=Ce(v,m,q);if(!y&&this.innerData){var N=void 0;if(0===c)h[1]=N=w;else if(void 0!==C){N=this.innerData[m];var k=void 0;h[1]=k=2===c?I(v,!0):T(v),(t=N).splice.apply(t,R([C,_],k,!1))}else h[1]=N=2===c?I(w,!0):T(w);this.innerData[m]=N}if(this.data[m]=w,this._$reflectToAttributes){var O=s.getBackendElement();if(O){var x=w;if(q.reflectIdPrefix){var A=s.ownerShadowRoot;if(A){var M=A.getHostNode()._$idPrefix;M&&(x="".concat(M,"--").concat(w))}}var L=m.replace(/[A-Z]/g,(function(e){return"-".concat(e.toLowerCase())})),D=typeof x;"boolean"===D?w?O.setAttribute(L,""):O.removeAttribute(L):"object"===D?O.setAttribute(L,JSON.stringify(x)):O.setAttribute(L,x)}}b=q.comparer?!!ct("Property Comparer",q.comparer,s,[v,S],null==s?void 0:s.general()):S!==w,!y&&b&&i.push({propName:m,prop:q,oldValue:S,newValue:w,skipModelListener:e})}else{for(var P=this.data,j=m,F=1;F<f.length;F+=1){var U=f[F];Number.isFinite(U)?B.call(P,j)&&Array.isArray(P[j])||(P[j]=[]):B.call(P,j)&&null!==P[j]&&"object"==typeof P[j]&&!Array.isArray(P[j])||(P[j]={}),P=P[j],j=U}if(C=void 0,$?(S=P[j],Array.isArray(S)?(E=h,C=g>=0&&g<S.length?g:S.length,E[2]=C,S.splice.apply(S,R([C,_],v,!1))):rt('An array splice change cannot be applied to a non-array value (on path "'.concat(f.join("."),'"). The change is ignored.'))):P[j]=v,!y&&this.innerData){P=this.innerData,j=m;for(var V=1;V<f.length;V+=1)U=f[V],Number.isFinite(U)?B.call(P,j)&&Array.isArray(P[j])||(P[j]=[]):B.call(P,j)&&null!==P[j]&&"object"==typeof P[j]&&!Array.isArray(P[j])||(P[j]={}),P=P[j],j=U;N=void 0,0===c?h[1]=N=v:void 0!==C?(N=P[j],k=void 0,h[1]=k=2===c?I(v,!0):T(v),(n=N).splice.apply(n,R([C,_],k,!1))):h[1]=N=2===c?I(v,!0):T(v),P[j]=N}!y&&q&&i.push({propName:m,prop:q,oldValue:void 0,newValue:v,skipModelListener:e||!1})}G(this._$observerTree,this._$observerStatus,f),!y&&b&&r.push(h),this._$doingUpdates&&(this._$doingUpdates.count+=1)}if(!u){if(this._$doingUpdates){var H=void 0;do{H=this._$doingUpdates.count,W(this._$observers,this._$observerStatus,s,this.data)}while(H!==this._$doingUpdates.count);this._$doingUpdates=null}if(null===(o=this._$updateListener)||void 0===o||o.call(this,this.innerData||this.data,r),s)for(p=0;p<i.length;p+=1){var z=i[p],q=(m=z.propName,z.prop),X=z.oldValue,K=z.newValue;if(!z.skipModelListener&&this._$modelBindingListener){var Y=this._$modelBindingListener[m];Y&&Y(K)}q.observer&&ct("Property Observer",q.observer,s.getMethodCaller(),[K,X],s),s._$mutationObserverTarget&&ft.callAttrObservers(s,{type:"properties",target:s,propertyName:m})}}},e}();!function(e){e[e.Normal=0]="Normal",e[e.NoDefault=1]="NoDefault"}(P||(P={}));var z,q,X=Date.now(),K=X;!function(e){e[e.None=0]="None",e[e.Mut=1]="Mut",e[e.Final=2]="Final"}(z||(z={})),function(e){e[e.NotChanged=0]="NotChanged",e[e.Failed=1]="Failed",e[e.None=2]="None",e[e.Final=3]="Final",e[e.Mut=4]="Mut"}(q||(q={}));var Y,Z=function(){function e(){this.listeners=Object.create(null),this.captureListeners=null}return e.prototype.addListener=function(e,t,n){void 0===n&&(n={});var o,r,i,a=n.final?2:n.mutated?1:0;return n.capture||n.useCapture?this.captureListeners?o=this.captureListeners:(o=Object.create(null),this.captureListeners=o):o=this.listeners,o[e]?(i=!0,r=o[e]):(i=!1,r=o[e]={mutCount:0,finalCount:0,funcArr:new lt}),r.funcArr.add(t,a),2===a?(r.finalCount+=1,i&&1!==r.finalCount?0:3):1===a?(r.mutCount+=1,!i||1===r.mutCount&&0===r.finalCount?4:0):i?0:2},e.prototype.removeListener=function(e,t,n){void 0===n&&(n={});var o=n.capture||n.useCapture?this.captureListeners:this.listeners;if(!o)return 1;var r=o[e];if(!r)return 1;var i=r.funcArr.remove(t);return null===i?1:2===i?(r.finalCount-=1,0!==r.finalCount?0:r.mutCount>0?4:2):1===i?(r.mutCount-=1,0!==r.mutCount||0!==r.finalCount?0:2):0},e}(),Q=function(){function e(e,t,n){void 0===n&&(n={});var o=function(){var e=Date.now();return e<K&&(X+=e-K),K=e,e-X}();this.type=e,this.timeStamp=o,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 o=Object.create(this);return o.target=e,o.mark=t,o.currentTarget=n,o},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.callListener=function(e,t,n,o){var r=this.type,i=e._$eventTarget;if(i){var a=o?i.captureListeners:i.listeners;if(a){var s=a[r];if(s){var l=this.mutatedMarked(),c=n instanceof $e&&n.getMethodCaller()||n,u=e instanceof $e&&e.getMethodCaller()||e,d=this.wrapShadowedEvent(c,t,u);!1===s.funcArr.call(u,[d],(function(e){return!l||1!==e}),n instanceof $e?n:void 0)||s.finalCount>0?(d.stopPropagation(),d.preventDefault()):s.mutCount>0&&d.markMutated()}}}},e.prototype.dispatch=function(e,t){var n=this;if(this._$dispatched)throw new Error("Event cannot be dispatched twice");this._$dispatched=!0;var o=this.composed,r=this.bubbles,i=t&&!o,a=this._$eventBubblingControl,s=function(e,t){for(var n=function(e){for(var r=e,i=e.collectMarks();;){if(!1===t(r,e,i))return null;var a=void 0;if(o){if(r instanceof St)return r.getHostNode();if(null===r.containingSlot)return null;if(r.containingSlot)a=n(r.containingSlot);else for(a=r.parentNode;null==a?void 0:a._$inheritSlots;)a=a.parentNode}else a=r.parentNode;if(!a)return null;r=a}},r=e;;){var i=n(r);if(!i)break;r=i}};if(this._$capturePhase&&!a.stopped&&!i){var l=[];s(e,(function(e,t,n){l.push([e,t,n])}));for(var c=l.length-1;c>=0;c-=1){var u=l[c],d=u[0],p=u[1],h=u[2];if(d._$eventTarget&&(this.callListener(d,h,p,!0),a.stopped))break}}if(!a.stopped&&t&&e instanceof $e&&e._$external&&e.shadowRoot.handleEvent(t,this),!a.stopped&&!i){var f=!0;s(e,(function(e,t,o){if(!f&&e instanceof $e&&e._$external){var i=e.shadowRoot;i.handleEvent(i.slot,n)}return f=!1,e._$eventTarget&&n.callListener(e,o,t,!1),r&&!a.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,o,r){var i=new e(n,o,r);e.dispatchEvent(t,i)},e.triggerExternalEvent=function(t,n,o,r,i){var a=new e(o,r,i);e.dispatchExternalEvent(t,n,a)},e}();!function(e){e[e.Child=0]="Child",e[e.Descendant=1]="Descendant",e[e.CrossShadowDescendant=2]="CrossShadowDescendant"}(Y||(Y={}));var J,ee=function(e){var t;return null===(t=e.ownerShadowRoot)||void 0===t?void 0:t.getHostNode().getRootBehavior().ownerSpace},te=function(){function e(t){this.unions=[];for(var n=String(t||"").split(","),o=0;o<n.length;o+=1){for(var r=n[o].split(/( |\t|>+)/g),i=[],a=1,s=0;s<r.length;s+=1){var l=r[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===r.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 o=n[1].slice(1),r=n[2].split(".");return r.shift(),o||r.length?{id:o,classes:r,relation:t}:null},e.prototype.isEmpty=function(){return 0===this.unions.length},e._$testSelectorSegment=function(t,n,o,r,i,a){var s;if(o===t)return!1;var l=r[i],c=!0;(ee(o)!==n||l.id&&l.id!==o.id)&&(c=!1);for(var u=l.classes,d=0;c&&d<u.length;d+=1)(null===(s=o.classList)||void 0===s?void 0:s.contains(u[d]))||(c=!1);if(!c&&0===a)return!1;var p=o;if(c&&0===i){if(null===t)return!0;for(p=p.parentNode;p;p=p.parentNode)if(p===t)return!0;if(2!==a)return!1;p=o,c=!1}var h=c?l.relation:a;do{p.parentNode?p=p.parentNode:2===h?p=p instanceof St?p.getHostNode():null:2===a?(c=!1,p=p instanceof St?p.getHostNode():null):p=null,p===t&&(p=null)}while(p instanceof se);if(!p)return!1;if(c){if(e._$testSelectorSegment(t,n,p,r,i-1,h))return!0;if(2!==a)return!1}return e._$testSelectorSegment(t,n,p,r,i,a)},e.prototype.testSelector=function(t,n){if(n instanceof se)return!1;var o,r=this.unions;if(void 0===(o=null!==t&&ee(t)||ee(n)))return!1;for(var i=0;i<r.length;i+=1){var a=r[i];if(e._$testSelectorSegment(t,o,n,a,a.length-1,0))return!0}return!1},e.prototype.query=function(e,t){var n=this,o=[],r=function(e,t,i){if(n.testSelector(e,t)){if(i)return t;o.push(t)}if(t instanceof $e){var a=t.getShadowRoot();if(a){var s=r(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 re){var d=r(e,u,i);if(d&&i)return d}}return null},i=r(e,e,t);return t?i:o},e}(),ne=function(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))};!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"}(J||(J={}));var oe,re=function(){function e(){throw new Error("Element cannot be constructed directly")}return e.prototype._$initialize=function(e,t,n,o){this._$backendElement=t,this._$destroyOnDetach=!1,this._$nodeTreeContext=o,this._$nodeId="",this._$nodeAttributes=null,this._$nodeSlot="",this._$slotName=null,this._$slotElement=null,this._$slotValues=null,this._$subtreeSlotStart=null,this._$subtreeSlotEnd=null,this._$inheritSlots=!1,this._$placeholderHandler=void 0,this._$virtual=e,this.dataset={},this._$marks=null,this._$attached=!1,this.classList=null,this._$styleSegments=[],this.parentNode=null,this.parentIndex=-1,this.childNodes=[],this.slotNodes=void 0,this.ownerShadowRoot=n,this._$mutationObserverTarget=null,this._$eventTarget=new Z},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,o=String(e);if(this._$nodeId!==o){if(this._$nodeId=o,this.ownerShadowRoot){var r=this.ownerShadowRoot.getHostNode();if(this.ownerShadowRoot._$markIdCacheDirty(),r.getComponentOptions().writeIdToDOM){var i=r._$idPrefix,a=i?"".concat(i,"--").concat(o):o;if(3===this.getBackendMode()){var s=this._$backendElement;s&&(s.id=a)}else null===(t=this._$backendElement)||void 0===t||t.setId(a)}}tt.writeExtraInfoToAttr&&(null===(n=this._$backendElement)||void 0===n||n.setAttribute("exparser:info-attr-id",o)),this._$mutationObserverTarget&&ft.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);if(this._$nodeSlot!==n)if(this._$inheritSlots)rt('slots-inherited nodes do not support "slot" attribute.');else{this._$nodeSlot=n;var o=e._$getParentHostShadowRoot(this.parentNode);if(o){var r=o.getSlotMode();if(3===r)return void rt("nodes inside dynamic slots should change binding slots through Element#setSlotElement.");if(0===r)return void rt("nodes inside direct slots should not change slot name.");var i=St._$updateSubtreeSlotNodes(this.parentNode,[this],o,o,this.parentIndex);null==i||i.removeSlotNodes();var a=this.containingSlot;null==i||i.updateContainingSlot();var s=this.containingSlot;e.insertChildReassign(this.parentNode,this,a,s,this.parentIndex+1),null==i||i.insertSlotNodes()}this._$mutationObserverTarget&&ft.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],o=t[1];e.push({name:n,value:o})})),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 $t?this:null},e.prototype.asVirtualNode=function(){return this instanceof se?this:null},e.prototype.asInstanceOf=function(e){return this instanceof $e?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&&(3!==this.getBackendMode()&&this._$backendElement.release(),this._$backendElement=null)},e.prototype.destroyBackendElementOnDetach=function(){this._$destroyOnDetach=!0},e.prototype.cancelDestroyBackendElementOnDetach=function(){this._$destroyOnDetach=!1},e.prototype.isVirtual=function(){return this._$virtual},e.prototype.setNodeClass=function(e,t){var n;void 0===t&&(t=0),null===(n=this.classList)||void 0===n||n.setClassNames(e,t)},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&&(3===this.getBackendMode()?this._$backendElement.setAttribute("style",n):this._$backendElement.setStyle(n)),this._$mutationObserverTarget&&ft.callAttrObservers(this,{type:"properties",target:this,attributeName:"style"})}},e.checkAndCallAttached=function(t){!function t(n){if(n instanceof e&&!n._$attached){if(n._$attached=!0,n instanceof $e){n.triggerLifetime("attached",[]),n._$relation&&(n._$relation.triggerLinkEvent(2,!1),n._$relation.triggerLinkEvent(4,!1),n._$relation.triggerLinkEvent(0,!1)),n._$mutationObserverTarget&&ft.callAttachObservers(n,{type:"attachStatus",target:n,status:"attached"});var o=n.getShadowRoot();o&&t(o)}for(var r=n.childNodes,i=0;i<r.length;i+=1)t(r[i])}}(t)},e.checkAndCallDetached=function(t){!function t(n){if(n._$destroyOnDetach&&n.destroyBackendElement(),n instanceof e&&n._$attached)if(n instanceof $e&&n.triggerLifetime("beforeDetach",[]),n.childNodes.forEach(t),n instanceof $e){var o=n._$placeholderHandler;o&&o();var r=n.getShadowRoot();r&&t(r),n._$attached=!1,n.triggerLifetime("detached",[]),n._$relation&&(n._$relation.triggerLinkEvent(2,!0),n._$relation.triggerLinkEvent(4,!0),n._$relation.triggerLinkEvent(0,!0)),n._$mutationObserverTarget&&ft.callAttachObservers(n,{type:"attachStatus",target:n,status:"detached"})}else n._$attached=!1}(t)},e.checkAndCallMoved=function(t){!function t(n){if(n instanceof e&&n._$attached&&(n.childNodes.forEach(t),n instanceof $e)){var o=n.getShadowRoot();o&&t(o),n.triggerLifetime("moved",[]),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 o,r=e._$mutationObserverTarget;if(r&&(!(null===(o=r.childObservers)||void 0===o?void 0:o.empty)||r.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},ft.callChildObservers(e,i)}},e.hasSubtreeMutationObservers=function(e){var t;return(null===(t=e._$mutationObserverTarget)||void 0===t?void 0:t.hasSubtreeListeners())||!1},e._$insertChildReassignSlot=function(t,n,o,r){if(o)if(r)for(i=ne([],o.slotNodes,!0),a=0;a<i.length;a+=1)s=i[a],e._$spliceSlotNodes(o,0,1,void 0),e._$spliceSlotNodes(r,-1,0,[s]),e._$updateContainingSlot(s,r),s._$inheritSlots||e.insertChildReassign(s.parentNode,s,o,r,s.parentIndex);else for(var i=ne([],o.slotNodes,!0),a=0;a<i.length;a+=1){var s=i[a];e._$spliceSlotNodes(o,0,1,void 0),e._$updateContainingSlot(s,r),s._$inheritSlots||e.insertChildReassign(s.parentNode,s,o,null,s.parentIndex)}else{var l=[];t.forEachNodeInSpecifiedSlot(null,(function(t){null!==n&&(t instanceof e?t._$nodeSlot:"")!==n||l.push(t)}));for(a=0;a<l.length;a+=1){s=l[a];e._$spliceSlotNodes(r,-1,0,[s]),e._$updateContainingSlot(s,r),s._$inheritSlots||e.insertChildReassign(s.parentNode,s,null,r,s.parentIndex)}}},e.insertChildReassign=function(t,n,o,r,i){if(1!==t.getBackendMode()){if(o)if(r&&3===t.getBackendMode());else{var a=e.findNearestNonVirtual(o);if(a){var s=e.countNonVirtual(n);if(s){var l=s[0],c=s[1];if(3===t.getBackendContext().mode){for(var u=l._$backendElement,d=1;d<c;d+=1){var p=u.nextSibling;p&&a.removeChild(p)}c>0&&a.removeChild(u)}else a.spliceRemove(l._$backendElement,c)}}}r&&e.insertChildComposed(t,n,void 0,!1,i)}else n._$backendElement.reassignContainingSlot(o?o._$backendElement:null,r?r._$backendElement:null)},e.findNearestNonVirtual=function(e){for(var t=e;null==t?void 0:t._$virtual;)t=t instanceof St?t.getHostNode():void 0===t.containingSlot?t.parentNode:t.containingSlot;return t?t._$backendElement:null},e.countNonVirtual=function(t){var n,o=null,r=0,i=function(e){0===r&&(o=e),r+=1};return(n=t)instanceof e&&n._$virtual?n.forEachNonVirtualComposedChild(i):i(n),o?[o,r]:null},e.forEachNodeInSlot=function(e,t){var n=function(e){if(!1===t(e,e.containingSlot))return!1;if(e._$inheritSlots){for(var o=e.childNodes,r=0;r<o.length;r+=1)if(!n(o[r]))return!1;return!0}return!0};return n(e)},e.forEachNodeInSpecificSlot=function(e,t,n){var o=function(e){if(e.containingSlot===t&&!1===n(e))return!1;if(e._$inheritSlots){for(var r=e.childNodes,i=0;i<r.length;i+=1)if(!o(r[i]))return!1;return!0}return!0};return o(e)},e.forEachSlotContentInSlot=function(e,t){var n=function(e){if(e._$inheritSlots){for(var o=e.childNodes,r=0;r<o.length;r+=1)if(!n(o[r]))return!1;return!0}return!1!==t(e,e.containingSlot)};return n(e)},e.forEachSlotContentInSpecificSlot=function(e,t,n){var o=function(e){if(e._$inheritSlots){for(var r=e.childNodes,i=0;i<r.length;i+=1)if(!o(r[i]))return!1;return!0}return e.containingSlot!==t||!1!==n(e)};return o(e)},e._$findFirstNonVirtualChild=function(t,n){var o=null!==t._$slotName,r=o?t.slotNodes:t.childNodes;if(n>=0&&n<r.length)for(var i=function(e){var t=null,n=function(e){return t=e,!1},i=function(e){if(!o&&e._$inheritSlots)for(var t=e.childNodes,r=0;r<t.length;r+=1)if(!1===i(t[r]))return!1;return e._$virtual?e.forEachNonVirtualComposedChild(n):n(e)};if(i(r[e]),t)return{value:t}},a=n;a<r.length;a+=1){var s=i(a);if("object"==typeof s)return s.value}if(!t._$virtual)return null;var l=t.containingSlot;if(null===l)return null;if(void 0!==l)return e._$findFirstNonVirtualChild(l,t.slotIndex+1);var c=t;if(t instanceof St&&!(c=t.getHostNode())._$virtual)return null;var u=c.parentNode;return u?e._$findFirstNonVirtualChild(u,c.parentIndex+1):null},e._$findFirstNonVirtualSibling=function(t,n){var o=t.containingSlot;if(null===o)return null;if(void 0!==o){if(!o._$virtual)return null;if(void 0!==t.slotIndex)return e._$findFirstNonVirtualChild(o,t.slotIndex+1);var r=e._$findSlotNodeInsertPosition(o,t,n);return e._$findFirstNonVirtualChild(o,r)}var i=t;if(t instanceof St&&!(i=t.getHostNode())._$virtual)return null;var a=i.parentNode;return a?e._$findFirstNonVirtualChild(a,n):null},e.insertChildComposed=function(t,n,o,r,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,p=u,h=p._$nodeTreeContext;p instanceof $e?p._$external?d=p.shadowRoot.slot:c=!0:(p._$virtual&&(c=!0),d=e.findNearestNonVirtual(p));var f=null,v=function(a,s){var l=a||(s?e.findNearestNonVirtual(s):null);if(3===t.getBackendMode()||l){var u=0,d=null,p=null,v=null;if(n){var g=f||(3===h.mode?h.document.createDocumentFragment():h.createFragment());f=g;var _=function(e){g.appendChild(e._$backendElement),p=g};e.forEachNodeInSpecificSlot(n,s,(function(e){v||(v=e),e._$virtual?e.forEachNonVirtualComposedChild(_):_(e)}))}if(3!==t.getBackendMode()||l){if((o||c)&&(r&&o?(e.forEachSlotContentInSpecificSlot(o,s,(function(t){if(t instanceof e){var n=e.countNonVirtual(t);n&&(d||(d=n[0]),u+=n[1])}else d||(d=t),u+=1;return!0})),0===u&&p&&v&&(d=e._$findFirstNonVirtualSibling(void 0===s?n:v,i+1))):p&&v&&(d=e._$findFirstNonVirtualSibling(void 0===s?n:v,i))),p)if(d)if(3===h.mode){var $=d._$backendElement;l.insertBefore(p,$);for(var m=1;m<u;m+=1)(y=$.nextSibling)&&l.removeChild(y);u>0&&l.removeChild($)}else l.spliceBefore(d._$backendElement,u,p);else 3===h.mode?l.appendChild(p):l.spliceAppend(p);else if(u>0)if(3===h.mode){for($=d._$backendElement,m=1;m<u;m+=1){var y;(y=$.nextSibling)&&l.removeChild(y)}u>0&&l.removeChild($)}else l.spliceRemove(d._$backendElement,u)}else f=null}};if(void 0!==d)null===d||(c||n instanceof e&&n._$virtual||o instanceof e&&o._$virtual?v(d,void 0):r?n?d.replaceChild(n._$backendElement,o._$backendElement):d.removeChild(o._$backendElement):o?d.insertBefore(n._$backendElement,o._$backendElement):d.appendChild(n._$backendElement));else if(n&&n._$inheritSlots||r&&o&&o._$inheritSlots){var g=new Set;r&&o&&e.forEachSlotContentInSlot(o,(function(e,t){g.add(t)})),n&&e.forEachSlotContentInSlot(n,(function(e,t){g.add(t)})),g.forEach((function(e){return v(null,e)}))}else n&&v(null,n.containingSlot),!r||!o||n&&o.containingSlot===n.containingSlot||v(null,o.containingSlot);3!==h.mode&&f&&f.release(),tt.writeExtraInfoToAttr&&(r&&o instanceof e&&(null===(a=o._$backendElement)||void 0===a||a.removeAttribute("exparser:info-in-slot-of")),n instanceof e&&(t instanceof $e?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._$updateSubtreeSlotsInsertion=function(e,t,n,o,r){if(t&&n){var i=e,a=null,s=null,l=function(e,t){if(e._$subtreeSlotStart){for(var n=e.childNodes,o=t+1,r=n[o];r&&!r._$subtreeSlotStart;)r=n[o+=1];r?(s=r._$subtreeSlotStart,a=s.prev):(a=e._$subtreeSlotEnd)&&(s=a.next)}else{for(var i=e,c=e.parentNode;c&&!c._$subtreeSlotStart;)i=c,c=c.parentNode;c&&l(c,i.parentIndex)}};for(l(i,o),a&&(a.next=t,t.prev=a),s&&(s.prev=n,n.next=s);i;){var c=!1;if(i._$subtreeSlotStart?i._$subtreeSlotStart===s?(i._$subtreeSlotStart=t,c=!0):i._$subtreeSlotEnd===a&&(i._$subtreeSlotEnd=n,c=!0):(i._$subtreeSlotStart=t,i._$subtreeSlotEnd=n,c=!0),!c||!i.parentNode)break;i=i.parentNode}var u=i.ownerShadowRoot;(null==u?void 0:u.isConnected(i))&&u._$applySlotsInsertion(t,n,r)}},e._$updateSubtreeSlotsRemoval=function(e,t,n,o){if(t&&n){var r=e,i=t.prev,a=n.next;for(i&&(i.next=a,t.prev=null),a&&(a.prev=i,n.next=null);r;){var s=!1;if(r._$subtreeSlotStart===t&&r._$subtreeSlotEnd===n&&(r._$subtreeSlotStart=r._$subtreeSlotEnd=null,s=!0),r._$subtreeSlotStart===t?(r._$subtreeSlotStart=a,s=!0):r._$subtreeSlotEnd===n&&(r._$subtreeSlotEnd=i,s=!0),!s||!r.parentNode)break;r=r.parentNode}var l=r.ownerShadowRoot;(null==l?void 0:l.isConnected(r))&&l._$applySlotsRemoval(t,n,o)}},e._$updateSubtreeSlotsReplacement=function(t,n,o,r,i,a,s){if(n&&o)if(r&&i){var l=t,c=r.prev,u=i.next;for(c&&(c.next=n,n.prev=c,r.prev=null),u&&(u.prev=o,o.next=u,i.next=null);l;){var d=!1;if(l._$subtreeSlotStart===r&&(l._$subtreeSlotStart=n,d=!0),l._$subtreeSlotEnd===i&&(l._$subtreeSlotEnd=o,d=!0),!d||!l.parentNode)break;l=l.parentNode}var p=l.ownerShadowRoot;(null==p?void 0:p.isConnected(l))&&(p._$applySlotsRemoval(r,i,!1),p._$applySlotsInsertion(n,o,s))}else e._$updateSubtreeSlotsInsertion(t,n,o,a,s);else e._$updateSubtreeSlotsRemoval(t,r,i,s)},e.insertChildSingleOperation=function(t,n,o,r){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=o,p=d>=0?t.childNodes[d]:void 0;if((u=!!r&&!!p&&n!==p)||n){var h;if(n){if(h=n.parentNode){var f=h.childNodes,v=n.parentIndex;f.splice(v,1);for(var g=v;g<f.length;g+=1)f[g].parentIndex=g;n.parentIndex=-1,h===t&&v<d&&(d-=1);var _=St._$updateSubtreeSlotNodes(t,[n],null,e._$getParentHostShadowRoot(h),d);null==_||_.removeSlotNodes(),3===t.getBackendMode()||(1===t.getBackendMode()?null===(i=h._$backendElement)||void 0===i||i.removeChild(n._$backendElement,v):e.insertChildComposed(h,null,n,!0,v)),null==_||_.updateContainingSlot()}n.parentNode=t,n instanceof e&&h!==t&&(h&&(null===(a=h._$mutationObserverTarget)||void 0===a||a.detachChild(n)),null===(s=t._$mutationObserverTarget)||void 0===s||s.attachChild(n))}else h=null;var $=e._$getParentHostShadowRoot(t),m=n?St._$updateSubtreeSlotNodes(t,[n],$,null,d):null,y=p&&u?St._$updateSubtreeSlotNodes(t,[p],null,$,d):null;null==m||m.updateContainingSlot(),null==y||y.removeSlotNodes(),1===t.getBackendMode()?t._$backendElement&&(u?n?t._$backendElement.replaceChild(n._$backendElement,p._$backendElement,d):t._$backendElement.removeChild(p._$backendElement,d):p?t._$backendElement.insertBefore(n._$backendElement,p._$backendElement,d):t._$backendElement.appendChild(n._$backendElement)):e.insertChildComposed(t,n,p,u,d),null==m||m.insertSlotNodes(),null==y||y.updateContainingSlot(),u&&p&&(p instanceof e&&(null===(l=t._$mutationObserverTarget)||void 0===l||l.detachChild(p)),p.parentNode=null,p.parentIndex=-1);var b=t.childNodes;if(n)if(d<0)b.push(n),n.parentIndex=b.length-1;else if(u)b[d]=n,n.parentIndex=d;else for(b.splice(d,0,n),g=d;g<b.length;g+=1)b[g].parentIndex=g;else if(u)for(b.splice(d,1),g=d;g<b.length;g+=1)b[g].parentIndex=g;var S=n?n._$subtreeSlotStart:null,C=n?n._$subtreeSlotEnd:null,w=p?p._$subtreeSlotStart:null,E=p?p._$subtreeSlotEnd:null;n?(h&&e._$updateSubtreeSlotsRemoval(h,S,C,!0),u?e._$updateSubtreeSlotsReplacement(t,S,C,w,E,d,!!h):e._$updateSubtreeSlotsInsertion(t,S,C,d,!!h)):u&&p&&e._$updateSubtreeSlotsRemoval(t,w,E,!1),null===(c=t.ownerShadowRoot)||void 0===c||c._$markIdCacheDirty(),u&&(e.checkAndCallDetached(p),e.checkChildObservers(t,"remove",p)),n&&((null==h?void 0:h._$attached)?t._$attached?e.checkAndCallMoved(n):e.checkAndCallDetached(n):t._$attached&&e.checkAndCallAttached(n),h===t?e.checkChildObservers(t,"move",n):(h&&e.checkChildObservers(h,"remove",n),e.checkChildObservers(t,"add",n)))}},e.insertChildBatchRemoval=function(t,n,o){for(var r,i,a=t.childNodes[n],s=t;null==s?void 0:s._$inheritSlots;)s=s.parentNode;for(var l=s instanceof $e&&!s._$external?s.shadowRoot:null,c=t.childNodes,u=c.splice(n,o),d=n;d<c.length;d+=1)c[d].parentIndex=d;var p=St._$updateSubtreeSlotNodes(t,u,null,l,n);if(null==p||p.removeSlotNodes(),1===t.getBackendMode())t._$backendElement&&t._$backendElement.spliceRemove(a._$backendElement,o);else for(d=o-1;d>=0;d-=1)e.insertChildComposed(t,null,u[d],!0,d);for(d=0;d<o;d+=1){var h=u[d];h.parentNode=null,h.parentIndex=-1,h instanceof e&&(null===(r=t._$mutationObserverTarget)||void 0===r||r.detachChild(h))}null==p||p.updateContainingSlot();var f=null,v=null;for(d=0;d<o;d+=1){var g=u[d];f||(f=g._$subtreeSlotStart),g._$subtreeSlotEnd&&(v=g._$subtreeSlotEnd)}for(e._$updateSubtreeSlotsRemoval(t,f,v,!1),null===(i=t.ownerShadowRoot)||void 0===i||i._$markIdCacheDirty(),d=0;d<o;d+=1){var _=u[d];e.checkAndCallDetached(_),e.checkChildObservers(t,"remove",_)}},e.insertChildBatchInsertion=function(t,n,o){for(var r,i,a=o>=0?t.childNodes[o]:void 0,s=t;null==s?void 0:s._$inheritSlots;)s=s.parentNode;var l,c=s instanceof $e&&!s._$external?s.shadowRoot:null;l=1===t.getBackendMode()&&n.length>=5?t.getBackendContext().createFragment():null;for(var u=0;u<n.length;u+=1){var d=n[u];if(t.ownerShadowRoot!==d.ownerShadowRoot)throw new Error("Cannot move the node from one shadow tree to another shadow tree.");if(d.parentNode)throw new Error("Cannot batch-insert the node which already has a parent.");if(d.parentNode=t,d instanceof e&&(null===(r=t._$mutationObserverTarget)||void 0===r||r.attachChild(d)),1===t.getBackendMode()&&l){var p=d._$backendElement;l.appendChild(p)}}var h=St._$updateSubtreeSlotNodes(t,n,c,null,o);if(null==h||h.updateContainingSlot(),1===t.getBackendMode()){if(t._$backendElement)if(l)a?t._$backendElement.spliceBefore(a._$backendElement,0,l):t._$backendElement.spliceAppend(l),l.release();else if(a)for(u=0;u<n.length;u+=1)d=n[u],t._$backendElement.insertBefore(d._$backendElement,a._$backendElement);else for(u=0;u<n.length;u+=1)d=n[u],t._$backendElement.appendChild(d._$backendElement)}else{var f=o>=0?o:t.childNodes.length;for(u=0;u<n.length;u+=1)d=n[u],e.insertChildComposed(t,d,a,!1,f)}null==h||h.insertSlotNodes();var v=t.childNodes;if(a)for(v.splice.apply(v,ne([o,0],n,!1)),u=o;u<v.length;u+=1)v[u].parentIndex=u;else for(v.push.apply(v,n),u=v.length-n.length;u<v.length;u+=1)v[u].parentIndex=u;var g=null,_=null;for(u=0;u<n.length;u+=1){var $=(d=n[u])._$subtreeSlotStart,m=d._$subtreeSlotEnd;$&&(_?($.prev=_,_.next=$,_=m):(g=$,_=m))}for(e._$updateSubtreeSlotsInsertion(t,g,_,o+n.length-1,!1),null===(i=t.ownerShadowRoot)||void 0===i||i._$markIdCacheDirty(),u=0;u<n.length;u+=1)d=n[u],t._$attached&&e.checkAndCallAttached(d),e.checkChildObservers(t,"add",d)},e.insertChildPlaceholderReplace=function(t,n,o){var r,i,a,s,l,c,u,d;if(o&&t.ownerShadowRoot!==o.ownerShadowRoot)throw new Error("Cannot move the node from one shadow tree to another shadow tree.");if(o.parentNode)throw new Error("Cannot replace with the node which already has a parent.");var p=t.childNodes[n];if(!(p instanceof e))throw new Error("Cannot replace on text nodes.");if(null!==p._$slotName||null!==o._$slotName)throw new Error("Cannot replace on slot nodes.");if(p!==o){var h;h=1===t.getBackendMode()?t.getBackendContext().createFragment():null;var f=p.childNodes;1===t.getBackendMode()&&f.length>0&&(null===(i=p._$backendElement)||void 0===i||i.spliceRemove(f[0]._$backendElement,f.length));for(var v=0;v<f.length;v+=1){var g=f[v];if(3===t.getBackendMode());else if(1===t.getBackendMode()){var _=g._$backendElement;h.appendChild(_)}else e.insertChildComposed(p,null,g,!0,v);g.parentNode=o,g instanceof e&&(null===(a=p._$mutationObserverTarget)||void 0===a||a.detachChild(g),null===(s=t._$mutationObserverTarget)||void 0===s||s.attachChild(g))}p.parentNode=null,p.parentIndex=-1,o.parentNode=t;var $=p.containingSlot;void 0!==$&&(e._$updateContainingSlot(p,void 0),e._$updateContainingSlot(o,$));var m=f.length?St._$updateSubtreeSlotNodes(o,f,e._$getParentHostShadowRoot(o),e._$getParentHostShadowRoot(p),0):null;if(null==m||m.updateContainingSlot(),null==m||m.removeSlotNodes(),t.childNodes[n]=o,o.parentIndex=n,1===t.getBackendMode())t._$backendElement&&(t._$backendElement.replaceChild(o._$backendElement,p._$backendElement,n),null===(l=o._$backendElement)||void 0===l||l.spliceAppend(h)),h.release();else for(p.isVirtual()?e.insertChildComposed(t,o,void 0,!1,n):e.insertChildComposed(t,o,p,!0,n),v=0;v<f.length;v+=1)g=f[v],e.insertChildComposed(o,g,void 0,!1,v);for(null==m||m.insertSlotNodes(),o._$subtreeSlotStart=p._$subtreeSlotStart,o._$subtreeSlotEnd=p._$subtreeSlotEnd,null===(c=t._$mutationObserverTarget)||void 0===c||c.detachChild(p),null===(u=t._$mutationObserverTarget)||void 0===u||u.attachChild(o),(r=o.childNodes).push.apply(r,p.childNodes),v=o.childNodes.length-p.childNodes.length;v<o.childNodes.length;v+=1)o.childNodes[v].parentIndex=v;if(p.childNodes=[],null===(d=t.ownerShadowRoot)||void 0===d||d._$markIdCacheDirty(),t._$attached)for(e.checkAndCallDetached(p),e.checkChildObservers(t,"remove",p),e.checkAndCallAttached(o),e.checkChildObservers(t,"add",o),v=0;v<f.length;v+=1)g=f[v],e.checkAndCallMoved(g),e.checkChildObservers(t,"move",g)}},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 o=n?n.parentIndex:-1;e.insertChildSingleOperation(this,t,o,!1)},e.prototype.removeChildAt=function(t){e.insertChildSingleOperation(this,null,t,!0)},e.prototype.removeChild=function(t){var n=t.parentIndex;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 o=n.parentIndex;e.insertChildSingleOperation(this,t,o,!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.insertChildPlaceholderReplace(n,this.parentIndex,t)},e._$generateIdMap=function(t){var n=Object.create(null);return function t(o){if(o instanceof e){var r=o._$nodeId;r&&(n[r]||(n[r]=o)),o.childNodes.forEach(t)}}(t),n},e.prototype.triggerEvent=function(e,t,n){Q.triggerEvent(this,e,t,n)},e.prototype.dispatchEvent=function(e){Q.dispatchEvent(this,e)},e.prototype._$setListenerStats=function(e,t,n){if(void 0===n&&(n={}),this._$backendElement){var o,r=!!n.capture||!!n.useCapture;switch(t){case 2:o=0;break;case 4:o=1;break;case 3:o=2;break;default:return}3===this.getBackendMode()?this._$nodeTreeContext.setListenerStats(this._$backendElement,e,r,o):this._$backendElement.setListenerStats(e,r,o)}},e.prototype.addListener=function(e,t,n){var o=this._$eventTarget.addListener(e,t,n);this._$setListenerStats(e,o,n),this instanceof $e&&this._$definition._$options.listenerChangeLifetimes&&this.triggerLifetime("listenerChange",[!0,e,t,n])},e.prototype.removeListener=function(e,t,n){var o=this._$eventTarget.removeListener(e,t,n);1!==o&&(this._$setListenerStats(e,o,n),this instanceof $e&&this._$definition._$options.listenerChangeLifetimes&&this.triggerLifetime("listenerChange",[!1,e,t,n]))},e.prototype.getAttribute=function(e){return this._$nodeAttributes?this._$nodeAttributes[e]:null},e.prototype.updateAttribute=function(e,t){3===this.getBackendMode()?"boolean"==typeof t?!0===t?this.setAttribute(e,""):this.removeAttribute(e):this.setAttribute(e,null==t?"":String(t)):void 0===t?this.removeAttribute(e):this.setAttribute(e,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.setDataset=function(e,t){this.dataset[e]=t,1===this.getBackendMode()&&this._$backendElement.setDataset(e,t)},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,o){if(t._$attached)throw new Error("An attached element cannot be attached again");t._$backendElement&&n.replaceChild(t._$backendElement,o),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){var o;if(t._$inheritSlots)throw new Error("Slot-inherit mode is not usable in slot element");var r=n?String(n):"",i=t._$slotName;if(i!==r){var a=null===i;t._$slotName=r,a&&(t._$subtreeSlotStart=t._$subtreeSlotEnd={value:t,prev:null,next:null}),1===t.getBackendMode()&&(null===(o=t._$backendElement)||void 0===o||o.setSlotName(r));var s=t.ownerShadowRoot;if(s)if(a){3===s.getSlotMode()&&(t._$slotValues=Object.create(null)),t.slotNodes=[];var l=t.parentNode;l&&e._$updateSubtreeSlotsInsertion(l,t._$subtreeSlotStart,t._$subtreeSlotEnd,t.parentIndex,!1)}else s.isConnected(t)&&s._$applySlotRename(t,r,i)}},e.getSlotName=function(e){var t=e._$slotName;return null===t?void 0:t},e.setInheritSlots=function(e){var t;if(!e._$virtual)throw new Error("Cannot set slot-inherit on non-virtual node");if(null!==e._$slotName||0!==e.childNodes.length)throw new Error("Slot-inherit mode cannot be set when the element has any child node");1===e.getBackendMode()&&(null===(t=e._$backendElement)||void 0===t||t.setInheritSlots()),e._$inheritSlots=!0},e.getInheritSlots=function(e){return e._$inheritSlots},e.setSlotElement=function(t,n){if(t._$slotElement!==n){t._$slotElement=n;var o=e._$getParentHostShadowRoot(t.parentNode);if(o){var r=St._$updateSubtreeSlotNodes(t.parentNode,[t],o,o,t.parentIndex),i=t.containingSlot;null==r||r.updateContainingSlot(),null==r||r.removeSlotNodes();var a=t.containingSlot;e.insertChildReassign(t.parentNode,t,i,a,t.parentIndex),null==r||r.insertSlotNodes()}}},e._$updateContainingSlot=function(e,t){var n;e.containingSlot=t,1===(null===(n=e.ownerShadowRoot)||void 0===n?void 0:n.getBackendMode())&&e.getBackendElement().setContainingSlot(t?t.getBackendElement():t)},e._$spliceSlotNodes=function(e,t,n,o){var r=e.slotNodes=e.slotNodes||[],i=t>=0&&t<r.length;if(null==o?void 0:o.length)if(i){for(var a=t;a<t+n;a+=1)r[a].slotIndex=void 0;for(r.splice.apply(r,ne([t,n],o,!1)),a=t;a<r.length;a+=1)r[a].slotIndex=a}else{var s=r.length;for(r.push.apply(r,o),a=s;a<r.length;a+=1)r[a].slotIndex=a}else if(n){for(a=t;a<t+n;a+=1)r[a].slotIndex=void 0;for(r.splice(t,n),a=t;a<r.length;a+=1)r[a].slotIndex=a}if(1===e._$nodeTreeContext.mode)if(null==o?void 0:o.length){var l=e._$nodeTreeContext.createFragment();for(a=0;a<o.length;a+=1)l.appendChild(o[a]._$backendElement);i?e._$backendElement.spliceBeforeSlotNodes(t,n,l):e._$backendElement.spliceAppendSlotNodes(l),l.release()}else n&&e._$backendElement.spliceRemoveSlotNodes(t,n)},e._$findSlotNodeInsertPosition=function(e,t,n){for(var o=e.ownerShadowRoot.getHostNode(),r=function(e){for(var t=0,n=e;n&&n!==o;)t+=1,n=n.parentNode;return t},i=r(t),a=function(e,t,n,o,r,i,s){if(e===o)return 0;if(e.parentNode===o.parentNode)return t-(-1===r?s:r);if(i<n){var l=e.parentNode;return a(l,l.parentIndex,n-1,o,r,i,s)}var c=n<i?e:e.parentNode,u=n<i?n:n-1,d=o.parentNode,p=i-1,h=a(c,c.parentIndex,u,d,d.parentIndex,p,s);return 0===h?-1:h},s=e.slotNodes,l=s.length-1;l>=0;l-=1){var c=s[l];if(a(c,c.parentIndex,r(c),t,t.parentIndex,i,n-.5)<0)break}return l+1},e.prototype.getComposedParent=function(){if(this instanceof St)return this.getHostNode();if(void 0!==this.containingSlot)return this.containingSlot;for(var e=this.parentNode;null==e?void 0:e._$inheritSlots;)e=e.parentNode;return e},e.prototype.getComposedChildren=function(){var e=[];return this.forEachComposedChild((function(t){e.push(t)})),e},e.prototype.forEachComposedChild=function(e){if(this._$inheritSlots)return!0;if(this instanceof $e&&!this._$external)return!1!==e(this.shadowRoot);if(null!==this._$slotName){var t=this.ownerShadowRoot;return!t||t.forEachNodeInSpecifiedSlot(this,e)}var n=function(t){for(var o=0;o<t.length;o+=1){var r=t[o];if(!1===e(r))return!1;if(r._$inheritSlots&&!n(r.childNodes))return!1}return!0};return n(this.childNodes)},e.prototype.forEachNonVirtualComposedChild=function(e){if(this._$inheritSlots)return!0;var t=function(t){return t._$virtual?t.forEachNonVirtualComposedChild(e):!1!==e(t)};if(this instanceof $e&&!this._$external)return t(this.shadowRoot);if(null!==this._$slotName){var n=this.ownerShadowRoot;return!n||n.forEachSlotContentInSpecifiedSlot(this,t)}var o=function(e){for(var n=0;n<e.length;n+=1){var r=e[n];if(!t(r))return!1;if(r._$inheritSlots&&!o(r.childNodes))return!1}return!0};return o(this.childNodes)},e.parseSelector=function(e){return new te(e)},e.prototype.querySelector=function(e){return(e instanceof te?e:new te(e)).query(this,!0)},e.prototype.querySelectorAll=function(e){return(e instanceof te?e:new te(e)).query(this,!1)},e.matchSelector=function(e,t){return(e instanceof te?e:new te(e)).testSelector(null,t)},e.prototype.matchSelector=function(e,t){return(e instanceof te?e:new te(e)).testSelector(this,t)},e.prototype.getBoundingClientRect=function(e){var t=this._$backendElement;if(t)if(3===this.getBackendMode()){var n=t.getBoundingClientRect();setTimeout((function(){e(n)}),0)}else t.getBoundingClientRect(e);else setTimeout((function(){e({left:0,top:0,width:0,height:0})}),0)},e.prototype.getScrollOffset=function(e){var t=this._$backendElement;if(t)if(3===this.getBackendMode()){var n=t,o={scrollLeft:n.scrollLeft,scrollTop:n.scrollTop,scrollWidth:n.scrollWidth,scrollHeight:n.scrollHeight};setTimeout((function(){e(o)}),0)}else t.getScrollOffset(e);else setTimeout((function(){e({scrollLeft:0,scrollTop:0,scrollWidth:0,scrollHeight:0})}),0)},e.prototype.createIntersectionObserver=function(e,t,n,o){var r=this._$backendElement;return r?e&&!e._$backendElement?null:3===this.getBackendMode()?this._$nodeTreeContext.createIntersectionObserver(r,(null==e?void 0:e._$backendElement)||null,t,n,o):r.createIntersectionObserver((null==e?void 0:e._$backendElement)||null,t,n,o):null},e.prototype.getContext=function(e){var t=this._$backendElement;t&&(3===this.getBackendMode()?this._$nodeTreeContext.getContext(t,e):t.getContext(e))},e._$getParentHostShadowRoot=function(e){for(var t=e;null==t?void 0:t._$inheritSlots;)t=t.parentNode;return t instanceof $e&&!t._$external?t.shadowRoot:null},e}(),ie=Symbol("method"),ae=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 o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),se=function(e){function t(){throw new Error("Element cannot be constructed directly")}return ae(t,e),t.prototype._$initializeVirtual=function(e,t,n,o){if(this.is=String(e),1===n.mode){var r=t._$backendShadowRoot,i=o||(null==r?void 0:r.createVirtualNode(e))||null;this._$initialize(!0,i,t,n),null==i||i.associateValue(this)}else this._$initialize(!0,o,t,n)},t.create=function(e,n){var o=Object.create(t.prototype);return o._$initializeVirtual(e,n,n._$nodeTreeContext,null),o},t}(re);!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"}(oe||(oe={}));var le,ce=function(){function e(e,t){this._$comp=e;var n=new Array(6);if(t)for(var o=0;o<6;o+=1){var r=t.definitions[o];if(r){for(var i=new Array(r.length),a=0;a<r.length;a+=1)i[a]=null;n[o]=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(""),o=this._$group.definitions,r=this._$group.keyMap,i=e.type;o[i]?(r[n]=[i,o[i].length],o[i].push(e)):(r[n]=[i,0],o[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,o,r=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],p=d.target;if(!t)for(var h=r;;){var f=h.parentNode;if(!f)break;if(!((h=f)instanceof se)){if(h instanceof $e){if(h.hasBehavior(p)){var v=h._$relation;if(v){var g;g=4===e?5:0===e?1:3;var _=null===(o=v._$group)||void 0===o?void 0:o.definitions[g];if(_){for(var $=0;$<_.length;$+=1){var m=_[$];if(m.target&&this._$comp.hasBehavior(m.target)){u={target:h,def:m};break}}if(u)break}}}if(4===e)break}if(2===e)break}}if(l[s]=u,c){var y=c.target,b=c.def;u&&c.target===u.target&&c.def===u.def?(b.linkChanged&&ct("Relation Link Changed Callback",b.linkChanged,y.getMethodCaller(),[r.getMethodCaller()],y),d.linkChanged&&ct("Relation Link Changed Callback",d.linkChanged,r.getMethodCaller(),[y.getMethodCaller()],r)):(b.unlinked&&ct("Relation Unlinked Callback",b.unlinked,y.getMethodCaller(),[r.getMethodCaller()],y),d.unlinked&&ct("Relation Unlinked Callback",d.unlinked,r.getMethodCaller(),[y.getMethodCaller()],r))}if(u){var S=u.target,C=u.def;c&&c.target===u.target&&c.def===u.def||(C.linked&&ct("Relation Linked Callback",C.linked,S.getMethodCaller(),[r.getMethodCaller()],S),d.linked&&ct("Relation Linked Callback",d.linked,r.getMethodCaller(),[S.getMethodCaller()],r))}t||u||!d.linkFailed||ct("Relation Link Failed Callback",d.linkFailed,r.getMethodCaller(),[],r)}},e.prototype.getLinkedTargets=function(e){var t,n,o,r,i=null===(t=this._$group)||void 0===t?void 0:t.keyMap[e];if(!i)return rt('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===(r=null===(o=this._$group)||void 0===o?void 0:o.definitions[a])||void 0===r?void 0:r[s],p=function(e){for(var t=e.childNodes,n=0;n<t.length;n+=1){var o=t[n];if(o instanceof re)if(o instanceof se)p(o);else if(o instanceof $e){if(o._$relation){var r;if(r=5===a?o._$relation._$links[4]:1===a?o._$relation._$links[0]:o._$relation._$links[2])for(var i=0;i<r.length;i+=1){var s=r[i];if(s&&s.target===u&&s.def===d){c.push(o);break}}}1===a&&p(o)}else 5!==a&&1!==a||p(o)}};return p(this._$comp),c},e}(),ue=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}(),de=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}(),pe=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 o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),he=function(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},fe=function(e,t,n,o){var r=t.ownerSpace,i=null==n?void 0:n._$behavior._$using,a=null==n?void 0:n._$genericImpls;e._$detail||e.prepare();var s,l=e.behavior,c=l._$generics;if(c){var u=l._$genericDefaults;s=Object.create(null);for(var d=0;d<c.length;d+=1){var p=c[d];if(o&&Object.prototype.hasOwnProperty.call(o,p)){var h=o[p];if("string"==typeof h)if(null==i?void 0:i[h])s[p]=i[h];else if(a&&a[h])s[p]=a[h];else{var f=r.getGlobalUsingComponent(h);if("string"==typeof f)s[p]=f;else if(f)s[p]={final:f,source:t,placeholder:null,waiting:null};else{if(rt('Generic "'.concat(p,'" value "').concat(h,'" is not valid (on component "').concat(e.is,'").')),!(v=r.getDefaultComponent()))throw new Error('Cannot find default component for generic "'.concat(p,'" (on component "').concat(e.is,'")'));s[p]={final:v,source:t,placeholder:null,waiting:null}}}else s[p]=h}else{var v;if(!(v=u[p]||r.getDefaultComponent()))throw new Error('Cannot find default component for generic "'.concat(p,'" (on component "').concat(e.is,'")'));s[p]="string"==typeof v?v:{final:v,source:t,placeholder:null,waiting:null}}}}else s=null;return s},ve=function(e,t,n,o){var r,i=n._$using[e]||o&&o[e],a=null;if(i&&("string"==typeof i?a=i:null===i.placeholder?a=i.final:rt('Placeholder on generic implementation is not valid (on component "'.concat(n.is,'")'))),a)return a;var s=null!==(r=t.getGlobalUsingComponent(e))&&void 0!==r?r:t.getDefaultComponent();if(!s)throw new Error('Cannot find default component for placeholder target "'.concat(e,'" (on component "').concat(n.is,'")'));return s},ge=function(){function e(e){this.behavior=e,this.is=this.behavior.is,this._$detail=null,this._$options=nt(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.updateTemplate=function(e){var t;this.behavior._$updateTemplate(e),(null===(t=this._$detail)||void 0===t?void 0:t.template.updateTemplate)?this._$detail.template.updateTemplate(this.behavior):rt('The template engine of component "'.concat(this.is,'" does not support template update'))},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 o=Object.keys(e._$propertyMap),r=function(e){var t=o[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<o.length;i+=1)r(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(){};n.constructor={value:l,writable:!0};var c=l.prototype=Object.create($e.prototype,n);c._$behavior=e,c._$definition=this,c._$methodMap=e._$methodMap;var u=e._$generateObserverTree();c._$lifetimeFuncs=e._$getAllLifetimeFuncs(),c._$pageLifetimeFuncs=e._$getAllPageLifetimeFuncs();var d=function(e){if(void 0===e)return null;for(var t={definitions:new Array(6),keyMap:Object.create(null)},n=t.definitions,o=t.keyMap,r=Object.keys(e),i=0;i<r.length;i+=1){var a=r[i],s=e[a],l=s.type;n[l]?(o[a]=[l,n[l].length],n[l].push(s)):(o[a]=[l,0],n[l]=[s])}return t}(e._$relationMap),p=V(t.dataDeepCopy),h=V(t.propertyPassingDeepCopy),f=this._$templateEngine.create(e,t);this._$detail={proto:c,template:f,dataGroupObserverTree:u,dataDeepCopy:p,propertyPassingDeepCopy:h,relationDefinitionGroup:d}}},e}(),_e=1,$e=function(e){function t(){throw new Error("Element cannot be constructed directly")}return pe(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||Qe()).defineComponent(e)},t._$tagMethod=function(e){var t=e;return t[ie]=!0,t},t._$isTaggedMethod=function(e){return"function"==typeof e&&!!e[ie]},t._$advancedCreate=function(e,n,o,r,i,a,s){var l,c;n._$detail||n.prepare();var u=n._$detail,d=u.proto,p=u.template,h=u.dataDeepCopy,f=u.propertyPassingDeepCopy,v=u.relationDefinitionGroup,g=n._$detail.dataGroupObserverTree,_=n._$options,$=n.behavior,m=o?o._$nodeTreeContext:r||tt.backendContext||et(),y=_.externalComponent,b=_.propertyEarlyInit,S=tt.writeExtraInfoToAttr,C=_.virtualHost,w=Object.create(d);w._$genericImpls=i,w._$placeholderHandler=a,w._$external=y,w.tagName=e,w._$methodCaller=w;var N=null;if(o)if(C||3!==m.mode)if(C||2!==m.mode){if(1===m.mode){var k=o._$backendShadowRoot;N=(null==k?void 0:k.createComponent(e))||null}}else N=o._$nodeTreeContext.createElement(_.hostNodeTagName,e);else N=o._$nodeTreeContext.document.createElement(e);else if(C||3!==m.mode)if(C||2!==m.mode){if(1===m.mode){var O=m.getRootNode();if(!O)throw new Error("Failed getting backend shadow tree");N=O.createComponent(e)||null}}else N=m.createElement(_.hostNodeTagName,e)||null;else N=m.document.createElement(e);w._$initialize(C,N,o,m);var x={};if($._$externalClasses)for(var A=$._$externalClasses,M=0;M<A.length;M+=1)x[A[M]]=null;if(w.classList=new E(w,x),N){var D=o?o.getHostNode()._$definition._$options.styleScope:_.styleScope;if(D&&3!==m.mode&&N.setStyleScope(D,_.styleScope),o&&S){var I=null===(l=o.getHostNode()._$behavior.ownerSpace)||void 0===l?void 0:l.styleScopeManager.queryName(D);I&&N.setAttribute("exparser:info-class-prefix","".concat(I,"--"))}}if(N&&(3!==m.mode?N.associateValue(w):m.associateValue(N,w)),S&&N){var R=_e;_e+=1,w._$componentInstanceId=R,N.setAttribute("exparser:info-component-id",R)}w._$idPrefix=_.idPrefixGenerator?_.idPrefixGenerator.call(w):"";var B,P=$._$staticData,j=$._$data;if(void 0===P)if(1===j.length)B=(F=j[0])();else for(B={},M=0;M<j.length;M+=1){var F=j[M];Object.assign(B,F())}else for(B=T(P),M=0;M<j.length;M+=1)F=j[M],Object.assign(B,F());var U=w._$relation=new ce(w,v);w._$traitGroup=new de;var G=$._$traitBehaviors;if(void 0!==G)for(M=0;M<G.length;M+=1){var W=G[M],V=W.traitBehavior,z=W.impl;w._$traitGroup.implement(V,z)}if($._$methodCallerInit){var q=$._$methodCallerInit.call(w);w._$methodCaller=q}var X=!1;if($._$init.length>0){var K=!0,Y=!0,Z=!0,Q=!0,J={self:q=w.getMethodCaller(),data:B,setData:w.setData.bind(w),implement:function(e,t){if(X)throw new Error("Cannot execute init-time functions after initialization");w._$traitGroup.implement(e,t)},relation:function(e){if(X)throw new Error("Cannot execute init-time functions after initialization");var t,n=e.target,o=Ee($.ownerSpace,$.is,"undefined",e);return t=o?U.add(o):Symbol("invalid"),{list:function(){return U.getLinkedTargets(t).map((function(e){return e.getMethodCaller()}))},listAsTrait:n instanceof ue?function(){return U.getLinkedTargets(t).map((function(e){return e.traitBehavior(n)}))}:void 0}},observer:function(e,t){if(X)throw new Error("Cannot execute init-time functions after initialization");K&&(K=!1,g=g.cloneSub()),g.addObserver(t,L(e))},lifetime:function(e,t){if(X)throw new Error("Cannot execute init-time functions after initialization");Y&&(Y=!1,w._$lifetimeFuncs=$._$getAllLifetimeFuncs());var n=w._$lifetimeFuncs;n[e]?n[e].add(t):(n[e]=new ot).add(t)},pageLifetime:function(e,t){if(X)throw new Error("Cannot execute init-time functions after initialization");Z&&(Z=!1,w._$pageLifetimeFuncs=$._$getAllPageLifetimeFuncs());var n=w._$pageLifetimeFuncs;n[e]?n[e].add(t):(n[e]=new ot).add(t)},method:function(e){return t._$tagMethod(e)},listener:function(e){return t._$tagMethod(e)}},ee=$._$init;for(M=0;M<ee.length;M+=1){var te=ee[M],ne=ct("Component Init",te,q,[J],void 0);if(ne)for(var oe=Object.keys(ne),re=0;re<oe.length;re+=1){var ie=oe[re],ae=ne[ie];t._$isTaggedMethod(ae)&&(Q&&(Q=!1,w._$methodMap=Object.create(w._$methodMap)),w._$methodMap[ie]=ae,_.writeFieldsToNode&&(w[ie]=ae))}}}X=!0;var se=p.createInstance(w),le=se.shadowRoot;w.shadowRoot=le;var pe=new H(w,B,_.pureDataPattern||null,h,f,_.reflectToAttributes,g);w._$dataGroup=pe,b&&void 0!==s&&s(w),se.initValues(pe.innerData||pe.data),w._$tmplInst=se,pe.setUpdateListener(se.updateValues.bind(se));var he=$._$listeners;if(void 0!==he){var fe=function(e){var t=he[e],n=t.id,o=t.ev,r=t.listener;if("this"===n)w.addListener(o,(function(e){return r.call(w._$methodCaller,e)}));else if(y)a=le,(i=n?a.getIdMap()[n]:a.root)&&a.setListener(i,o,(function(e){return r.call(w._$methodCaller,e)}));else{var i,a=le;(i=n?a.getElementById(n):a)&&i.addListener(o,(function(e){return r.call(w._$methodCaller,e)}))}};for(M=0;M<he.length;M+=1)fe(M)}return null===(c=w._$lifetimeFuncs.created)||void 0===c||c.call(w._$methodCaller,[],w),b||void 0===s||s(w),w},t.createWithGenericsAndContext=function(e,n,o,r,i){var a=function(e){var t;return o&&(t=Object.create(null),Object.entries(o).forEach((function(n){var o=n[0],r=n[1];t[o]={final:r,source:e.behavior,placeholder:null,waiting:null}}))),fe(e,e.behavior,void 0,t)};if(n)return t._$advancedCreate(String(e),n,null,r,a(n),void 0,i);if(e instanceof ge)return t._$advancedCreate(e.is,e,null,r,a(e),void 0);var s=Qe().getComponentByUrl(e,"");return t._$advancedCreate(e,s,null,r,a(s),void 0)},t.createWithGenerics=function(e,n,o,r){return t.createWithGenericsAndContext(e,n,o,null,r)},t.createWithContext=function(e,n,o,r){return t.createWithGenericsAndContext(e,n,null,o,r)},t.create=function(e,n,o){return t.createWithGenericsAndContext(e,n,null,null,o)},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],o=e[1];return t.replaceDataOnPath([n],o)})),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.prototype.applyTemplateUpdates=function(){var e;if(null===(e=this._$tmplInst)||void 0===e?void 0:e.updateTemplate){var t=this._$dataGroup;this._$tmplInst.updateTemplate(this._$definition._$detail.template,t.innerData||t.data)}else rt('The template engine of component "'.concat(this.is,'" does not support template update'))},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){if(e._$definition._$options.useMethodCallerListeners){var n=e._$methodCaller[t];return"function"==typeof n?n:void 0}return e._$methodMap[t]},t.prototype.callMethod=function(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];var r=t.getMethod(this,e);return null==r?void 0:r.call.apply(r,he([this],n,!1))},t.prototype.getComponentDefinition=function(){return this._$definition},t.prototype.getComponentOptions=function(){return this._$definition._$options},t.prototype.hasBehavior=function(e){return e instanceof ue?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 o=function(r){if(r instanceof t){if(r._$pageLifetimeFuncs){var i=r._$pageLifetimeFuncs[e];i&&i.call(r._$methodCaller,n)}r._$external||o(r.shadowRoot)}for(var a=r.childNodes,s=0;s<a.length;s+=1){var l=a[s];l instanceof re&&o(l)}};o(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.triggerWorkletChangeLifetime=function(e,t){this.triggerLifetime("workletChange",[e,t])},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,o){var r=this._$dataGroup;if(void 0===r)throw new Error("Cannot update data before component created");r.spliceArrayDataOnPath(e,t,n,o)},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");if("object"==typeof e&&null!==e)for(var n=Object.keys(e),o=0;o<n.length;o+=1){var r=n[o],i=M(r);i&&t.replaceDataOnPath(i,e[r])}},t.prototype.setData=function(e){var t=this._$dataGroup;if(void 0===t)throw new Error("Cannot update data before component created");if("object"==typeof e&&null!==e)for(var n=Object.keys(e),o=0;o<n.length;o+=1){var r=n[o],i=M(r);i&&t.replaceDataOnPath(i,e[r])}t.applyDataUpdates()},t}(re),me=function(){return me=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},me.apply(this,arguments)};!function(e){e.Invalid="invalid",e.Any="any",e.String="string",e.Number="number",e.Boolean="boolean",e.Object="object",e.Array="array",e.Function="function"}(le||(le={}));var ye,be=function(e,t){for(var n=Object.keys(t),o=0;o<n.length;o+=1){var r=n[o];if(Object.prototype.hasOwnProperty.call(e,r))if("_"===r[0]&&rt('data field "'.concat(r,'" from different behaviors is overriding or merging.')),"object"!=typeof e[r]||"object"!=typeof t[r]||null===t[r]||Array.isArray(t[r]))e[r]=t[r];else{if(Array.isArray(e[r]))e[r]=e[r].slice();else{for(var i=e[r],a={},s=Object.keys(i),l=0;l<s.length;l+=1){var c=s[l];a[c]=i[c]}e[r]=a}be(e[r],t[r])}else e[r]=t[r]}},Se=function(e){return"string"===e||e===String?"string":"number"===e||e===Number?"number":"boolean"===e||e===Boolean?"boolean":"object"===e||e===Object?"object":"array"===e||e===Array?"array":"function"===e||e===Function?"function":"any"===e||null==e?"any":"invalid"},Ce=function(e,t,n){var o=n.type,r=n.default,i=n.optionalTypes;if(i)for(var a=0;a<i.length;a+=1)if(we(i[a],e))return e;return"string"===o?null==e?(rt('property "'.concat(t,'" received type-incompatible value: expected <String> but get null value. Used default value instead.')),void 0===r?"":r()):("object"==typeof e&&rt('property "'.concat(t,'" received type-incompatible value: expected <String> but got object-typed value. Force converted.')),String(e)):"number"===o?isFinite(e)?Number(e):(rt('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===r?0:r()):"boolean"===o?!!e:"array"===o?Array.isArray(e)?e:(rt('property "'.concat(t,'" received type-incompatible value: expected <Array> but got non-array value. Used default value instead.')),void 0===r?[]:r()):"object"===o?"object"==typeof e?e:(rt('property "'.concat(t,'" received type-incompatible value: expected <Object> but got non-object value. Used default value instead.')),void 0===r?null:r()):"function"===o?"function"==typeof e?e:(rt('property "'.concat(t,'" received type-incompatible value: expected <Function> but got non-function value. Used default value instead.')),void 0===r?function(){}:r()):void 0===e?void 0===r?null:r():e},we=function(e,t){if("string"===e){if("string"!=typeof t)return!1}else if("number"===e){if(!Number.isFinite(t))return!1}else if("boolean"===e){if("boolean"!=typeof t)return!1}else if("object"===e){if("object"!=typeof t||Array.isArray(t))return!1}else if("array"===e){if("object"!=typeof t||!Array.isArray(t))return!1}else if("function"===e){if("function"!=typeof t)return!1}else if(void 0===t)return!1;return!0},Ee=function(e,t,n,o){var r,i=function(e){return"function"==typeof e?e:(void 0!==e&&rt('the "'.concat(n,'" relation listener is not a function (when preparing behavior "').concat(t,'").')),null)};if("parent"===o.type)r=4;else if("child"===o.type)r=5;else if("parent-common-node"===o.type)r=2;else if("child-common-node"===o.type)r=3;else if("ancestor"===o.type)r=0;else{if("descendant"!==o.type){var a=o.type;return rt('the "'.concat(n,'" relation has an invalid relation type "').concat(a,'" (when preparing behavior "').concat(t,'").')),null}r=1}var s=null;if(o.target instanceof ge)s=o.target.behavior;else if(o.target instanceof ke||o.target instanceof ue)s=o.target;else{var l=String(o.target||n),c=e.getComponentByUrlWithoutDefault(l,t);if(c)s=c.behavior;else{var u=e.getGlobalUsingComponent(l);"object"==typeof u&&null!==u&&(s=u.behavior)}}return s?{target:s,type:r,linked:i(o.linked),linkChanged:i(o.linkChanged),unlinked:i(o.unlinked),linkFailed:i(o.linkFailed)}:(rt('the target of relation "'.concat(n,'" is not a valid behavior or component (when preparing behavior "').concat(t,'").')),null)},Ne=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?me(me({},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=me(me({},this._$using),e):this._$using=e,this},e.prototype.placeholders=function(e){return this._$placeholders?this._$placeholders=me(me({},this._$placeholders),e):this._$placeholders=e,this},e.prototype.generics=function(e){return this._$generics?this._$generics=me(me({},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 o=t[n],r=e[o];this._$methods.push({name:o,func:r})}return this},e.prototype.observer=function(e,t,n){return void 0===n&&(n=!1),this._$observers||(this._$observers=[]),this._$observers.push({dataPaths:L(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 o=e.properties;if(void 0!==o){this._$properties||(this._$properties=[]);for(var r=Object.keys(o),i=0;i<r.length;i+=1){var a=r[i],s=o[a];this._$properties.push({name:a,def:s})}}var l=e.methods;if(void 0!==l)for(r=Object.keys(l),i=0;i<r.length;i+=1){var c=r[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 p=d[i],h=p.fields,f=p.observer;this._$observers.push({dataPaths:L(null!=h?h:"**"),func:f,once:!1})}else for(r=Object.keys(d),i=0;i<r.length;i+=1)f=d[h=r[i]],this._$observers.push({dataPaths:L(h),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(r=Object.keys(v),i=0;i<r.length;i+=1){var g=r[i];u=v[g],this._$lifetimes.push({name:g,func:u,once:!0})}var _=e.pageLifetimes;if(_)for(this._$pageLifetimes||(this._$pageLifetimes=[]),r=Object.keys(_),i=0;i<r.length;i+=1){var $=r[i];u=_[$],this._$pageLifetimes.push({name:$,func:u,once:!0})}this._$listeners=e.listeners;var m=e.relations;if(m)for(this._$relations||(this._$relations=[]),r=Object.keys(m),i=0;i<r.length;i+=1){var y=r[i],b=m[y];this._$relations.push({name:y,rel:b})}return this},e.prototype.registerBehavior=function(){var e=this._$is,t=new ke(this);return void 0!==e&&this._$ownerSpace._$registerBehavior(e,t),t},e.prototype.registerComponent=function(){var e=this._$is,t=new ke(this),n=new ge(t);return void 0!==e&&this._$ownerSpace._$registerComponent(e,n),n},e}(),ke=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 Ne(e.is,t||Qe()).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 o=Object.keys(e._$using),r=0;r<o.length;r+=1){var i=o[r],a=e._$using[i];if("string"!=typeof a){var s=a.final;s&&!t.has(s)&&(t.add(s),n(s.behavior))}}};if(n(this.general()),e)for(var o=Object.values(e),r=0;r<o.length;r+=1){var i=o[r];"string"!=typeof i&&(t.has(i)||(t.add(i),n(i.behavior)))}return t},e.prepare=function(e){e.prepare()},e.prototype.prepare=function(){var t,n,o,r,i,a,s,l,c,u;if(this._$unprepared){this._$unprepared=!1;var d=this.is,p=this.ownerSpace,h=this._$builder,f=this._$flatAncestors;if(Array.isArray(h._$behaviors))for(var v=0;v<h._$behaviors.length;v+=1){var g=h._$behaviors[v],_=null;if(g instanceof e)_=g;else{var $=String(g);p&&(_=p.getBehaviorByUrl($,d)),_||rt('behavior "'.concat($,'" 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={}),be(this._$staticData,y)),Object.assign(this._$methodMap,_._$methodMap),Object.assign(this._$propertyMap,_._$propertyMap),(n=this._$data).push.apply(n,_._$data);for(var b=_._$observers,S=0;S<b.length;S+=1)(k=b[S]).once&&this._$observers.indexOf(k)>=0||this._$observers.push(k);for(var C=_._$lifetimes,w=0;w<C.length;w+=1)(k=C[w]).once&&this._$lifetimes.indexOf(k)>=0||this._$lifetimes.push(k);var E=_._$pageLifetimes;if(void 0!==E)if(this._$pageLifetimes)for(var N=0;N<E.length;N+=1){var k;(k=E[N]).once&&this._$pageLifetimes.indexOf(k)>=0||this._$pageLifetimes.push(k)}else this._$pageLifetimes=E.slice();var O=_._$listeners;void 0!==O&&(this._$listeners||(this._$listeners=[]),(o=this._$listeners).push.apply(o,O));var x=_._$relationMap;void 0!==x&&(this._$relationMap||(this._$relationMap=Object.create(null)),Object.assign(this._$relationMap,x)),(r=this._$init).push.apply(r,_._$init),_._$flatAncestors.forEach((function(e){f.add(e)}))}}var A=h._$traitBehaviors;if(void 0!==A&&(this._$traitBehaviors||(this._$traitBehaviors=[]),(i=this._$traitBehaviors).push.apply(i,A)),"object"==typeof h._$using&&null!==h._$using){var M="object"==typeof h._$placeholders&&null!==h._$placeholders,L=Object.keys(h._$using),D=function(e){var t=L[e],n=h._$using[t],o=null;if(M&&(o=null!==(u=h._$placeholders[t])&&void 0!==u?u:null),n instanceof ge)I._$using[t]={final:n,source:I,placeholder:o,waiting:null};else if(p){var r=String(n),i=p.getComponentByUrlWithoutDefault(r,d);if(i)I._$using[t]={final:i,source:I,placeholder:null,waiting:null};else if(null!==o){var a={final:null,source:I,placeholder:o,waiting:null},s=p._$componentWaitingList(r,d);s&&(s.add((function(e){a.final=e,a.placeholder=null,a.waiting=null})),a.waiting=s),I._$using[t]=a}else{var l=p.getGlobalUsingComponent(r);I._$using[t]="string"==typeof l?l:{final:l,source:I,placeholder:null,waiting:null}}}else rt('cannot find component "'.concat(String(n),'" (when preparing behavior "').concat(d,'").'))},I=this;for(v=0;v<L.length;v+=1)D(v)}if("object"==typeof h._$generics&&null!==h._$generics){var R=this._$generics=[],B=Object.create(null);this._$genericDefaults=B;var P=Object.keys(h._$generics);for(v=0;v<P.length;v+=1){var j=P[v],F=h._$generics[j],U=null,G=!0===F||null==F?void 0:F.default;if(void 0!==G)if(G instanceof ge)U=G;else if(p){var W=String(G);U=p.getComponentByUrlWithoutDefault(W,d)||p.getGlobalUsingComponent(W)}else rt('cannot define generic "'.concat(j,'" without a default implementor (when preparing behavior "').concat(d,'").'));R.push(j),B[j]=U}}var V=h._$staticData;V&&(this._$staticData?be(this._$staticData,V):this._$staticData=V);var H=h._$methods;for(v=0;v<H.length;v+=1){var z=H[v],q=z.name,X=z.func;this._$methodMap[q]=X}var K=h._$properties;if(void 0!==K){var Y=[],Z=function(e){var t,n=K[e],o=n.name,r=n.def,i=function(e){return"string"===e||e===String?{type:"string",optionalTypes:null,value:"",default:void 0,observer:null,comparer:null,reflectIdPrefix:!1}:"number"===e||e===Number?{type:"number",optionalTypes:null,value:0,default:void 0,observer:null,comparer:null,reflectIdPrefix:!1}:"boolean"===e||e===Boolean?{type:"boolean",optionalTypes:null,value:!1,default:void 0,observer:null,comparer:null,reflectIdPrefix:!1}:"object"===e||e===Object?{type:"object",optionalTypes:null,value:null,default:void 0,observer:null,comparer:null,reflectIdPrefix:!1}:"array"===e||e===Array?{type:"array",optionalTypes:null,value:[],default:void 0,observer:null,comparer:null,reflectIdPrefix:!1}:"function"===e||e===Function?{type:"function",optionalTypes:null,value:function(){},default:void 0,observer:null,comparer:null,reflectIdPrefix:!1}:"any"===e||null==e?{type:"any",optionalTypes:null,value:null,default:void 0,observer:null,comparer:null,reflectIdPrefix:!1}:null}(r);if(null!==i)t=i;else{var a=r,s=Se(a.type),l=null;Array.isArray(a.optionalTypes)&&(l=a.optionalTypes.map(Se)).length>0&&("invalid"!==s&&"any"!==s||(s=l[0])),"invalid"===s&&rt('the type of property "'.concat(o,'" is illegal (when preparing behavior "').concat(d,'").'));var c=a.value;void 0===a.value?c="string"===s?"":"number"===s?0:"boolean"!==s&&("array"===s?[]:null):void 0!==a.default&&rt('the initial value of property "'.concat(o,'" is not used when its default is provided (when preparing behavior "').concat(d,'").'));var u=void 0;"function"==typeof a.observer?u=a.observer:a.observer?u=Q._$methodMap[a.observer]||null:(u=null,void 0!==a.observer&&rt('the observer of property "'.concat(o,'" is not a function (when preparing behavior "').concat(d,'").')));var p=void 0;"function"==typeof a.comparer?p=a.comparer:(p=null,void 0!==a.comparer&&rt('the comparer of property "'.concat(o,'" 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,comparer:p,reflectIdPrefix:h}}Q._$propertyMap[o]=t,Y.push({name:o,func:void 0===t.default?function(){return T(t.value)}:t.default})},Q=this;for(v=0;v<K.length;v+=1)Z(v);this._$data.push((function(){for(var e={},t=0;t<Y.length;t+=1){var n=Y[t],o=n.name,r=n.func;e[o]=r()}return e}))}(a=this._$data).push.apply(a,h._$data);var J=h._$observers;if(void 0!==J)for(v=0;v<J.length;v+=1){var ee=J[v],te=ee.dataPaths,ne=(X=ee.func,ee.once),oe="function"==typeof X?X:this._$methodMap[X];"function"==typeof oe?this._$observers.push({dataPaths:te,observer:oe,once:ne}):rt('the "'.concat(String(oe),'" observer is not a function (when preparing behavior "').concat(d,'").'))}var re=h._$lifetimes;(s=this._$lifetimes).push.apply(s,re);var ie=h._$pageLifetimes;ie&&(this._$pageLifetimes||(this._$pageLifetimes=[]),(l=this._$pageLifetimes).push.apply(l,ie));var ae=h._$listeners;if(void 0!==ae&&(L=Object.keys(ae)).length>0)for(this._$listeners=[],v=0;v<L.length;v+=1){var se=ae[j=L[v]],le="function"==typeof se?se:this._$methodMap[se];if(le){var ce=j.indexOf("."),ue=void 0,de=void 0;ce>=0?(ue=j.slice(0,ce),de=j.slice(ce+1)):(ue="",de=j),this._$listeners.push({id:ue,ev:de,listener:le})}else rt('the "'.concat(j,'" listener is not a function or a method name (when preparing behavior "').concat(d,'").'))}var pe=h._$relations;if(void 0!==pe)for(this._$relationMap||(this._$relationMap=Object.create(null)),v=0;v<pe.length;v+=1){var he=pe[v],fe=he.name,ve=he.rel;if(null!=ve){var _e=Ee(p,d,fe,ve);_e&&(this._$relationMap[fe]=_e)}}(c=this._$init).push.apply(c,h._$init),f.add(this)}},e.prototype.getTemplate=function(){return this._$template},e.prototype._$updateTemplate=function(e){this._$template=e},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 o=t[n],r=o.dataPaths,i=o.observer;e.addObserver(i,r)}return e},e.prototype._$getAllLifetimeFuncs=function(){for(var e=Object.create(null),t=this._$lifetimes,n=0;n<t.length;n+=1){var o=t[n],r=o.name,i=o.func;e[r]?e[r].add(i):(e[r]=new ot).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 o=t[n],r=o.name,i=o.func;e[r]?e[r].add(i):(e[r]=new ot).add(i)}return e},e}(),Oe=function(e,t){var n;n="/"!==e[0]?t.split("/").slice(0,-1).concat(e.split("/")):e.split("/");for(var o=[],r=0;r<n.length;r+=1){var i=n[r];""!==i&&"."!==i&&(".."!==i?o.push(i):o.pop())}return o.join("/")},xe=function(e,t){var n=e.indexOf("://");if(n>0){var o=e.indexOf("/",n+3);return o>0?{domain:e.slice(0,o),absPath:Oe(e.slice(o+1),"")}:{domain:e.slice(0,n+3),absPath:Oe(e.slice(n+3),"")}}return{domain:null,absPath:Oe(e,t)}},Ae=function(){function e(e,t,n){this._$callbacks=[],this._$ownerSpace=e,this._$isPub=t,this._$alias=n}return e.prototype.add=function(e){this._$callbacks.push(e)},e.prototype.hintUsed=function(e){var t,n;null===(n=(t=this._$ownerSpace)._$componentWaitingListener)||void 0===n||n.call(t,this._$isPub,this._$alias,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}(),Me=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._$using=Object.create(null),this._$importedSpaces=Object.create(null),this._$listWaiting=Object.create(null),this._$pubListWaiting=Object.create(null),this._$groupingListWaiting=null,this._$componentWaitingListener=null,t&&(Object.assign(this._$list,t._$pubList),Object.assign(this._$behaviorList,t._$pubBehaviorList)),this._$defaultComponent=null!=e?e:"",this._$componentOptions=nt({},null==t?void 0:t._$componentOptions),this.styleScopeManager=n||new w}return e.prototype.updateComponentOptions=function(e){this._$componentOptions=nt(e,this._$componentOptions)},e.prototype.getComponentOptions=function(){return this._$componentOptions},e.prototype.setGlobalUsingComponent=function(e,t){this._$using[e]=t},e.prototype.importSpace=function(e,t,n){this._$importedSpaces[e]={space:t,privateUse:n}},e.prototype.getComponentByUrl=function(e,t){var n=xe(e,t),o=n.domain,r=n.absPath,i=this.getComponent(r,!0,o);if(!i)throw new Error('There is no component "'.concat(r,'" in the space and no default component can be used'));return i},e.prototype.getComponentByUrlWithoutDefault=function(e,t){var n=xe(e,t),o=n.domain,r=n.absPath;return this.getComponent(r,!1,o)||null},e.prototype.getComponent=function(e,t,n){var o;if(void 0===t&&(t=!0),void 0===n&&(n=null),n){var r=this._$importedSpaces[n];if(r){var i=r.space;o=r.privateUse?i._$list:i._$pubList}}else o=this._$list;if(o){var a=o[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.getGlobalUsingComponent=function(e){return this._$using[e]||null},e.prototype.getBehaviorByUrl=function(e,t){var n=xe(e,t),o=n.domain,r=n.absPath;return this._$getBehavior(r,o)||null},e.prototype._$getBehavior=function(e,t){var n;if(void 0===t&&(t=null),t){var o=this._$importedSpaces[t];if(o){var r=o.space;n=o.privateUse?r._$behaviorList:r._$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 Ne(t,this).definition(e).registerComponent()},e.prototype.defineBehavior=function(e){var t=e.is;return new Ne(t,this).definition(e).registerBehavior()},e.prototype.define=function(e){return new Ne(e,this)},e.prototype.defineWithMethodCaller=function(e){return new Ne(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],this._$groupingListWaiting?this._$groupingListWaiting.push({waiting:n,comp:t}):n.call(t))},e.prototype._$registerBehavior=function(e,t){this._$behaviorList[e]=t},e.prototype.startGroupRegister=function(){this._$groupingListWaiting=[]},e.prototype.endGroupRegister=function(){var e=this._$groupingListWaiting;if(e){this._$groupingListWaiting=null;for(var t=0;t<e.length;t+=1){var n=e[t],o=n.waiting,r=n.comp;o.call(r)}}},e.prototype.groupRegister=function(e){this.startGroupRegister();var t=ct("group register",e,this,[]);return this.endGroupRegister(),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 o=this._$pubListWaiting[e];o&&(delete this._$pubListWaiting[e],o.call(n))},e.prototype.getExportedComponent=function(e){return this._$pubList[e]},e.prototype.getExportedBehavior=function(e){return this._$pubBehaviorList[e]},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,o,r,i=xe(e,t),a=i.domain,s=i.absPath;if(a){var l=this._$importedSpaces[a];if(!l)return null;if(o=l.space,r=!l.privateUse){if(o._$pubList[s])return null;n=o._$pubListWaiting}else{if(o._$list[s])return null;n=o._$listWaiting}}else{if(o=this,r=!1,this._$list[s])return null;n=this._$listWaiting}var c=n[s];return c||(n[s]=new Ae(o,r,s))},e.prototype.setComponentWaitingListener=function(e){this._$componentWaitingListener=e},e.prototype.createComponentByUrl=function(e,t,n,o){var r=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],o=r.getComponentByUrl(t,"");u[e]=o}))),$e.createWithGenericsAndContext(e,c,u,o,(function(e){if(a){var t=!1;a.split("&").forEach((function(n){var o=n.indexOf("=");if(o>=0){var r=decodeURIComponent(n.slice(0,o)),i=decodeURIComponent(n.slice(o+1));e._$dataGroup.replaceProperty(r,i)&&(t=!0)}})),t&&e.applyDataUpdates()}}))},e.prototype.defineTraitBehavior=function(e){return new ue(this,e)},e}(),Le=function(){function e(e,t,n,o){this.keyName=e,this.updateKeys(t);for(var r=this.items,i=this.indexes,a=[],s=0;s<r.length;s+=1){var l=r[s],c=null===i?s:i[s];a.push(o(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 o=Object.keys(e);t=new Array(o.length),n=new Array(o.length);for(var r=0;r<o.length;r+=1){var i=e[h=o[r]];t[r]=i,n[r]=h}}else if("string"==typeof e)for(rt("Use string as for-list is generally for testing. Each character is treated as an item."),t=new Array(e.length),n=null,r=0;r<e.length;r+=1)t[r]=e[r];else if("number"==typeof e)for(rt("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,r=0;r<e;r+=1)t[r]=r;else rt("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(r=0;r<t.length;r+=1){i=t[r];var u="*this"===s?i:null==i?void 0:i[s],d=null!=u?String(u):"";l[r]=d,void 0!==c[d]?(a||(a=Object.create(null)),a[d]=[c[d],r],delete c[d]):(null==a?void 0:a[d])?a[d].push(r):c[d]=r}if(a){var p=Object.keys(a);for(rt('Some keys are not unique while list updates: "'.concat(p.join('", "'),'".')),r=0;r<p.length;r+=1)for(var h,f=a[h=p[r]],v=0,g=0;g<f.length;g+=1){for(var _=f[g];void 0!==c["".concat(h,"--").concat(v)];)v+=1;c[o="".concat(h,"--").concat(v)]=_,l[_]=o}}}this.rawKeys=l,this.keyMap=c,this.sharedKeyMap=a},e.prototype.diff=function(e,t,n,o,r){var i=this.rawKeys,a=this.keyMap,s=this.sharedKeyMap,l=this.indexes;this.updateKeys(e);var c,u,d=this.rawKeys,p=this.sharedKeyMap,h=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 g=!1;if(Array.isArray(t))g=!0;else for(var _=Object.keys(t),$=0;$<_.length;$+=1)if(!0===(m=t[y=_[$]])||("*this"===v?m:null==m?void 0:m[v])){g=!0;break}if(g){for(u=new Array(d.length),$=0;$<d.length;$+=1){var m,y=d[$];void 0!==(null==s?void 0:s[y])||void 0!==(null==p?void 0:p[y])?u[$]=!0:void 0===(m=t[$])||(!0===m||("*this"===v?m:null==m?void 0:m[v])?u[$]=!0:u[$]=m)}c=!1}else u=t,c=!1}if(c){var b;for(b=!!Array.isArray(t)||t,$=0;$<i.length&&$<d.length;){var S=h[$],C=null===f?$:f[$],w=null===l?$:l[$];r(S,C,!0===b||void 0===b?b:b[$],C!==w,n.childNodes[$]),$+=1}if($<i.length)n.removeChildren($,i.length-$);else if($<d.length){for(var E=[];$<d.length;$+=1)S=h[$],C=null===f?$:f[$],E.push(o(S,C));n.insertChildren(E,-1)}}else{var N=[],k=[],O=new Array(d.length),x=new Array(d.length),A=-1,M=-1;for($=0;$<d.length;$+=1){var L=d[$];if(i[A+1]!==L)if(void 0!==(w=a[L])){for(var D=0,T=N.length;D<T;){var I=Math.floor((D+T)/2);w<N[I]?T=I:D=I+1}N[T]=w,k[T]=$,O[$]=T>0?k[T-1]:-1,x[$]=w,A=w,M=T}else x[$]=-1;else A+=1,N[M+=1]=A,k[M]=$,O[$]=M>0?k[M-1]:-1,x[$]=A}var R=k.length;if(R!==d.length||R!==i.length){for(var B=R>0?k[R-1]:-1,P=R;-1!==B;)N[P-=1]=B,B=O[B];var j,F=N;!function(e){e[e.Stable=0]="Stable",e[e.ForwardMove=1]="ForwardMove",e[e.BackwardMove=2]="BackwardMove"}(j||(j={}));var U=new Array(i.length),G=new Array(d.length),W=F[P];for($=0;$<x.length;$+=1){var V=x[$];$!==F[P]?-1!==V?(U[V]=V>W?2:1,G[$]=n.childNodes[V]):(S=h[$],C=null===f?$:f[$],G[$]=o(S,C)):(W=V,P+=1,U[V]=0)}var H=0,z=0,q=0;P=0;do{for(var X=P<F.length?F[P]:G.length,K=P<F.length?x[X]:U.length;z<K;)if(void 0===U[z]){var Y=z;z+=1;for(var Z=1;z<K&&void 0===U[z];)z+=1,Z+=1;n.removeChildren(Y+H,Z),H-=Z}else 2===U[z]&&(H-=1),z+=1;for(;q<X;){var Q=G[q];if(-1===(V=x[q])){for(Y=q,q+=1,Z=1;q<X&&-1===x[q];)q+=1,Z+=1;n.insertChildren(G.slice(Y,Y+Z),K+H),H+=Z}else n.insertChildAt(Q,K+H),S=h[q],C=null===f?q:f[q],w=null===l?V:l[V],r(S,C,!0===u||void 0===u?u:u[q],C!==w,Q),2===U[V]&&(H+=1),q+=1}P<F.length&&(S=h[X],C=null===f?X:f[X],w=null===l?K:l[K],r(S,C,!0===u||void 0===u?u:u[X],C!==w,n.childNodes[K+H])),z=K+1,q=X+1,P+=1}while(P<=F.length)}else for($=0;$<i.length&&$<d.length;){S=h[$],C=null===f?$:f[$],w=null===l?$:l[$];r(S,C,!0===u||void 0===u?u:u[$],C!==w,n.childNodes[$]),$+=1}}},e}(),De=function(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Te=function(e){return e},Ie=function(e){var t=e;return t._$wxTmplArgs=t._$wxTmplArgs||{}},Re=function(e){return null==e?"":String(e)},Be=function(){function e(e,t,n,o){this.bindingMapDisabled=!1,this.eventObjectFilter=Te,this.changePropFilter=Te,this.eventListenerFilter=Te,this.shadowRoot=e,this.procGen=t,this.disallowNativeNode=n,o&&(this.eventObjectFilter=o)}return e.prototype.create=function(e){var t=this.shadowRoot,n=(0,this.procGen)(this,!0,e,void 0);return this.handleChildrenCreationAndInsert(n.C,t,void 0,void 0),n.B},e.prototype.update=function(e,t){var n=this.shadowRoot,o=(0,this.procGen)(this,!1,e,t);this.handleChildrenUpdate(o.C,n,void 0,void 0)},e.prototype.bindingMapUpdate=function(e,t,n){if(this.bindingMapDisabled)return!1;var o=n[e];if(!o)return!1;for(var r=null,i=0;i<o.length;i+=1)(0,o[i])(t,(function(e){null!==r&&e!==r&&r instanceof $e&&r.hasPendingChanges()&&$e.getDataProxy(r).applyDataUpdates(!0),r=e}),(function(e,t){e.textContent=t}));var a=r;return null!==a&&a instanceof $e&&a.hasPendingChanges()&&$e.getDataProxy(a).applyDataUpdates(!0),!0},e.prototype.handleChildrenCreation=function(e,t,n){var o=this,r=[];return e(!0,(function(e,i){if(t&&""!==n){var a=o.createDynamicPlaceholder(t);r.push(a)}else{var s=o.shadowRoot.createTextNode(e);s.destroyBackendElementOnDetach(),t&&re.setSlotElement(s,t),i&&i(s),r.push(s)}}),(function(e,i,a,s,l,c){if(t&&n!==(l||"")){var u=o.createDynamicPlaceholder(t);r.push(u)}else{var d=o.createCommonElement(e,i,a,s,c);t?(re.setSlotElement(d,t),Ie(d).dynamicSlotNameMatched=!0):void 0!==l&&(d.slot=l),r.push(d)}}),(function(e,i){var a=o.shadowRoot.createVirtualNode("wx:if");a.destroyBackendElementOnDetach(),re.setInheritSlots(a),t&&re.setSlotElement(a,t),Ie(a).key=e,o.handleChildrenCreationAndInsert(i,a,t,n),r.push(a)}),(function(e,i,a,s,l){var c=o.shadowRoot,u=c.createVirtualNode("wx:for");u.destroyBackendElementOnDetach(),re.setInheritSlots(u),t&&re.setSlotElement(u,t),Ie(u).keyList=new Le(i,e,u,(function(e,r){var i=c.createVirtualNode("wx:for-item");return i.destroyBackendElementOnDetach(),re.setInheritSlots(i),t&&re.setSlotElement(u,t),o.handleChildrenCreationAndInsert((function(t,n,o,i,a,c,u){l(!0,e,r,void 0,void 0,s?De(De([],s,!0),[r],!1):null,n,o,i,a,c,u)}),i,t,n),i})),r.push(u)}),(function(e,n){var i=o.shadowRoot.createVirtualNode("slot");i.destroyBackendElementOnDetach(),re.setSlotName(i,Re(e)),t&&re.setSlotElement(i,t),n&&n(i),r.push(i)}),(function(e,i){if(void 0!==i)if(t)if(n===i)(a=o.shadowRoot.createVirtualNode("virtual")).destroyBackendElementOnDetach(),re.setSlotElement(a,t),Ie(a).dynamicSlotNameMatched=!0,o.handleChildrenCreationAndInsert(e,a,void 0,void 0),r.push(a);else{var a=o.createDynamicPlaceholder(t);r.push(a)}else(a=o.shadowRoot.createVirtualNode("virtual")).destroyBackendElementOnDetach(),a.slot=i,o.handleChildrenCreationAndInsert(e,a,void 0,void 0),r.push(a);else(a=o.shadowRoot.createVirtualNode("virtual")).destroyBackendElementOnDetach(),re.setInheritSlots(a),t&&re.setSlotElement(a,t),o.handleChildrenCreationAndInsert(e,a,t,n),r.push(a)}),void 0,void 0),r},e.prototype.handleChildrenCreationAndInsert=function(e,t,n,o){var r=this.handleChildrenCreation(e,n,o);r.length&&t.insertChildren(r,-1)},e.prototype.handleChildrenUpdate=function(e,t,n,o){var r=this,i=0,a=n?n.slotNodes.filter((function(e){return e.parentNode===t})):t.childNodes;e(!1,(function(e){var t=a[i];i+=1,(!n||Ie(t).dynamicSlotNameMatched)&&void 0!==e&&(t.textContent=e)}),(function(e,s,l,c,u,d){var p=a[i];if(i+=1,n){var h=Ie(p);if(o!==(u||""))return void(h.dynamicSlotNameMatched&&(f=r.createDynamicPlaceholder(n),t.replaceChild(f,p)));if(!h.dynamicSlotNameMatched){var f=r.createCommonElement(e,s,l,c,d);return re.setSlotElement(f,n),Ie(f).dynamicSlotNameMatched=!0,void t.replaceChild(f,p)}}l(p,!1);var v=!1;if(p instanceof $e){var g=r.dynamicSlotUpdate(p,d,c);g&&(v=!0),p.hasPendingChanges()&&$e.getDataProxy(p).applyDataUpdates(!0),null==g||g.applySlotUpdates()}n||void 0!==u&&(p.slot=u),v||r.handleChildrenUpdate(c,p,void 0,void 0)}),(function(e,s){var l=a[i];if(i+=1,Ie(l).key===e)r.handleChildrenUpdate(s,l,n,o);else{var c=r.shadowRoot.createVirtualNode("wx:if");c.destroyBackendElementOnDetach(),re.setInheritSlots(c),n&&re.setSlotElement(c,n),Ie(c).key=e,r.handleChildrenCreationAndInsert(s,c,n,o),n?t.replaceChild(c,l):t.replaceChildAt(c,i-1)}}),(function(e,t,s,l,c){var u=a[i];i+=1,Ie(u).keyList.diff(e,s,u,(function(e,t){var i=r.shadowRoot.createVirtualNode("wx:for-item");return i.destroyBackendElementOnDetach(),re.setInheritSlots(i),n&&re.setSlotElement(u,n),r.handleChildrenCreationAndInsert((function(n,o,r,i,a,s,u){c(!0,e,t,void 0,void 0,l?De(De([],l,!0),[t],!1):null,o,r,i,a,s,u)}),i,n,o),i}),(function(e,t,i,a,s){r.handleChildrenUpdate((function(n,o,r,s,u,d,p){c(!1,e,t,i,!!a||void 0,l?De(De([],l,!0),[t],!1):null,o,r,s,u,d,p)}),s,n,o)}))}),(function(e,t){var n=a[i];i+=1,void 0!==e&&re.setSlotName(n,Re(e)),t&&t(n),r.shadowRoot.applySlotValueUpdates(n)}),(function(e,s){var l=a[i];if(i+=1,void 0!==s)if(n){var c=Ie(l);if(o===s)c.dynamicSlotNameMatched?r.handleChildrenUpdate(e,l,void 0,void 0):((u=r.shadowRoot.createVirtualNode("virtual")).destroyBackendElementOnDetach(),re.setSlotElement(u,n),Ie(u).dynamicSlotNameMatched=!0,r.handleChildrenCreationAndInsert(e,u,void 0,void 0),t.replaceChild(u,l));else if(c.dynamicSlotNameMatched){var u=r.createDynamicPlaceholder(n);t.replaceChild(u,l)}}else l.slot=s,r.handleChildrenUpdate(e,l,void 0,void 0);else r.handleChildrenUpdate(e,l,n,o)}),void 0,void 0)},e.prototype.dynamicSlotUpdate=function(e,t,n){var o=this,r=e.getShadowRoot();return 3===(null==r?void 0:r.getSlotMode())?(r.setDynamicSlotHandler(t||[],(function(t){for(var r=[],i=function(e){var i=t[e],a=i.slot,s=i.name,l=i.slotValues,c=o.handleChildrenCreation((function(e,t,o,r,i,a,s){n(!0,t,o,r,i,a,s,l,void 0)}),a,s);r.push.apply(r,c)},a=0;a<t.length;a+=1)i(a);r.length&&e.insertChildren(r,-1)}),(function(t){if(t.length&&t[0].slotNodes.length){t.sort((function(e,t){return e.slotNodes[0].parentIndex-t.slotNodes[0].parentIndex}));for(var n=-1/0,o=-1/0,r=0;r<t.length;r+=1){var i=t[r].slotNodes,a=i[0].parentIndex;o===a||(n>=0&&e.removeChildren(n,o-n),n=a),o=a+i.length}n>=0&&e.removeChildren(n,o-n)}}),(function(t,r,i){var a=t._$slotName||"";o.handleChildrenUpdate((function(e,t,o,a,s,l,c){n(!1,t,o,a,s,l,c,r,i)}),e,t,a)})),r):null},e.prototype.createDynamicPlaceholder=function(e){var t=this.shadowRoot.createVirtualNode("virtual");return t.destroyBackendElementOnDetach(),re.setSlotElement(t,e),Ie(t).dynamicSlotNameMatched=!1,t},e.prototype.createCommonElement=function(e,t,n,o,r){var i,a=this,s=this.shadowRoot.checkComponentPlaceholder(e),l=!1,c=function(e){var t=e instanceof $e?a.dynamicSlotUpdate(e,r,o):null;t&&(l=!0),n(e,!0),e instanceof $e&&(e.hasPendingChanges()&&$e.getDataProxy(e).applyDataUpdates(!0),null==t||t.applySlotUpdates())};if(this.disallowNativeNode||"boolean"==typeof s){var u=void 0;s&&(u=function(){var n,o=a.shadowRoot.createComponent(e,e,t,void 0,c);o.destroyBackendElementOnDetach();var r=o.getShadowRoot(),s=i instanceof $e?i.getShadowRoot():null,l=3===(null==s?void 0:s.getSlotMode());if(3===(null==r?void 0:r.getSlotMode())){if(!l)throw new Error('The "dynamicSlots" option of the component and its placeholder should be the same.');null===(n=i.parentNode)||void 0===n||n.replaceChild(o,i)}else{if(l)throw new Error('The "dynamicSlots" option of the component and its placeholder should be the same.');i.selfReplaceWith(o)}}),(i=this.shadowRoot.createComponent(e,e,t,u,c)).destroyBackendElementOnDetach()}else(i=this.shadowRoot.createComponentOrNativeNode(null!=s?s:e,t,c)).destroyBackendElementOnDetach();return l?this.bindingMapDisabled=!0:this.handleChildrenCreationAndInsert(o,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 $e?(e.hasExternalClass("class")&&e.setExternalClass("class",Re(t)),e.class=Re(t)):e.class=Re(t)},e.prototype.y=function(e,t){e.setNodeStyle(Re(t),0)},e.prototype.d=function(e,t,n){e.setDataset(t,n)},e.prototype.m=function(e,t,n){e.setMark(t,n)},e.prototype.v=function(e,t,n,o,r,i,a){var s=this,l="function"==typeof n?this.eventListenerFilter(n):Re(n),c=function(t){var n,o=e.ownerShadowRoot.getHostNode(),r=o.getMethodCaller(),i="function"==typeof l?l:$e.getMethod(o,l);if("function"==typeof i){var a=s.eventObjectFilter(t);n=i.call(r,a)}return n},u={final:o,mutated:r,capture:i};if(a){var d=Ie(e);d.dynEvListeners||(d.dynEvListeners={});var p=d.dynEvListeners;p[t]&&e.removeListener(t,p[t],u),p[t]=c}l&&e.addListener(t,c,u)},e.prototype.r=function(e,t,n,o){var r;if(e instanceof $e){var i=$e.getDataProxy(e),a=t.replace(/-(.|$)/g,(function(e){return e[1]?e[1].toUpperCase():""}));if(i.replaceProperty(a,n)){o&&i.setModelBindingListener(a,(function(t){var n=e.ownerShadowRoot.getHostNode(),r=$e.getDataProxy(n);r.replaceDataOnPath(o,t),r.applyDataUpdates(!1)}));var s=Ie(e);if(null===(r=s.changeProp)||void 0===r?void 0:r[t]){var l=s.changeProp[t],c=l.oldValue;if(c!==n){l.oldValue=n;var u=e.ownerShadowRoot.getHostNode();l.listener.call(u.getMethodCaller(),n,c,u,e)}}}else e.hasExternalClass(t)?e.setExternalClass(t,Re(n)):a.startsWith("bind")?this.v(e,a.slice("bind".length),Re(n),!1,!1,!1,!0):a.startsWith("captureBind")?this.v(e,a.slice("captureBind".length),Re(n),!1,!1,!0,!0):a.startsWith("catch")?this.v(e,a.slice("catch".length),Re(n),!0,!1,!1,!0):a.startsWith("captureCatch")?this.v(e,a.slice("captureCatch".length),Re(n),!0,!1,!0,!0):a.startsWith("on")&&this.v(e,a.slice("on".length),Re(n),!1,!1,!1,!0)}else e instanceof $t&&(e.updateAttribute(t,n),o&&e.setModelBindingListener(t,(function(t){var n=e.ownerShadowRoot.getHostNode(),r=$e.getDataProxy(n);r.replaceDataOnPath(o,t),r.applyDataUpdates(!1)})))},e.prototype.wl=function(e,t,n){e instanceof $e&&e.triggerWorkletChangeLifetime(t,n)},e.prototype.p=function(e,t,n){if(e instanceof $e&&$e.hasProperty(e,t)){var o=Ie(e);o.changeProp||(o.changeProp=Object.create(null)),o.changeProp[t]={listener:this.changePropFilter(n),oldValue:e.data[t]}}},e.prototype.setFnFilter=function(e,t){this.changePropFilter=e,this.eventListenerFilter=t},e}(),Pe=function(){},je=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 o=n[e];if(void 0!==o)for(var r=0;r<o.length;r+=1)(0,o[r])(t,(function(){}),(function(e,t){e.textContent=t}))},e.prototype.handleChildrenCreation=function(e,t){var n=this,o=!0,r=!1,i=function(){o=!1,r=!1;var e=document.createElement("virtual");t.appendChild(e),n.shadowRoot.slot=e};e(!0,(function(e,n){r?i():o=!1;var a=document.createTextNode(e||"");n&&n(a),t.appendChild(a)}),(function(e,a,s,l){r?i():o=!1;var c=document.createElement(e);s(c,!0),n.handleChildrenCreation(l,c),t.appendChild(c)}),Pe,Pe,(function(){o?(r=!0,n.shadowRoot.slot=t):i()}),(function(e){r?i():o=!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]=Re(n)},e.prototype.m=function(){},e.prototype.v=function(e,t,n,o){var r=this;this.shadowRoot.setListener(e,t,(function(e){var t=r.shadowRoot.template.methods[n],i=null==t?void 0:t(e);return!o&&i}))},e.prototype.r=function(e,t,n){"boolean"==typeof n?n?e.setAttribute(t,""):e.removeAttribute(t):e.setAttribute(t,Re(n))},e.prototype.p=function(){},e.prototype.setFnFilter=function(){},e}(),Fe=function(){return{C:function(e,t,n,o,r,i){i("")},B:Object.create(null)}},Ue=function(){return Fe},Ge=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:Ue};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 We(this,e)},e}(),We=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 o=e.genObjectGroupEnv.group("")||Ue();this.procGenWrapper=new je(this,o),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,o=0;o<t.length;o+=1){var r=t[o][0];this.procGenWrapper.bindingMapUpdate(r[0],e,n)}},e.prototype.setListener=function(e,t,n){var o,r=e;r._$wxTmplEv?r._$wxTmplEv[t]=n:r._$wxTmplEv=((o={})[t]=n,o)},e.prototype.handleEvent=function(e,t){for(var n,o=e,r=o,i=this.shadowRootElement,a=t.type,s=t.bubbles;;){var l=t.wrapShadowedEvent(o,null,r),c=null===(n=r._$wxTmplEv)||void 0===n?void 0:n[a];if(c&&!1===c.call(r,l)&&(t.preventDefault(),t.stopPropagation()),!s||t.propagationStopped())break;if(r===i)break;var u=r.parentNode;if(!u)break;r=u}},e}(),Ve=function(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},He=function(){return{C:function(e,t,n,o,r,i){i("")},B:Object.create(null)}},ze=function(){return He};!function(e){e[e.Disabled=0]="Disabled",e[e.Enabled=1]="Enabled",e[e.Forced=2]="Forced"}(ye||(ye={}));var qe,Xe=function(){function e(){}return e.prototype.create=function(e,t){return t.externalComponent?new Ge(e):new Ke(e)},e}(),Ke=function(){function e(e){this.updateTemplate(e)}return e.prototype.updateTemplate=function(e){var t=e._$template;if("object"!=typeof t&&void 0!==t)throw new Error("Component template of ".concat(e.is,' must be a valid compiled template (or "null" for default template).'));var n=t||{content:ze};this.genObjectGroupEnv={list:n.groupList||Object.create(null),group:n.content},this.updateMode=n.updateMode||"",this.disallowNativeNode=n.disallowNativeNode||!1,this.eventObjectFilter=n.eventObjectFilter},e.prototype.createInstance=function(e){return new Ye(this,e)},e}(),Ye=function(){function e(e,t){this.comp=t,this.shadowRoot=St.createShadowRoot(t),this.shadowRoot.destroyBackendElementOnDetach(),this._$applyTemplate(e)}return e.prototype.updateTemplate=function(e,t){this._$applyTemplate(e),this.shadowRoot.removeChildren(0,this.shadowRoot.childNodes.length),this.bindingMapGen=this.procGenWrapper.create(t)},e.prototype._$applyTemplate=function(e){var t=e.genObjectGroupEnv.group("")||ze("");"bindingMap"===e.updateMode?this.forceBindingMapUpdate=2:"virtualTree"===e.updateMode?this.forceBindingMapUpdate=0:this.forceBindingMapUpdate=1,this.procGenWrapper=new Be(this.shadowRoot,t,e.disallowNativeNode,e.eventObjectFilter),this.bindingMapGen=void 0},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(S=0;S<t.length;S+=1)for(var o=t[S],r=o[0],i=o[1],a=o[2],s=o[3],l=n,c=0;c<r.length;c+=1){var u=r[c],d=l[u];if(!0===d)break;if(c===r.length-1){if(void 0===s)l[u]=!0;else{var p=a;if(void 0===d)l[u]=new Array(p);else if(!Array.isArray(d)){for(var h=new Array(p),f=Object.keys(d),v=0;v<f.length;v+=1){var g=f[v],_=d[g],$=Number(g);h.length<$&&(h.length=$),h[g]=_}l[u]=h}var m=l[u];m.length<p&&(m.length=p);var y=new Array(i.length);y.fill(!0),m.splice.apply(m,Ve([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 S=0;S<t.length;S+=1)this.tryBindingMapUpdate(e,t[S])},e.prototype.tryBindingMapUpdate=function(e,t){if(!t)return!0;var n=this.bindingMapGen;if(!n)return!1;var o=t[0];return 1===o.length&&this.procGenWrapper.bindingMapUpdate(o[0],e,n)},e}();!function(e){e.None="none",e.Simple="simple",e.SimpleWithRecursion="simple-recursion"}(qe||(qe={}));var Ze=null,Qe=function(){if(Ze)return Ze;var e=new Me;return Ze=e,e},Je=null,et=function(){return Je||(e=new g,Je=e,e);var e},tt={defaultComponentSpace:null,externalComponent:!1,templateEngine:new Xe,styleScope:w.globalScope(),extraStyleScope:null,hostNodeTagName:"wx-x",multipleSlots:!1,dynamicSlots:!1,directSlots:!1,reflectToAttributes:!1,writeFieldsToNode:!0,writeIdToDOM:!1,useMethodCallerListeners:!1,idPrefixGenerator:null,pureDataPattern:null,dataDeepCopy:qe.Simple,propertyPassingDeepCopy:qe.Simple,listenerChangeLifetimes:!1,virtualHost:!1,propertyEarlyInit:!1,throwGlobalError:!1,writeExtraInfoToAttr:!1,backendContext:null},nt=function(e,t){var n=void 0===t?tt:t;if(void 0===e&&n!==tt)return n;var o=null!=e?e:{};return{externalComponent:void 0!==o.externalComponent?o.externalComponent:n.externalComponent,templateEngine:void 0!==o.templateEngine?o.templateEngine:n.templateEngine,styleScope:void 0!==o.styleScope?o.styleScope:n.styleScope,hostNodeTagName:void 0!==o.hostNodeTagName?o.hostNodeTagName:n.hostNodeTagName,extraStyleScope:void 0!==o.extraStyleScope?o.extraStyleScope:n.extraStyleScope,multipleSlots:void 0!==o.multipleSlots?o.multipleSlots:n.multipleSlots,dynamicSlots:void 0!==o.dynamicSlots?o.dynamicSlots:n.dynamicSlots,directSlots:void 0!==o.directSlots?o.directSlots:n.directSlots,reflectToAttributes:void 0!==o.reflectToAttributes?o.reflectToAttributes:n.reflectToAttributes,writeFieldsToNode:void 0!==o.writeFieldsToNode?o.writeFieldsToNode:n.writeFieldsToNode,writeIdToDOM:void 0!==o.writeIdToDOM?o.writeIdToDOM:n.writeIdToDOM,useMethodCallerListeners:void 0!==o.useMethodCallerListeners?o.useMethodCallerListeners:n.useMethodCallerListeners,idPrefixGenerator:void 0!==o.idPrefixGenerator?o.idPrefixGenerator:n.idPrefixGenerator,pureDataPattern:void 0!==o.pureDataPattern?o.pureDataPattern:n.pureDataPattern,dataDeepCopy:void 0!==o.dataDeepCopy?o.dataDeepCopy:n.dataDeepCopy,propertyPassingDeepCopy:void 0!==o.propertyPassingDeepCopy?o.propertyPassingDeepCopy:n.propertyPassingDeepCopy,listenerChangeLifetimes:void 0!==o.listenerChangeLifetimes?o.listenerChangeLifetimes:n.listenerChangeLifetimes,virtualHost:void 0!==o.virtualHost?o.virtualHost:n.virtualHost,propertyEarlyInit:void 0!==o.propertyEarlyInit?o.propertyEarlyInit:n.propertyEarlyInit}},ot=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=[],o=this._$arr,r=0;r<o.length;r+=1){if(o[r]===e){n.push.apply(n,o.slice(r+1)),t=e;break}n.push(o[r])}this._$arr=n,this.empty=0===this._$arr.length}return t},e.prototype.call=function(e,t,n){var o=this._$arr,r=!0;if(o)for(var i=0;i<o.length;i+=1)!1===ct(this._$type,o[i],e,t,n,this._$avoidErrorHandler)&&(r=!1);return r},e.safeCallback=function(e,t,n,o,r,i){void 0===i&&(i=!1);try{return t.apply(n,o)}catch(s){var a="[Error] [Component] ".concat(e||"Error Listener"," Error @ ");return n instanceof $e&&(a+=n.is),a+="#".concat(t.name||"(anonymous)"),r&&r.triggerLifetime("error",[s]),void function(e,t,n){if(n||!1!==it.call(e,[e,t])){if(tt.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:o},i)}},e.addGlobalErrorListener=function(e){it.add(e)},e.removeGlobalErrorListener=function(e){it.remove(e)},e.addGlobalWarningListener=function(e){st.add(e)},e.removeGlobalWarningListener=function(e){st.remove(e)},e}();function rt(e){var t="[Warning] [Component] ".concat(e);st.call(t,[t])&&console.warn(t)}var it=new ot;it._$avoidErrorHandler=!0;var at,st=new ot,lt=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=[],o=this._$arr,r=0;r<o.length;r+=1){var i=o[r];if(i.f===e){n.push.apply(n,o.slice(r+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,o){var r=this._$arr,i=!0;if(r)for(var a=0;a<r.length;a+=1){var s=r[a],l=s.f;n(s.data)&&!1===ot.safeCallback(this._$type,l,e,t,o)&&(i=!1)}return i},e}(),ct=ot.safeCallback,ut=ot.addGlobalErrorListener,dt=ot.removeGlobalErrorListener,pt=ot.addGlobalWarningListener,ht=ot.removeGlobalWarningListener,ft=function(){function e(e){this._$subtreeObserversCount=0,this.attrObservers=null,this.textObservers=null,this.childObservers=null,this.attachObservers=null,this._$boundElement=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._$boundElement.childNodes.forEach((function(n){n instanceof re&&(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,o=e;do{var r=o._$mutationObserverTarget;null===(n=null==r?void 0:r.attrObservers)||void 0===n||n.call(o,[t]);var i=o.parentNode;if(!i)break;if(!(o=i)._$mutationObserverTarget)break}while(o._$mutationObserverTarget._$subtreeObserversCount>0)},e.callTextObservers=function(e,t){for(var n,o=e.parentNode;o;){var r=o._$mutationObserverTarget;if(!r||0===r._$subtreeObserversCount)break;null===(n=r.textObservers)||void 0===n||n.call(o,[t]),o=o.parentNode}},e.callChildObservers=function(e,t){var n,o=e;do{var r=o._$mutationObserverTarget;null===(n=null==r?void 0:r.childObservers)||void 0===n||n.call(o,[t]);var i=o.parentNode;if(!i)break;if(!(o=i)._$mutationObserverTarget)break}while(o._$mutationObserverTarget._$subtreeObserversCount>0)},e.callAttachObservers=function(e,t){var n,o=e._$mutationObserverTarget;null===(n=null==o?void 0:o.attachObservers)||void 0===n||n.call(e,[t])},e}(),vt=function(){function e(e){this._$subtreeListenersCount=0,this._$boundFuncArrs=[],this._$boundTarget=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,o=this._$listener;if(!o)throw new Error("A MutationObserver can only observe once");e._$mutationObserverTarget?n=e._$mutationObserverTarget:(n=new ft(e),e._$mutationObserverTarget=n),this._$listener=null;var r=t.subtree?o:function(e){e.target===this&&o.call(this,e)};this._$normalizedListener=r,this._$boundTarget=n,t.properties&&(n.attrObservers||(n.attrObservers=new ot),n.attrObservers.add(r),this._$boundFuncArrs.push(n.attrObservers),this._$subtreeListenersCount+=1),t.childList&&(n.childObservers||(n.childObservers=new ot),n.childObservers.add(r),this._$boundFuncArrs.push(n.childObservers),this._$subtreeListenersCount+=1),t.characterData&&(n.textObservers||(n.textObservers=new ot),n.textObservers.add(r),this._$boundFuncArrs.push(n.textObservers),this._$subtreeListenersCount+=1),t.subtree&&n.updateSubtreeCount(this._$subtreeListenersCount),t.attachStatus&&(n.attachObservers||(n.attachObservers=new ot),n.attachObservers.add(r),this._$boundFuncArrs.push(n.attachObservers))},e.prototype.disconnect=function(){var e;null===(e=this._$boundTarget)||void 0===e||e.updateSubtreeCount(-this._$subtreeListenersCount);var t=this._$boundFuncArrs;this._$boundFuncArrs=[];var n=this._$normalizedListener;n&&t.forEach((function(e){e.remove(n)}))},e}(),gt=function(){function e(e,t){var n;if(this._$slotElement=null,this._$destroyOnDetach=!1,this._$subtreeSlotStart=null,this._$subtreeSlotEnd=null,this._$text=String(e),3===t.getBackendMode())n=t._$nodeTreeContext.document.createTextNode(e);else if(1===t.getBackendMode()){var o=t._$backendShadowRoot;n=(null==o?void 0:o.createTextNode(e))||null}else n=t._$nodeTreeContext.createTextNode(e);this._$backendElement=n,this.ownerShadowRoot=t,this.parentNode=null,this.parentIndex=-1,this.containingSlot=void 0}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&&(3!==this.ownerShadowRoot.getBackendMode()&&this._$backendElement.release(),this._$backendElement=null)},e.prototype.destroyBackendElementOnDetach=function(){this._$destroyOnDetach=!0},e.prototype.getBackendElement=function(){return this._$backendElement},e.prototype.getComposedParent=function(){if(void 0!==this.containingSlot)return this.containingSlot;for(var e=this.parentNode;null==e?void 0:e._$inheritSlots;)e=e.parentNode;return 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&&(3===this.ownerShadowRoot.getBackendMode()?this._$backendElement.textContent=this._$text:this._$backendElement.setText(this._$text)),ft.callTextObservers(this,{type:"characterData",target:this})},enumerable:!1,configurable:!0}),e}(),_t=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 o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),$t=function(e){function t(){throw new Error("Element cannot be constructed directly")}return _t(t,e),t.create=function(e,n,o,r){var i,a=Object.create(t.prototype);a.is=e,a._$placeholderHandler=r;var s,l=n._$nodeTreeContext;if(3===n.getBackendMode())s=l.document.createElement(e);else if(1===n.getBackendMode()){var c=n._$backendShadowRoot;s=(null==c?void 0:c.createElement(e,null!=o?o:e))||null}else s=l.createElement(e,null!=o?o:e);if(a._$initialize(!1,s,n,l),a.classList=new E(a,null),n&&s){var u=n.getHostNode()._$definition._$options.styleScope;if(u&&3!==n.getBackendMode()&&s.setStyleScope(u),tt.writeExtraInfoToAttr){var d=null===(i=n.getHostNode()._$behavior.ownerSpace)||void 0===i?void 0:i.styleScopeManager.queryName(u);d&&s.setAttribute("exparser:info-class-prefix","".concat(d,"--"))}}return s&&(3!==n.getBackendMode()?s.associateValue(a):n._$nodeTreeContext.associateValue(s,a)),a},t.prototype.setModelBindingListener=function(e,t){var n=this;if(this._$modelBindingListeners||(this._$modelBindingListeners=Object.create(null)),!this._$modelBindingListeners[e]){var o=this.getBackendElement();if(o){var r=function(t){var o,r=null===(o=n._$modelBindingListeners)||void 0===o?void 0:o[e];r&&r.call(n,t)};3===this.getBackendMode()?this.getBackendContext().setModelBindingStat(o,e,r):o.setModelBindingStat(e,r)}}this._$modelBindingListeners[e]=t},t}(re),mt=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 o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();!function(e){e[e.Direct=0]="Direct",e[e.Single=1]="Single",e[e.Multiple=2]="Multiple",e[e.Dynamic=3]="Dynamic"}(at||(at={}));var yt,bt=function(e,t,n){var o=t.waiting;if(o)return o.add(e),o.hintUsed(n),function(){o.remove(e)}},St=function(e){function t(){throw new Error("Element cannot be constructed directly")}return mt(t,e),t.createShadowRoot=function(e){var n,o=Object.create(t.prototype),r=1===e.getBackendMode()&&(null===(n=e.getBackendElement())||void 0===n?void 0:n.getShadowRoot())||null;o._$initializeVirtual("shadow",o,e._$nodeTreeContext,r),o._$idMap=null;var i=1,a=e.getComponentOptions();return a.multipleSlots?i=2:a.dynamicSlots?i=3:a.directSlots&&(i=0),o._$slotMode=i,1===i?o._$singleSlot=null:2===i?(o._$slots=Object.create(null),o._$slotsList=Object.create(null)):3===i&&(o._$dynamicSlotsInserted=!1,o._$dynamicSlots=new Map,o._$requiredSlotValueNames=[],o._$propertyPassingDeepCopy=V(a.propertyPassingDeepCopy),o._$insertDynamicSlotHandler=void 0,o._$removeDynamicSlotHandler=void 0,o._$updateDynamicSlotHandler=void 0),o._$backendShadowRoot=r,o._$initialize(!0,r,o,e._$nodeTreeContext),o._$host=e,e.shadowRoot=o,o},t.prototype.getHostNode=function(){return this._$host},t.prototype.createTextNode=function(e){return void 0===e&&(e=""),new gt(e,this)},t.prototype.createNativeNode=function(e){return $t.create(e,this)},t.prototype.createVirtualNode=function(e){return void 0===e&&(e="virtual"),se.create(e,this)},t.prototype.createNativeNodeWithInit=function(e,t,n,o){var r=$t.create(e,this,t,n);return null==o||o(r),r},t.prototype.createComponent=function(e,t,n,o,r){var i,a=this._$host,s=a._$behavior,l=a._$genericImpls,c=s.ownerSpace,u=void 0===t?e:t,d=s._$using[u];if("string"==typeof d)return this.createNativeNodeWithInit(d,e,void 0,r);if(d){var p=void 0;d.final?p=d.final:null!==d.placeholder&&(p=ve(d.placeholder,c,d.source,l));var h=o?bt(o,d,a):void 0;if("string"==typeof p)return this.createNativeNodeWithInit(p,e,h,r);if(p)return $e._$advancedCreate(e,p,this,null,fe(p,s,a,n),h,r)}var f=l&&l[u];if("string"==typeof f)return this.createNativeNodeWithInit(f,e,void 0,r);if(f){var v=void 0;if(f.final?v=f.final:null!==f.placeholder&&(v=ve(f.placeholder,c,f.source,l)),h=o?bt(o,f,a):void 0,"string"==typeof v)return this.createNativeNodeWithInit(v,e,h,r);if(v)return $e._$advancedCreate(e,v,this,null,fe(v,s,a,n),h,r)}var g=null!==(i=c.getGlobalUsingComponent(u))&&void 0!==i?i:c.getDefaultComponent();if(!g)throw new Error('Cannot find component "'.concat(u,'"'));return"string"==typeof g?this.createNativeNodeWithInit(g,e,void 0,r):$e._$advancedCreate(e,g,this,null,fe(g,s,a,n),void 0,r)},t.prototype.createComponentOrNativeNode=function(e,t,n){var o=this._$host,r=o._$behavior,i=r.ownerSpace.getGlobalUsingComponent(e);if("string"==typeof i)return this.createNativeNodeWithInit(i,e,void 0,n);if(i)return $e._$advancedCreate(e,i,this,null,fe(i,r,o,t),void 0,n);var a=$t.create(e,this);return null==n||n(a),a},t.prototype.checkComponentPlaceholder=function(e){var t,n,o=this._$host._$behavior._$using[e];if(void 0!==o)n=o;else{var r=null===(t=this._$host._$genericImpls)||void 0===t?void 0:t[e];if(!r)return;n=r}return"string"!=typeof n&&!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=re._$generateIdMap(this);return this._$idMap=e,e},t.prototype.getSlotElementFromName=function(e){var t=this._$slotMode;if(0===t)throw new Error("cannot get slot element in directSlots");if(1===t)return this._$singleSlot;if(2===t)return this._$slots[e]||null;if(3===t){for(var n=[],o=this._$subtreeSlotStart;o;o=o.next){var r=o.value;(r._$slotName||"")===e&&n.push(r)}return n}return null},t.prototype.getContainingSlot=function(e){var t,n,o=this._$slotMode;if(0===o)return(null==e?void 0:e.containingSlot)||null;if(1===o)return this._$singleSlot;if(3===o){if(!e)return null;for(var r=e;null===(t=r.parentNode)||void 0===t?void 0:t._$inheritSlots;)r=r.parentNode;var i=r._$slotElement;if((null==i?void 0:i.ownerShadowRoot)===this)return i}return 2===o?(n=e instanceof re?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){var t=this._$slotMode;if(0===t)throw new Error("Cannot iterate slots in directSlots");if(1===t)this._$singleSlot&&e(this._$singleSlot);else if(2===t)for(var n=Object.values(this._$slots),o=0;o<n.length&&!1!==e(n[o]);o+=1);else if(3===t)for(var r=this._$subtreeSlotStart;r&&!1!==e(r.value);r=r.next);},t.prototype.forEachNodeInSlot=function(e){for(var t=this._$host.childNodes,n=0;n<t.length;n+=1)if(!re.forEachNodeInSlot(t[n],e))return!1;return!0},t.prototype.forEachNodeInSpecifiedSlot=function(e,t){if(e){for(var n=e.slotNodes,o=0;o<n.length;o+=1){var r=n[o];if(!1===t(r))return!1}return!0}return this.forEachNodeInSlot((function(e,n){return null!==n||t(e)}))},t.prototype.forEachSlotContentInSlot=function(e){for(var t=this._$host.childNodes,n=0;n<t.length;n+=1)if(!re.forEachSlotContentInSlot(t[n],e))return!1;return!0},t.prototype.forEachSlotContentInSpecifiedSlot=function(e,t){if(e){for(var n=e.slotNodes,o=0;o<n.length;o+=1){var r=n[o];if(!r._$inheritSlots&&!1===t(r))return!1}return!0}return this.forEachSlotContentInSlot((function(e,n){return null!==n||t(e)}))},t.prototype.isConnected=function(e){if(e.ownerShadowRoot!==this)return!1;for(var t=e;t;t=t.parentNode)if(t===this)return!0;return!1},t.prototype._$applyMultipleSlotInsertion=function(e,t,n){var o=this._$slotsList,r=this._$slots;if(o[t]){for(var i=o[t],a={next:i},s=!0,l=this._$subtreeSlotStart;l&&a.next&&l.value!==e;l=l.next)l.value===a.next.value&&(s=!1,a=a.next);if(s)o[t]=i.prev={value:e,prev:null,next:i};else{var c=a.next;a.next={value:e,prev:a,next:c},c&&(c.prev=a.next)}}else o[t]={value:e,prev:null,next:null};var u=r[t],d=o[t].value;u!==d&&(r[t]=d,re._$insertChildReassignSlot(this,t,u||null,d))},t.prototype._$applyMultipleSlotsRemoval=function(e,t,n){for(var o=this._$slotsList,r=this._$slots,i=o[t]||null;i&&i.value!==e;i=i.next);if(i){var a=i.prev,s=i.next;if(a&&(a.next=s),s&&(s.prev=a),!a){var l=s;if(l){var c=l.value;o[t]=l,n||(r[t]=c,re._$insertChildReassignSlot(this,t,e,c))}else delete o[t],n||(delete r[t],re._$insertChildReassignSlot(this,t,e,null))}}},t.prototype._$applySlotRename=function(e,t,n){var o=this._$slotMode;if(1!==o&&0!==o){if(2===o)return this._$applyMultipleSlotsRemoval(e,n,!1),void this._$applyMultipleSlotInsertion(e,t,!1);if(3===o){if(!this._$dynamicSlotsInserted)return;var r=this._$insertDynamicSlotHandler,i=this._$removeDynamicSlotHandler;this._$dynamicSlots.set(e,{updatePathTree:void 0}),null==i||i([e]),null==r||r([{slot:e,name:t,slotValues:e._$slotValues}])}}},t.prototype._$applySlotsInsertion=function(e,t,n){var o=this._$slotMode;if(0!==o){if(1===o){var r=this._$singleSlot,i=this._$subtreeSlotStart.value;if(r===i)return;return this._$singleSlot=i,void re._$insertChildReassignSlot(this,null,r||null,i)}if(2!==o){if(3===o){if(n)return;if(!this._$dynamicSlotsInserted)return;for(var a=this._$insertDynamicSlotHandler,s=[],l=e;l&&l!==t.next;l=l.next)d=(u=l.value)._$slotName,this._$dynamicSlots.set(u,{updatePathTree:void 0}),s.push({slot:u,name:d,slotValues:u._$slotValues});null==a||a(s)}}else for(var c=e;c&&c!==t.next;c=c.next){var u,d=(u=c.value)._$slotName;this._$applyMultipleSlotInsertion(u,d,n)}}},t.prototype._$applySlotsRemoval=function(e,t,n){var o,r=this._$slotMode;if(0!==r){if(1===r){if(n)return;var i=this._$singleSlot,a=null===(o=this._$subtreeSlotStart)||void 0===o?void 0:o.value;if(i===a)return;return this._$singleSlot=a,void re._$insertChildReassignSlot(this,null,i||null,a||null)}if(2!==r){if(3===r){if(n)return;if(!this._$dynamicSlotsInserted)return;for(var s=this._$removeDynamicSlotHandler,l=[],c=e;c&&c!==t.next;c=c.next)d=c.value,this._$dynamicSlots.delete(d),l.push(d);null==s||s(l)}}else for(var u=e;u&&u!==t.next;u=u.next){var d,p=(d=u.value)._$slotName;this._$applyMultipleSlotsRemoval(d,p,n)}}},t.prototype.setDynamicSlotHandler=function(e,t,n,o){if(3===this._$slotMode&&(this._$requiredSlotValueNames=e,this._$insertDynamicSlotHandler=t,this._$removeDynamicSlotHandler=n,this._$updateDynamicSlotHandler=o,this._$dynamicSlotsInserted))for(var r=this._$dynamicSlots.values(),i=r.next();!i.done;i=r.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 o,r=e._$slotValues;if(r){var i=r[t],a=n;if(0!==this._$propertyPassingDeepCopy&&(a=2===this._$propertyPassingDeepCopy?I(n,!0):T(n)),i!==a&&(r[t]=a,!(this._$requiredSlotValueNames.indexOf(t)<0))){var s=null===(o=this._$dynamicSlots)||void 0===o?void 0:o.get(e);s&&(s.updatePathTree||(s.updatePathTree=Object.create(null)),s.updatePathTree[t]=!0)}}},t.prototype.applySlotValueUpdates=function(e){var t,n,o=null===(t=this._$dynamicSlots)||void 0===t?void 0:t.get(e),r=null==o?void 0:o.updatePathTree;r&&(o.updatePathTree=void 0,null===(n=this._$updateDynamicSlotHandler)||void 0===n||n.call(this,e,e._$slotValues,r))},t.prototype.applySlotUpdates=function(){var e;if(this._$dynamicSlotsInserted)for(var t=this._$dynamicSlots.entries(),n=t.next();!n.done;n=t.next()){var o=n.value,r=(c=o[0],o[1]),i=r.updatePathTree;i&&(r.updatePathTree=void 0,null===(e=this._$updateDynamicSlotHandler)||void 0===e||e.call(this,c,c._$slotValues,i))}else{this._$dynamicSlotsInserted=!0;for(var a=this._$insertDynamicSlotHandler,s=[],l=this._$subtreeSlotStart;l;l=l.next){var c,u=(c=l.value)._$slotName;this._$dynamicSlots.set(c,{updatePathTree:void 0}),s.push({slot:c,name:u,slotValues:c._$slotValues})}null==a||a(s)}},t.prototype.getSlotMode=function(){return this._$slotMode},t._$updateSubtreeSlotNodes=function(e,t,n,o,r){if(n||o){var i=null==n?void 0:n.getSlotMode(),a=null==o?void 0:o.getSlotMode();if(void 0!==i&&0!==i||void 0!==a&&0!==a){if(!(void 0!==i&&1!==i||void 0!==a&&1!==a)){for(var s=-1,l=0,c=-1,u=[],d=t[0].containingSlot,p=null==n?void 0:n.getContainingSlot(t[0]),h=0;h<t.length;h+=1){var f=t[h];re.forEachNodeInSlot(f,(function(e){d&&(l?l+=1:(s=e.slotIndex,l=1)),u.push(e)}))}if(p&&u.length){var v=u[0];c=re._$findSlotNodeInsertPosition(p,v,r)}return{updateContainingSlot:function(){for(var e=u.length-1;e>=0;e-=1){var t=u[e];re._$updateContainingSlot(t,p)}},removeSlotNodes:function(){o&&d&&l&&re._$spliceSlotNodes(d,s,l,void 0)},insertSlotNodes:function(){n&&p&&u.length&&re._$spliceSlotNodes(p,c,0,u)}}}var g=new Map,_=new Map,$=[];for(h=0;h<t.length;h+=1)f=t[h],re.forEachNodeInSlot(f,(function(e,t){var o=0!==i?null==n?void 0:n.getContainingSlot(e):void 0;if(t){var r=_.get(t);r?r.count+=1:_.set(t,{start:e.slotIndex,count:1})}if(o){var a=g.get(o);a?a.nodes.push(e):g.set(o,{nodes:[e],insertPos:-1})}$.push([e,o])}));if(n&&g.size)for(var m=g.entries(),y=m.next();!y.done;y=m.next()){var b=y.value,S=b[0],C=b[1].nodes[0];y.value[1].insertPos=re._$findSlotNodeInsertPosition(S,C,r)}return{updateContainingSlot:function(){for(var e=$.length-1;e>=0;e-=1){var t=$[e],n=t[0],o=t[1];re._$updateContainingSlot(n,o)}},removeSlotNodes:function(){if(o&&_.size)for(var e=_.entries(),t=e.next();!t.done;t=e.next()){var n=t.value,r=n[0],i=n[1],a=i.start,s=i.count;re._$spliceSlotNodes(r,a,s,void 0)}},insertSlotNodes:function(){if(n&&g.size)for(var e=g.entries(),t=e.next();!t.done;t=e.next()){var o=t.value,r=o[0],i=o[1],a=i.nodes,s=i.insertPos;re._$spliceSlotNodes(r,s,0,a)}}}}}},t}(se),Ct=function(e){if(e instanceof re){var t;return t=e instanceof se?"(virtual):".concat(e.is):e instanceof $e?"".concat(e.tagName,":").concat(e.is):e instanceof $t?e.is:"(unknown)","<".concat(t).concat(function(e){var t="";if(e instanceof re){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 se||(e instanceof $e?$e.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 gt?e.textContent.trim():null===e?"<(null)>":void 0===e?"<(undefined)>":"<(unknown)>"},wt=function(e,t,n){void 0===n&&(n=0);for(var o="",r=n;r;r-=1)o+=" ";var i=o+Ct(e),a=!1;return e instanceof re&&(e instanceof $e&&(a=e._$external),t?a?(i+="\n".concat(o," <(external)>"),e.forEachComposedChild((function(e){i+="\n".concat(wt(e,t,n+2))}))):e.forEachComposedChild((function(e){i+="\n".concat(wt(e,t,n+1))})):e.childNodes.forEach((function(e){i+="\n".concat(wt(e,t,n+1))}))),i},Et=function(e,t){console.log(wt(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"}(yt||(yt={}));var Nt=function(){function e(e,t,n){if(void 0===n&&(n=re),!(e instanceof re||e instanceof gt))throw new Error("Element iterators can only be used in elements or text nodes");if(this._$node=e,this._$nodeTypeLimit=n||re,"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,o){return new e(t,n,o)},e.prototype.forEach=function(e){var t=this._$nodeTypeLimit,n=this._$composed;if(this._$isAncestor)for(var o=this._$node;;){if(o instanceof t&&!1===e(o))return;var r;if(!(r=n?o.getComposedParent():o.parentNode))break;o=r}else{var i=this._$rootFirst,a=function(o){if(i&&o instanceof t&&!1===e(o))return!1;if(o instanceof re){var r=!1,s=function(e){return!1!==a(e)||(r=!0,!1)};if(n?o.forEachComposedChild(s):o.childNodes.forEach(s),r)return!1}return!(!i&&o instanceof t&&!1===e(o))};a(this._$node)}},e}(),kt=function(e,t){var n,o;n=e.getBackendContext(),o=t||null,n.render((function(){"function"==typeof o&&ct("render",o,n,[null])}))},Ot=function(e){return Qe().defineBehavior(e)},xt=function(e){return Qe().defineComponent(e)};function At(e,t){return $e.create(e,t||null)}var Mt=Q.triggerEvent,Lt=Q.triggerExternalEvent;module.exports=t})();
2
2
  //# sourceMappingURL=glass_easel.all.js.map