web-component-wrapper 0.0.597 → 0.0.599
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ReactWeb.js +1 -0
- package/dist/Web.js +1 -0
- package/dist/bundle/ReactWeb.js +42 -0
- package/dist/bundle/Web.js +3 -0
- package/dist/bundle/compatible/ReactWeb.js +42 -0
- package/dist/bundle/compatible/Web.js +3 -0
- package/dist/bundle/compatible/decorator.js +3 -0
- package/dist/bundle/compatible/index.js +42 -0
- package/dist/bundle/compatible/test.js +42 -0
- package/dist/bundle/compatible/type.js +1 -0
- package/dist/bundle/decorator.js +3 -0
- package/dist/bundle/index.js +42 -0
- package/dist/bundle/test.js +42 -0
- package/dist/bundle/type.js +1 -0
- package/{ReactWeb.js → dist/compatible/ReactWeb.js} +1 -1
- package/{Web.js → dist/compatible/Web.js} +1 -1
- package/{decorator.js → dist/compatible/decorator.js} +0 -0
- package/{index.js → dist/compatible/index.js} +1 -1
- package/dist/compatible/test.js +1 -0
- package/dist/compatible/type.js +1 -0
- package/{decoratorNext.js → dist/decorator.js} +0 -0
- package/dist/index.js +1 -0
- package/dist/test.js +1 -0
- package/dist/type.js +1 -0
- package/package.json +45 -32
- package/readme.md +101 -0
- package/ReactWeb.d.ts +0 -174
- package/ReactWebNext.js +0 -1
- package/Web.d.ts +0 -463
- package/WebNext.js +0 -1
- package/decorator.d.ts +0 -23
- package/index.d.ts +0 -20
- package/indexNext.js +0 -1
- package/polyfill.html.ejs +0 -74
- package/type.d.ts +0 -100
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";if("undefined"!=typeof module&&null!==module&&"undefined"!==eval("typeof require")&&null!==eval("require")&&"main"in eval("require")&&"undefined"!==eval("typeof require.main")&&null!==eval("require.main")){var ORIGINAL_MAIN_MODULE=module;module!==eval("require.main")&&"paths"in module&&"paths"in eval("require.main")&&"undefined"!=typeof __dirname&&null!==__dirname&&(module.paths=eval("require.main.paths").concat(module.paths.filter((function(path){return eval("require.main.paths").includes(path)}))))}if(null==window)var window="undefined"==typeof global||null===global?{}:global;!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@babel/runtime/helpers/extends"),require("@babel/runtime/helpers/inheritsLoose"),require("clientnode"),require("clientnode/property-types"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("react"),require("react-dom"),require("react-dom/client"),require("@babel/runtime/helpers/initializerDefineProperty"),require("@babel/runtime/helpers/applyDecoratedDescriptor"),require("@babel/runtime/helpers/initializerWarningHelper"));else if("function"==typeof define&&define.amd)define(["@babel/runtime/helpers/extends","@babel/runtime/helpers/inheritsLoose","clientnode","clientnode/property-types","@babel/runtime/helpers/asyncToGenerator","@babel/runtime/regenerator","react","react-dom","react-dom/client","@babel/runtime/helpers/initializerDefineProperty","@babel/runtime/helpers/applyDecoratedDescriptor","@babel/runtime/helpers/initializerWarningHelper"],t);else{var r="object"==typeof exports?t(require("@babel/runtime/helpers/extends"),require("@babel/runtime/helpers/inheritsLoose"),require("clientnode"),require("clientnode/property-types"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("react"),require("react-dom"),require("react-dom/client"),require("@babel/runtime/helpers/initializerDefineProperty"),require("@babel/runtime/helpers/applyDecoratedDescriptor"),require("@babel/runtime/helpers/initializerWarningHelper")):t(e["@babel/runtime/helpers/extends"],e["@babel/runtime/helpers/inheritsLoose"],e.clientnode,e["clientnode/property-types"],e["@babel/runtime/helpers/asyncToGenerator"],e["@babel/runtime/regenerator"],e.react,e["react-dom"],e["react-dom/client"],e["@babel/runtime/helpers/initializerDefineProperty"],e["@babel/runtime/helpers/applyDecoratedDescriptor"],e["@babel/runtime/helpers/initializerWarningHelper"]);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(this,(function(e,t,r,n,i,o,s,a,p,l,c,u){return function(){var d=[function(t){t.exports=e},function(e){e.exports=r},function(e){e.exports=n},function(e){e.exports=t},function(e,t,r){var n=r(0),i=r.n(n),o=r(1),s=r(2);t.default=function(e){return void 0===e&&(e={}),e=i()({readAttribute:!0,type:s.string},e),function(t,r){if("string"==typeof r){var n,s=t.self||t.constructor;if(e.readAttribute){Object.prototype.hasOwnProperty.call(s,"observedAttributes")||(s.observedAttributes=s.observedAttributes?[].concat(s.observedAttributes):[]);var a=(0,o.camelCaseToDelimited)(r);s.observedAttributes&&!s.observedAttributes.includes(a)&&s.observedAttributes.push(a)}if(e.type&&(Object.prototype.hasOwnProperty.call(s,"propertyTypes")||(s.propertyTypes=s.propertyTypes?i()({},s.propertyTypes):{}),!s.propertyTypes||!e.update&&Object.prototype.hasOwnProperty.call(s,r)||(s.propertyTypes[r]=e.type)),e.writeAttribute)if(Object.prototype.hasOwnProperty.call(s,"propertiesToReflectAsAttributes")||(s.propertiesToReflectAsAttributes=s.propertiesToReflectAsAttributes?(0,o.copy)(s.propertiesToReflectAsAttributes):[]),e.update||s.propertiesToReflectAsAttributes instanceof Map&&!s.propertiesToReflectAsAttributes.has(r)||Array.isArray(s.propertiesToReflectAsAttributes)&&!s.propertiesToReflectAsAttributes.includes(r)||"object"==typeof s.propertiesToReflectAsAttributes&&!Object.prototype.hasOwnProperty.call(s.propertiesToReflectAsAttributes,r))"boolean"==typeof e.writeAttribute?e.writeAttribute&&s.propertyTypes&&Object.prototype.hasOwnProperty.call(s.propertyTypes,r)&&(n=s.propertyTypes[r]):n=e.writeAttribute,void 0!==n&&(Array.isArray(s.propertiesToReflectAsAttributes)&&(!0===e.writeAttribute?s.propertiesToReflectAsAttributes.push(r):s.normalizePropertyTypeList&&(s.propertiesToReflectAsAttributes=s.normalizePropertyTypeList(s.propertiesToReflectAsAttributes))),s.propertiesToReflectAsAttributes instanceof Map&&s.propertiesToReflectAsAttributes.set(r,n),"object"==typeof s.propertiesToReflectAsAttributes&&(s.propertiesToReflectAsAttributes[r]=n));e.alias&&(Object.prototype.hasOwnProperty.call(s,"propertyAliases")||(s.propertyAliases=s.propertyAliases?i()({},s.propertyAliases):{}),!s.propertyAliases||!e.update&&Object.prototype.hasOwnProperty.call(s,r)||(s.propertyAliases[r]=e.alias))}}}},function(e){e.exports=i},function(e){e.exports=o},function(e,t,r){r.d(t,{api:function(){return R}});var n,i,o,s,a=r(5),p=r.n(a),l=r(8),c=r.n(l),u=r(0),d=r.n(u),h=r(3),f=r.n(h),m=r(9),y=r.n(m),b=(r(10),r(6)),v=r.n(b),g=r(1),P=r(2),A=r(4);function w(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return T(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?T(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var O=new g.Logger({name:"web-component-wrapper-web"}),S="undefined"==typeof HTMLElement?function(){}:HTMLElement,C=(n=(0,A.default)({type:P.boolean,writeAttribute:!0}),s=function(e){function t(){var r;return(r=e.call(this)||this).renderState={promise:Promise.resolve(""),pending:!1,resolve:g.NOOP},r.childComponentInstances=[],r.batchAttributeUpdates=!0,r.batchPropertyUpdates=!0,r.batchUpdates=!0,r.batchedAttributeUpdateRunning=!0,r.batchedPropertyUpdateRunning=!0,r.batchedUpdateRunning=!0,r.connectionRegistered=!1,r.pendingAttributeUpdates=[],r.parentInstance=null,r.rootInstance=void 0,r.hostDomNode=void 0,r.scope=d()({},g.UTILITY_SCOPE),r.domNodeEventBindings=new Map,r.domNodeTemplateCache=new Map,r.externalProperties={},r.ignoreAttributeUpdateObservations=!1,r.internalProperties={},r.outputEventNames=new Set,r.instance=null,c()(r,"isRoot",o,r),r.runDomConnectionAndRenderingInSameEventQueue=!1,r.self=t,r.slots={},r.prepareNewRenderingPromise(),r.self=r.constructor,r.self._propertiesToReflectAsAttributes||(r.self._propertiesToReflectAsAttributes=r.self.normalizePropertyTypeList(r.self.propertiesToReflectAsAttributes)),r.generateAliasIndex(),r.hostDomNode=r,r.rootInstance=r,r.defineGetterAndSetterInterface(),r}f()(t,e);var r=t.prototype;return r.attributeChangedCallback=function(e,t,r){this.ignoreAttributeUpdateObservations||t===r||this.onUpdateAttribute(e,r)},r.onUpdateAttribute=function(e,t){var r=this,n=new Promise((function(n){return r.pendingAttributeUpdates.push((function(){r.evaluateStringOrNullAndSetAsProperty(e,t),r.batchAttributeUpdates?r.batchedAttributeUpdateRunning||r.batchedUpdateRunning||(r.batchedAttributeUpdateRunning=!0,r.batchedUpdateRunning=!0,(0,g.timeout)((function(){r.batchedAttributeUpdateRunning=!1,r.batchedUpdateRunning=!1,r.render("attributeChanged")}))):r.render("attributeChanged"),n()}))}));if(this.connectionRegistered)for(;this.pendingAttributeUpdates.length;)this.pendingAttributeUpdates.shift()();return n},r.connectedCallback=function(){var e=this;try{this.isConnected=!0}catch(e){}for(this.connectionRegistered=!0,this.parentInstance=this,this.rootInstance=this,this.attachEventHandler(),this.self.determineRootBinding&&(this.determineRootBinding(),this.parentInstance!==this&&this.parentInstance.childComponentInstances&&this.parentInstance.childComponentInstances.push(this)),this.self.applyRootBinding&&this.isRoot&&(this.determineRenderScope(),this.applyBinding(this,this.scope));this.pendingAttributeUpdates.length;)this.pendingAttributeUpdates.shift()();this.batchedAttributeUpdateRunning=!1,this.batchedPropertyUpdateRunning=!1,this.batchedUpdateRunning=!1,this.grabGivenSlots(),this.reflectExternalProperties(this.externalProperties),this.runDomConnectionAndRenderingInSameEventQueue?this.render("connected"):(0,g.timeout)((function(){e.render("connected")}))},r.disconnectedCallback=function(){this.unRender("disconnected"),this.unregisterConnectionState()},r.defineGetterAndSetterInterface=function(){for(var e,t=this,r=function(){var r=e.value;Object.prototype.hasOwnProperty.call(t,r)&&t.setPropertyValue(r,t[r]),Object.defineProperty(t,r,{configurable:!0,get:function(){return t.getPropertyValue(r)},set:function(e){t.setPropertyValue(r,e),t.triggerPropertySpecificRendering(r,e)}})},n=w((0,g.unique)(Object.keys(this.self.propertyTypes).concat(this.self._propertyAliasIndex?Object.keys(this.self._propertyAliasIndex):[])));!(e=n()).done;)r()},r.getPropertyAlias=function(e){return this.self._propertyAliasIndex&&Object.prototype.hasOwnProperty.call(this.self._propertyAliasIndex,e)?this.self._propertyAliasIndex[e]:null},r.getPropertyValue=function(e){var r,n,i,o=null!=(r=this.instance)&&null!=(r=r.current)&&r.properties&&(Object.prototype.hasOwnProperty.call(!t.propertyTypes,e)||Object.prototype.hasOwnProperty.call(this.instance.current.properties,e))?this.instance.current.properties[e]:null!==(n=this.internalProperties[e])&&void 0!==n?n:this.externalProperties[e];return null!=(i=this.instance)&&null!=(i=i.current)&&i.state&&Object.prototype.hasOwnProperty.call(this.instance.current.state,e)?this.instance.current.state[e]:o},r.setExternalPropertyValue=function(e,t){this.externalProperties[e]=t;var r=this.getPropertyAlias(e);r&&(this.externalProperties[r]=t)},r.setInternalPropertyValue=function(e,t){this.internalProperties[e]=t;var r=this.getPropertyAlias(e);r&&(this.internalProperties[r]=t)},r.setPropertyValue=function(e,t){var r;this.reflectProperties(((r={})[e]=t,r)),this.setInternalPropertyValue(e,t)},r.triggerPropertySpecificRendering=function(e,t){var r=this;if(this.batchPropertyUpdates)this.batchedPropertyUpdateRunning||this.batchedUpdateRunning||(this.batchedPropertyUpdateRunning=!0,this.batchedUpdateRunning=!0,(0,g.timeout)((function(){void 0!==t&&r.isStateProperty(e)?(r.render("preStatePropertyChanged"),(0,g.timeout)((function(){r.setInternalPropertyValue(e,void 0),r.batchedPropertyUpdateRunning=!1,r.batchedUpdateRunning=!1,r.render("postStatePropertyChanged"),r.triggerOutputEvents()}))):(r.batchedPropertyUpdateRunning=!1,r.batchedUpdateRunning=!1,r.render("propertyChanged"),r.triggerOutputEvents())})));else{var n=this.isStateProperty(e);this.render(n?"preStatePropertyChanged":"propertyChanged"),void 0!==t&&n&&(this.setInternalPropertyValue(e,void 0),this.render("postStatePropertyChanged")),this.triggerOutputEvents()}},r.unregisterConnectionState=function(){try{this.isConnected=!1}catch(e){}this.connectionRegistered=!1,this.slots={}},r.unregisterDomNodeEventBindings=function(){for(var e,t=w(this.domNodeEventBindings.values());!(e=t()).done;)for(var r,n=w(e.value.values());!(r=n()).done;){(0,r.value)()}},r.applyBinding=function(e,t){var r=this;if(e.getAttributeNames)for(var n,i=function(){var i,o=n.value;if(o.startsWith("data-bind-")?i=o.substring(10):o.startsWith("bind-")&&(i=o.substring(5)),i){var s=e.getAttribute(o);if(null===s)return 0;if(i.startsWith("attribute-")||i.startsWith("property-")){var a=(0,g.evaluate)(s,t,!1,!0,e);if(a.error)return O.warn("Error occurred during processing given",'attribute binding "'+o+'" on node:',e,a.error),0;i.startsWith("attribute-")?e.setAttribute(i.substring(10),a.result):e[(0,g.delimitedToCamelCase)(i.substring(9))]=a.result}else if(i.startsWith("on-")){i=(0,g.delimitedToCamelCase)(i.substring(3)),t=d()({log:O,event:void 0,parameters:void 0},t);var p=(0,g.compile)(s,t,!0,!0,e);p.error?O.warn("Error occurred during compiling given event",'binding "'+o+'" on node:',e,p.error):r.addSecureEventListener(e,i,(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.event=n[0],t.parameters=n;try{p.templateFunction.apply(p,p.originalScopeNames.map((function(e){return t[e]})))}catch(t){O.warn("Error occurred during processing","given event binding",'"'+o+'" on node:',e,'Given expression "'+s+'" could',"not be evaluated with given scope",'names "'+p.scopeNames.join('", "')+'": '+(0,g.represent)(t))}}))}}},o=w(e.getAttributeNames());!(n=o()).done;)i()},r.applyBindings=function(e,t,r){for(void 0===r&&(r=!0);e;){var n;null==(n=e.attributes)||!n.length||!r&&e.getAttribute("slot")||this.applyBinding(e,t),e.nodeName.toLowerCase().includes("-")||this.applyBindings(e.firstChild,t),e=e.nextSibling}},r.compileDomNodeTemplate=function(e,t,r){void 0===t&&(t=[]),void 0===r&&(r={}),r=d()({ignoreComponents:!0,ignoreNestedComponents:!0,unsafe:this.self.renderUnsafe},r);var n=e.nodeName.toLowerCase();if(r.ignoreComponents&&n.includes("-"))return null;if(r.unsafe){var i=e.innerHTML;if(!i&&e.template&&(i=e.template),this.self.hasCode(i)){var o=(0,g.compile)("`"+i+"`",t);return{domNode:e,children:[],error:o.error,scopeNames:o.scopeNames,template:i,templateFunction:o.templateFunction}}return null}var s=null;if("#text"===n){var a=e.textContent;a&&this.self.hasCode(a)&&(s=a.replace(/ /g," ").trim())}var p=[],l={children:p,domNode:e};if(s){var c=(0,g.compile)("`"+s+"`",t);l.error=c.error,l.scopeNames=c.scopeNames,l.template=s,l.templateFunction=c.templateFunction}for(var u=e.firstChild;u;){if(!r.filter||r.filter(u)){var h=this.compileDomNodeTemplate(u,t,d()({},r,{ignoreComponents:r.ignoreNestedComponents}));h&&p.push(h)}u=u.nextSibling}return l},r.evaluateCompiledDomNodeTemplate=function(e,t){var r=e.domNode,n=e.error,i=e.templateFunction,o=e.scopeNames;if(!i||!o)return null;if(n)return O.warn("Error occurred during compiling node content:",n),null;var s=null;try{s=i.apply(void 0,o.map((function(e){return t[e]})))}catch(n){O.warn('Error occurred when "'+this.self._name+'" is running','"'+String(i)+'": with bound','names "'+o.join('", "')+'":','"'+n+'". Rendering node:',r)}return s},r.evaluateDomNodeTemplate=function(e,t,r){var n=this;void 0===t&&(t={}),void 0===r&&(r={});var i=(r=d()({domNodeTemplateCache:this.domNodeTemplateCache,ignoreComponents:!0,ignoreNestedComponents:!0,unsafe:this.self.renderUnsafe},r)).domNodeTemplateCache;if(!i.has(e)){var o={filter:r.filter,ignoreComponents:r.ignoreComponents,ignoreNestedComponents:r.ignoreNestedComponents,unsafe:r.unsafe},s=this.compileDomNodeTemplate(e,t,o);s&&i.set(e,s)}if(i.has(e)){var a=i.get(e),p=this.evaluateCompiledDomNodeTemplate(a,t);if(null!==p&&(r.unsafe&&e.innerHTML?e.innerHTML=p:e.textContent=p),a.children.length){var l=function(e){for(var r,i=w(e);!(r=i()).done;){var o=r.value,s=n.evaluateCompiledDomNodeTemplate(o,t);null!==s&&(o.domNode.textContent=s),o.children.length&&l(o.children)}};l(a.children)}}r.applyBindings&&this.applyBindings(e,t)},r.addSecureEventListener=function(e,t,r,n,i){var o=this;this.domNodeEventBindings.has(e)||this.domNodeEventBindings.set(e,new Map);var s=this.domNodeEventBindings.get(e),a=s.get(t);a&&a!==r&&a();var p=function(){e.removeEventListener(t,r,i),s.delete(t),0===s.size&&o.domNodeEventBindings.delete(e)};return s.set(t,p),e.addEventListener(t,r,n),p},r.determineRootBinding=function(){for(var e=this.parentNode;e;){var r=e instanceof t||e.nodeName.includes("-")&&"#document-fragment"!==e.nodeName,n=null===e.parentNode&&"[object ShadowRoot]"===e.toString();r?(this.rootInstance===this&&(this.parentInstance=e,this.setPropertyValue("isRoot",!1)),this.rootInstance=e):n&&this.setPropertyValue("isRoot",!1),e=e.parentNode}},t.hasCode=function(e){return"string"==typeof e&&e.includes("${")&&e.includes("}")&&/\${[\s\S]+}/.test(e)},t.normalizePropertyTypeList=function(e){if("string"==typeof e&&(e=[e]),Array.isArray(e)){for(var r,n=e,i=new Map,o=w(n);!(r=o()).done;){var s=r.value;Object.prototype.hasOwnProperty.call(t.propertyTypes,s)&&i.set(s,t.propertyTypes[s])}return i}return(0,g.convertPlainObjectToMap)(e)},r.attachEventHandler=function(){if(null!==this.self.eventToPropertyMapping){var e=this.attachExplicitDefinedOutputEventHandler();this.attachImplicitDefinedOutputEventHandler(!e)}},r.attachExplicitDefinedOutputEventHandler=function(){var e=this;if(!this.self.eventToPropertyMapping)return!1;for(var t=!1,r=function(){var r=i[n];Object.prototype.hasOwnProperty.call(e.internalProperties,r)||(t=!0,e.outputEventNames.add(r),e.setInternalPropertyValue(r,p()(v().mark((function t(){var n,i,o,s,a=arguments;return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(n=a.length,i=new Array(n),o=0;o<n;o++)i[o]=a[o];return t.next=1,e.reflectEventToProperties(r,i);case 1:(s=t.sent)&&(i[0]=s),e.forwardEvent(r,i);case 2:case"end":return t.stop()}}),t)})))))},n=0,i=Object.keys(this.self.eventToPropertyMapping);n<i.length;n++)r();return t},r.attachImplicitDefinedOutputEventHandler=function(e){var t=this;void 0===e&&(e=!0);for(var r=function(){var r=i[n],o=r[0],s=r[1];Object.prototype.hasOwnProperty.call(t.internalProperties,o)||![P.func,"function"].includes(s)||t.self.renderProperties.includes(o)||(t.outputEventNames.add(o),t.setInternalPropertyValue(o,(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e&&t.reflectEventToProperties(o,n),t.forwardEvent(o,n)})))},n=0,i=Object.entries(this.self.propertyTypes);n<i.length;n++)r()},r.triggerOutputEvents=function(){for(var e,t=w(this.outputEventNames);!(e=t()).done;){var r=e.value;this.forwardEvent(r,[this.externalProperties])}},r.forwardEvent=function(e,t){return e.length>3&&e.startsWith("on")&&(e=(0,g.lowerCase)(e.substring(2))),this.dispatchEvent(new CustomEvent(e,{detail:{parameters:t}}))},r.applySlots=function(e,r){for(var n=this,i=0,o=Array.from(e.querySelectorAll("slot"));i<o.length;i++){var s=o[i],a=s.getAttribute("name");if(null===a||"default"===a)if(this.slots.default){if(this.self.renderSlots){if(this.self.evaluateSlots)for(var p,l=w(this.slots.default);!(p=l()).done;){var c=p.value;this.evaluateDomNodeTemplate(c,r)}(0,g.replace)(s,this.slots.default,t.trimSlots)}}else this.slots.default=(0,g.unwrap)(s).map((function(e){return n.grabSlotContent(e)}));else this.slots[a]?this.self.renderSlots&&(this.self.evaluateSlots&&this.evaluateDomNodeTemplate(this.slots[a],r),(0,g.replace)(s,this.slots[a],t.trimSlots)):this.slots[a]=this.grabSlotContent((0,g.unwrap)(s).filter((function(e){return"#text"!==e.nodeName.toLowerCase()}))[0])}},r.grabSlotContent=function(e){var t,r=P.node.firstElementChild?e:null;if(r&&"textarea"===(null==(t=r.firstElementChild)?void 0:t.nodeName.toLowerCase())&&(!r.firstElementChild.hasAttribute("data-no-template")||"false"===r.firstElementChild.getAttribute("data-no-template"))){var n=r.firstElementChild.value;r.classList.remove("web-component-template");var i=r.cloneNode();return r.classList.add("web-component-template"),i.innerHTML="",i.template=n,i}return this.self.cloneSlots?e.cloneNode(!0):e},r.grabGivenSlots=function(){var e=this;this.slots={};for(var t=0,r=Array.from(this.querySelectorAll("[slot]"));t<r.length;t++){for(var n,i=r[t],o=i.parentNode,s=!0;o;){if(o.nodeName.includes("-")){o===this&&(s=!1);break}o=o.parentNode}if(!s){var a=null==(n=i.getAttribute("slot"))?void 0:n.trim();this.slots[null!=a?a:i.nodeName.toLowerCase()]=this.grabSlotContent(i)}}this.slots.default?this.slots.default=[].concat(this.slots.default):this.childNodes.length>0?this.slots.default=Array.from(this.childNodes).map((function(t){return e.grabSlotContent(t)})):this.slots.default=[]},r.isStateProperty=function(e){var t;return Boolean((null==(t=this.instance)||null==(t=t.current)?void 0:t.state)&&(Object.prototype.hasOwnProperty.call(this.instance.current.state,e)||this.instance.current.state.modelState&&Object.prototype.hasOwnProperty.call(this.instance.current.state.modelState,e)))},r.generateAliasIndex=function(){if(!this.self._propertyAliasIndex){this.self._propertyAliasIndex=d()({},this.self.propertyAliases);for(var e=0,t=Object.entries(this.self._propertyAliasIndex);e<t.length;e++){var r=t[e],n=r[0],i=r[1];Object.prototype.hasOwnProperty.call(this.self._propertyAliasIndex,i)||(this.self._propertyAliasIndex[i]=n)}}},r.reflectExternalProperties=function(e){this.ignoreAttributeUpdateObservations=!0;for(var t=0,r=Object.entries(e);t<r.length;t++){var n,i=r[t],o=i[0],s=i[1];if(this.setExternalPropertyValue(o,s),this.isConnected){var a=(0,g.camelCaseToDelimited)(o);if(null!=(n=this.self._propertiesToReflectAsAttributes)&&n.has(o))switch(this.self._propertiesToReflectAsAttributes.get(o)){case P.boolean:case"boolean":s?""!==this.getAttribute(a)&&this.setAttribute(a,""):this.hasAttribute(a)&&this.removeAttribute(a);break;case P.func:case"function":break;case"json":if(s){var p=JSON.stringify(s);if(p&&this.getAttribute(a)!==p){this.setAttribute(a,p);break}}this.hasAttribute(a)&&this.removeAttribute(a);break;case P.number:case"number":if("number"!=typeof s||isNaN(s))this.hasAttribute(a)&&this.removeAttribute(a);else{var l=String(s);this.getAttribute(a)!==l&&this.setAttribute(a,l)}break;case P.string:case"string":s?this.getAttribute(a)!==s&&this.setAttribute(a,s):this.hasAttribute(a)&&this.removeAttribute(a);break;case P.any:case P.array:case P.arrayOf:case P.element:case P.elementType:case P.instanceOf:case P.node:case P.object:case"object":case P.objectOf:case P.shape:case P.exact:case P.symbol:default:if(s){var c=(0,g.represent)(s);if(c&&this.getAttribute(a)!==c){this.setAttribute(a,c);break}}this.hasAttribute(a)&&this.removeAttribute(a)}}}this.ignoreAttributeUpdateObservations=!1},r.reflectProperties=function(e){var t,r;if(this.reflectExternalProperties(e),null!=(t=this.instance)&&null!=(t=t.current)&&t.state&&"object"==typeof this.instance.current.state)for(var n,i=w(Object.keys(this.instance.current.state).concat(this.instance.current.state.modelState?Object.keys(this.instance.current.state.modelState):[]));!(n=i()).done;){var o=n.value;Object.prototype.hasOwnProperty.call(this.internalProperties,o)&&this.setInternalPropertyValue(o,void 0)}null!=(r=this.internalProperties.model)&&r.state&&(delete this.internalProperties.model.state,this.setInternalPropertyValue("model",this.internalProperties.model));for(var s,a=w(this.self.controllableProperties);!(s=a()).done;){var p=s.value;Object.prototype.hasOwnProperty.call(e,p)&&this.setInternalPropertyValue(p,e[p])}},r.reflectEventToProperties=function(){var e=p()(v().mark((function e(t,r){var n,i,o,s,a,p,l,c,u,h,f,m,y,b,P,A,T;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.batchUpdates,this.batchUpdates=!1,i=null,o=!1,!(this.self.eventToPropertyMapping&&Object.prototype.hasOwnProperty.call(this.self.eventToPropertyMapping,t)&&(0,g.isFunction)(this.self.eventToPropertyMapping[t]))){e.next=4;break}if(!((a=(s=this.self.eventToPropertyMapping)[t].apply(s,r.concat([this])))&&"then"in a&&(0,g.isFunction)(a.then))){e.next=2;break}return e.next=1,a;case 1:T=e.sent,e.next=3;break;case 2:T=a;case 3:p=T,o=!0,Array.isArray(p)?(i=p[0],this.reflectProperties(i),(0,g.extend)(!0,this.internalProperties,p[1])):null===p?o=!1:"object"==typeof p&&(i=p,this.reflectProperties(p));case 4:if(!o&&r.length>0&&(0,g.isObject)(r[0])){if(c=r[0],"persist"in r[0]&&(0,g.isFunction)(r[0].persist))for(c={},u=0,h=Object.keys(this.self.propertyTypes);u<h.length;u++)for(f=h[u],m=w([f].concat(null!==(b=this.getPropertyAlias(f))&&void 0!==b?b:[]));!(y=m()).done;)P=y.value,(A=r[0].currentTarget&&Object.prototype.hasOwnProperty.call(r[0].currentTarget,P)?r[0].currentTarget[P]:this.getPropertyValue(P))!==this.externalProperties[P]&&(c[P]=A);else[null,void 0].includes(null==(l=c.detail)?void 0:l.value)||(c=d()({},c.detail));i=c,this.reflectProperties(c)}return this.triggerRender("propertyReflected"),this.batchUpdates=n,e.abrupt("return",i);case 5:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}(),r.evaluateStringOrNullAndSetAsProperty=function(e,t){var r=this,n=e.startsWith("-"),i=n?e.substring(1):e,o=(0,g.delimitedToCamelCase)(i),s=this.getPropertyAlias(o);if(s&&Object.prototype.hasOwnProperty.call(this.self.propertyTypes,s)&&(o=s),Object.prototype.hasOwnProperty.call(this.self.propertyTypes,o)){var a=this.self.propertyTypes[o];if(n){if(t){var p=(0,g.evaluate)(t,d()({},g.UTILITY_SCOPE),!1,!0,this);p.error?(O.warn("Failed to process pre-evaluation attribute",'"'+e+'": '+p.error+". Will be",'set to "undefined".'),this.setInternalPropertyValue(o,void 0)):(this.setInternalPropertyValue(o,p.result),this.setExternalPropertyValue(o,p.result))}}else switch(a){case P.boolean:case"boolean":var l=![null,"false"].includes(t);this.setInternalPropertyValue(o,l),this.setExternalPropertyValue(o,l);break;case P.func:case"function":var c,u=null,h=["data","event","firstArgument","firstParameter","options"];if(t){var f=(0,g.compile)(t,h.concat("parameters","scope",g.UTILITY_SCOPE_NAMES),!0,!0,this);u=f.error,c=f.templateFunction,u&&O.warn("Failed to compile given handler",'"'+e+'": '+u+".")}this.setInternalPropertyValue(o,(function(){for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];r.outputEventNames.has(o)&&r.reflectEventToProperties(o,i);var a=void 0;if(!u){for(var p=d()({parameters:i},g.UTILITY_SCOPE),l=0,f=h;l<f.length;l++){var m=f[l];p[m]=i[0]}try{a=null==c?void 0:c.apply(void 0,h.map((function(e){return p[e]})).concat([i,p],g.UTILITY_SCOPE_NAMES.map((function(e){return g.UTILITY_SCOPE[e]}))))}catch(r){O.warn("Failed to evaluate function",'"'+e+'" with expression','"'+t+'" and scope',"variables",'"'+h.join('", "')+'" set to','"'+(0,g.represent)(i)+'":',r+". Set property",'to "undefined".')}}return r.self.renderProperties.includes(o)||r.forwardEvent(o,i),a})),u||this.setExternalPropertyValue(o,c);break;case"json":if(t){var m;try{m=JSON.parse(t)}catch(u){O.warn("Error occurred during parsing given json",'attribute "'+e+'":',(0,g.represent)(u));break}this.setInternalPropertyValue(o,m),this.setExternalPropertyValue(o,(0,g.copy)(m,!1,1))}else this.setInternalPropertyValue(o,null),this.setExternalPropertyValue(o,null);break;case P.number:case"number":if(null===t){this.setInternalPropertyValue(o,t),this.setExternalPropertyValue(o,t);break}var y=parseFloat(t);isNaN(y)&&(y=void 0),this.setInternalPropertyValue(o,y),this.setExternalPropertyValue(o,y);break;case P.string:case"string":this.setInternalPropertyValue(o,t),this.setExternalPropertyValue(o,t);break;case P.any:case P.array:case P.arrayOf:case P.element:case P.elementType:case P.instanceOf:case P.node:case P.object:case"object":case P.objectOf:case P.oneOf:case P.oneOfType:case P.shape:case P.exact:case P.symbol:default:if(t){var b=(0,g.evaluate)(t,{},!1,!0,this);if(b.error){O.warn("Error occurred during processing given",'attribute configuration "'+e+'":',b.error);break}this.setInternalPropertyValue(o,b.result),this.setExternalPropertyValue(o,(0,g.copy)(b.result,!1,1))}else this.hasAttribute(e)?(this.setInternalPropertyValue(o,!0),this.setExternalPropertyValue(o,!0)):(this.setInternalPropertyValue(o,null),this.setExternalPropertyValue(o,null))}}},r.waitForNestedComponentRendering=function(){var e=p()(v().mark((function e(){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.childComponentInstances){e.next=1;break}return e.abrupt("return");case 1:return e.next=2,Promise.all(this.childComponentInstances.map((function(e){return e.renderState.pending?e.renderState.promise:Promise.resolve()})));case 2:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),r.resolveRenderingPromiseIfSet=function(){var e=p()(v().mark((function e(t,r){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r){e.next=2;break}return e.next=1,this.waitForNestedComponentRendering();case 1:this.renderState.pending=!1,this.renderState.resolve(t),this.prepareNewRenderingPromise();case 2:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}(),r.prepareNewRenderingPromise=function(){var e=this;this.renderState.pending||(this.renderState.promise=new Promise((function(t){e.renderState.resolve=function(r){e.renderState.pending=!1,t(r)}})))},r.triggerRender=function(e){var t=this;this.batchUpdates?this.batchedUpdateRunning||(this.batchedUpdateRunning=!0,(0,g.timeout)((function(){t.batchedUpdateRunning=!1,t.render(e)}))):this.render(e)},r.applyShadowRootIfNotExisting=function(){this.self.shadowDOM&&this.hostDomNode===this&&(this.hostDomNode=(!("attachShadow"in this)&&"ShadyDOM"in window?window.ShadyDOM.wrap(this):this).attachShadow((0,g.isObject)(this.self.shadowDOM)?this.self.shadowDOM:{mode:"open"}))},r.determineRenderScope=function(e){var t,r;void 0===e&&(e={}),this.scope=d()({},(null==(t=this.parentInstance)?void 0:t.scope)||{},this.scope,this.internalProperties,((r={parentInstance:this.parentInstance,rootInstance:this.rootInstance,self:this})[(0,g.lowerCase)(this.self._name)||"instance"]=this,r),e),this.scope.scope=this.scope},r.render=function(){var e=p()(v().mark((function e(t,r){var n,i,o=this;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===t&&(t="unknown"),void 0===r&&(r=!0),this.unRender("reRender",t),this.childComponentInstances=[],this.renderState.pending=!0,!this.isRoot){e.next=3;break}return e.next=1,this.resolveRenderingPromiseIfSet(t,r);case 1:if(!r){e.next=3;break}return e.next=2,Promise.all(this.self.pendingRenderPromises);case 2:this.self.pendingRenderPromises=[];case 3:if(this.self.pendingRenderPromises.push(this.renderState.promise),this.determineRenderScope(),this.self.doRender&&this.dispatchEvent(new CustomEvent("render",{detail:{reason:t,scope:this.scope}}))){e.next=5;break}return e.next=4,this.resolveRenderingPromiseIfSet(t,r);case 4:return e.abrupt("return");case 5:if(!(n=(0,g.evaluate)("`"+this.self.content+"`",this.scope)).error){e.next=7;break}return O.warn("Failed to process template: "+n.error),this.renderState.resolve(t),e.next=6,Promise.all(this.self.pendingRenderPromises);case 6:return e.abrupt("return");case 7:return this.applyShadowRootIfNotExisting(),(i=document.createElement("div")).innerHTML=n.result,this.applySlots(i,d()({},this.scope,{parentInstance:this})),this.hostDomNode.innerHTML=i.innerHTML,e.next=8,(0,g.timeout)();case 8:return this.waitForNestedComponentRendering().then((function(){o.applyBindings(o.hostDomNode.firstChild,o.scope,o.self.renderSlots)})),e.next=9,this.resolveRenderingPromiseIfSet(t,r);case 9:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}(),r.unRender=function(e,t){void 0===e&&(e="unknown"),this.unregisterDomNodeEventBindings()},t}(S),s.applyRootBinding=!0,s.pendingRenderPromises=[],s.content="<slot>Please provide a template to transclude.</slot>",s.determineRootBinding=!0,s.shadowDOM=null,s.observedAttributes=[],s.controllableProperties=[],s.eventToPropertyMapping={},s.propertyAliases={},s.propertyTypes={onClick:P.func},s.propertiesToReflectAsAttributes=[],s.renderProperties=["children"],s.doRender=!1,s.cloneSlots=!1,s.evaluateSlots=!1,s.renderSlots=!0,s.trimSlots=!0,s.renderUnsafe=!1,s._name="BaseWeb",s._propertyAliasIndex=void 0,s._propertiesToReflectAsAttributes=void 0,i=s,o=y()(i.prototype,"isRoot",[n],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),i),R={component:C,register:function(e){void 0===e&&(e=(0,g.camelCaseToDelimited)(C._name)),customElements.define(e,C)}};t.default=C},function(e){e.exports=l},function(e){e.exports=c},function(e){e.exports=u},function(e){e.exports=s},function(e){e.exports=a},function(e){e.exports=p},function(e,t,r){r.d(t,{api:function(){return w}});var n=r(0),i=r.n(n),o=r(5),s=r.n(o),a=r(3),p=r.n(a),l=r(6),c=r.n(l),u=r(1),d=r(2),h=r(11),f=r.n(h),m=r(12),y=r(13),b=r(7);function v(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return g(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var P=new u.Logger({name:"web-component-wrapper-web"}),A=function(e){function t(){for(var r,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return(r=e.call.apply(e,[this].concat(i))||this).unmountOnDisconnect=!0,r.compiledSlots={},r.preparedSlots={},r.reactRoot=null,r.rootReactInstance=null,r.self=t,r.wrapMemorizingWrapper=null,r.isWrapped=!1,r.reflectInstanceProperties=function(){var e;null!=(e=r.instance)&&e.current&&r.instance.current.properties&&r.reflectProperties(r.instance.current.properties)},r}p()(t,e);var r=t.prototype;return r.connectedCallback=function(){this.applyComponentWrapper(),this.rootReactInstance=this,e.prototype.connectedCallback.call(this)},r.disconnectedCallback=function(){var e;this.unRender("disconnected"),this.unmountOnDisconnect&&(null==(e=this.reactRoot)||e.unmount()),this.unregisterConnectionState()},r.reflectExternalProperties=function(t){this.isRoot&&e.prototype.reflectExternalProperties.call(this,t)},r.render=function(){var t=s()(c().mark((function t(r,n){var o,s,a,p,l=this;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0===r&&(r="unknown"),void 0===n&&(n=!0),e.prototype.unRender.call(this,"reRender",r),this.childComponentInstances=[],this.renderState.pending=!0,this.isRoot&&(this.self.pendingRenderPromises=[]),this.self.pendingRenderPromises.push(this.renderState.promise),this.rootReactInstance===this&&this.dispatchEvent(new CustomEvent("render",{detail:{reason:r,scope:this.scope}}))){t.next=1;break}return t.abrupt("return",this.resolveRenderingPromiseIfSet(r,n));case 1:if(this.determineRenderScope(),0===Object.keys(this.compiledSlots).length&&this.preCompileSlots(),this.evaluateSlots(i()({},this.scope,{parentInstance:this})),this.prepareProperties(this.internalProperties),this.applyShadowRootIfNotExisting(),this.rootInstance!==this&&!this.reactRoot)for(o=this.firstChild;o;)s=o.nextSibling,this.removeChild(o),o=s;if(this.reactRoot||(a=this.id||this.internalProperties.id||this.externalProperties.id||this.name||this.internalProperties.name||this.externalProperties.name,p="","string"==typeof a&&(p=a),this.reactRoot=(0,y.createRoot)(this.hostDomNode,{identifierPrefix:p})),(0,m.flushSync)((function(){var e;null==(e=l.reactRoot)||e.render((0,h.createElement)(l.self.content,l.internalProperties)),l.resolveRenderingPromiseIfSet(r,n)})),!n){t.next=2;break}return t.next=2,this.renderState.promise;case 2:case"end":return t.stop()}}),t,this)})));return function(e,r){return t.apply(this,arguments)}}(),r.setPropertyValue=function(e,t){var r;this.reflectProperties(((r={})[e]=(0,u.copy)(t,!1,1),r)),this.setInternalPropertyValue(e,(0,u.copy)(t,!1,1))},r.setInternalPropertyValue=function(t,r){null===r?r=d.NullSymbol:void 0===r&&(r=d.UndefinedSymbol),e.prototype.setInternalPropertyValue.call(this,t,r)},r.preCompileDomNodes=function(e,t,r){if(void 0===t&&(t={}),void 0===r&&(r=!1),1===(e=e.filter((function(e){return e.nodeType!==Node.TEXT_NODE||"string"==typeof e.nodeValue&&""!==e.nodeValue.trim()}))).length)return this.preCompileDomNode(e[0],t,r);for(var n,i=1,o=[],s=v(e);!(n=s()).done;){var a=n.value,p=this.preCompileDomNode(a,t,r,i.toString());o.push(p),i+=1}return r?function(e){return function(){for(var t,r=[],n=v(o);!(t=n()).done;){var i=(0,t.value)(e);"function"==typeof i&&r.push(i.apply(void 0,arguments))}return(0,h.createElement)(h.Fragment,{children:r})}}:o},r.preCompileDomNode=function(e,t,r,n){var o=this;if(void 0===t&&(t={}),void 0===r&&(r=!1),r){var s=this.preCompileDomNode(e,i()({},t,{data:void 0,firstArgument:void 0,firstParameter:void 0,options:void 0,scope:void 0,parameters:void 0}),!1,n);return function(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var o=r.length>0?r[0]:null;return s(i()({},e,{data:o,firstArgument:o,firstParameter:o,options:o,scope:o,parameters:r}))}}}if(e.nodeType===Node.TEXT_NODE){var a="string"==typeof e.nodeValue?e.nodeValue.trim():"",p=n&&a?(0,h.createElement)(h.Fragment,{children:a,key:n}):a||null;return function(){return p}}if(!e.getAttributeNames)return function(){return null};var l,c={},d=this.self.isReactComponent(e);d?(e.determineRenderScope(),0===Object.keys(this.compiledSlots).length&&e.preCompileSlots(),n&&!Object.prototype.hasOwnProperty.call(c,"key")&&(c.key=n),l=e.constructor.content):(c.key=n,l=e.tagName.toLowerCase());for(var f,m=Object.keys(t),y={},b=function(){var r,n=f.value,i=e.getAttribute(n);if(null===i)return 0;var s=!1,a="";if(n.startsWith("data-bind-")?a=n.substring(10):n.startsWith("bind-")&&(a=n.substring(5)),a.startsWith("attribute-")||"attributes"===a||a.startsWith("property-")||"properties"===a){var p=(0,u.compile)(i,m),l=p.error,h=p.originalScopeNames,b=p.templateFunction;if(l)return P.warn("Error occurred during compiling given attribute",'binding "'+n+'" on node:',e,l),0;"attributes"===a||"properties"===a?s=!0:a=a.startsWith("attribute-")?a.substring(10):a.substring(9),i={originalScopeNames:h,templateFunction:b.bind(o)}}else if(a.startsWith("on-")){a=(0,u.delimitedToCamelCase)(a),Object.prototype.hasOwnProperty.call(t,"event")||(m=[].concat(m,["event"])),Object.prototype.hasOwnProperty.call(t,"parameters")||(m=[].concat(m,["parameters"]));var v=(0,u.compile)(i,m,!0),g=v.error,A=v.originalScopeNames,w=v.scopeNames,T=v.templateFunction;if(g)return P.warn("Error occurred during compiling given event",'binding "'+n+'" on node:',e,g),0;var O=T.bind(o);i=function(){for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];t.event=o[0],t.parameters=o;try{O.apply(void 0,A.map((function(e){return t[e]})))}catch(t){P.warn("Error occurred during processing given",'event binding "'+n+'" on node: ',e,'Given expression "'+i+'" could',"not be evaluated with given scope names",'"'+w.join('", "')+'":',(0,u.represent)(t))}}}else a=n;var S={class:"className",for:"htmlFor"};Object.prototype.hasOwnProperty.call(S,a)&&(a=S[a]),a=(0,u.delimitedToCamelCase)(a),null!=(r=i)&&r.originalScopeNames?y[s?"":a]=i:d||(c[a]=i)},g=v(e.getAttributeNames());!(f=g()).done;)b();if(!d){var A=Array.from(e.childNodes);A.length&&(c.children=this.preCompileDomNodes(A,t))}return function(r){(r=i()({},t,r)).scope=r;for(var n=i()({},c),s=0,a=Object.entries(y);s<a.length;s++){var p=a[s],u=p[0],f=p[1],m=f.originalScopeNames,b=f.templateFunction.apply(void 0,m.map((function(e){return r[e]})));""===u?n=i()({},n,b):n[u]=b}return Object.prototype.hasOwnProperty.call(n,"innerHTML")&&(n.dangerouslySetInnerHTML={__html:n.innerHTML},delete n.children,delete n.innerHTML),Object.prototype.hasOwnProperty.call(n,"textContent")?(n.children=n.textContent,delete n.textContent):d?(n=i()({},e.internalProperties,n),r=i()({},n,r,{parentInstance:e}),e.evaluateSlots(r),e.prepareProperties(n)):n.children&&(n.children=o.evaluatePreCompiledDomNodes(n.children,r)),(0,h.createElement)(l,n)}},r.evaluatePreCompiledDomNodes=function(e,t){if(void 0===t&&(t={}),!Array.isArray(e))return e(t);if(1===e.length)return e[0](t);for(var r,n=[],i=v(e);!(r=i()).done;){var o=(0,r.value)(t);o&&n.push(o)}return n},r.preCompileSlots=function(){for(var e in this.slots)this.slots[e]&&"default"!==e&&(this.compiledSlots[e]=this.preCompileDomNode(this.slots[e],i()({},this.scope,{parentInstance:this}),[d.func,"function"].includes(this.self.propertyTypes[e])));this.slots.default&&this.slots.default.length>0&&(this.compiledSlots.children=this.preCompileDomNodes(this.slots.default,i()({},this.scope,{parentInstance:this}),[d.func,"function"].includes(this.self.propertyTypes.children)))},r.evaluateSlots=function(e){for(var t in this.preparedSlots={},this.compiledSlots)Object.prototype.hasOwnProperty.call(this.compiledSlots,t)&&("children"===t?this.preparedSlots.children=this.evaluatePreCompiledDomNodes(this.compiledSlots[t],e):this.preparedSlots[t]=this.compiledSlots[t](e))},t.isReactComponent=function(e){var t=e.constructor;return"object"==typeof t.content&&(!t.attachWebComponentAdapterIfNotExists||"react"===t.content.webComponentAdapterWrapped)},r.determineRootBinding=function(){e.prototype.determineRootBinding.call(this);for(var t=this.parentNode;t;){if(this.self.isReactComponent(t)){this.rootReactInstance=t;break}t=t.parentNode}},r.applyComponentWrapper=function(){if("string"!=typeof this.self.content&&!this.isWrapped){this.isWrapped=!0;var e=this.self.content.wrapped||this.self.content;this.self.content.webComponentAdapterWrapped?this.wrapMemorizingWrapper&&(this.self.content=(0,h.memo)(this.self.content),this.self.content.wrapped=e):this.self.attachWebComponentAdapterIfNotExists?(this.self.content.displayName||(this.self.content.displayName=this.self._name),this.self.content=(0,h.forwardRef)((function(t,r){return(0,h.useImperativeHandle)(r,(function(){return{properties:t}}),[t]),(0,h.createElement)(e,t)})),(this.wrapMemorizingWrapper||null===this.wrapMemorizingWrapper)&&(this.self.content=(0,h.memo)(this.self.content)),this.self.content.wrapped=e,this.self.content.webComponentAdapterWrapped="react"):this.wrapMemorizingWrapper&&(this.self.content=(0,h.memo)(this.self.content),this.self.content.wrapped=e)}},r.prepareProperties=function(e){var t=this;(0,u.extend)(e,this.preparedSlots),this.self.removeKnownUnwantedPropertyKeys(this.self,e),e.ref||(this.instance=(0,h.createRef)(),e.ref=function(e){t.instance?t.instance.current=e:t.instance={current:e},t.reflectInstanceProperties()})},t.removeKnownUnwantedPropertyKeys=function(e,t){if("string"!=typeof e.content)for(var r,n=v(["isRoot","isTrusted","__composed"]);!(r=n()).done;){var i=r.value;Object.prototype.hasOwnProperty.call(t,i)&&(Object.prototype.hasOwnProperty.call(e.content,"propTypes")&&!Object.prototype.hasOwnProperty.call(e.content.propTypes,i)||Object.prototype.hasOwnProperty.call(e.content,"wrapped")&&Object.prototype.hasOwnProperty.call(e.content.wrapped,"propTypes")&&!Object.prototype.hasOwnProperty.call(e.content.wrapped.propTypes,i))&&delete t[i]}},t}(b.default);A.attachWebComponentAdapterIfNotExists=!0,A.content="div",A.react=f(),A._name="ReactWebComponent";var w={component:A,register:function(e){void 0===e&&(e=(0,u.camelCaseToDelimited)(A._name)),customElements.define(e,A)}};t.default=A}],h={};function f(e){var t=h[e];if(void 0!==t)return t.exports;var r=h[e]={exports:{}};return d[e](r,r.exports,f),r.exports}f.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(t,{a:t}),t},f.d=function(e,t){for(var r in t)f.o(t,r)&&!f.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},f.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var m={};f.r(m),f.d(m,{ReactWeb:function(){return S},Web:function(){return N},property:function(){return O},reactWebAPI:function(){return C},webAPI:function(){return R},wrapAsWebComponent:function(){return x}});var y=f(0),b=f.n(y),v=f(3),g=f.n(v),P=f(1),A=f(4),w=f(14),T=f(7),O=A.default,S=w.default,C=w.api,R=T.api,N=T.default,x=function(e,t,r){var n,i,o;void 0===t&&(t="NoName"),void 0===r&&(r={});var s=e._name||(null==(n=e.___types)||null==(n=n.name)?void 0:n.name)||t.replace(/^(.*\/+)?([^/]+)\.tsx$/,"$2");r.propTypes&&(e.propTypes=r.propTypes);var a=e.propTypes||{},p=r.propertyAliases||e.propertyAliases||{},l=(0,P.unique)(Object.keys(a).concat(Object.keys(p)).concat(Object.values(p))),c=r.propertiesToReflectAsAttributes||e.propertiesToReflectAsAttributes||[];if(S.propertiesToReflectAsAttributes)if(Array.isArray(c))c=[].concat(S.propertiesToReflectAsAttributes,c);else if(c instanceof Map)for(var u=0,d=S.propertiesToReflectAsAttributes;u<d.length;u++){var h=d[u];c.set(h,S.propertyTypes[h])}else if("object"==typeof c)for(var f=0,m=S.propertiesToReflectAsAttributes;f<m.length;f++){var y=m[f];c[y]=S.propertyTypes[y]}var v=l.map((function(e){return(0,P.camelCaseToDelimited)(e)})),A=function(t){function n(){for(var i,o,s=arguments.length,a=new Array(s),p=0;p<s;p++)a[p]=arguments[p];return(o=t.call.apply(t,[this].concat(a))||this).self=n,o.internalProperties=r.internalProperties?b()({},r.internalProperties):e.internalProperties?b()({},e.internalProperties):{},o.unmountOnDisconnect=null===(i=r.unmountOnDisconnect)||void 0===i||i,o}return g()(n,t),n}(S);return A.attachWebComponentAdapterIfNotExists="boolean"!=typeof r.attachWebComponentAdapterIfNotExists||r.attachWebComponentAdapterIfNotExists,A.content=e,A.observedAttributes=S.observedAttributes.concat(v).concat(v.map((function(e){return"-"+e}))),A.controllableProperties=e.controllableProperties||r.controllableProperties||[],A.eventToPropertyMapping=null===r.eventToPropertyMapping?r.eventToPropertyMapping:r.eventToPropertyMapping?b()({},r.eventToPropertyMapping):null===e.eventToPropertyMapping?e.eventToPropertyMapping:e.eventToPropertyMapping?b()({},e.eventToPropertyMapping):{},A.propertyAliases=b()({},S.propertyAliases,p),A.propertiesToReflectAsAttributes=c,A.propertyTypes=b()({},S.propertyTypes,a),A.renderProperties=null!==(i=null!==(o=r.renderProperties)&&void 0!==o?o:e.renderProperties)&&void 0!==i?i:S.renderProperties,A._name=s,{component:A,register:function(e){void 0===e&&(e=(0,P.camelCaseToDelimited)(s)),customElements.define(e,A)}}};return m.default=x,m}()}));
|
|
1
|
+
"use strict";if("undefined"!=typeof module&&null!==module&&"undefined"!==eval("typeof require")&&null!==eval("require")&&"main"in eval("require")&&"undefined"!==eval("typeof require.main")&&null!==eval("require.main")){var ORIGINAL_MAIN_MODULE=module;module!==eval("require.main")&&"paths"in module&&"paths"in eval("require.main")&&"undefined"!=typeof __dirname&&null!==__dirname&&(module.paths=eval("require.main.paths").concat(module.paths.filter((function(path){return eval("require.main.paths").includes(path)}))))}if(null==window)var window="undefined"==typeof global||null===global?{}:global;!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@babel/runtime/helpers/extends"),require("@babel/runtime/helpers/inheritsLoose"),require("clientnode"),require("clientnode/property-types"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("react"),require("react-dom"),require("react-dom/client"),require("@babel/runtime/helpers/initializerDefineProperty"),require("@babel/runtime/helpers/applyDecoratedDescriptor"),require("@babel/runtime/helpers/initializerWarningHelper"));else if("function"==typeof define&&define.amd)define(["@babel/runtime/helpers/extends","@babel/runtime/helpers/inheritsLoose","clientnode","clientnode/property-types","@babel/runtime/helpers/asyncToGenerator","@babel/runtime/regenerator","react","react-dom","react-dom/client","@babel/runtime/helpers/initializerDefineProperty","@babel/runtime/helpers/applyDecoratedDescriptor","@babel/runtime/helpers/initializerWarningHelper"],t);else{var r="object"==typeof exports?t(require("@babel/runtime/helpers/extends"),require("@babel/runtime/helpers/inheritsLoose"),require("clientnode"),require("clientnode/property-types"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("react"),require("react-dom"),require("react-dom/client"),require("@babel/runtime/helpers/initializerDefineProperty"),require("@babel/runtime/helpers/applyDecoratedDescriptor"),require("@babel/runtime/helpers/initializerWarningHelper")):t(e["@babel/runtime/helpers/extends"],e["@babel/runtime/helpers/inheritsLoose"],e.clientnode,e["clientnode/property-types"],e["@babel/runtime/helpers/asyncToGenerator"],e["@babel/runtime/regenerator"],e.react,e["react-dom"],e["react-dom/client"],e["@babel/runtime/helpers/initializerDefineProperty"],e["@babel/runtime/helpers/applyDecoratedDescriptor"],e["@babel/runtime/helpers/initializerWarningHelper"]);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(this,(function(e,t,r,n,i,o,s,a,p,l,c,u){return function(){var d=[function(t){t.exports=e},function(e){e.exports=r},function(e){e.exports=n},function(e){e.exports=t},function(e){e.exports=i},function(e){e.exports=o},function(e,t,r){var n=r(0),i=r.n(n),o=r(1),s=r(2);t.default=function(e){return void 0===e&&(e={}),e=i()({readAttribute:!0,type:s.string},e),function(t,r){if("string"==typeof r){var n,s=t.self||t.constructor;if(e.readAttribute){Object.prototype.hasOwnProperty.call(s,"observedAttributes")||(s.observedAttributes=s.observedAttributes?[].concat(s.observedAttributes):[]);var a=(0,o.camelCaseToDelimited)(r);s.observedAttributes&&!s.observedAttributes.includes(a)&&s.observedAttributes.push(a)}if(e.type&&(Object.prototype.hasOwnProperty.call(s,"propertyTypes")||(s.propertyTypes=s.propertyTypes?i()({},s.propertyTypes):{}),!s.propertyTypes||!e.update&&Object.prototype.hasOwnProperty.call(s,r)||(s.propertyTypes[r]=e.type)),e.writeAttribute)if(Object.prototype.hasOwnProperty.call(s,"propertiesToReflectAsAttributes")||(s.propertiesToReflectAsAttributes=s.propertiesToReflectAsAttributes?(0,o.copy)(s.propertiesToReflectAsAttributes):[]),e.update||s.propertiesToReflectAsAttributes instanceof Map&&!s.propertiesToReflectAsAttributes.has(r)||Array.isArray(s.propertiesToReflectAsAttributes)&&!s.propertiesToReflectAsAttributes.includes(r)||"object"==typeof s.propertiesToReflectAsAttributes&&!Object.prototype.hasOwnProperty.call(s.propertiesToReflectAsAttributes,r))"boolean"==typeof e.writeAttribute?e.writeAttribute&&s.propertyTypes&&Object.prototype.hasOwnProperty.call(s.propertyTypes,r)&&(n=s.propertyTypes[r]):n=e.writeAttribute,void 0!==n&&(Array.isArray(s.propertiesToReflectAsAttributes)&&(!0===e.writeAttribute?s.propertiesToReflectAsAttributes.push(r):s.normalizePropertyTypeList&&(s.propertiesToReflectAsAttributes=s.normalizePropertyTypeList(s.propertiesToReflectAsAttributes))),s.propertiesToReflectAsAttributes instanceof Map&&s.propertiesToReflectAsAttributes.set(r,n),"object"==typeof s.propertiesToReflectAsAttributes&&(s.propertiesToReflectAsAttributes[r]=n));e.alias&&(Object.prototype.hasOwnProperty.call(s,"propertyAliases")||(s.propertyAliases=s.propertyAliases?i()({},s.propertyAliases):{}),!s.propertyAliases||!e.update&&Object.prototype.hasOwnProperty.call(s,r)||(s.propertyAliases[r]=e.alias))}}}},function(e,t,r){r.d(t,{api:function(){return R}});var n,i,o,s,a=r(4),p=r.n(a),l=r(8),c=r.n(l),u=r(0),d=r.n(u),h=r(3),f=r.n(h),m=r(9),y=r.n(m),b=(r(10),r(5)),v=r.n(b),g=r(1),P=r(2),A=r(6);function w(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return T(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?T(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var O=new g.Logger({name:"web-component-wrapper-web"}),S="undefined"==typeof HTMLElement?function(){}:HTMLElement,C=(n=(0,A.default)({type:P.boolean,writeAttribute:!0}),s=function(e){function t(){var r;return(r=e.call(this)||this).renderState={promise:Promise.resolve(""),pending:!1,resolve:g.NOOP},r.childComponentInstances=[],r.batchAttributeUpdates=!0,r.batchPropertyUpdates=!0,r.batchUpdates=!0,r.batchedAttributeUpdateRunning=!0,r.batchedPropertyUpdateRunning=!0,r.batchedUpdateRunning=!0,r.connectionRegistered=!1,r.pendingAttributeUpdates=[],r.parentInstance=null,r.rootInstance=void 0,r.hostDomNode=void 0,r.scope=d()({},g.UTILITY_SCOPE),r.domNodeEventBindings=new Map,r.domNodeTemplateCache=new Map,r.externalProperties={},r.ignoreAttributeUpdateObservations=!1,r.internalProperties={},r.outputEventNames=new Set,r.instance=null,c()(r,"isRoot",o,r),r.runDomConnectionAndRenderingInSameEventQueue=!1,r.self=t,r.slots={},r.prepareNewRenderingPromise(),r.self=r.constructor,r.self._propertiesToReflectAsAttributes||(r.self._propertiesToReflectAsAttributes=r.self.normalizePropertyTypeList(r.self.propertiesToReflectAsAttributes)),r.generateAliasIndex(),r.hostDomNode=r,r.rootInstance=r,r.defineGetterAndSetterInterface(),r}f()(t,e);var r=t.prototype;return r.attributeChangedCallback=function(e,t,r){this.ignoreAttributeUpdateObservations||t===r||this.onUpdateAttribute(e,r)},r.onUpdateAttribute=function(e,t){var r=this,n=new Promise((function(n){return r.pendingAttributeUpdates.push((function(){r.evaluateStringOrNullAndSetAsProperty(e,t),r.batchAttributeUpdates?r.batchedAttributeUpdateRunning||r.batchedUpdateRunning||(r.batchedAttributeUpdateRunning=!0,r.batchedUpdateRunning=!0,(0,g.timeout)((function(){r.batchedAttributeUpdateRunning=!1,r.batchedUpdateRunning=!1,r.render("attributeChanged")}))):r.render("attributeChanged"),n()}))}));if(this.connectionRegistered)for(;this.pendingAttributeUpdates.length;)this.pendingAttributeUpdates.shift()();return n},r.connectedCallback=function(){var e=this;try{this.isConnected=!0}catch(e){}for(this.connectionRegistered=!0,this.parentInstance=this,this.rootInstance=this,this.attachEventHandler(),this.self.determineRootBinding&&(this.determineRootBinding(),this.parentInstance!==this&&this.parentInstance.childComponentInstances&&this.parentInstance.childComponentInstances.push(this)),this.self.applyRootBinding&&this.isRoot&&(this.determineRenderScope(),this.applyBinding(this,this.scope));this.pendingAttributeUpdates.length;)this.pendingAttributeUpdates.shift()();this.batchedAttributeUpdateRunning=!1,this.batchedPropertyUpdateRunning=!1,this.batchedUpdateRunning=!1,this.grabGivenSlots(),this.reflectExternalProperties(this.externalProperties),this.runDomConnectionAndRenderingInSameEventQueue?this.render("connected"):(0,g.timeout)((function(){e.render("connected")}))},r.disconnectedCallback=function(){this.unRender("disconnected"),this.unregisterConnectionState()},r.defineGetterAndSetterInterface=function(){for(var e,t=this,r=function(){var r=e.value;Object.prototype.hasOwnProperty.call(t,r)&&t.setPropertyValue(r,t[r]),Object.defineProperty(t,r,{configurable:!0,get:function(){return t.getPropertyValue(r)},set:function(e){t.setPropertyValue(r,e),t.triggerPropertySpecificRendering(r,e)}})},n=w((0,g.unique)(Object.keys(this.self.propertyTypes).concat(this.self._propertyAliasIndex?Object.keys(this.self._propertyAliasIndex):[])));!(e=n()).done;)r()},r.getPropertyAlias=function(e){return this.self._propertyAliasIndex&&Object.prototype.hasOwnProperty.call(this.self._propertyAliasIndex,e)?this.self._propertyAliasIndex[e]:null},r.getPropertyValue=function(e){var r,n,i,o=null!=(r=this.instance)&&null!=(r=r.current)&&r.properties&&(Object.prototype.hasOwnProperty.call(!t.propertyTypes,e)||Object.prototype.hasOwnProperty.call(this.instance.current.properties,e))?this.instance.current.properties[e]:null!==(n=this.internalProperties[e])&&void 0!==n?n:this.externalProperties[e];return null!=(i=this.instance)&&null!=(i=i.current)&&i.state&&Object.prototype.hasOwnProperty.call(this.instance.current.state,e)?this.instance.current.state[e]:o},r.setExternalPropertyValue=function(e,t){this.externalProperties[e]=t;var r=this.getPropertyAlias(e);r&&(this.externalProperties[r]=t)},r.setInternalPropertyValue=function(e,t){this.internalProperties[e]=t;var r=this.getPropertyAlias(e);r&&(this.internalProperties[r]=t)},r.setPropertyValue=function(e,t){var r;this.reflectProperties(((r={})[e]=t,r)),this.setInternalPropertyValue(e,t)},r.triggerPropertySpecificRendering=function(e,t){var r=this;if(this.batchPropertyUpdates)this.batchedPropertyUpdateRunning||this.batchedUpdateRunning||(this.batchedPropertyUpdateRunning=!0,this.batchedUpdateRunning=!0,(0,g.timeout)((function(){void 0!==t&&r.isStateProperty(e)?(r.render("preStatePropertyChanged"),(0,g.timeout)((function(){r.setInternalPropertyValue(e,void 0),r.batchedPropertyUpdateRunning=!1,r.batchedUpdateRunning=!1,r.render("postStatePropertyChanged"),r.triggerOutputEvents()}))):(r.batchedPropertyUpdateRunning=!1,r.batchedUpdateRunning=!1,r.render("propertyChanged"),r.triggerOutputEvents())})));else{var n=this.isStateProperty(e);this.render(n?"preStatePropertyChanged":"propertyChanged"),void 0!==t&&n&&(this.setInternalPropertyValue(e,void 0),this.render("postStatePropertyChanged")),this.triggerOutputEvents()}},r.unregisterConnectionState=function(){try{this.isConnected=!1}catch(e){}this.connectionRegistered=!1,this.slots={}},r.unregisterDomNodeEventBindings=function(){for(var e,t=w(this.domNodeEventBindings.values());!(e=t()).done;)for(var r,n=w(e.value.values());!(r=n()).done;){(0,r.value)()}},r.applyBinding=function(e,t){var r=this;if(e.getAttributeNames)for(var n,i=function(){var i,o=n.value;if(o.startsWith("data-bind-")?i=o.substring(10):o.startsWith("bind-")&&(i=o.substring(5)),i){var s=e.getAttribute(o);if(null===s)return 0;if(i.startsWith("attribute-")||i.startsWith("property-")){var a=(0,g.evaluate)(s,t,!1,!0,e);if(a.error)return O.warn("Error occurred during processing given",'attribute binding "'+o+'" on node:',e,a.error),0;i.startsWith("attribute-")?e.setAttribute(i.substring(10),a.result):e[(0,g.delimitedToCamelCase)(i.substring(9))]=a.result}else if(i.startsWith("on-")){i=(0,g.delimitedToCamelCase)(i.substring(3)),t=d()({log:O,event:void 0,parameters:void 0},t);var p=(0,g.compile)(s,t,!0,!0,e);p.error?O.warn("Error occurred during compiling given event",'binding "'+o+'" on node:',e,p.error):r.addSecureEventListener(e,i,(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.event=n[0],t.parameters=n;try{p.templateFunction.apply(p,p.originalScopeNames.map((function(e){return t[e]})))}catch(t){O.warn("Error occurred during processing","given event binding",'"'+o+'" on node:',e,'Given expression "'+s+'" could',"not be evaluated with given scope",'names "'+p.scopeNames.join('", "')+'": '+(0,g.represent)(t))}}))}}},o=w(e.getAttributeNames());!(n=o()).done;)i()},r.applyBindings=function(e,t,r){for(void 0===r&&(r=!0);e;){var n;null==(n=e.attributes)||!n.length||!r&&e.getAttribute("slot")||this.applyBinding(e,t),e.nodeName.toLowerCase().includes("-")||this.applyBindings(e.firstChild,t),e=e.nextSibling}},r.compileDomNodeTemplate=function(e,t,r){void 0===t&&(t=[]),void 0===r&&(r={}),r=d()({ignoreComponents:!0,ignoreNestedComponents:!0,unsafe:this.self.renderUnsafe},r);var n=e.nodeName.toLowerCase();if(r.ignoreComponents&&n.includes("-"))return null;if(r.unsafe){var i=e.innerHTML;if(!i&&e.template&&(i=e.template),this.self.hasCode(i)){var o=(0,g.compile)("`"+i+"`",t);return{domNode:e,children:[],error:o.error,scopeNames:o.scopeNames,template:i,templateFunction:o.templateFunction}}return null}var s=null;if("#text"===n){var a=e.textContent;a&&this.self.hasCode(a)&&(s=a.replace(/ /g," ").trim())}var p=[],l={children:p,domNode:e};if(s){var c=(0,g.compile)("`"+s+"`",t);l.error=c.error,l.scopeNames=c.scopeNames,l.template=s,l.templateFunction=c.templateFunction}for(var u=e.firstChild;u;){if(!r.filter||r.filter(u)){var h=this.compileDomNodeTemplate(u,t,d()({},r,{ignoreComponents:r.ignoreNestedComponents}));h&&p.push(h)}u=u.nextSibling}return l},r.evaluateCompiledDomNodeTemplate=function(e,t){var r=e.domNode,n=e.error,i=e.templateFunction,o=e.scopeNames;if(!i||!o)return null;if(n)return O.warn("Error occurred during compiling node content:",n),null;var s=null;try{s=i.apply(void 0,o.map((function(e){return t[e]})))}catch(n){O.warn('Error occurred when "'+this.self._name+'" is running','"'+String(i)+'": with bound','names "'+o.join('", "')+'":','"'+n+'". Rendering node:',r)}return s},r.evaluateDomNodeTemplate=function(e,t,r){var n=this;void 0===t&&(t={}),void 0===r&&(r={});var i=(r=d()({domNodeTemplateCache:this.domNodeTemplateCache,ignoreComponents:!0,ignoreNestedComponents:!0,unsafe:this.self.renderUnsafe},r)).domNodeTemplateCache;if(!i.has(e)){var o={filter:r.filter,ignoreComponents:r.ignoreComponents,ignoreNestedComponents:r.ignoreNestedComponents,unsafe:r.unsafe},s=this.compileDomNodeTemplate(e,t,o);s&&i.set(e,s)}if(i.has(e)){var a=i.get(e),p=this.evaluateCompiledDomNodeTemplate(a,t);if(null!==p&&(r.unsafe&&e.innerHTML?e.innerHTML=p:e.textContent=p),a.children.length){var l=function(e){for(var r,i=w(e);!(r=i()).done;){var o=r.value,s=n.evaluateCompiledDomNodeTemplate(o,t);null!==s&&(o.domNode.textContent=s),o.children.length&&l(o.children)}};l(a.children)}}r.applyBindings&&this.applyBindings(e,t)},r.addSecureEventListener=function(e,t,r,n,i){var o=this;this.domNodeEventBindings.has(e)||this.domNodeEventBindings.set(e,new Map);var s=this.domNodeEventBindings.get(e),a=s.get(t);a&&a!==r&&a();var p=function(){e.removeEventListener(t,r,i),s.delete(t),0===s.size&&o.domNodeEventBindings.delete(e)};return s.set(t,p),e.addEventListener(t,r,n),p},r.determineRootBinding=function(){for(var e=this.parentNode;e;){var r=e instanceof t||e.nodeName.includes("-")&&"#document-fragment"!==e.nodeName,n=null===e.parentNode&&"[object ShadowRoot]"===e.toString();r?(this.rootInstance===this&&(this.parentInstance=e,this.setPropertyValue("isRoot",!1)),this.rootInstance=e):n&&this.setPropertyValue("isRoot",!1),e=e.parentNode}},t.hasCode=function(e){return"string"==typeof e&&e.includes("${")&&e.includes("}")&&/\${[\s\S]+}/.test(e)},t.normalizePropertyTypeList=function(e){if("string"==typeof e&&(e=[e]),Array.isArray(e)){for(var r,n=e,i=new Map,o=w(n);!(r=o()).done;){var s=r.value;Object.prototype.hasOwnProperty.call(t.propertyTypes,s)&&i.set(s,t.propertyTypes[s])}return i}return(0,g.convertPlainObjectToMap)(e)},r.attachEventHandler=function(){if(null!==this.self.eventToPropertyMapping){var e=this.attachExplicitDefinedOutputEventHandler();this.attachImplicitDefinedOutputEventHandler(!e)}},r.attachExplicitDefinedOutputEventHandler=function(){var e=this;if(!this.self.eventToPropertyMapping)return!1;for(var t=!1,r=function(){var r=i[n];Object.prototype.hasOwnProperty.call(e.internalProperties,r)||(t=!0,e.outputEventNames.add(r),e.setInternalPropertyValue(r,p()(v().mark((function t(){var n,i,o,s,a=arguments;return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(n=a.length,i=new Array(n),o=0;o<n;o++)i[o]=a[o];return t.next=1,e.reflectEventToProperties(r,i);case 1:(s=t.sent)&&(i[0]=s),e.forwardEvent(r,i);case 2:case"end":return t.stop()}}),t)})))))},n=0,i=Object.keys(this.self.eventToPropertyMapping);n<i.length;n++)r();return t},r.attachImplicitDefinedOutputEventHandler=function(e){var t=this;void 0===e&&(e=!0);for(var r=function(){var r=i[n],o=r[0],s=r[1];Object.prototype.hasOwnProperty.call(t.internalProperties,o)||![P.func,"function"].includes(s)||t.self.renderProperties.includes(o)||(t.outputEventNames.add(o),t.setInternalPropertyValue(o,(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e&&t.reflectEventToProperties(o,n),t.forwardEvent(o,n)})))},n=0,i=Object.entries(this.self.propertyTypes);n<i.length;n++)r()},r.triggerOutputEvents=function(){for(var e,t=w(this.outputEventNames);!(e=t()).done;){var r=e.value;this.forwardEvent(r,[this.externalProperties])}},r.forwardEvent=function(e,t){return e.length>3&&e.startsWith("on")&&(e=(0,g.lowerCase)(e.substring(2))),this.dispatchEvent(new CustomEvent(e,{detail:{parameters:t}}))},r.applySlots=function(e,r){for(var n=this,i=0,o=Array.from(e.querySelectorAll("slot"));i<o.length;i++){var s=o[i],a=s.getAttribute("name");if(null===a||"default"===a)if(this.slots.default){if(this.self.renderSlots){if(this.self.evaluateSlots)for(var p,l=w(this.slots.default);!(p=l()).done;){var c=p.value;this.evaluateDomNodeTemplate(c,r)}(0,g.replace)(s,this.slots.default,t.trimSlots)}}else this.slots.default=(0,g.unwrap)(s).map((function(e){return n.grabSlotContent(e)}));else this.slots[a]?this.self.renderSlots&&(this.self.evaluateSlots&&this.evaluateDomNodeTemplate(this.slots[a],r),(0,g.replace)(s,this.slots[a],t.trimSlots)):this.slots[a]=this.grabSlotContent((0,g.unwrap)(s).filter((function(e){return"#text"!==e.nodeName.toLowerCase()}))[0])}},r.grabSlotContent=function(e){var t,r=P.node.firstElementChild?e:null;if(r&&"textarea"===(null==(t=r.firstElementChild)?void 0:t.nodeName.toLowerCase())&&(!r.firstElementChild.hasAttribute("data-no-template")||"false"===r.firstElementChild.getAttribute("data-no-template"))){var n=r.firstElementChild.value;r.classList.remove("web-component-template");var i=r.cloneNode();return r.classList.add("web-component-template"),i.innerHTML="",i.template=n,i}return this.self.cloneSlots?e.cloneNode(!0):e},r.grabGivenSlots=function(){var e=this;this.slots={};for(var t=0,r=Array.from(this.querySelectorAll("[slot]"));t<r.length;t++){for(var n,i=r[t],o=i.parentNode,s=!0;o;){if(o.nodeName.includes("-")){o===this&&(s=!1);break}o=o.parentNode}if(!s){var a=null==(n=i.getAttribute("slot"))?void 0:n.trim();this.slots[null!=a?a:i.nodeName.toLowerCase()]=this.grabSlotContent(i)}}this.slots.default?this.slots.default=[].concat(this.slots.default):this.childNodes.length>0?this.slots.default=Array.from(this.childNodes).map((function(t){return e.grabSlotContent(t)})):this.slots.default=[]},r.isStateProperty=function(e){var t;return Boolean((null==(t=this.instance)||null==(t=t.current)?void 0:t.state)&&(Object.prototype.hasOwnProperty.call(this.instance.current.state,e)||this.instance.current.state.modelState&&Object.prototype.hasOwnProperty.call(this.instance.current.state.modelState,e)))},r.generateAliasIndex=function(){if(!this.self._propertyAliasIndex){this.self._propertyAliasIndex=d()({},this.self.propertyAliases);for(var e=0,t=Object.entries(this.self._propertyAliasIndex);e<t.length;e++){var r=t[e],n=r[0],i=r[1];Object.prototype.hasOwnProperty.call(this.self._propertyAliasIndex,i)||(this.self._propertyAliasIndex[i]=n)}}},r.reflectExternalProperties=function(e){this.ignoreAttributeUpdateObservations=!0;for(var t=0,r=Object.entries(e);t<r.length;t++){var n,i=r[t],o=i[0],s=i[1];if(this.setExternalPropertyValue(o,s),this.isConnected){var a=(0,g.camelCaseToDelimited)(o);if(null!=(n=this.self._propertiesToReflectAsAttributes)&&n.has(o))switch(this.self._propertiesToReflectAsAttributes.get(o)){case P.boolean:case"boolean":s?""!==this.getAttribute(a)&&this.setAttribute(a,""):this.hasAttribute(a)&&this.removeAttribute(a);break;case P.func:case"function":break;case"json":if(s){var p=JSON.stringify(s);if(p&&this.getAttribute(a)!==p){this.setAttribute(a,p);break}}this.hasAttribute(a)&&this.removeAttribute(a);break;case P.number:case"number":if("number"!=typeof s||isNaN(s))this.hasAttribute(a)&&this.removeAttribute(a);else{var l=String(s);this.getAttribute(a)!==l&&this.setAttribute(a,l)}break;case P.string:case"string":s?this.getAttribute(a)!==s&&this.setAttribute(a,s):this.hasAttribute(a)&&this.removeAttribute(a);break;case P.any:case P.array:case P.arrayOf:case P.element:case P.elementType:case P.instanceOf:case P.node:case P.object:case"object":case P.objectOf:case P.shape:case P.exact:case P.symbol:default:if(s){var c=(0,g.represent)(s);if(c&&this.getAttribute(a)!==c){this.setAttribute(a,c);break}}this.hasAttribute(a)&&this.removeAttribute(a)}}}this.ignoreAttributeUpdateObservations=!1},r.reflectProperties=function(e){var t,r;if(this.reflectExternalProperties(e),null!=(t=this.instance)&&null!=(t=t.current)&&t.state&&"object"==typeof this.instance.current.state)for(var n,i=w(Object.keys(this.instance.current.state).concat(this.instance.current.state.modelState?Object.keys(this.instance.current.state.modelState):[]));!(n=i()).done;){var o=n.value;Object.prototype.hasOwnProperty.call(this.internalProperties,o)&&this.setInternalPropertyValue(o,void 0)}null!=(r=this.internalProperties.model)&&r.state&&(delete this.internalProperties.model.state,this.setInternalPropertyValue("model",this.internalProperties.model));for(var s,a=w(this.self.controllableProperties);!(s=a()).done;){var p=s.value;Object.prototype.hasOwnProperty.call(e,p)&&this.setInternalPropertyValue(p,e[p])}},r.reflectEventToProperties=function(){var e=p()(v().mark((function e(t,r){var n,i,o,s,a,p,l,c,u,h,f,m,y,b,P,A,T;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.batchUpdates,this.batchUpdates=!1,i=null,o=!1,!(this.self.eventToPropertyMapping&&Object.prototype.hasOwnProperty.call(this.self.eventToPropertyMapping,t)&&(0,g.isFunction)(this.self.eventToPropertyMapping[t]))){e.next=4;break}if(!((a=(s=this.self.eventToPropertyMapping)[t].apply(s,r.concat([this])))&&"then"in a&&(0,g.isFunction)(a.then))){e.next=2;break}return e.next=1,a;case 1:T=e.sent,e.next=3;break;case 2:T=a;case 3:p=T,o=!0,Array.isArray(p)?(i=p[0],this.reflectProperties(i),(0,g.extend)(!0,this.internalProperties,p[1])):null===p?o=!1:"object"==typeof p&&(i=p,this.reflectProperties(p));case 4:if(!o&&r.length>0&&(0,g.isObject)(r[0])){if(c=r[0],"persist"in r[0]&&(0,g.isFunction)(r[0].persist))for(c={},u=0,h=Object.keys(this.self.propertyTypes);u<h.length;u++)for(f=h[u],m=w([f].concat(null!==(b=this.getPropertyAlias(f))&&void 0!==b?b:[]));!(y=m()).done;)P=y.value,(A=r[0].currentTarget&&Object.prototype.hasOwnProperty.call(r[0].currentTarget,P)?r[0].currentTarget[P]:this.getPropertyValue(P))!==this.externalProperties[P]&&(c[P]=A);else[null,void 0].includes(null==(l=c.detail)?void 0:l.value)||(c=d()({},c.detail));i=c,this.reflectProperties(c)}return this.triggerRender("propertyReflected"),this.batchUpdates=n,e.abrupt("return",i);case 5:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}(),r.evaluateStringOrNullAndSetAsProperty=function(e,t){var r=this,n=e.startsWith("-"),i=n?e.substring(1):e,o=(0,g.delimitedToCamelCase)(i),s=this.getPropertyAlias(o);if(s&&Object.prototype.hasOwnProperty.call(this.self.propertyTypes,s)&&(o=s),Object.prototype.hasOwnProperty.call(this.self.propertyTypes,o)){var a=this.self.propertyTypes[o];if(n){if(t){var p=(0,g.evaluate)(t,d()({},g.UTILITY_SCOPE),!1,!0,this);p.error?(O.warn("Failed to process pre-evaluation attribute",'"'+e+'": '+p.error+". Will be",'set to "undefined".'),this.setInternalPropertyValue(o,void 0)):(this.setInternalPropertyValue(o,p.result),this.setExternalPropertyValue(o,p.result))}}else switch(a){case P.boolean:case"boolean":var l=![null,"false"].includes(t);this.setInternalPropertyValue(o,l),this.setExternalPropertyValue(o,l);break;case P.func:case"function":var c,u=null,h=["data","event","firstArgument","firstParameter","options"];if(t){var f=(0,g.compile)(t,h.concat("parameters","scope",g.UTILITY_SCOPE_NAMES),!0,!0,this);u=f.error,c=f.templateFunction,u&&O.warn("Failed to compile given handler",'"'+e+'": '+u+".")}this.setInternalPropertyValue(o,(function(){for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];r.outputEventNames.has(o)&&r.reflectEventToProperties(o,i);var a=void 0;if(!u){for(var p=d()({parameters:i},g.UTILITY_SCOPE),l=0,f=h;l<f.length;l++){var m=f[l];p[m]=i[0]}try{a=null==c?void 0:c.apply(void 0,h.map((function(e){return p[e]})).concat([i,p],g.UTILITY_SCOPE_NAMES.map((function(e){return g.UTILITY_SCOPE[e]}))))}catch(r){O.warn("Failed to evaluate function",'"'+e+'" with expression','"'+t+'" and scope',"variables",'"'+h.join('", "')+'" set to','"'+(0,g.represent)(i)+'":',r+". Set property",'to "undefined".')}}return r.self.renderProperties.includes(o)||r.forwardEvent(o,i),a})),u||this.setExternalPropertyValue(o,c);break;case"json":if(t){var m;try{m=JSON.parse(t)}catch(u){O.warn("Error occurred during parsing given json",'attribute "'+e+'":',(0,g.represent)(u));break}this.setInternalPropertyValue(o,m),this.setExternalPropertyValue(o,(0,g.copy)(m,!1,1))}else this.setInternalPropertyValue(o,null),this.setExternalPropertyValue(o,null);break;case P.number:case"number":if(null===t){this.setInternalPropertyValue(o,t),this.setExternalPropertyValue(o,t);break}var y=parseFloat(t);isNaN(y)&&(y=void 0),this.setInternalPropertyValue(o,y),this.setExternalPropertyValue(o,y);break;case P.string:case"string":this.setInternalPropertyValue(o,t),this.setExternalPropertyValue(o,t);break;case P.any:case P.array:case P.arrayOf:case P.element:case P.elementType:case P.instanceOf:case P.node:case P.object:case"object":case P.objectOf:case P.oneOf:case P.oneOfType:case P.shape:case P.exact:case P.symbol:default:if(t){var b=(0,g.evaluate)(t,{},!1,!0,this);if(b.error){O.warn("Error occurred during processing given",'attribute configuration "'+e+'":',b.error);break}this.setInternalPropertyValue(o,b.result),this.setExternalPropertyValue(o,(0,g.copy)(b.result,!1,1))}else this.hasAttribute(e)?(this.setInternalPropertyValue(o,!0),this.setExternalPropertyValue(o,!0)):(this.setInternalPropertyValue(o,null),this.setExternalPropertyValue(o,null))}}},r.waitForNestedComponentRendering=function(){var e=p()(v().mark((function e(){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.childComponentInstances){e.next=1;break}return e.abrupt("return");case 1:return e.next=2,Promise.all(this.childComponentInstances.map((function(e){return e.renderState.pending?e.renderState.promise:Promise.resolve()})));case 2:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),r.resolveRenderingPromiseIfSet=function(){var e=p()(v().mark((function e(t,r){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r){e.next=2;break}return e.next=1,this.waitForNestedComponentRendering();case 1:this.renderState.pending=!1,this.renderState.resolve(t),this.prepareNewRenderingPromise();case 2:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}(),r.prepareNewRenderingPromise=function(){var e=this;this.renderState.pending||(this.renderState.promise=new Promise((function(t){e.renderState.resolve=function(r){e.renderState.pending=!1,t(r)}})))},r.triggerRender=function(e){var t=this;this.batchUpdates?this.batchedUpdateRunning||(this.batchedUpdateRunning=!0,(0,g.timeout)((function(){t.batchedUpdateRunning=!1,t.render(e)}))):this.render(e)},r.applyShadowRootIfNotExisting=function(){this.self.shadowDOM&&this.hostDomNode===this&&(this.hostDomNode=(!("attachShadow"in this)&&"ShadyDOM"in window?window.ShadyDOM.wrap(this):this).attachShadow((0,g.isObject)(this.self.shadowDOM)?this.self.shadowDOM:{mode:"open"}))},r.determineRenderScope=function(e){var t,r;void 0===e&&(e={}),this.scope=d()({},(null==(t=this.parentInstance)?void 0:t.scope)||{},this.scope,this.internalProperties,((r={parentInstance:this.parentInstance,rootInstance:this.rootInstance,self:this})[(0,g.lowerCase)(this.self._name)||"instance"]=this,r),e),this.scope.scope=this.scope},r.render=function(){var e=p()(v().mark((function e(t,r){var n,i,o=this;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===t&&(t="unknown"),void 0===r&&(r=!0),this.unRender("reRender",t),this.childComponentInstances=[],this.renderState.pending=!0,!this.isRoot){e.next=3;break}return e.next=1,this.resolveRenderingPromiseIfSet(t,r);case 1:if(!r){e.next=3;break}return e.next=2,Promise.all(this.self.pendingRenderPromises);case 2:this.self.pendingRenderPromises=[];case 3:if(this.self.pendingRenderPromises.push(this.renderState.promise),this.determineRenderScope(),this.self.doRender&&this.dispatchEvent(new CustomEvent("render",{detail:{reason:t,scope:this.scope}}))){e.next=5;break}return e.next=4,this.resolveRenderingPromiseIfSet(t,r);case 4:return e.abrupt("return");case 5:if(!(n=(0,g.evaluate)("`"+this.self.content+"`",this.scope)).error){e.next=7;break}return O.warn("Failed to process template: "+n.error),this.renderState.resolve(t),e.next=6,Promise.all(this.self.pendingRenderPromises);case 6:return e.abrupt("return");case 7:return this.applyShadowRootIfNotExisting(),(i=document.createElement("div")).innerHTML=n.result,this.applySlots(i,d()({},this.scope,{parentInstance:this})),this.hostDomNode.innerHTML=i.innerHTML,e.next=8,(0,g.timeout)();case 8:return this.waitForNestedComponentRendering().then((function(){o.applyBindings(o.hostDomNode.firstChild,o.scope,o.self.renderSlots)})),e.next=9,this.resolveRenderingPromiseIfSet(t,r);case 9:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}(),r.unRender=function(e,t){void 0===e&&(e="unknown"),this.unregisterDomNodeEventBindings()},t}(S),s.applyRootBinding=!0,s.pendingRenderPromises=[],s.content="<slot>Please provide a template to transclude.</slot>",s.determineRootBinding=!0,s.shadowDOM=null,s.observedAttributes=[],s.controllableProperties=[],s.eventToPropertyMapping={},s.propertyAliases={},s.propertyTypes={onClick:P.func},s.propertiesToReflectAsAttributes=[],s.renderProperties=["children"],s.doRender=!1,s.cloneSlots=!1,s.evaluateSlots=!1,s.renderSlots=!0,s.trimSlots=!0,s.renderUnsafe=!1,s._name="BaseWeb",s._propertyAliasIndex=void 0,s._propertiesToReflectAsAttributes=void 0,i=s,o=y()(i.prototype,"isRoot",[n],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),i),R={component:C,register:function(e){void 0===e&&(e=(0,g.camelCaseToDelimited)(C._name)),customElements.define(e,C)}};t.default=C},function(e){e.exports=l},function(e){e.exports=c},function(e){e.exports=u},function(e){e.exports=s},function(e,t,r){r.d(t,{api:function(){return w}});var n=r(0),i=r.n(n),o=r(4),s=r.n(o),a=r(3),p=r.n(a),l=r(5),c=r.n(l),u=r(1),d=r(2),h=r(11),f=r.n(h),m=r(13),y=r(14),b=r(7);function v(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return g(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var P=new u.Logger({name:"web-component-wrapper-web"}),A=function(e){function t(){for(var r,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return(r=e.call.apply(e,[this].concat(i))||this).unmountOnDisconnect=!0,r.compiledSlots={},r.preparedSlots={},r.reactRoot=null,r.rootReactInstance=null,r.self=t,r.wrapMemorizingWrapper=null,r.isWrapped=!1,r.reflectInstanceProperties=function(){var e;null!=(e=r.instance)&&e.current&&r.instance.current.properties&&r.reflectProperties(r.instance.current.properties)},r}p()(t,e);var r=t.prototype;return r.connectedCallback=function(){this.applyComponentWrapper(),this.rootReactInstance=this,e.prototype.connectedCallback.call(this)},r.disconnectedCallback=function(){var e;this.unRender("disconnected"),this.unmountOnDisconnect&&(null==(e=this.reactRoot)||e.unmount()),this.unregisterConnectionState()},r.reflectExternalProperties=function(t){this.isRoot&&e.prototype.reflectExternalProperties.call(this,t)},r.render=function(){var t=s()(c().mark((function t(r,n){var o,s,a,p,l=this;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0===r&&(r="unknown"),void 0===n&&(n=!0),e.prototype.unRender.call(this,"reRender",r),this.childComponentInstances=[],this.renderState.pending=!0,this.isRoot&&(this.self.pendingRenderPromises=[]),this.self.pendingRenderPromises.push(this.renderState.promise),this.rootReactInstance===this&&this.dispatchEvent(new CustomEvent("render",{detail:{reason:r,scope:this.scope}}))){t.next=1;break}return t.abrupt("return",this.resolveRenderingPromiseIfSet(r,n));case 1:if(this.determineRenderScope(),0===Object.keys(this.compiledSlots).length&&this.preCompileSlots(),this.evaluateSlots(i()({},this.scope,{parentInstance:this})),this.prepareProperties(this.internalProperties),this.applyShadowRootIfNotExisting(),this.rootInstance!==this&&!this.reactRoot)for(o=this.firstChild;o;)s=o.nextSibling,this.removeChild(o),o=s;if(this.reactRoot||(a=this.id||this.internalProperties.id||this.externalProperties.id||this.name||this.internalProperties.name||this.externalProperties.name,p="","string"==typeof a&&(p=a),this.reactRoot=(0,y.createRoot)(this.hostDomNode,{identifierPrefix:p})),(0,m.flushSync)((function(){var e;null==(e=l.reactRoot)||e.render((0,h.createElement)(l.self.content,l.internalProperties)),l.resolveRenderingPromiseIfSet(r,n)})),!n){t.next=2;break}return t.next=2,this.renderState.promise;case 2:case"end":return t.stop()}}),t,this)})));return function(e,r){return t.apply(this,arguments)}}(),r.setPropertyValue=function(e,t){var r;this.reflectProperties(((r={})[e]=(0,u.copy)(t,!1,1),r)),this.setInternalPropertyValue(e,(0,u.copy)(t,!1,1))},r.setInternalPropertyValue=function(t,r){null===r?r=d.NullSymbol:void 0===r&&(r=d.UndefinedSymbol),e.prototype.setInternalPropertyValue.call(this,t,r)},r.preCompileDomNodes=function(e,t,r){if(void 0===t&&(t={}),void 0===r&&(r=!1),1===(e=e.filter((function(e){return e.nodeType!==Node.TEXT_NODE||"string"==typeof e.nodeValue&&""!==e.nodeValue.trim()}))).length)return this.preCompileDomNode(e[0],t,r);for(var n,i=1,o=[],s=v(e);!(n=s()).done;){var a=n.value,p=this.preCompileDomNode(a,t,r,i.toString());o.push(p),i+=1}return r?function(e){return function(){for(var t,r=[],n=v(o);!(t=n()).done;){var i=(0,t.value)(e);"function"==typeof i&&r.push(i.apply(void 0,arguments))}return(0,h.createElement)(h.Fragment,{children:r})}}:o},r.preCompileDomNode=function(e,t,r,n){var o=this;if(void 0===t&&(t={}),void 0===r&&(r=!1),r){var s=this.preCompileDomNode(e,i()({},t,{data:void 0,firstArgument:void 0,firstParameter:void 0,options:void 0,scope:void 0,parameters:void 0}),!1,n);return function(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var o=r.length>0?r[0]:null;return s(i()({},e,{data:o,firstArgument:o,firstParameter:o,options:o,scope:o,parameters:r}))}}}if(e.nodeType===Node.TEXT_NODE){var a="string"==typeof e.nodeValue?e.nodeValue.trim():"",p=n&&a?(0,h.createElement)(h.Fragment,{children:a,key:n}):a||null;return function(){return p}}if(!e.getAttributeNames)return function(){return null};var l,c={},d=this.self.isReactComponent(e);d?(e.determineRenderScope(),0===Object.keys(this.compiledSlots).length&&e.preCompileSlots(),n&&!Object.prototype.hasOwnProperty.call(c,"key")&&(c.key=n),l=e.constructor.content):(c.key=n,l=e.tagName.toLowerCase());for(var f,m=Object.keys(t),y={},b=function(){var r,n=f.value,i=e.getAttribute(n);if(null===i)return 0;var s=!1,a="";if(n.startsWith("data-bind-")?a=n.substring(10):n.startsWith("bind-")&&(a=n.substring(5)),a.startsWith("attribute-")||"attributes"===a||a.startsWith("property-")||"properties"===a){var p=(0,u.compile)(i,m),l=p.error,h=p.originalScopeNames,b=p.templateFunction;if(l)return P.warn("Error occurred during compiling given attribute",'binding "'+n+'" on node:',e,l),0;"attributes"===a||"properties"===a?s=!0:a=a.startsWith("attribute-")?a.substring(10):a.substring(9),i={originalScopeNames:h,templateFunction:b.bind(o)}}else if(a.startsWith("on-")){a=(0,u.delimitedToCamelCase)(a),Object.prototype.hasOwnProperty.call(t,"event")||(m=[].concat(m,["event"])),Object.prototype.hasOwnProperty.call(t,"parameters")||(m=[].concat(m,["parameters"]));var v=(0,u.compile)(i,m,!0),g=v.error,A=v.originalScopeNames,w=v.scopeNames,T=v.templateFunction;if(g)return P.warn("Error occurred during compiling given event",'binding "'+n+'" on node:',e,g),0;var O=T.bind(o);i=function(){for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];t.event=o[0],t.parameters=o;try{O.apply(void 0,A.map((function(e){return t[e]})))}catch(t){P.warn("Error occurred during processing given",'event binding "'+n+'" on node: ',e,'Given expression "'+i+'" could',"not be evaluated with given scope names",'"'+w.join('", "')+'":',(0,u.represent)(t))}}}else a=n;var S={class:"className",for:"htmlFor"};Object.prototype.hasOwnProperty.call(S,a)&&(a=S[a]),a=(0,u.delimitedToCamelCase)(a),null!=(r=i)&&r.originalScopeNames?y[s?"":a]=i:d||(c[a]=i)},g=v(e.getAttributeNames());!(f=g()).done;)b();if(!d){var A=Array.from(e.childNodes);A.length&&(c.children=this.preCompileDomNodes(A,t))}return function(r){(r=i()({},t,r)).scope=r;for(var n=i()({},c),s=0,a=Object.entries(y);s<a.length;s++){var p=a[s],u=p[0],f=p[1],m=f.originalScopeNames,b=f.templateFunction.apply(void 0,m.map((function(e){return r[e]})));""===u?n=i()({},n,b):n[u]=b}return Object.prototype.hasOwnProperty.call(n,"innerHTML")&&(n.dangerouslySetInnerHTML={__html:n.innerHTML},delete n.children,delete n.innerHTML),Object.prototype.hasOwnProperty.call(n,"textContent")?(n.children=n.textContent,delete n.textContent):d?(n=i()({},e.internalProperties,n),r=i()({},n,r,{parentInstance:e}),e.evaluateSlots(r),e.prepareProperties(n)):n.children&&(n.children=o.evaluatePreCompiledDomNodes(n.children,r)),(0,h.createElement)(l,n)}},r.evaluatePreCompiledDomNodes=function(e,t){if(void 0===t&&(t={}),!Array.isArray(e))return e(t);if(1===e.length)return e[0](t);for(var r,n=[],i=v(e);!(r=i()).done;){var o=(0,r.value)(t);o&&n.push(o)}return n},r.preCompileSlots=function(){for(var e in this.slots)this.slots[e]&&"default"!==e&&(this.compiledSlots[e]=this.preCompileDomNode(this.slots[e],i()({},this.scope,{parentInstance:this}),[d.func,"function"].includes(this.self.propertyTypes[e])));this.slots.default&&this.slots.default.length>0&&(this.compiledSlots.children=this.preCompileDomNodes(this.slots.default,i()({},this.scope,{parentInstance:this}),[d.func,"function"].includes(this.self.propertyTypes.children)))},r.evaluateSlots=function(e){for(var t in this.preparedSlots={},this.compiledSlots)Object.prototype.hasOwnProperty.call(this.compiledSlots,t)&&("children"===t?this.preparedSlots.children=this.evaluatePreCompiledDomNodes(this.compiledSlots[t],e):this.preparedSlots[t]=this.compiledSlots[t](e))},t.isReactComponent=function(e){var t=e.constructor;return"object"==typeof t.content&&(!t.attachWebComponentAdapterIfNotExists||"react"===t.content.webComponentAdapterWrapped)},r.determineRootBinding=function(){e.prototype.determineRootBinding.call(this);for(var t=this.parentNode;t;){if(this.self.isReactComponent(t)){this.rootReactInstance=t;break}t=t.parentNode}},r.applyComponentWrapper=function(){if("string"!=typeof this.self.content&&!this.isWrapped){this.isWrapped=!0;var e=this.self.content.wrapped||this.self.content;this.self.content.webComponentAdapterWrapped?this.wrapMemorizingWrapper&&(this.self.content=(0,h.memo)(this.self.content),this.self.content.wrapped=e):this.self.attachWebComponentAdapterIfNotExists?(this.self.content.displayName||(this.self.content.displayName=this.self._name),this.self.content=(0,h.forwardRef)((function(t,r){return(0,h.useImperativeHandle)(r,(function(){return{properties:t}}),[t]),(0,h.createElement)(e,t)})),(this.wrapMemorizingWrapper||null===this.wrapMemorizingWrapper)&&(this.self.content=(0,h.memo)(this.self.content)),this.self.content.wrapped=e,this.self.content.webComponentAdapterWrapped="react"):this.wrapMemorizingWrapper&&(this.self.content=(0,h.memo)(this.self.content),this.self.content.wrapped=e)}},r.prepareProperties=function(e){var t=this;(0,u.extend)(e,this.preparedSlots),this.self.removeKnownUnwantedPropertyKeys(this.self,e),e.ref||(this.instance=(0,h.createRef)(),e.ref=function(e){t.instance?t.instance.current=e:t.instance={current:e},t.reflectInstanceProperties()})},t.removeKnownUnwantedPropertyKeys=function(e,t){if("string"!=typeof e.content)for(var r,n=v(["isRoot","isTrusted","__composed"]);!(r=n()).done;){var i=r.value;Object.prototype.hasOwnProperty.call(t,i)&&(Object.prototype.hasOwnProperty.call(e.content,"propTypes")&&!Object.prototype.hasOwnProperty.call(e.content.propTypes,i)||Object.prototype.hasOwnProperty.call(e.content,"wrapped")&&Object.prototype.hasOwnProperty.call(e.content.wrapped,"propTypes")&&!Object.prototype.hasOwnProperty.call(e.content.wrapped.propTypes,i))&&delete t[i]}},t}(b.default);A.attachWebComponentAdapterIfNotExists=!0,A.content="div",A.react=f(),A._name="ReactWebComponent";var w={component:A,register:function(e){void 0===e&&(e=(0,u.camelCaseToDelimited)(A._name)),customElements.define(e,A)}};t.default=A},function(e){e.exports=a},function(e){e.exports=p}],h={};function f(e){var t=h[e];if(void 0!==t)return t.exports;var r=h[e]={exports:{}};return d[e](r,r.exports,f),r.exports}f.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(t,{a:t}),t},f.d=function(e,t){for(var r in t)f.o(t,r)&&!f.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},f.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var m={};f.r(m),f.d(m,{ReactWeb:function(){return S},Web:function(){return N},property:function(){return O},reactWebAPI:function(){return C},webAPI:function(){return R},wrapAsWebComponent:function(){return x}});var y=f(0),b=f.n(y),v=f(3),g=f.n(v),P=f(1),A=f(6),w=f(12),T=f(7),O=A.default,S=w.default,C=w.api,R=T.api,N=T.default,x=function(e,t,r){var n,i,o;void 0===t&&(t="NoName"),void 0===r&&(r={});var s=e._name||(null==(n=e.___types)||null==(n=n.name)?void 0:n.name)||t.replace(/^(.*\/+)?([^/]+)\.tsx$/,"$2");r.propTypes&&(e.propTypes=r.propTypes);var a=e.propTypes||{},p=r.propertyAliases||e.propertyAliases||{},l=(0,P.unique)(Object.keys(a).concat(Object.keys(p)).concat(Object.values(p))),c=r.propertiesToReflectAsAttributes||e.propertiesToReflectAsAttributes||[];if(S.propertiesToReflectAsAttributes)if(Array.isArray(c))c=[].concat(S.propertiesToReflectAsAttributes,c);else if(c instanceof Map)for(var u=0,d=S.propertiesToReflectAsAttributes;u<d.length;u++){var h=d[u];c.set(h,S.propertyTypes[h])}else if("object"==typeof c)for(var f=0,m=S.propertiesToReflectAsAttributes;f<m.length;f++){var y=m[f];c[y]=S.propertyTypes[y]}var v=l.map((function(e){return(0,P.camelCaseToDelimited)(e)})),A=function(t){function n(){for(var i,o,s=arguments.length,a=new Array(s),p=0;p<s;p++)a[p]=arguments[p];return(o=t.call.apply(t,[this].concat(a))||this).self=n,o.internalProperties=r.internalProperties?b()({},r.internalProperties):e.internalProperties?b()({},e.internalProperties):{},o.unmountOnDisconnect=null===(i=r.unmountOnDisconnect)||void 0===i||i,o}return g()(n,t),n}(S);return A.attachWebComponentAdapterIfNotExists="boolean"!=typeof r.attachWebComponentAdapterIfNotExists||r.attachWebComponentAdapterIfNotExists,A.content=e,A.observedAttributes=S.observedAttributes.concat(v).concat(v.map((function(e){return"-"+e}))),A.controllableProperties=e.controllableProperties||r.controllableProperties||[],A.eventToPropertyMapping=null===r.eventToPropertyMapping?r.eventToPropertyMapping:r.eventToPropertyMapping?b()({},r.eventToPropertyMapping):null===e.eventToPropertyMapping?e.eventToPropertyMapping:e.eventToPropertyMapping?b()({},e.eventToPropertyMapping):{},A.propertyAliases=b()({},S.propertyAliases,p),A.propertiesToReflectAsAttributes=c,A.propertyTypes=b()({},S.propertyTypes,a),A.renderProperties=null!==(i=null!==(o=r.renderProperties)&&void 0!==o?o:e.renderProperties)&&void 0!==i?i:S.renderProperties,A._name=s,{component:A,register:function(e){void 0===e&&(e=(0,P.camelCaseToDelimited)(s)),customElements.define(e,A)}}};return m.default=x,m}()}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";if("undefined"!=typeof module&&null!==module&&"undefined"!==eval("typeof require")&&null!==eval("require")&&"main"in eval("require")&&"undefined"!==eval("typeof require.main")&&null!==eval("require.main")){var ORIGINAL_MAIN_MODULE=module;module!==eval("require.main")&&"paths"in module&&"paths"in eval("require.main")&&"undefined"!=typeof __dirname&&null!==__dirname&&(module.paths=eval("require.main.paths").concat(module.paths.filter((function(path){return eval("require.main.paths").includes(path)}))))}if(null==window)var window="undefined"==typeof global||null===global?{}:global;!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@babel/runtime/helpers/extends"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/helpers/inheritsLoose"),require("@babel/runtime/regenerator"),require("clientnode"),require("clientnode/property-types"),require("react"),require("@jest/globals"),require("react-dom"),require("react-dom/client"),require("@babel/runtime/helpers/initializerDefineProperty"),require("@babel/runtime/helpers/applyDecoratedDescriptor"),require("@babel/runtime/helpers/initializerWarningHelper"));else if("function"==typeof define&&define.amd)define(["@babel/runtime/helpers/extends","@babel/runtime/helpers/asyncToGenerator","@babel/runtime/helpers/inheritsLoose","@babel/runtime/regenerator","clientnode","clientnode/property-types","react","@jest/globals","react-dom","react-dom/client","@babel/runtime/helpers/initializerDefineProperty","@babel/runtime/helpers/applyDecoratedDescriptor","@babel/runtime/helpers/initializerWarningHelper"],t);else{var r="object"==typeof exports?t(require("@babel/runtime/helpers/extends"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/helpers/inheritsLoose"),require("@babel/runtime/regenerator"),require("clientnode"),require("clientnode/property-types"),require("react"),require("@jest/globals"),require("react-dom"),require("react-dom/client"),require("@babel/runtime/helpers/initializerDefineProperty"),require("@babel/runtime/helpers/applyDecoratedDescriptor"),require("@babel/runtime/helpers/initializerWarningHelper")):t(e["@babel/runtime/helpers/extends"],e["@babel/runtime/helpers/asyncToGenerator"],e["@babel/runtime/helpers/inheritsLoose"],e["@babel/runtime/regenerator"],e.clientnode,e["clientnode/property-types"],e.react,e["@jest/globals"],e["react-dom"],e["react-dom/client"],e["@babel/runtime/helpers/initializerDefineProperty"],e["@babel/runtime/helpers/applyDecoratedDescriptor"],e["@babel/runtime/helpers/initializerWarningHelper"]);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(this,(function(e,t,r,n,o,i,s,a,p,l,c,u,d){return function(){var h=[function(t){t.exports=e},function(e){e.exports=o},function(e){e.exports=i},function(e){e.exports=r},function(e){e.exports=t},function(e){e.exports=n},function(e,t,r){var n=r(0),o=r.n(n),i=r(1),s=r(2);t.default=function(e){return void 0===e&&(e={}),e=o()({readAttribute:!0,type:s.string},e),function(t,r){if("string"==typeof r){var n,s=t.self||t.constructor;if(e.readAttribute){Object.prototype.hasOwnProperty.call(s,"observedAttributes")||(s.observedAttributes=s.observedAttributes?[].concat(s.observedAttributes):[]);var a=(0,i.camelCaseToDelimited)(r);s.observedAttributes&&!s.observedAttributes.includes(a)&&s.observedAttributes.push(a)}if(e.type&&(Object.prototype.hasOwnProperty.call(s,"propertyTypes")||(s.propertyTypes=s.propertyTypes?o()({},s.propertyTypes):{}),!s.propertyTypes||!e.update&&Object.prototype.hasOwnProperty.call(s,r)||(s.propertyTypes[r]=e.type)),e.writeAttribute)if(Object.prototype.hasOwnProperty.call(s,"propertiesToReflectAsAttributes")||(s.propertiesToReflectAsAttributes=s.propertiesToReflectAsAttributes?(0,i.copy)(s.propertiesToReflectAsAttributes):[]),e.update||s.propertiesToReflectAsAttributes instanceof Map&&!s.propertiesToReflectAsAttributes.has(r)||Array.isArray(s.propertiesToReflectAsAttributes)&&!s.propertiesToReflectAsAttributes.includes(r)||"object"==typeof s.propertiesToReflectAsAttributes&&!Object.prototype.hasOwnProperty.call(s.propertiesToReflectAsAttributes,r))"boolean"==typeof e.writeAttribute?e.writeAttribute&&s.propertyTypes&&Object.prototype.hasOwnProperty.call(s.propertyTypes,r)&&(n=s.propertyTypes[r]):n=e.writeAttribute,void 0!==n&&(Array.isArray(s.propertiesToReflectAsAttributes)&&(!0===e.writeAttribute?s.propertiesToReflectAsAttributes.push(r):s.normalizePropertyTypeList&&(s.propertiesToReflectAsAttributes=s.normalizePropertyTypeList(s.propertiesToReflectAsAttributes))),s.propertiesToReflectAsAttributes instanceof Map&&s.propertiesToReflectAsAttributes.set(r,n),"object"==typeof s.propertiesToReflectAsAttributes&&(s.propertiesToReflectAsAttributes[r]=n));e.alias&&(Object.prototype.hasOwnProperty.call(s,"propertyAliases")||(s.propertyAliases=s.propertyAliases?o()({},s.propertyAliases):{}),!s.propertyAliases||!e.update&&Object.prototype.hasOwnProperty.call(s,r)||(s.propertyAliases[r]=e.alias))}}}},function(e,t,r){var n,o,i,s,a=r(4),p=r.n(a),l=r(8),c=r.n(l),u=r(0),d=r.n(u),h=r(3),f=r.n(h),m=r(9),y=r.n(m),v=(r(10),r(5)),b=r.n(v),g=r(1),P=r(2),A=r(6);function w(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return x(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var T=new g.Logger({name:"web-component-wrapper-web"}),C="undefined"==typeof HTMLElement?function(){}:HTMLElement,S=(n=(0,A.default)({type:P.boolean,writeAttribute:!0}),s=function(e){function t(){var r;return(r=e.call(this)||this).renderState={promise:Promise.resolve(""),pending:!1,resolve:g.NOOP},r.childComponentInstances=[],r.batchAttributeUpdates=!0,r.batchPropertyUpdates=!0,r.batchUpdates=!0,r.batchedAttributeUpdateRunning=!0,r.batchedPropertyUpdateRunning=!0,r.batchedUpdateRunning=!0,r.connectionRegistered=!1,r.pendingAttributeUpdates=[],r.parentInstance=null,r.rootInstance=void 0,r.hostDomNode=void 0,r.scope=d()({},g.UTILITY_SCOPE),r.domNodeEventBindings=new Map,r.domNodeTemplateCache=new Map,r.externalProperties={},r.ignoreAttributeUpdateObservations=!1,r.internalProperties={},r.outputEventNames=new Set,r.instance=null,c()(r,"isRoot",i,r),r.runDomConnectionAndRenderingInSameEventQueue=!1,r.self=t,r.slots={},r.prepareNewRenderingPromise(),r.self=r.constructor,r.self._propertiesToReflectAsAttributes||(r.self._propertiesToReflectAsAttributes=r.self.normalizePropertyTypeList(r.self.propertiesToReflectAsAttributes)),r.generateAliasIndex(),r.hostDomNode=r,r.rootInstance=r,r.defineGetterAndSetterInterface(),r}f()(t,e);var r=t.prototype;return r.attributeChangedCallback=function(e,t,r){this.ignoreAttributeUpdateObservations||t===r||this.onUpdateAttribute(e,r)},r.onUpdateAttribute=function(e,t){var r=this,n=new Promise((function(n){return r.pendingAttributeUpdates.push((function(){r.evaluateStringOrNullAndSetAsProperty(e,t),r.batchAttributeUpdates?r.batchedAttributeUpdateRunning||r.batchedUpdateRunning||(r.batchedAttributeUpdateRunning=!0,r.batchedUpdateRunning=!0,(0,g.timeout)((function(){r.batchedAttributeUpdateRunning=!1,r.batchedUpdateRunning=!1,r.render("attributeChanged")}))):r.render("attributeChanged"),n()}))}));if(this.connectionRegistered)for(;this.pendingAttributeUpdates.length;)this.pendingAttributeUpdates.shift()();return n},r.connectedCallback=function(){var e=this;try{this.isConnected=!0}catch(e){}for(this.connectionRegistered=!0,this.parentInstance=this,this.rootInstance=this,this.attachEventHandler(),this.self.determineRootBinding&&(this.determineRootBinding(),this.parentInstance!==this&&this.parentInstance.childComponentInstances&&this.parentInstance.childComponentInstances.push(this)),this.self.applyRootBinding&&this.isRoot&&(this.determineRenderScope(),this.applyBinding(this,this.scope));this.pendingAttributeUpdates.length;)this.pendingAttributeUpdates.shift()();this.batchedAttributeUpdateRunning=!1,this.batchedPropertyUpdateRunning=!1,this.batchedUpdateRunning=!1,this.grabGivenSlots(),this.reflectExternalProperties(this.externalProperties),this.runDomConnectionAndRenderingInSameEventQueue?this.render("connected"):(0,g.timeout)((function(){e.render("connected")}))},r.disconnectedCallback=function(){this.unRender("disconnected"),this.unregisterConnectionState()},r.defineGetterAndSetterInterface=function(){for(var e,t=this,r=function(){var r=e.value;Object.prototype.hasOwnProperty.call(t,r)&&t.setPropertyValue(r,t[r]),Object.defineProperty(t,r,{configurable:!0,get:function(){return t.getPropertyValue(r)},set:function(e){t.setPropertyValue(r,e),t.triggerPropertySpecificRendering(r,e)}})},n=w((0,g.unique)(Object.keys(this.self.propertyTypes).concat(this.self._propertyAliasIndex?Object.keys(this.self._propertyAliasIndex):[])));!(e=n()).done;)r()},r.getPropertyAlias=function(e){return this.self._propertyAliasIndex&&Object.prototype.hasOwnProperty.call(this.self._propertyAliasIndex,e)?this.self._propertyAliasIndex[e]:null},r.getPropertyValue=function(e){var r,n,o,i=null!=(r=this.instance)&&null!=(r=r.current)&&r.properties&&(Object.prototype.hasOwnProperty.call(!t.propertyTypes,e)||Object.prototype.hasOwnProperty.call(this.instance.current.properties,e))?this.instance.current.properties[e]:null!==(n=this.internalProperties[e])&&void 0!==n?n:this.externalProperties[e];return null!=(o=this.instance)&&null!=(o=o.current)&&o.state&&Object.prototype.hasOwnProperty.call(this.instance.current.state,e)?this.instance.current.state[e]:i},r.setExternalPropertyValue=function(e,t){this.externalProperties[e]=t;var r=this.getPropertyAlias(e);r&&(this.externalProperties[r]=t)},r.setInternalPropertyValue=function(e,t){this.internalProperties[e]=t;var r=this.getPropertyAlias(e);r&&(this.internalProperties[r]=t)},r.setPropertyValue=function(e,t){var r;this.reflectProperties(((r={})[e]=t,r)),this.setInternalPropertyValue(e,t)},r.triggerPropertySpecificRendering=function(e,t){var r=this;if(this.batchPropertyUpdates)this.batchedPropertyUpdateRunning||this.batchedUpdateRunning||(this.batchedPropertyUpdateRunning=!0,this.batchedUpdateRunning=!0,(0,g.timeout)((function(){void 0!==t&&r.isStateProperty(e)?(r.render("preStatePropertyChanged"),(0,g.timeout)((function(){r.setInternalPropertyValue(e,void 0),r.batchedPropertyUpdateRunning=!1,r.batchedUpdateRunning=!1,r.render("postStatePropertyChanged"),r.triggerOutputEvents()}))):(r.batchedPropertyUpdateRunning=!1,r.batchedUpdateRunning=!1,r.render("propertyChanged"),r.triggerOutputEvents())})));else{var n=this.isStateProperty(e);this.render(n?"preStatePropertyChanged":"propertyChanged"),void 0!==t&&n&&(this.setInternalPropertyValue(e,void 0),this.render("postStatePropertyChanged")),this.triggerOutputEvents()}},r.unregisterConnectionState=function(){try{this.isConnected=!1}catch(e){}this.connectionRegistered=!1,this.slots={}},r.unregisterDomNodeEventBindings=function(){for(var e,t=w(this.domNodeEventBindings.values());!(e=t()).done;)for(var r,n=w(e.value.values());!(r=n()).done;){(0,r.value)()}},r.applyBinding=function(e,t){var r=this;if(e.getAttributeNames)for(var n,o=function(){var o,i=n.value;if(i.startsWith("data-bind-")?o=i.substring(10):i.startsWith("bind-")&&(o=i.substring(5)),o){var s=e.getAttribute(i);if(null===s)return 0;if(o.startsWith("attribute-")||o.startsWith("property-")){var a=(0,g.evaluate)(s,t,!1,!0,e);if(a.error)return T.warn("Error occurred during processing given",'attribute binding "'+i+'" on node:',e,a.error),0;o.startsWith("attribute-")?e.setAttribute(o.substring(10),a.result):e[(0,g.delimitedToCamelCase)(o.substring(9))]=a.result}else if(o.startsWith("on-")){o=(0,g.delimitedToCamelCase)(o.substring(3)),t=d()({log:T,event:void 0,parameters:void 0},t);var p=(0,g.compile)(s,t,!0,!0,e);p.error?T.warn("Error occurred during compiling given event",'binding "'+i+'" on node:',e,p.error):r.addSecureEventListener(e,o,(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];t.event=n[0],t.parameters=n;try{p.templateFunction.apply(p,p.originalScopeNames.map((function(e){return t[e]})))}catch(t){T.warn("Error occurred during processing","given event binding",'"'+i+'" on node:',e,'Given expression "'+s+'" could',"not be evaluated with given scope",'names "'+p.scopeNames.join('", "')+'": '+(0,g.represent)(t))}}))}}},i=w(e.getAttributeNames());!(n=i()).done;)o()},r.applyBindings=function(e,t,r){for(void 0===r&&(r=!0);e;){var n;null==(n=e.attributes)||!n.length||!r&&e.getAttribute("slot")||this.applyBinding(e,t),e.nodeName.toLowerCase().includes("-")||this.applyBindings(e.firstChild,t),e=e.nextSibling}},r.compileDomNodeTemplate=function(e,t,r){void 0===t&&(t=[]),void 0===r&&(r={}),r=d()({ignoreComponents:!0,ignoreNestedComponents:!0,unsafe:this.self.renderUnsafe},r);var n=e.nodeName.toLowerCase();if(r.ignoreComponents&&n.includes("-"))return null;if(r.unsafe){var o=e.innerHTML;if(!o&&e.template&&(o=e.template),this.self.hasCode(o)){var i=(0,g.compile)("`"+o+"`",t);return{domNode:e,children:[],error:i.error,scopeNames:i.scopeNames,template:o,templateFunction:i.templateFunction}}return null}var s=null;if("#text"===n){var a=e.textContent;a&&this.self.hasCode(a)&&(s=a.replace(/ /g," ").trim())}var p=[],l={children:p,domNode:e};if(s){var c=(0,g.compile)("`"+s+"`",t);l.error=c.error,l.scopeNames=c.scopeNames,l.template=s,l.templateFunction=c.templateFunction}for(var u=e.firstChild;u;){if(!r.filter||r.filter(u)){var h=this.compileDomNodeTemplate(u,t,d()({},r,{ignoreComponents:r.ignoreNestedComponents}));h&&p.push(h)}u=u.nextSibling}return l},r.evaluateCompiledDomNodeTemplate=function(e,t){var r=e.domNode,n=e.error,o=e.templateFunction,i=e.scopeNames;if(!o||!i)return null;if(n)return T.warn("Error occurred during compiling node content:",n),null;var s=null;try{s=o.apply(void 0,i.map((function(e){return t[e]})))}catch(n){T.warn('Error occurred when "'+this.self._name+'" is running','"'+String(o)+'": with bound','names "'+i.join('", "')+'":','"'+n+'". Rendering node:',r)}return s},r.evaluateDomNodeTemplate=function(e,t,r){var n=this;void 0===t&&(t={}),void 0===r&&(r={});var o=(r=d()({domNodeTemplateCache:this.domNodeTemplateCache,ignoreComponents:!0,ignoreNestedComponents:!0,unsafe:this.self.renderUnsafe},r)).domNodeTemplateCache;if(!o.has(e)){var i={filter:r.filter,ignoreComponents:r.ignoreComponents,ignoreNestedComponents:r.ignoreNestedComponents,unsafe:r.unsafe},s=this.compileDomNodeTemplate(e,t,i);s&&o.set(e,s)}if(o.has(e)){var a=o.get(e),p=this.evaluateCompiledDomNodeTemplate(a,t);if(null!==p&&(r.unsafe&&e.innerHTML?e.innerHTML=p:e.textContent=p),a.children.length){var l=function(e){for(var r,o=w(e);!(r=o()).done;){var i=r.value,s=n.evaluateCompiledDomNodeTemplate(i,t);null!==s&&(i.domNode.textContent=s),i.children.length&&l(i.children)}};l(a.children)}}r.applyBindings&&this.applyBindings(e,t)},r.addSecureEventListener=function(e,t,r,n,o){var i=this;this.domNodeEventBindings.has(e)||this.domNodeEventBindings.set(e,new Map);var s=this.domNodeEventBindings.get(e),a=s.get(t);a&&a!==r&&a();var p=function(){e.removeEventListener(t,r,o),s.delete(t),0===s.size&&i.domNodeEventBindings.delete(e)};return s.set(t,p),e.addEventListener(t,r,n),p},r.determineRootBinding=function(){for(var e=this.parentNode;e;){var r=e instanceof t||e.nodeName.includes("-")&&"#document-fragment"!==e.nodeName,n=null===e.parentNode&&"[object ShadowRoot]"===e.toString();r?(this.rootInstance===this&&(this.parentInstance=e,this.setPropertyValue("isRoot",!1)),this.rootInstance=e):n&&this.setPropertyValue("isRoot",!1),e=e.parentNode}},t.hasCode=function(e){return"string"==typeof e&&e.includes("${")&&e.includes("}")&&/\${[\s\S]+}/.test(e)},t.normalizePropertyTypeList=function(e){if("string"==typeof e&&(e=[e]),Array.isArray(e)){for(var r,n=e,o=new Map,i=w(n);!(r=i()).done;){var s=r.value;Object.prototype.hasOwnProperty.call(t.propertyTypes,s)&&o.set(s,t.propertyTypes[s])}return o}return(0,g.convertPlainObjectToMap)(e)},r.attachEventHandler=function(){if(null!==this.self.eventToPropertyMapping){var e=this.attachExplicitDefinedOutputEventHandler();this.attachImplicitDefinedOutputEventHandler(!e)}},r.attachExplicitDefinedOutputEventHandler=function(){var e=this;if(!this.self.eventToPropertyMapping)return!1;for(var t=!1,r=function(){var r=o[n];Object.prototype.hasOwnProperty.call(e.internalProperties,r)||(t=!0,e.outputEventNames.add(r),e.setInternalPropertyValue(r,p()(b().mark((function t(){var n,o,i,s,a=arguments;return b().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(n=a.length,o=new Array(n),i=0;i<n;i++)o[i]=a[i];return t.next=1,e.reflectEventToProperties(r,o);case 1:(s=t.sent)&&(o[0]=s),e.forwardEvent(r,o);case 2:case"end":return t.stop()}}),t)})))))},n=0,o=Object.keys(this.self.eventToPropertyMapping);n<o.length;n++)r();return t},r.attachImplicitDefinedOutputEventHandler=function(e){var t=this;void 0===e&&(e=!0);for(var r=function(){var r=o[n],i=r[0],s=r[1];Object.prototype.hasOwnProperty.call(t.internalProperties,i)||![P.func,"function"].includes(s)||t.self.renderProperties.includes(i)||(t.outputEventNames.add(i),t.setInternalPropertyValue(i,(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];e&&t.reflectEventToProperties(i,n),t.forwardEvent(i,n)})))},n=0,o=Object.entries(this.self.propertyTypes);n<o.length;n++)r()},r.triggerOutputEvents=function(){for(var e,t=w(this.outputEventNames);!(e=t()).done;){var r=e.value;this.forwardEvent(r,[this.externalProperties])}},r.forwardEvent=function(e,t){return e.length>3&&e.startsWith("on")&&(e=(0,g.lowerCase)(e.substring(2))),this.dispatchEvent(new CustomEvent(e,{detail:{parameters:t}}))},r.applySlots=function(e,r){for(var n=this,o=0,i=Array.from(e.querySelectorAll("slot"));o<i.length;o++){var s=i[o],a=s.getAttribute("name");if(null===a||"default"===a)if(this.slots.default){if(this.self.renderSlots){if(this.self.evaluateSlots)for(var p,l=w(this.slots.default);!(p=l()).done;){var c=p.value;this.evaluateDomNodeTemplate(c,r)}(0,g.replace)(s,this.slots.default,t.trimSlots)}}else this.slots.default=(0,g.unwrap)(s).map((function(e){return n.grabSlotContent(e)}));else this.slots[a]?this.self.renderSlots&&(this.self.evaluateSlots&&this.evaluateDomNodeTemplate(this.slots[a],r),(0,g.replace)(s,this.slots[a],t.trimSlots)):this.slots[a]=this.grabSlotContent((0,g.unwrap)(s).filter((function(e){return"#text"!==e.nodeName.toLowerCase()}))[0])}},r.grabSlotContent=function(e){var t,r=P.node.firstElementChild?e:null;if(r&&"textarea"===(null==(t=r.firstElementChild)?void 0:t.nodeName.toLowerCase())&&(!r.firstElementChild.hasAttribute("data-no-template")||"false"===r.firstElementChild.getAttribute("data-no-template"))){var n=r.firstElementChild.value;r.classList.remove("web-component-template");var o=r.cloneNode();return r.classList.add("web-component-template"),o.innerHTML="",o.template=n,o}return this.self.cloneSlots?e.cloneNode(!0):e},r.grabGivenSlots=function(){var e=this;this.slots={};for(var t=0,r=Array.from(this.querySelectorAll("[slot]"));t<r.length;t++){for(var n,o=r[t],i=o.parentNode,s=!0;i;){if(i.nodeName.includes("-")){i===this&&(s=!1);break}i=i.parentNode}if(!s){var a=null==(n=o.getAttribute("slot"))?void 0:n.trim();this.slots[null!=a?a:o.nodeName.toLowerCase()]=this.grabSlotContent(o)}}this.slots.default?this.slots.default=[].concat(this.slots.default):this.childNodes.length>0?this.slots.default=Array.from(this.childNodes).map((function(t){return e.grabSlotContent(t)})):this.slots.default=[]},r.isStateProperty=function(e){var t;return Boolean((null==(t=this.instance)||null==(t=t.current)?void 0:t.state)&&(Object.prototype.hasOwnProperty.call(this.instance.current.state,e)||this.instance.current.state.modelState&&Object.prototype.hasOwnProperty.call(this.instance.current.state.modelState,e)))},r.generateAliasIndex=function(){if(!this.self._propertyAliasIndex){this.self._propertyAliasIndex=d()({},this.self.propertyAliases);for(var e=0,t=Object.entries(this.self._propertyAliasIndex);e<t.length;e++){var r=t[e],n=r[0],o=r[1];Object.prototype.hasOwnProperty.call(this.self._propertyAliasIndex,o)||(this.self._propertyAliasIndex[o]=n)}}},r.reflectExternalProperties=function(e){this.ignoreAttributeUpdateObservations=!0;for(var t=0,r=Object.entries(e);t<r.length;t++){var n,o=r[t],i=o[0],s=o[1];if(this.setExternalPropertyValue(i,s),this.isConnected){var a=(0,g.camelCaseToDelimited)(i);if(null!=(n=this.self._propertiesToReflectAsAttributes)&&n.has(i))switch(this.self._propertiesToReflectAsAttributes.get(i)){case P.boolean:case"boolean":s?""!==this.getAttribute(a)&&this.setAttribute(a,""):this.hasAttribute(a)&&this.removeAttribute(a);break;case P.func:case"function":break;case"json":if(s){var p=JSON.stringify(s);if(p&&this.getAttribute(a)!==p){this.setAttribute(a,p);break}}this.hasAttribute(a)&&this.removeAttribute(a);break;case P.number:case"number":if("number"!=typeof s||isNaN(s))this.hasAttribute(a)&&this.removeAttribute(a);else{var l=String(s);this.getAttribute(a)!==l&&this.setAttribute(a,l)}break;case P.string:case"string":s?this.getAttribute(a)!==s&&this.setAttribute(a,s):this.hasAttribute(a)&&this.removeAttribute(a);break;case P.any:case P.array:case P.arrayOf:case P.element:case P.elementType:case P.instanceOf:case P.node:case P.object:case"object":case P.objectOf:case P.shape:case P.exact:case P.symbol:default:if(s){var c=(0,g.represent)(s);if(c&&this.getAttribute(a)!==c){this.setAttribute(a,c);break}}this.hasAttribute(a)&&this.removeAttribute(a)}}}this.ignoreAttributeUpdateObservations=!1},r.reflectProperties=function(e){var t,r;if(this.reflectExternalProperties(e),null!=(t=this.instance)&&null!=(t=t.current)&&t.state&&"object"==typeof this.instance.current.state)for(var n,o=w(Object.keys(this.instance.current.state).concat(this.instance.current.state.modelState?Object.keys(this.instance.current.state.modelState):[]));!(n=o()).done;){var i=n.value;Object.prototype.hasOwnProperty.call(this.internalProperties,i)&&this.setInternalPropertyValue(i,void 0)}null!=(r=this.internalProperties.model)&&r.state&&(delete this.internalProperties.model.state,this.setInternalPropertyValue("model",this.internalProperties.model));for(var s,a=w(this.self.controllableProperties);!(s=a()).done;){var p=s.value;Object.prototype.hasOwnProperty.call(e,p)&&this.setInternalPropertyValue(p,e[p])}},r.reflectEventToProperties=function(){var e=p()(b().mark((function e(t,r){var n,o,i,s,a,p,l,c,u,h,f,m,y,v,P,A,x;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.batchUpdates,this.batchUpdates=!1,o=null,i=!1,!(this.self.eventToPropertyMapping&&Object.prototype.hasOwnProperty.call(this.self.eventToPropertyMapping,t)&&(0,g.isFunction)(this.self.eventToPropertyMapping[t]))){e.next=4;break}if(!((a=(s=this.self.eventToPropertyMapping)[t].apply(s,r.concat([this])))&&"then"in a&&(0,g.isFunction)(a.then))){e.next=2;break}return e.next=1,a;case 1:x=e.sent,e.next=3;break;case 2:x=a;case 3:p=x,i=!0,Array.isArray(p)?(o=p[0],this.reflectProperties(o),(0,g.extend)(!0,this.internalProperties,p[1])):null===p?i=!1:"object"==typeof p&&(o=p,this.reflectProperties(p));case 4:if(!i&&r.length>0&&(0,g.isObject)(r[0])){if(c=r[0],"persist"in r[0]&&(0,g.isFunction)(r[0].persist))for(c={},u=0,h=Object.keys(this.self.propertyTypes);u<h.length;u++)for(f=h[u],m=w([f].concat(null!==(v=this.getPropertyAlias(f))&&void 0!==v?v:[]));!(y=m()).done;)P=y.value,(A=r[0].currentTarget&&Object.prototype.hasOwnProperty.call(r[0].currentTarget,P)?r[0].currentTarget[P]:this.getPropertyValue(P))!==this.externalProperties[P]&&(c[P]=A);else[null,void 0].includes(null==(l=c.detail)?void 0:l.value)||(c=d()({},c.detail));o=c,this.reflectProperties(c)}return this.triggerRender("propertyReflected"),this.batchUpdates=n,e.abrupt("return",o);case 5:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}(),r.evaluateStringOrNullAndSetAsProperty=function(e,t){var r=this,n=e.startsWith("-"),o=n?e.substring(1):e,i=(0,g.delimitedToCamelCase)(o),s=this.getPropertyAlias(i);if(s&&Object.prototype.hasOwnProperty.call(this.self.propertyTypes,s)&&(i=s),Object.prototype.hasOwnProperty.call(this.self.propertyTypes,i)){var a=this.self.propertyTypes[i];if(n){if(t){var p=(0,g.evaluate)(t,d()({},g.UTILITY_SCOPE),!1,!0,this);p.error?(T.warn("Failed to process pre-evaluation attribute",'"'+e+'": '+p.error+". Will be",'set to "undefined".'),this.setInternalPropertyValue(i,void 0)):(this.setInternalPropertyValue(i,p.result),this.setExternalPropertyValue(i,p.result))}}else switch(a){case P.boolean:case"boolean":var l=![null,"false"].includes(t);this.setInternalPropertyValue(i,l),this.setExternalPropertyValue(i,l);break;case P.func:case"function":var c,u=null,h=["data","event","firstArgument","firstParameter","options"];if(t){var f=(0,g.compile)(t,h.concat("parameters","scope",g.UTILITY_SCOPE_NAMES),!0,!0,this);u=f.error,c=f.templateFunction,u&&T.warn("Failed to compile given handler",'"'+e+'": '+u+".")}this.setInternalPropertyValue(i,(function(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];r.outputEventNames.has(i)&&r.reflectEventToProperties(i,o);var a=void 0;if(!u){for(var p=d()({parameters:o},g.UTILITY_SCOPE),l=0,f=h;l<f.length;l++){var m=f[l];p[m]=o[0]}try{a=null==c?void 0:c.apply(void 0,h.map((function(e){return p[e]})).concat([o,p],g.UTILITY_SCOPE_NAMES.map((function(e){return g.UTILITY_SCOPE[e]}))))}catch(r){T.warn("Failed to evaluate function",'"'+e+'" with expression','"'+t+'" and scope',"variables",'"'+h.join('", "')+'" set to','"'+(0,g.represent)(o)+'":',r+". Set property",'to "undefined".')}}return r.self.renderProperties.includes(i)||r.forwardEvent(i,o),a})),u||this.setExternalPropertyValue(i,c);break;case"json":if(t){var m;try{m=JSON.parse(t)}catch(u){T.warn("Error occurred during parsing given json",'attribute "'+e+'":',(0,g.represent)(u));break}this.setInternalPropertyValue(i,m),this.setExternalPropertyValue(i,(0,g.copy)(m,!1,1))}else this.setInternalPropertyValue(i,null),this.setExternalPropertyValue(i,null);break;case P.number:case"number":if(null===t){this.setInternalPropertyValue(i,t),this.setExternalPropertyValue(i,t);break}var y=parseFloat(t);isNaN(y)&&(y=void 0),this.setInternalPropertyValue(i,y),this.setExternalPropertyValue(i,y);break;case P.string:case"string":this.setInternalPropertyValue(i,t),this.setExternalPropertyValue(i,t);break;case P.any:case P.array:case P.arrayOf:case P.element:case P.elementType:case P.instanceOf:case P.node:case P.object:case"object":case P.objectOf:case P.oneOf:case P.oneOfType:case P.shape:case P.exact:case P.symbol:default:if(t){var v=(0,g.evaluate)(t,{},!1,!0,this);if(v.error){T.warn("Error occurred during processing given",'attribute configuration "'+e+'":',v.error);break}this.setInternalPropertyValue(i,v.result),this.setExternalPropertyValue(i,(0,g.copy)(v.result,!1,1))}else this.hasAttribute(e)?(this.setInternalPropertyValue(i,!0),this.setExternalPropertyValue(i,!0)):(this.setInternalPropertyValue(i,null),this.setExternalPropertyValue(i,null))}}},r.waitForNestedComponentRendering=function(){var e=p()(b().mark((function e(){return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.childComponentInstances){e.next=1;break}return e.abrupt("return");case 1:return e.next=2,Promise.all(this.childComponentInstances.map((function(e){return e.renderState.pending?e.renderState.promise:Promise.resolve()})));case 2:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),r.resolveRenderingPromiseIfSet=function(){var e=p()(b().mark((function e(t,r){return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r){e.next=2;break}return e.next=1,this.waitForNestedComponentRendering();case 1:this.renderState.pending=!1,this.renderState.resolve(t),this.prepareNewRenderingPromise();case 2:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}(),r.prepareNewRenderingPromise=function(){var e=this;this.renderState.pending||(this.renderState.promise=new Promise((function(t){e.renderState.resolve=function(r){e.renderState.pending=!1,t(r)}})))},r.triggerRender=function(e){var t=this;this.batchUpdates?this.batchedUpdateRunning||(this.batchedUpdateRunning=!0,(0,g.timeout)((function(){t.batchedUpdateRunning=!1,t.render(e)}))):this.render(e)},r.applyShadowRootIfNotExisting=function(){this.self.shadowDOM&&this.hostDomNode===this&&(this.hostDomNode=(!("attachShadow"in this)&&"ShadyDOM"in window?window.ShadyDOM.wrap(this):this).attachShadow((0,g.isObject)(this.self.shadowDOM)?this.self.shadowDOM:{mode:"open"}))},r.determineRenderScope=function(e){var t,r;void 0===e&&(e={}),this.scope=d()({},(null==(t=this.parentInstance)?void 0:t.scope)||{},this.scope,this.internalProperties,((r={parentInstance:this.parentInstance,rootInstance:this.rootInstance,self:this})[(0,g.lowerCase)(this.self._name)||"instance"]=this,r),e),this.scope.scope=this.scope},r.render=function(){var e=p()(b().mark((function e(t,r){var n,o,i=this;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===t&&(t="unknown"),void 0===r&&(r=!0),this.unRender("reRender",t),this.childComponentInstances=[],this.renderState.pending=!0,!this.isRoot){e.next=3;break}return e.next=1,this.resolveRenderingPromiseIfSet(t,r);case 1:if(!r){e.next=3;break}return e.next=2,Promise.all(this.self.pendingRenderPromises);case 2:this.self.pendingRenderPromises=[];case 3:if(this.self.pendingRenderPromises.push(this.renderState.promise),this.determineRenderScope(),this.self.doRender&&this.dispatchEvent(new CustomEvent("render",{detail:{reason:t,scope:this.scope}}))){e.next=5;break}return e.next=4,this.resolveRenderingPromiseIfSet(t,r);case 4:return e.abrupt("return");case 5:if(!(n=(0,g.evaluate)("`"+this.self.content+"`",this.scope)).error){e.next=7;break}return T.warn("Failed to process template: "+n.error),this.renderState.resolve(t),e.next=6,Promise.all(this.self.pendingRenderPromises);case 6:return e.abrupt("return");case 7:return this.applyShadowRootIfNotExisting(),(o=document.createElement("div")).innerHTML=n.result,this.applySlots(o,d()({},this.scope,{parentInstance:this})),this.hostDomNode.innerHTML=o.innerHTML,e.next=8,(0,g.timeout)();case 8:return this.waitForNestedComponentRendering().then((function(){i.applyBindings(i.hostDomNode.firstChild,i.scope,i.self.renderSlots)})),e.next=9,this.resolveRenderingPromiseIfSet(t,r);case 9:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}(),r.unRender=function(e,t){void 0===e&&(e="unknown"),this.unregisterDomNodeEventBindings()},t}(C),s.applyRootBinding=!0,s.pendingRenderPromises=[],s.content="<slot>Please provide a template to transclude.</slot>",s.determineRootBinding=!0,s.shadowDOM=null,s.observedAttributes=[],s.controllableProperties=[],s.eventToPropertyMapping={},s.propertyAliases={},s.propertyTypes={onClick:P.func},s.propertiesToReflectAsAttributes=[],s.renderProperties=["children"],s.doRender=!1,s.cloneSlots=!1,s.evaluateSlots=!1,s.renderSlots=!0,s.trimSlots=!0,s.renderUnsafe=!1,s._name="BaseWeb",s._propertyAliasIndex=void 0,s._propertiesToReflectAsAttributes=void 0,o=s,i=y()(o.prototype,"isRoot",[n],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),o);t.default=S},function(e){e.exports=c},function(e){e.exports=u},function(e){e.exports=d},function(e){e.exports=s},function(e,t,r){var n=r(0),o=r.n(n),i=r(4),s=r.n(i),a=r(3),p=r.n(a),l=r(5),c=r.n(l),u=r(1),d=r(2),h=r(11),f=r.n(h),m=r(13),y=r(14),v=r(7);function b(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return g(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var P=new u.Logger({name:"web-component-wrapper-web"}),A=function(e){function t(){for(var r,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return(r=e.call.apply(e,[this].concat(o))||this).unmountOnDisconnect=!0,r.compiledSlots={},r.preparedSlots={},r.reactRoot=null,r.rootReactInstance=null,r.self=t,r.wrapMemorizingWrapper=null,r.isWrapped=!1,r.reflectInstanceProperties=function(){var e;null!=(e=r.instance)&&e.current&&r.instance.current.properties&&r.reflectProperties(r.instance.current.properties)},r}p()(t,e);var r=t.prototype;return r.connectedCallback=function(){this.applyComponentWrapper(),this.rootReactInstance=this,e.prototype.connectedCallback.call(this)},r.disconnectedCallback=function(){var e;this.unRender("disconnected"),this.unmountOnDisconnect&&(null==(e=this.reactRoot)||e.unmount()),this.unregisterConnectionState()},r.reflectExternalProperties=function(t){this.isRoot&&e.prototype.reflectExternalProperties.call(this,t)},r.render=function(){var t=s()(c().mark((function t(r,n){var i,s,a,p,l=this;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0===r&&(r="unknown"),void 0===n&&(n=!0),e.prototype.unRender.call(this,"reRender",r),this.childComponentInstances=[],this.renderState.pending=!0,this.isRoot&&(this.self.pendingRenderPromises=[]),this.self.pendingRenderPromises.push(this.renderState.promise),this.rootReactInstance===this&&this.dispatchEvent(new CustomEvent("render",{detail:{reason:r,scope:this.scope}}))){t.next=1;break}return t.abrupt("return",this.resolveRenderingPromiseIfSet(r,n));case 1:if(this.determineRenderScope(),0===Object.keys(this.compiledSlots).length&&this.preCompileSlots(),this.evaluateSlots(o()({},this.scope,{parentInstance:this})),this.prepareProperties(this.internalProperties),this.applyShadowRootIfNotExisting(),this.rootInstance!==this&&!this.reactRoot)for(i=this.firstChild;i;)s=i.nextSibling,this.removeChild(i),i=s;if(this.reactRoot||(a=this.id||this.internalProperties.id||this.externalProperties.id||this.name||this.internalProperties.name||this.externalProperties.name,p="","string"==typeof a&&(p=a),this.reactRoot=(0,y.createRoot)(this.hostDomNode,{identifierPrefix:p})),(0,m.flushSync)((function(){var e;null==(e=l.reactRoot)||e.render((0,h.createElement)(l.self.content,l.internalProperties)),l.resolveRenderingPromiseIfSet(r,n)})),!n){t.next=2;break}return t.next=2,this.renderState.promise;case 2:case"end":return t.stop()}}),t,this)})));return function(e,r){return t.apply(this,arguments)}}(),r.setPropertyValue=function(e,t){var r;this.reflectProperties(((r={})[e]=(0,u.copy)(t,!1,1),r)),this.setInternalPropertyValue(e,(0,u.copy)(t,!1,1))},r.setInternalPropertyValue=function(t,r){null===r?r=d.NullSymbol:void 0===r&&(r=d.UndefinedSymbol),e.prototype.setInternalPropertyValue.call(this,t,r)},r.preCompileDomNodes=function(e,t,r){if(void 0===t&&(t={}),void 0===r&&(r=!1),1===(e=e.filter((function(e){return e.nodeType!==Node.TEXT_NODE||"string"==typeof e.nodeValue&&""!==e.nodeValue.trim()}))).length)return this.preCompileDomNode(e[0],t,r);for(var n,o=1,i=[],s=b(e);!(n=s()).done;){var a=n.value,p=this.preCompileDomNode(a,t,r,o.toString());i.push(p),o+=1}return r?function(e){return function(){for(var t,r=[],n=b(i);!(t=n()).done;){var o=(0,t.value)(e);"function"==typeof o&&r.push(o.apply(void 0,arguments))}return(0,h.createElement)(h.Fragment,{children:r})}}:i},r.preCompileDomNode=function(e,t,r,n){var i=this;if(void 0===t&&(t={}),void 0===r&&(r=!1),r){var s=this.preCompileDomNode(e,o()({},t,{data:void 0,firstArgument:void 0,firstParameter:void 0,options:void 0,scope:void 0,parameters:void 0}),!1,n);return function(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r.length>0?r[0]:null;return s(o()({},e,{data:i,firstArgument:i,firstParameter:i,options:i,scope:i,parameters:r}))}}}if(e.nodeType===Node.TEXT_NODE){var a="string"==typeof e.nodeValue?e.nodeValue.trim():"",p=n&&a?(0,h.createElement)(h.Fragment,{children:a,key:n}):a||null;return function(){return p}}if(!e.getAttributeNames)return function(){return null};var l,c={},d=this.self.isReactComponent(e);d?(e.determineRenderScope(),0===Object.keys(this.compiledSlots).length&&e.preCompileSlots(),n&&!Object.prototype.hasOwnProperty.call(c,"key")&&(c.key=n),l=e.constructor.content):(c.key=n,l=e.tagName.toLowerCase());for(var f,m=Object.keys(t),y={},v=function(){var r,n=f.value,o=e.getAttribute(n);if(null===o)return 0;var s=!1,a="";if(n.startsWith("data-bind-")?a=n.substring(10):n.startsWith("bind-")&&(a=n.substring(5)),a.startsWith("attribute-")||"attributes"===a||a.startsWith("property-")||"properties"===a){var p=(0,u.compile)(o,m),l=p.error,h=p.originalScopeNames,v=p.templateFunction;if(l)return P.warn("Error occurred during compiling given attribute",'binding "'+n+'" on node:',e,l),0;"attributes"===a||"properties"===a?s=!0:a=a.startsWith("attribute-")?a.substring(10):a.substring(9),o={originalScopeNames:h,templateFunction:v.bind(i)}}else if(a.startsWith("on-")){a=(0,u.delimitedToCamelCase)(a),Object.prototype.hasOwnProperty.call(t,"event")||(m=[].concat(m,["event"])),Object.prototype.hasOwnProperty.call(t,"parameters")||(m=[].concat(m,["parameters"]));var b=(0,u.compile)(o,m,!0),g=b.error,A=b.originalScopeNames,w=b.scopeNames,x=b.templateFunction;if(g)return P.warn("Error occurred during compiling given event",'binding "'+n+'" on node:',e,g),0;var T=x.bind(i);o=function(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];t.event=i[0],t.parameters=i;try{T.apply(void 0,A.map((function(e){return t[e]})))}catch(t){P.warn("Error occurred during processing given",'event binding "'+n+'" on node: ',e,'Given expression "'+o+'" could',"not be evaluated with given scope names",'"'+w.join('", "')+'":',(0,u.represent)(t))}}}else a=n;var C={class:"className",for:"htmlFor"};Object.prototype.hasOwnProperty.call(C,a)&&(a=C[a]),a=(0,u.delimitedToCamelCase)(a),null!=(r=o)&&r.originalScopeNames?y[s?"":a]=o:d||(c[a]=o)},g=b(e.getAttributeNames());!(f=g()).done;)v();if(!d){var A=Array.from(e.childNodes);A.length&&(c.children=this.preCompileDomNodes(A,t))}return function(r){(r=o()({},t,r)).scope=r;for(var n=o()({},c),s=0,a=Object.entries(y);s<a.length;s++){var p=a[s],u=p[0],f=p[1],m=f.originalScopeNames,v=f.templateFunction.apply(void 0,m.map((function(e){return r[e]})));""===u?n=o()({},n,v):n[u]=v}return Object.prototype.hasOwnProperty.call(n,"innerHTML")&&(n.dangerouslySetInnerHTML={__html:n.innerHTML},delete n.children,delete n.innerHTML),Object.prototype.hasOwnProperty.call(n,"textContent")?(n.children=n.textContent,delete n.textContent):d?(n=o()({},e.internalProperties,n),r=o()({},n,r,{parentInstance:e}),e.evaluateSlots(r),e.prepareProperties(n)):n.children&&(n.children=i.evaluatePreCompiledDomNodes(n.children,r)),(0,h.createElement)(l,n)}},r.evaluatePreCompiledDomNodes=function(e,t){if(void 0===t&&(t={}),!Array.isArray(e))return e(t);if(1===e.length)return e[0](t);for(var r,n=[],o=b(e);!(r=o()).done;){var i=(0,r.value)(t);i&&n.push(i)}return n},r.preCompileSlots=function(){for(var e in this.slots)this.slots[e]&&"default"!==e&&(this.compiledSlots[e]=this.preCompileDomNode(this.slots[e],o()({},this.scope,{parentInstance:this}),[d.func,"function"].includes(this.self.propertyTypes[e])));this.slots.default&&this.slots.default.length>0&&(this.compiledSlots.children=this.preCompileDomNodes(this.slots.default,o()({},this.scope,{parentInstance:this}),[d.func,"function"].includes(this.self.propertyTypes.children)))},r.evaluateSlots=function(e){for(var t in this.preparedSlots={},this.compiledSlots)Object.prototype.hasOwnProperty.call(this.compiledSlots,t)&&("children"===t?this.preparedSlots.children=this.evaluatePreCompiledDomNodes(this.compiledSlots[t],e):this.preparedSlots[t]=this.compiledSlots[t](e))},t.isReactComponent=function(e){var t=e.constructor;return"object"==typeof t.content&&(!t.attachWebComponentAdapterIfNotExists||"react"===t.content.webComponentAdapterWrapped)},r.determineRootBinding=function(){e.prototype.determineRootBinding.call(this);for(var t=this.parentNode;t;){if(this.self.isReactComponent(t)){this.rootReactInstance=t;break}t=t.parentNode}},r.applyComponentWrapper=function(){if("string"!=typeof this.self.content&&!this.isWrapped){this.isWrapped=!0;var e=this.self.content.wrapped||this.self.content;this.self.content.webComponentAdapterWrapped?this.wrapMemorizingWrapper&&(this.self.content=(0,h.memo)(this.self.content),this.self.content.wrapped=e):this.self.attachWebComponentAdapterIfNotExists?(this.self.content.displayName||(this.self.content.displayName=this.self._name),this.self.content=(0,h.forwardRef)((function(t,r){return(0,h.useImperativeHandle)(r,(function(){return{properties:t}}),[t]),(0,h.createElement)(e,t)})),(this.wrapMemorizingWrapper||null===this.wrapMemorizingWrapper)&&(this.self.content=(0,h.memo)(this.self.content)),this.self.content.wrapped=e,this.self.content.webComponentAdapterWrapped="react"):this.wrapMemorizingWrapper&&(this.self.content=(0,h.memo)(this.self.content),this.self.content.wrapped=e)}},r.prepareProperties=function(e){var t=this;(0,u.extend)(e,this.preparedSlots),this.self.removeKnownUnwantedPropertyKeys(this.self,e),e.ref||(this.instance=(0,h.createRef)(),e.ref=function(e){t.instance?t.instance.current=e:t.instance={current:e},t.reflectInstanceProperties()})},t.removeKnownUnwantedPropertyKeys=function(e,t){if("string"!=typeof e.content)for(var r,n=b(["isRoot","isTrusted","__composed"]);!(r=n()).done;){var o=r.value;Object.prototype.hasOwnProperty.call(t,o)&&(Object.prototype.hasOwnProperty.call(e.content,"propTypes")&&!Object.prototype.hasOwnProperty.call(e.content.propTypes,o)||Object.prototype.hasOwnProperty.call(e.content,"wrapped")&&Object.prototype.hasOwnProperty.call(e.content.wrapped,"propTypes")&&!Object.prototype.hasOwnProperty.call(e.content.wrapped.propTypes,o))&&delete t[o]}},t}(v.default);A.attachWebComponentAdapterIfNotExists=!0,A.content="div",A.react=f(),A._name="ReactWebComponent";t.default=A},function(e){e.exports=p},function(e){e.exports=l},function(e,t,r){var n=r(0),o=r.n(n),i=r(3),s=r.n(i),a=r(1),p=r(12).default;t.default=function(e,t,r){var n,i,l;void 0===t&&(t="NoName"),void 0===r&&(r={});var c=e._name||(null==(n=e.___types)||null==(n=n.name)?void 0:n.name)||t.replace(/^(.*\/+)?([^/]+)\.tsx$/,"$2");r.propTypes&&(e.propTypes=r.propTypes);var u=e.propTypes||{},d=r.propertyAliases||e.propertyAliases||{},h=(0,a.unique)(Object.keys(u).concat(Object.keys(d)).concat(Object.values(d))),f=r.propertiesToReflectAsAttributes||e.propertiesToReflectAsAttributes||[];if(p.propertiesToReflectAsAttributes)if(Array.isArray(f))f=[].concat(p.propertiesToReflectAsAttributes,f);else if(f instanceof Map)for(var m=0,y=p.propertiesToReflectAsAttributes;m<y.length;m++){var v=y[m];f.set(v,p.propertyTypes[v])}else if("object"==typeof f)for(var b=0,g=p.propertiesToReflectAsAttributes;b<g.length;b++){var P=g[b];f[P]=p.propertyTypes[P]}var A=h.map((function(e){return(0,a.camelCaseToDelimited)(e)})),w=function(t){function n(){for(var i,s,a=arguments.length,p=new Array(a),l=0;l<a;l++)p[l]=arguments[l];return(s=t.call.apply(t,[this].concat(p))||this).self=n,s.internalProperties=r.internalProperties?o()({},r.internalProperties):e.internalProperties?o()({},e.internalProperties):{},s.unmountOnDisconnect=null===(i=r.unmountOnDisconnect)||void 0===i||i,s}return s()(n,t),n}(p);return w.attachWebComponentAdapterIfNotExists="boolean"!=typeof r.attachWebComponentAdapterIfNotExists||r.attachWebComponentAdapterIfNotExists,w.content=e,w.observedAttributes=p.observedAttributes.concat(A).concat(A.map((function(e){return"-"+e}))),w.controllableProperties=e.controllableProperties||r.controllableProperties||[],w.eventToPropertyMapping=null===r.eventToPropertyMapping?r.eventToPropertyMapping:r.eventToPropertyMapping?o()({},r.eventToPropertyMapping):null===e.eventToPropertyMapping?e.eventToPropertyMapping:e.eventToPropertyMapping?o()({},e.eventToPropertyMapping):{},w.propertyAliases=o()({},p.propertyAliases,d),w.propertiesToReflectAsAttributes=f,w.propertyTypes=o()({},p.propertyTypes,u),w.renderProperties=null!==(i=null!==(l=r.renderProperties)&&void 0!==l?l:e.renderProperties)&&void 0!==i?i:p.renderProperties,w._name=c,{component:w,register:function(e){void 0===e&&(e=(0,a.camelCaseToDelimited)(c)),customElements.define(e,w)}}}},,function(e){e.exports=a}],f={};function m(e){var t=f[e];if(void 0!==t)return t.exports;var r=f[e]={exports:{}};return h[e](r,r.exports,m),r.exports}m.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return m.d(t,{a:t}),t},m.d=function(e,t){for(var r in t)m.o(t,r)&&!m.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},m.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},m.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var y={};m.r(y);var v=m(0),b=m.n(v),g=m(4),P=m.n(g),A=m(3),w=m.n(A),x=m(5),T=m.n(x),C=m(1),S=m(2),O=m(11),R=m(17),N=m(15),E=m(12),I=m(7);return(0,R.describe)("Web",(function(){(0,R.test)("constructor",(function(){var e=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(t=e.call.apply(e,[this].concat(n))||this).onClick=void 0,t}return w()(t,e),t}(I.default);e.observedAttributes=["is-root","on-click","on-event"],(0,R.expect)(e).toHaveProperty("content"),(0,R.expect)(e).toHaveProperty("observedAttributes"),customElements.define("test-web",e);var t=document.createElement("test-web");(0,R.expect)(t).not.toHaveProperty("clicked"),t.setAttribute("on-click","this.clicked = true"),(0,R.expect)(t).not.toHaveProperty("clicked"),document.body.appendChild(t),(0,R.expect)(t).toHaveProperty("rootInstance",t),(0,R.expect)(t).not.toHaveProperty("clicked"),t.onClick(),(0,R.expect)(t).toHaveProperty("clicked",!0);var r=R.jest.fn();t.addEventListener("click",r),(0,R.expect)(r).not.toHaveBeenCalled(),t.onClick(),(0,R.expect)(r).toHaveBeenCalled()}))})),(0,R.describe)("ReactWeb",(function(){(0,R.test)("constructor",P()(T().mark((function e(){var t,r,n,o,i,s,a,p,l;return T().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o="initial",i=function(e){var t=e.onEvent,r=e.property,i=void 0===r?o:r;return n=t,o=i,(0,O.createElement)("div",{className:i})},s=function(e){function t(){for(var r,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return(r=e.call.apply(e,[this].concat(o))||this).self=t,r.onClick=void 0,r.onEvent=void 0,r}return w()(t,e),t}(E.default),s._name="Test",s.content=i,s.observedAttributes=["is-root","on-click","on-event"],s.propertyTypes=b()({},I.default.propertyTypes,{onEvent:S.func,property:S.string}),(0,R.expect)(s).toHaveProperty("content"),(0,R.expect)(s).toHaveProperty("observedAttributes"),customElements.define("test-react",s),a=document.createElement("test-react"),(0,R.expect)(a).not.toHaveProperty("clicked"),a.setAttribute("on-click","this.clicked = true"),(0,R.expect)(a).toHaveProperty("onClick"),(0,R.expect)(a).not.toHaveProperty("clicked"),a.setAttribute("on-event","this.eventHappened = true"),(0,R.expect)(a).toHaveProperty("onEvent"),(0,R.expect)(n).not.toBeDefined(),document.body.appendChild(a),(0,R.expect)(a).toHaveProperty("rootInstance",a),(0,R.expect)(a).toHaveProperty("reactRoot"),(0,R.expect)(n).not.toBeDefined(),e.next=1,(0,C.timeout)();case 1:return(0,R.expect)(n).toBeDefined(),(0,R.expect)(a).not.toHaveProperty("eventHappened"),n&&n(),(0,R.expect)(a).toHaveProperty("eventHappened",!0),p=R.jest.fn(),a.addEventListener("event",p),(0,R.expect)(p).not.toHaveBeenCalled(),n&&n(),(0,R.expect)(p).toHaveBeenCalled(),(0,R.expect)(a).not.toHaveProperty("clicked"),a.onClick(),(0,R.expect)(a).toHaveProperty("clicked",!0),l=R.jest.fn(),a.addEventListener("click",l),(0,R.expect)(l).not.toHaveBeenCalled(),a.onClick(),(0,R.expect)(l).toHaveBeenCalled(),(0,R.expect)(o).toStrictEqual("initial"),(0,R.expect)(null==(t=document.querySelector("div"))?void 0:t.className).toStrictEqual("initial"),a.property="test",e.next=2,(0,C.timeout)();case 2:(0,R.expect)(a).toHaveProperty("property","test"),(0,R.expect)(null==(r=document.querySelector("div"))?void 0:r.className).toStrictEqual("test");case 3:case"end":return e.stop()}}),e)}))))})),(0,R.describe)("index",(function(){(0,R.test)("wrapAsWebComponent",(function(){var e=(0,N.default)((function(){return(0,O.createElement)("div")}),"TestComponent",{eventToPropertyMapping:{},propertyAliases:{alternateName:"name"},propertiesToReflectAsAttributes:[],propTypes:{name:"string"}});(0,R.expect)(e).toHaveProperty("component"),(0,R.expect)(e).toHaveProperty("register"),(0,R.expect)(e.component).toHaveProperty("_name","TestComponent"),(0,R.expect)(e.component).toHaveProperty("propertyTypes.name","string"),(0,R.expect)(e.component).toHaveProperty("propertiesToReflectAsAttributes",["isRoot"]),(0,R.expect)(e.component).toHaveProperty("eventToPropertyMapping",{})}))})),y}()}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";if("undefined"!=typeof module&&null!==module&&"undefined"!==eval("typeof require")&&null!==eval("require")&&"main"in eval("require")&&"undefined"!==eval("typeof require.main")&&null!==eval("require.main")){var ORIGINAL_MAIN_MODULE=module;module!==eval("require.main")&&"paths"in module&&"paths"in eval("require.main")&&"undefined"!=typeof __dirname&&null!==__dirname&&(module.paths=eval("require.main.paths").concat(module.paths.filter((function(path){return eval("require.main.paths").includes(path)}))))}if(null==window)var window="undefined"==typeof global||null===global?{}:global;!function(e,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var i=n();for(var l in i)("object"==typeof exports?exports:e)[l]=i[l]}}(this,(function(){return{r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}.r(e={}),e;var e}));
|
|
File without changes
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";if("undefined"!=typeof module&&null!==module&&"undefined"!==eval("typeof require")&&null!==eval("require")&&"main"in eval("require")&&"undefined"!==eval("typeof require.main")&&null!==eval("require.main")){var ORIGINAL_MAIN_MODULE=module;module!==eval("require.main")&&"paths"in module&&"paths"in eval("require.main")&&"undefined"!=typeof __dirname&&null!==__dirname&&(module.paths=eval("require.main.paths").concat(module.paths.filter((function(path){return eval("require.main.paths").includes(path)}))))}if(null==window)var window="undefined"==typeof global||null===global?{}:global;!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("clientnode"),require("clientnode/property-types"),require("react"),require("react-dom"),require("react-dom/client"),require("@babel/runtime/helpers/initializerDefineProperty"),require("@babel/runtime/helpers/applyDecoratedDescriptor"),require("@babel/runtime/helpers/initializerWarningHelper"));else if("function"==typeof define&&define.amd)define(["clientnode","clientnode/property-types","react","react-dom","react-dom/client","@babel/runtime/helpers/initializerDefineProperty","@babel/runtime/helpers/applyDecoratedDescriptor","@babel/runtime/helpers/initializerWarningHelper"],t);else{var r="object"==typeof exports?t(require("clientnode"),require("clientnode/property-types"),require("react"),require("react-dom"),require("react-dom/client"),require("@babel/runtime/helpers/initializerDefineProperty"),require("@babel/runtime/helpers/applyDecoratedDescriptor"),require("@babel/runtime/helpers/initializerWarningHelper")):t(e.clientnode,e["clientnode/property-types"],e.react,e["react-dom"],e["react-dom/client"],e["@babel/runtime/helpers/initializerDefineProperty"],e["@babel/runtime/helpers/applyDecoratedDescriptor"],e["@babel/runtime/helpers/initializerWarningHelper"]);for(var s in r)("object"==typeof exports?exports:e)[s]=r[s]}}(this,((e,t,r,s,n,i,o,a)=>(()=>{var p=[t=>{t.exports=e},e=>{e.exports=t},(e,t,r)=>{r.d(t,{default:()=>i});var s=r(0),n=r(1);const i=function(e={}){return e={readAttribute:!0,type:n.string,...e},function(t,r){if("string"!=typeof r)return;const n=t.self||t.constructor;if(e.readAttribute){Object.prototype.hasOwnProperty.call(n,"observedAttributes")||(n.observedAttributes=n.observedAttributes?[...n.observedAttributes]:[]);const e=(0,s.camelCaseToDelimited)(r);n.observedAttributes&&!n.observedAttributes.includes(e)&&n.observedAttributes.push(e)}if(e.type&&(Object.prototype.hasOwnProperty.call(n,"propertyTypes")||(n.propertyTypes=n.propertyTypes?{...n.propertyTypes}:{}),!n.propertyTypes||!e.update&&Object.prototype.hasOwnProperty.call(n,r)||(n.propertyTypes[r]=e.type)),e.writeAttribute&&(Object.prototype.hasOwnProperty.call(n,"propertiesToReflectAsAttributes")||(n.propertiesToReflectAsAttributes=n.propertiesToReflectAsAttributes?(0,s.copy)(n.propertiesToReflectAsAttributes):[]),e.update||n.propertiesToReflectAsAttributes instanceof Map&&!n.propertiesToReflectAsAttributes.has(r)||Array.isArray(n.propertiesToReflectAsAttributes)&&!n.propertiesToReflectAsAttributes.includes(r)||"object"==typeof n.propertiesToReflectAsAttributes&&!Object.prototype.hasOwnProperty.call(n.propertiesToReflectAsAttributes,r))){let t;"boolean"==typeof e.writeAttribute?e.writeAttribute&&n.propertyTypes&&Object.prototype.hasOwnProperty.call(n.propertyTypes,r)&&(t=n.propertyTypes[r]):t=e.writeAttribute,void 0!==t&&(Array.isArray(n.propertiesToReflectAsAttributes)&&(!0===e.writeAttribute?n.propertiesToReflectAsAttributes.push(r):n.normalizePropertyTypeList&&(n.propertiesToReflectAsAttributes=n.normalizePropertyTypeList(n.propertiesToReflectAsAttributes))),n.propertiesToReflectAsAttributes instanceof Map&&n.propertiesToReflectAsAttributes.set(r,t),"object"==typeof n.propertiesToReflectAsAttributes&&(n.propertiesToReflectAsAttributes[r]=t))}e.alias&&(Object.prototype.hasOwnProperty.call(n,"propertyAliases")||(n.propertyAliases=n.propertyAliases?{...n.propertyAliases}:{}),!n.propertyAliases||!e.update&&Object.prototype.hasOwnProperty.call(n,r)||(n.propertyAliases[r]=e.alias))}}},(e,t,r)=>{r.d(t,{api:()=>b,default:()=>g});var s,n,i,o,a=r(4),p=r.n(a),l=r(5),c=r.n(l),h=(r(6),r(0)),d=r(1),u=r(2);const f=new h.Logger({name:"web-component-wrapper-web"}),m="undefined"==typeof HTMLElement?class{}:HTMLElement;let y=(s=(0,u.default)({type:d.boolean,writeAttribute:!0}),o=class e extends m{constructor(){super(),this.renderState={promise:Promise.resolve(""),pending:!1,resolve:h.NOOP},this.childComponentInstances=[],this.batchAttributeUpdates=!0,this.batchPropertyUpdates=!0,this.batchUpdates=!0,this.batchedAttributeUpdateRunning=!0,this.batchedPropertyUpdateRunning=!0,this.batchedUpdateRunning=!0,this.connectionRegistered=!1,this.pendingAttributeUpdates=[],this.parentInstance=null,this.rootInstance=void 0,this.hostDomNode=void 0,this.scope={...h.UTILITY_SCOPE},this.domNodeEventBindings=new Map,this.domNodeTemplateCache=new Map,this.externalProperties={},this.ignoreAttributeUpdateObservations=!1,this.internalProperties={},this.outputEventNames=new Set,this.instance=null,p()(this,"isRoot",i,this),this.runDomConnectionAndRenderingInSameEventQueue=!1,this.self=e,this.slots={},this.prepareNewRenderingPromise(),this.self=this.constructor,this.self._propertiesToReflectAsAttributes||(this.self._propertiesToReflectAsAttributes=this.self.normalizePropertyTypeList(this.self.propertiesToReflectAsAttributes)),this.generateAliasIndex(),this.hostDomNode=this,this.rootInstance=this,this.defineGetterAndSetterInterface()}attributeChangedCallback(e,t,r){this.ignoreAttributeUpdateObservations||t===r||this.onUpdateAttribute(e,r)}onUpdateAttribute(e,t){const r=new Promise((r=>this.pendingAttributeUpdates.push((()=>{this.evaluateStringOrNullAndSetAsProperty(e,t),this.batchAttributeUpdates?this.batchedAttributeUpdateRunning||this.batchedUpdateRunning||(this.batchedAttributeUpdateRunning=!0,this.batchedUpdateRunning=!0,(0,h.timeout)((()=>{this.batchedAttributeUpdateRunning=!1,this.batchedUpdateRunning=!1,this.render("attributeChanged")}))):this.render("attributeChanged"),r()}))));if(this.connectionRegistered)for(;this.pendingAttributeUpdates.length;)this.pendingAttributeUpdates.shift()();return r}connectedCallback(){try{this.isConnected=!0}catch{}for(this.connectionRegistered=!0,this.parentInstance=this,this.rootInstance=this,this.attachEventHandler(),this.self.determineRootBinding&&(this.determineRootBinding(),this.parentInstance!==this&&this.parentInstance.childComponentInstances&&this.parentInstance.childComponentInstances.push(this)),this.self.applyRootBinding&&this.isRoot&&(this.determineRenderScope(),this.applyBinding(this,this.scope));this.pendingAttributeUpdates.length;)this.pendingAttributeUpdates.shift()();this.batchedAttributeUpdateRunning=!1,this.batchedPropertyUpdateRunning=!1,this.batchedUpdateRunning=!1,this.grabGivenSlots(),this.reflectExternalProperties(this.externalProperties),this.runDomConnectionAndRenderingInSameEventQueue?this.render("connected"):(0,h.timeout)((()=>{this.render("connected")}))}disconnectedCallback(){this.unRender("disconnected"),this.unregisterConnectionState()}defineGetterAndSetterInterface(){const e=(0,h.unique)(Object.keys(this.self.propertyTypes).concat(this.self._propertyAliasIndex?Object.keys(this.self._propertyAliasIndex):[]));for(const t of e)Object.prototype.hasOwnProperty.call(this,t)&&this.setPropertyValue(t,this[t]),Object.defineProperty(this,t,{configurable:!0,get:()=>this.getPropertyValue(t),set:e=>{this.setPropertyValue(t,e),this.triggerPropertySpecificRendering(t,e)}})}getPropertyAlias(e){return this.self._propertyAliasIndex&&Object.prototype.hasOwnProperty.call(this.self._propertyAliasIndex,e)?this.self._propertyAliasIndex[e]:null}getPropertyValue(t){var r;const s=this.instance?.current?.properties&&(Object.prototype.hasOwnProperty.call(!e.propertyTypes,t)||Object.prototype.hasOwnProperty.call(this.instance.current.properties,t))?this.instance.current.properties[t]:null!==(r=this.internalProperties[t])&&void 0!==r?r:this.externalProperties[t];return this.instance?.current?.state&&Object.prototype.hasOwnProperty.call(this.instance.current.state,t)?this.instance.current.state[t]:s}setExternalPropertyValue(e,t){this.externalProperties[e]=t;const r=this.getPropertyAlias(e);r&&(this.externalProperties[r]=t)}setInternalPropertyValue(e,t){this.internalProperties[e]=t;const r=this.getPropertyAlias(e);r&&(this.internalProperties[r]=t)}setPropertyValue(e,t){this.reflectProperties({[e]:t}),this.setInternalPropertyValue(e,t)}triggerPropertySpecificRendering(e,t){if(this.batchPropertyUpdates)this.batchedPropertyUpdateRunning||this.batchedUpdateRunning||(this.batchedPropertyUpdateRunning=!0,this.batchedUpdateRunning=!0,(0,h.timeout)((()=>{void 0!==t&&this.isStateProperty(e)?(this.render("preStatePropertyChanged"),(0,h.timeout)((()=>{this.setInternalPropertyValue(e,void 0),this.batchedPropertyUpdateRunning=!1,this.batchedUpdateRunning=!1,this.render("postStatePropertyChanged"),this.triggerOutputEvents()}))):(this.batchedPropertyUpdateRunning=!1,this.batchedUpdateRunning=!1,this.render("propertyChanged"),this.triggerOutputEvents())})));else{const r=this.isStateProperty(e);this.render(r?"preStatePropertyChanged":"propertyChanged"),void 0!==t&&r&&(this.setInternalPropertyValue(e,void 0),this.render("postStatePropertyChanged")),this.triggerOutputEvents()}}unregisterConnectionState(){try{this.isConnected=!1}catch{}this.connectionRegistered=!1,this.slots={}}unregisterDomNodeEventBindings(){for(const e of this.domNodeEventBindings.values())for(const t of e.values())t()}applyBinding(e,t){if(e.getAttributeNames)for(const r of e.getAttributeNames()){let s;if(r.startsWith("data-bind-")?s=r.substring(10):r.startsWith("bind-")&&(s=r.substring(5)),s){const n=e.getAttribute(r);if(null===n)continue;if(s.startsWith("attribute-")||s.startsWith("property-")){const i=(0,h.evaluate)(n,t,!1,!0,e);if(i.error){f.warn("Error occurred during processing given",`attribute binding "${r}" on node:`,e,i.error);continue}s.startsWith("attribute-")?e.setAttribute(s.substring(10),i.result):e[(0,h.delimitedToCamelCase)(s.substring(9))]=i.result}else if(s.startsWith("on-")){s=(0,h.delimitedToCamelCase)(s.substring(3)),t={log:f,event:void 0,parameters:void 0,...t};const i=(0,h.compile)(n,t,!0,!0,e);i.error?f.warn("Error occurred during compiling given event",`binding "${r}" on node:`,e,i.error):this.addSecureEventListener(e,s,((...s)=>{t.event=s[0],t.parameters=s;try{i.templateFunction(...i.originalScopeNames.map((e=>t[e])))}catch(t){f.warn("Error occurred during processing","given event binding",`"${r}" on node:`,e,`Given expression "${n}" could`,"not be evaluated with given scope",'names "'+i.scopeNames.join('", "')+`": ${(0,h.represent)(t)}`)}}))}}}}applyBindings(e,t,r=!0){for(;e;)!e.attributes?.length||!r&&e.getAttribute("slot")||this.applyBinding(e,t),e.nodeName.toLowerCase().includes("-")||this.applyBindings(e.firstChild,t),e=e.nextSibling}compileDomNodeTemplate(e,t=[],r={}){r={ignoreComponents:!0,ignoreNestedComponents:!0,unsafe:this.self.renderUnsafe,...r};const s=e.nodeName.toLowerCase();if(r.ignoreComponents&&s.includes("-"))return null;if(r.unsafe){let r=e.innerHTML;if(!r&&e.template&&(r=e.template),this.self.hasCode(r)){const s=(0,h.compile)(`\`${r}\``,t);return{domNode:e,children:[],error:s.error,scopeNames:s.scopeNames,template:r,templateFunction:s.templateFunction}}return null}let n=null;if("#text"===s){const t=e.textContent;t&&this.self.hasCode(t)&&(n=t.replace(/ /g," ").trim())}const i=[],o={children:i,domNode:e};if(n){const e=(0,h.compile)(`\`${n}\``,t);o.error=e.error,o.scopeNames=e.scopeNames,o.template=n,o.templateFunction=e.templateFunction}let a=e.firstChild;for(;a;){if(!r.filter||r.filter(a)){const e=this.compileDomNodeTemplate(a,t,{...r,ignoreComponents:r.ignoreNestedComponents});e&&i.push(e)}a=a.nextSibling}return o}evaluateCompiledDomNodeTemplate(e,t){const{domNode:r,error:s,templateFunction:n,scopeNames:i}=e;if(!n||!i)return null;if(s)return f.warn("Error occurred during compiling node content:",s),null;let o=null;try{o=n(...i.map((e=>t[e])))}catch(s){f.warn(`Error occurred when "${this.self._name}" is running`,`"${String(n)}": with bound`,`names "${i.join('", "')}":`,`"${s}". Rendering node:`,r)}return o}evaluateDomNodeTemplate(e,t={},r={}){const s=(r={domNodeTemplateCache:this.domNodeTemplateCache,ignoreComponents:!0,ignoreNestedComponents:!0,unsafe:this.self.renderUnsafe,...r}).domNodeTemplateCache;if(!s.has(e)){const n={filter:r.filter,ignoreComponents:r.ignoreComponents,ignoreNestedComponents:r.ignoreNestedComponents,unsafe:r.unsafe},i=this.compileDomNodeTemplate(e,t,n);i&&s.set(e,i)}if(s.has(e)){const n=s.get(e),i=this.evaluateCompiledDomNodeTemplate(n,t);if(null!==i&&(r.unsafe&&e.innerHTML?e.innerHTML=i:e.textContent=i),n.children.length){const e=r=>{for(const s of r){const r=this.evaluateCompiledDomNodeTemplate(s,t);null!==r&&(s.domNode.textContent=r),s.children.length&&e(s.children)}};e(n.children)}}r.applyBindings&&this.applyBindings(e,t)}addSecureEventListener(e,t,r,s,n){this.domNodeEventBindings.has(e)||this.domNodeEventBindings.set(e,new Map);const i=this.domNodeEventBindings.get(e),o=i.get(t);o&&o!==r&&o();const a=()=>{e.removeEventListener(t,r,n),i.delete(t),0===i.size&&this.domNodeEventBindings.delete(e)};return i.set(t,a),e.addEventListener(t,r,s),a}determineRootBinding(){let t=this.parentNode;for(;t;){const r=t instanceof e||t.nodeName.includes("-")&&"#document-fragment"!==t.nodeName,s=null===t.parentNode&&"[object ShadowRoot]"===t.toString();r?(this.rootInstance===this&&(this.parentInstance=t,this.setPropertyValue("isRoot",!1)),this.rootInstance=t):s&&this.setPropertyValue("isRoot",!1),t=t.parentNode}}static hasCode(e){return"string"==typeof e&&e.includes("${")&&e.includes("}")&&/\${[\s\S]+}/.test(e)}static normalizePropertyTypeList(t){if("string"==typeof t&&(t=[t]),Array.isArray(t)){const r=t,s=new Map;for(const t of r)Object.prototype.hasOwnProperty.call(e.propertyTypes,t)&&s.set(t,e.propertyTypes[t]);return s}return(0,h.convertPlainObjectToMap)(t)}attachEventHandler(){if(null===this.self.eventToPropertyMapping)return;const e=this.attachExplicitDefinedOutputEventHandler();this.attachImplicitDefinedOutputEventHandler(!e)}attachExplicitDefinedOutputEventHandler(){if(!this.self.eventToPropertyMapping)return!1;let e=!1;for(const t of Object.keys(this.self.eventToPropertyMapping))Object.prototype.hasOwnProperty.call(this.internalProperties,t)||(e=!0,this.outputEventNames.add(t),this.setInternalPropertyValue(t,(async(...e)=>{const r=await this.reflectEventToProperties(t,e);r&&(e[0]=r),this.forwardEvent(t,e)})));return e}attachImplicitDefinedOutputEventHandler(e=!0){for(const[t,r]of Object.entries(this.self.propertyTypes))Object.prototype.hasOwnProperty.call(this.internalProperties,t)||![d.func,"function"].includes(r)||this.self.renderProperties.includes(t)||(this.outputEventNames.add(t),this.setInternalPropertyValue(t,((...r)=>{e&&this.reflectEventToProperties(t,r),this.forwardEvent(t,r)})))}triggerOutputEvents(){for(const e of this.outputEventNames)this.forwardEvent(e,[this.externalProperties])}forwardEvent(e,t){return e.length>3&&e.startsWith("on")&&(e=(0,h.lowerCase)(e.substring(2))),this.dispatchEvent(new CustomEvent(e,{detail:{parameters:t}}))}applySlots(t,r){for(const s of Array.from(t.querySelectorAll("slot"))){const t=s.getAttribute("name");if(null===t||"default"===t)if(this.slots.default){if(this.self.renderSlots){if(this.self.evaluateSlots)for(const e of this.slots.default)this.evaluateDomNodeTemplate(e,r);(0,h.replace)(s,this.slots.default,e.trimSlots)}}else this.slots.default=(0,h.unwrap)(s).map((e=>this.grabSlotContent(e)));else this.slots[t]?this.self.renderSlots&&(this.self.evaluateSlots&&this.evaluateDomNodeTemplate(this.slots[t],r),(0,h.replace)(s,this.slots[t],e.trimSlots)):this.slots[t]=this.grabSlotContent((0,h.unwrap)(s).filter((e=>"#text"!==e.nodeName.toLowerCase()))[0])}}grabSlotContent(e){const t=d.node.firstElementChild?e:null;if(t&&"textarea"===t.firstElementChild?.nodeName.toLowerCase()&&(!t.firstElementChild.hasAttribute("data-no-template")||"false"===t.firstElementChild.getAttribute("data-no-template"))){const e=t.firstElementChild.value;t.classList.remove("web-component-template");const r=t.cloneNode();return t.classList.add("web-component-template"),r.innerHTML="",r.template=e,r}return this.self.cloneSlots?e.cloneNode(!0):e}grabGivenSlots(){this.slots={};for(const e of Array.from(this.querySelectorAll("[slot]"))){let t=e.parentNode,r=!0;for(;t;){if(t.nodeName.includes("-")){t===this&&(r=!1);break}t=t.parentNode}if(r)continue;const s=e.getAttribute("slot")?.trim();this.slots[null!=s?s:e.nodeName.toLowerCase()]=this.grabSlotContent(e)}this.slots.default?this.slots.default=[].concat(this.slots.default):this.childNodes.length>0?this.slots.default=Array.from(this.childNodes).map((e=>this.grabSlotContent(e))):this.slots.default=[]}isStateProperty(e){return Boolean(this.instance?.current?.state&&(Object.prototype.hasOwnProperty.call(this.instance.current.state,e)||this.instance.current.state.modelState&&Object.prototype.hasOwnProperty.call(this.instance.current.state.modelState,e)))}generateAliasIndex(){if(!this.self._propertyAliasIndex){this.self._propertyAliasIndex={...this.self.propertyAliases};for(const[e,t]of Object.entries(this.self._propertyAliasIndex))Object.prototype.hasOwnProperty.call(this.self._propertyAliasIndex,t)||(this.self._propertyAliasIndex[t]=e)}}reflectExternalProperties(e){this.ignoreAttributeUpdateObservations=!0;for(const[t,r]of Object.entries(e)){if(this.setExternalPropertyValue(t,r),!this.isConnected)continue;const e=(0,h.camelCaseToDelimited)(t);if(this.self._propertiesToReflectAsAttributes?.has(t))switch(this.self._propertiesToReflectAsAttributes.get(t)){case d.boolean:case"boolean":r?""!==this.getAttribute(e)&&this.setAttribute(e,""):this.hasAttribute(e)&&this.removeAttribute(e);break;case d.func:case"function":break;case"json":if(r){const t=JSON.stringify(r);if(t&&this.getAttribute(e)!==t){this.setAttribute(e,t);break}}this.hasAttribute(e)&&this.removeAttribute(e);break;case d.number:case"number":if("number"!=typeof r||isNaN(r))this.hasAttribute(e)&&this.removeAttribute(e);else{const t=String(r);this.getAttribute(e)!==t&&this.setAttribute(e,t)}break;case d.string:case"string":r?this.getAttribute(e)!==r&&this.setAttribute(e,r):this.hasAttribute(e)&&this.removeAttribute(e);break;case d.any:case d.array:case d.arrayOf:case d.element:case d.elementType:case d.instanceOf:case d.node:case d.object:case"object":case d.objectOf:case d.shape:case d.exact:case d.symbol:default:if(r){const t=(0,h.represent)(r);if(t&&this.getAttribute(e)!==t){this.setAttribute(e,t);break}}this.hasAttribute(e)&&this.removeAttribute(e)}}this.ignoreAttributeUpdateObservations=!1}reflectProperties(e){if(this.reflectExternalProperties(e),this.instance?.current?.state&&"object"==typeof this.instance.current.state)for(const e of Object.keys(this.instance.current.state).concat(this.instance.current.state.modelState?Object.keys(this.instance.current.state.modelState):[]))Object.prototype.hasOwnProperty.call(this.internalProperties,e)&&this.setInternalPropertyValue(e,void 0);this.internalProperties.model?.state&&(delete this.internalProperties.model.state,this.setInternalPropertyValue("model",this.internalProperties.model));for(const t of this.self.controllableProperties)Object.prototype.hasOwnProperty.call(e,t)&&this.setInternalPropertyValue(t,e[t])}async reflectEventToProperties(e,t){const r=this.batchUpdates;this.batchUpdates=!1;let s=null,n=!1;if(this.self.eventToPropertyMapping&&Object.prototype.hasOwnProperty.call(this.self.eventToPropertyMapping,e)&&(0,h.isFunction)(this.self.eventToPropertyMapping[e])){const r=this.self.eventToPropertyMapping[e](...t,this),i=r&&"then"in r&&(0,h.isFunction)(r.then)?await r:r;n=!0,Array.isArray(i)?(s=i[0],this.reflectProperties(s),(0,h.extend)(!0,this.internalProperties,i[1])):null===i?n=!1:"object"==typeof i&&(s=i,this.reflectProperties(i))}if(!n&&t.length>0&&(0,h.isObject)(t[0])){let e=t[0];if("persist"in t[0]&&(0,h.isFunction)(t[0].persist)){e={};for(const r of Object.keys(this.self.propertyTypes))for(const s of[r].concat(null!==(i=this.getPropertyAlias(r))&&void 0!==i?i:[])){var i;const r=t[0].currentTarget&&Object.prototype.hasOwnProperty.call(t[0].currentTarget,s)?t[0].currentTarget[s]:this.getPropertyValue(s);r!==this.externalProperties[s]&&(e[s]=r)}}else[null,void 0].includes(e.detail?.value)||(e={...e.detail});s=e,this.reflectProperties(e)}return this.triggerRender("propertyReflected"),this.batchUpdates=r,s}evaluateStringOrNullAndSetAsProperty(e,t){const r=e.startsWith("-"),s=r?e.substring(1):e;let n=(0,h.delimitedToCamelCase)(s);const i=this.getPropertyAlias(n);if(i&&Object.prototype.hasOwnProperty.call(this.self.propertyTypes,i)&&(n=i),Object.prototype.hasOwnProperty.call(this.self.propertyTypes,n)){const s=this.self.propertyTypes[n];if(r){if(t){const r=(0,h.evaluate)(t,{...h.UTILITY_SCOPE},!1,!0,this);r.error?(f.warn("Failed to process pre-evaluation attribute",`"${e}": ${r.error}. Will be`,'set to "undefined".'),this.setInternalPropertyValue(n,void 0)):(this.setInternalPropertyValue(n,r.result),this.setExternalPropertyValue(n,r.result))}}else switch(s){case d.boolean:case"boolean":{const e=![null,"false"].includes(t);this.setInternalPropertyValue(n,e),this.setExternalPropertyValue(n,e);break}case d.func:case"function":{let r,s=null;const i=["data","event","firstArgument","firstParameter","options"];if(t){const n=(0,h.compile)(t,i.concat("parameters","scope",h.UTILITY_SCOPE_NAMES),!0,!0,this);s=n.error,r=n.templateFunction,s&&f.warn("Failed to compile given handler",`"${e}": ${s}.`)}this.setInternalPropertyValue(n,((...o)=>{let a;if(this.outputEventNames.has(n)&&this.reflectEventToProperties(n,o),!s){const s={parameters:o,...h.UTILITY_SCOPE};for(const e of i)s[e]=o[0];try{a=r?.(...i.map((e=>s[e])),o,s,...h.UTILITY_SCOPE_NAMES.map((e=>h.UTILITY_SCOPE[e])))}catch(r){f.warn("Failed to evaluate function",`"${e}" with expression`,`"${t}" and scope`,"variables",`"${i.join('", "')}" set to`,`"${(0,h.represent)(o)}":`,`${r}. Set property`,'to "undefined".')}}return this.self.renderProperties.includes(n)||this.forwardEvent(n,o),a})),s||this.setExternalPropertyValue(n,r);break}case"json":if(t){let r;try{r=JSON.parse(t)}catch(t){f.warn("Error occurred during parsing given json",`attribute "${e}":`,(0,h.represent)(t));break}this.setInternalPropertyValue(n,r),this.setExternalPropertyValue(n,(0,h.copy)(r,!1,1))}else this.setInternalPropertyValue(n,null),this.setExternalPropertyValue(n,null);break;case d.number:case"number":{if(null===t){this.setInternalPropertyValue(n,t),this.setExternalPropertyValue(n,t);break}let e=parseFloat(t);isNaN(e)&&(e=void 0),this.setInternalPropertyValue(n,e),this.setExternalPropertyValue(n,e);break}case d.string:case"string":this.setInternalPropertyValue(n,t),this.setExternalPropertyValue(n,t);break;case d.any:case d.array:case d.arrayOf:case d.element:case d.elementType:case d.instanceOf:case d.node:case d.object:case"object":case d.objectOf:case d.oneOf:case d.oneOfType:case d.shape:case d.exact:case d.symbol:default:if(t){const r=(0,h.evaluate)(t,{},!1,!0,this);if(r.error){f.warn("Error occurred during processing given",`attribute configuration "${e}":`,r.error);break}this.setInternalPropertyValue(n,r.result),this.setExternalPropertyValue(n,(0,h.copy)(r.result,!1,1))}else this.hasAttribute(e)?(this.setInternalPropertyValue(n,!0),this.setExternalPropertyValue(n,!0)):(this.setInternalPropertyValue(n,null),this.setExternalPropertyValue(n,null))}}}async waitForNestedComponentRendering(){this.childComponentInstances&&await Promise.all(this.childComponentInstances.map((e=>e.renderState.pending?e.renderState.promise:Promise.resolve())))}async resolveRenderingPromiseIfSet(e,t){t&&(await this.waitForNestedComponentRendering(),this.renderState.pending=!1,this.renderState.resolve(e),this.prepareNewRenderingPromise())}prepareNewRenderingPromise(){this.renderState.pending||(this.renderState.promise=new Promise((e=>{this.renderState.resolve=t=>{this.renderState.pending=!1,e(t)}})))}triggerRender(e){this.batchUpdates?this.batchedUpdateRunning||(this.batchedUpdateRunning=!0,(0,h.timeout)((()=>{this.batchedUpdateRunning=!1,this.render(e)}))):this.render(e)}applyShadowRootIfNotExisting(){this.self.shadowDOM&&this.hostDomNode===this&&(this.hostDomNode=(!("attachShadow"in this)&&"ShadyDOM"in window?window.ShadyDOM.wrap(this):this).attachShadow((0,h.isObject)(this.self.shadowDOM)?this.self.shadowDOM:{mode:"open"}))}determineRenderScope(e={}){this.scope={...this.parentInstance?.scope||{},...this.scope,...this.internalProperties,parentInstance:this.parentInstance,rootInstance:this.rootInstance,self:this,[(0,h.lowerCase)(this.self._name)||"instance"]:this,...e},this.scope.scope=this.scope}async render(e="unknown",t=!0){if(this.unRender("reRender",e),this.childComponentInstances=[],this.renderState.pending=!0,this.isRoot&&(await this.resolveRenderingPromiseIfSet(e,t),t&&(await Promise.all(this.self.pendingRenderPromises),this.self.pendingRenderPromises=[])),this.self.pendingRenderPromises.push(this.renderState.promise),this.determineRenderScope(),!this.self.doRender||!this.dispatchEvent(new CustomEvent("render",{detail:{reason:e,scope:this.scope}})))return void await this.resolveRenderingPromiseIfSet(e,t);const r=(0,h.evaluate)(`\`${this.self.content}\``,this.scope);if(r.error)return f.warn(`Failed to process template: ${r.error}`),this.renderState.resolve(e),void await Promise.all(this.self.pendingRenderPromises);this.applyShadowRootIfNotExisting();const s=document.createElement("div");s.innerHTML=r.result,this.applySlots(s,{...this.scope,parentInstance:this}),this.hostDomNode.innerHTML=s.innerHTML,await(0,h.timeout)(),this.waitForNestedComponentRendering().then((()=>{this.applyBindings(this.hostDomNode.firstChild,this.scope,this.self.renderSlots)})),await this.resolveRenderingPromiseIfSet(e,t)}unRender(e="unknown",t){this.unregisterDomNodeEventBindings()}},o.applyRootBinding=!0,o.pendingRenderPromises=[],o.content="<slot>Please provide a template to transclude.</slot>",o.determineRootBinding=!0,o.shadowDOM=null,o.observedAttributes=[],o.controllableProperties=[],o.eventToPropertyMapping={},o.propertyAliases={},o.propertyTypes={onClick:d.func},o.propertiesToReflectAsAttributes=[],o.renderProperties=["children"],o.doRender=!1,o.cloneSlots=!1,o.evaluateSlots=!1,o.renderSlots=!0,o.trimSlots=!0,o.renderUnsafe=!1,o._name="BaseWeb",o._propertyAliasIndex=void 0,o._propertiesToReflectAsAttributes=void 0,n=o,i=c()(n.prototype,"isRoot",[s],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),n);const b={component:y,register:(e=(0,h.camelCaseToDelimited)(y._name))=>{customElements.define(e,y)}},g=y},e=>{e.exports=i},e=>{e.exports=o},e=>{e.exports=a},e=>{e.exports=r},(e,t,r)=>{r.d(t,{api:()=>d,default:()=>u});var s=r(0),n=r(1),i=r(7),o=r.n(i),a=r(9),p=r(10),l=r(3);const c=new s.Logger({name:"web-component-wrapper-web"});class h extends l.default{constructor(...e){super(...e),this.unmountOnDisconnect=!0,this.compiledSlots={},this.preparedSlots={},this.reactRoot=null,this.rootReactInstance=null,this.self=h,this.wrapMemorizingWrapper=null,this.isWrapped=!1,this.reflectInstanceProperties=()=>{this.instance?.current&&this.instance.current.properties&&this.reflectProperties(this.instance.current.properties)}}connectedCallback(){this.applyComponentWrapper(),this.rootReactInstance=this,super.connectedCallback()}disconnectedCallback(){this.unRender("disconnected"),this.unmountOnDisconnect&&this.reactRoot?.unmount(),this.unregisterConnectionState()}reflectExternalProperties(e){this.isRoot&&super.reflectExternalProperties(e)}async render(e="unknown",t=!0){if(super.unRender("reRender",e),this.childComponentInstances=[],this.renderState.pending=!0,this.isRoot&&(this.self.pendingRenderPromises=[]),this.self.pendingRenderPromises.push(this.renderState.promise),this.rootReactInstance!==this||!this.dispatchEvent(new CustomEvent("render",{detail:{reason:e,scope:this.scope}})))return this.resolveRenderingPromiseIfSet(e,t);if(this.determineRenderScope(),0===Object.keys(this.compiledSlots).length&&this.preCompileSlots(),this.evaluateSlots({...this.scope,parentInstance:this}),this.prepareProperties(this.internalProperties),this.applyShadowRootIfNotExisting(),this.rootInstance!==this&&!this.reactRoot){let e=this.firstChild;for(;e;){const t=e.nextSibling;this.removeChild(e),e=t}}if(!this.reactRoot){const e=this.id||this.internalProperties.id||this.externalProperties.id||this.name||this.internalProperties.name||this.externalProperties.name;let t="";"string"==typeof e&&(t=e),this.reactRoot=(0,p.createRoot)(this.hostDomNode,{identifierPrefix:t})}(0,a.flushSync)((()=>{this.reactRoot?.render((0,i.createElement)(this.self.content,this.internalProperties)),this.resolveRenderingPromiseIfSet(e,t)})),t&&await this.renderState.promise}setPropertyValue(e,t){this.reflectProperties({[e]:(0,s.copy)(t,!1,1)}),this.setInternalPropertyValue(e,(0,s.copy)(t,!1,1))}setInternalPropertyValue(e,t){null===t?t=n.NullSymbol:void 0===t&&(t=n.UndefinedSymbol),super.setInternalPropertyValue(e,t)}preCompileDomNodes(e,t={},r=!1){if(1===(e=e.filter((e=>e.nodeType!==Node.TEXT_NODE||"string"==typeof e.nodeValue&&""!==e.nodeValue.trim()))).length)return this.preCompileDomNode(e[0],t,r);let s=1;const n=[];for(const i of e){const e=this.preCompileDomNode(i,t,r,s.toString());n.push(e),s+=1}return r?e=>(...t)=>{const r=[];for(const s of n){const n=s(e);"function"==typeof n&&r.push(n(...t))}return(0,i.createElement)(i.Fragment,{children:r})}:n}preCompileDomNode(e,t={},r=!1,n){if(r){const r=this.preCompileDomNode(e,{...t,data:void 0,firstArgument:void 0,firstParameter:void 0,options:void 0,scope:void 0,parameters:void 0},!1,n);return e=>(...t)=>{const s=t.length>0?t[0]:null;return r({...e,data:s,firstArgument:s,firstParameter:s,options:s,scope:s,parameters:t})}}if(e.nodeType===Node.TEXT_NODE){const t="string"==typeof e.nodeValue?e.nodeValue.trim():"",r=n&&t?(0,i.createElement)(i.Fragment,{children:t,key:n}):t||null;return()=>r}if(!e.getAttributeNames)return()=>null;const o={};let a;const p=this.self.isReactComponent(e);p?(e.determineRenderScope(),0===Object.keys(this.compiledSlots).length&&e.preCompileSlots(),n&&!Object.prototype.hasOwnProperty.call(o,"key")&&(o.key=n),a=e.constructor.content):(o.key=n,a=e.tagName.toLowerCase());let l=Object.keys(t);const h={};for(const r of e.getAttributeNames()){let n=e.getAttribute(r);if(null===n)continue;let i=!1,a="";if(r.startsWith("data-bind-")?a=r.substring(10):r.startsWith("bind-")&&(a=r.substring(5)),a.startsWith("attribute-")||"attributes"===a||a.startsWith("property-")||"properties"===a){const{error:t,originalScopeNames:o,templateFunction:p}=(0,s.compile)(n,l);if(t){c.warn("Error occurred during compiling given attribute",`binding "${r}" on node:`,e,t);continue}"attributes"===a||"properties"===a?i=!0:a=a.startsWith("attribute-")?a.substring(10):a.substring(9),n={originalScopeNames:o,templateFunction:p.bind(this)}}else if(a.startsWith("on-")){a=(0,s.delimitedToCamelCase)(a),Object.prototype.hasOwnProperty.call(t,"event")||(l=[...l,"event"]),Object.prototype.hasOwnProperty.call(t,"parameters")||(l=[...l,"parameters"]);const{error:i,originalScopeNames:o,scopeNames:p,templateFunction:h}=(0,s.compile)(n,l,!0);if(i){c.warn("Error occurred during compiling given event",`binding "${r}" on node:`,e,i);continue}const d=h.bind(this);n=(...i)=>{t.event=i[0],t.parameters=i;try{d(...o.map((e=>t[e])))}catch(t){c.warn("Error occurred during processing given",`event binding "${r}" on node: `,e,`Given expression "${n}" could`,"not be evaluated with given scope names",`"${p.join('", "')}":`,(0,s.represent)(t))}}}else a=r;const d={class:"className",for:"htmlFor"};Object.prototype.hasOwnProperty.call(d,a)&&(a=d[a]),a=(0,s.delimitedToCamelCase)(a),n?.originalScopeNames?h[i?"":a]=n:p||(o[a]=n)}if(!p){const r=Array.from(e.childNodes);r.length&&(o.children=this.preCompileDomNodes(r,t))}return r=>{(r={...t,...r}).scope=r;let s={...o};for(const[e,{originalScopeNames:t,templateFunction:n}]of Object.entries(h)){const i=n(...t.map((e=>r[e])));""===e?s={...s,...i}:s[e]=i}return Object.prototype.hasOwnProperty.call(s,"innerHTML")&&(s.dangerouslySetInnerHTML={__html:s.innerHTML},delete s.children,delete s.innerHTML),Object.prototype.hasOwnProperty.call(s,"textContent")?(s.children=s.textContent,delete s.textContent):p?(s={...e.internalProperties,...s},r={...s,...r,parentInstance:e},e.evaluateSlots(r),e.prepareProperties(s)):s.children&&(s.children=this.evaluatePreCompiledDomNodes(s.children,r)),(0,i.createElement)(a,s)}}evaluatePreCompiledDomNodes(e,t={}){if(!Array.isArray(e))return e(t);if(1===e.length)return e[0](t);const r=[];for(const s of e){const e=s(t);e&&r.push(e)}return r}preCompileSlots(){for(const e in this.slots)this.slots[e]&&"default"!==e&&(this.compiledSlots[e]=this.preCompileDomNode(this.slots[e],{...this.scope,parentInstance:this},[n.func,"function"].includes(this.self.propertyTypes[e])));this.slots.default&&this.slots.default.length>0&&(this.compiledSlots.children=this.preCompileDomNodes(this.slots.default,{...this.scope,parentInstance:this},[n.func,"function"].includes(this.self.propertyTypes.children)))}evaluateSlots(e){this.preparedSlots={};for(const t in this.compiledSlots)Object.prototype.hasOwnProperty.call(this.compiledSlots,t)&&("children"===t?this.preparedSlots.children=this.evaluatePreCompiledDomNodes(this.compiledSlots[t],e):this.preparedSlots[t]=this.compiledSlots[t](e))}static isReactComponent(e){const t=e.constructor;return"object"==typeof t.content&&(!t.attachWebComponentAdapterIfNotExists||"react"===t.content.webComponentAdapterWrapped)}determineRootBinding(){super.determineRootBinding();let e=this.parentNode;for(;e;){if(this.self.isReactComponent(e)){this.rootReactInstance=e;break}e=e.parentNode}}applyComponentWrapper(){if("string"==typeof this.self.content||this.isWrapped)return;this.isWrapped=!0;const e=this.self.content.wrapped||this.self.content;this.self.content.webComponentAdapterWrapped?this.wrapMemorizingWrapper&&(this.self.content=(0,i.memo)(this.self.content),this.self.content.wrapped=e):this.self.attachWebComponentAdapterIfNotExists?(this.self.content.displayName||(this.self.content.displayName=this.self._name),this.self.content=(0,i.forwardRef)(((t,r)=>((0,i.useImperativeHandle)(r,(()=>({properties:t})),[t]),(0,i.createElement)(e,t)))),(this.wrapMemorizingWrapper||null===this.wrapMemorizingWrapper)&&(this.self.content=(0,i.memo)(this.self.content)),this.self.content.wrapped=e,this.self.content.webComponentAdapterWrapped="react"):this.wrapMemorizingWrapper&&(this.self.content=(0,i.memo)(this.self.content),this.self.content.wrapped=e)}prepareProperties(e){(0,s.extend)(e,this.preparedSlots),this.self.removeKnownUnwantedPropertyKeys(this.self,e),e.ref||(this.instance=(0,i.createRef)(),e.ref=e=>{this.instance?this.instance.current=e:this.instance={current:e},this.reflectInstanceProperties()})}static removeKnownUnwantedPropertyKeys(e,t){if("string"!=typeof e.content)for(const r of["isRoot","isTrusted","__composed"])Object.prototype.hasOwnProperty.call(t,r)&&(Object.prototype.hasOwnProperty.call(e.content,"propTypes")&&!Object.prototype.hasOwnProperty.call(e.content.propTypes,r)||Object.prototype.hasOwnProperty.call(e.content,"wrapped")&&Object.prototype.hasOwnProperty.call(e.content.wrapped,"propTypes")&&!Object.prototype.hasOwnProperty.call(e.content.wrapped.propTypes,r))&&delete t[r]}}h.attachWebComponentAdapterIfNotExists=!0,h.content="div",h.react=o(),h._name="ReactWebComponent";const d={component:h,register:(e=(0,s.camelCaseToDelimited)(h._name))=>{customElements.define(e,h)}},u=h},e=>{e.exports=s},e=>{e.exports=n}],l={};function c(e){var t=l[e];if(void 0!==t)return t.exports;var r=l[e]={exports:{}};return p[e](r,r.exports,c),r.exports}c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},c.d=(e,t)=>{for(var r in t)c.o(t,r)&&!c.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var h={};c.r(h),c.d(h,{ReactWeb:()=>b,Web:()=>v,default:()=>w,property:()=>y,reactWebAPI:()=>g,webAPI:()=>P,wrapAsWebComponent:()=>A});var d=c(0),u=c(2),f=c(8),m=c(3);const y=u.default,b=f.default,g=f.api,P=m.api,v=m.default,A=(e,t="NoName",r={})=>{var s,n;const i=e._name||e.___types?.name?.name||t.replace(/^(.*\/+)?([^/]+)\.tsx$/,"$2");r.propTypes&&(e.propTypes=r.propTypes);const o=e.propTypes||{},a=r.propertyAliases||e.propertyAliases||{},p=(0,d.unique)(Object.keys(o).concat(Object.keys(a)).concat(Object.values(a)));let l=r.propertiesToReflectAsAttributes||e.propertiesToReflectAsAttributes||[];if(b.propertiesToReflectAsAttributes)if(Array.isArray(l))l=[...b.propertiesToReflectAsAttributes,...l];else if(l instanceof Map)for(const e of b.propertiesToReflectAsAttributes)l.set(e,b.propertyTypes[e]);else if("object"==typeof l)for(const e of b.propertiesToReflectAsAttributes)l[e]=b.propertyTypes[e];const c=p.map((e=>(0,d.camelCaseToDelimited)(e)));class h extends b{constructor(...t){var s;super(...t),this.self=h,this.internalProperties=r.internalProperties?{...r.internalProperties}:e.internalProperties?{...e.internalProperties}:{},this.unmountOnDisconnect=null===(s=r.unmountOnDisconnect)||void 0===s||s}}h.attachWebComponentAdapterIfNotExists="boolean"!=typeof r.attachWebComponentAdapterIfNotExists||r.attachWebComponentAdapterIfNotExists,h.content=e,h.observedAttributes=b.observedAttributes.concat(c).concat(c.map((e=>`-${e}`))),h.controllableProperties=e.controllableProperties||r.controllableProperties||[],h.eventToPropertyMapping=null===r.eventToPropertyMapping?r.eventToPropertyMapping:r.eventToPropertyMapping?{...r.eventToPropertyMapping}:null===e.eventToPropertyMapping?e.eventToPropertyMapping:e.eventToPropertyMapping?{...e.eventToPropertyMapping}:{},h.propertyAliases={...b.propertyAliases,...a},h.propertiesToReflectAsAttributes=l,h.propertyTypes={...b.propertyTypes,...o},h.renderProperties=null!==(s=null!==(n=r.renderProperties)&&void 0!==n?n:e.renderProperties)&&void 0!==s?s:b.renderProperties,h._name=i;return{component:h,register:(e=(0,d.camelCaseToDelimited)(i))=>{customElements.define(e,h)}}},w=A;return h})()));
|
package/dist/test.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";if("undefined"!=typeof module&&null!==module&&"undefined"!==eval("typeof require")&&null!==eval("require")&&"main"in eval("require")&&"undefined"!==eval("typeof require.main")&&null!==eval("require.main")){var ORIGINAL_MAIN_MODULE=module;module!==eval("require.main")&&"paths"in module&&"paths"in eval("require.main")&&"undefined"!=typeof __dirname&&null!==__dirname&&(module.paths=eval("require.main.paths").concat(module.paths.filter((function(path){return eval("require.main.paths").includes(path)}))))}if(null==window)var window="undefined"==typeof global||null===global?{}:global;!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("clientnode"),require("clientnode/property-types"),require("react"),require("@jest/globals"),require("react-dom"),require("react-dom/client"),require("@babel/runtime/helpers/initializerDefineProperty"),require("@babel/runtime/helpers/applyDecoratedDescriptor"),require("@babel/runtime/helpers/initializerWarningHelper"));else if("function"==typeof define&&define.amd)define(["clientnode","clientnode/property-types","react","@jest/globals","react-dom","react-dom/client","@babel/runtime/helpers/initializerDefineProperty","@babel/runtime/helpers/applyDecoratedDescriptor","@babel/runtime/helpers/initializerWarningHelper"],t);else{var r="object"==typeof exports?t(require("clientnode"),require("clientnode/property-types"),require("react"),require("@jest/globals"),require("react-dom"),require("react-dom/client"),require("@babel/runtime/helpers/initializerDefineProperty"),require("@babel/runtime/helpers/applyDecoratedDescriptor"),require("@babel/runtime/helpers/initializerWarningHelper")):t(e.clientnode,e["clientnode/property-types"],e.react,e["@jest/globals"],e["react-dom"],e["react-dom/client"],e["@babel/runtime/helpers/initializerDefineProperty"],e["@babel/runtime/helpers/applyDecoratedDescriptor"],e["@babel/runtime/helpers/initializerWarningHelper"]);for(var s in r)("object"==typeof exports?exports:e)[s]=r[s]}}(this,((e,t,r,s,n,o,i,a,p)=>(()=>{var l=[t=>{t.exports=e},e=>{e.exports=t},(e,t,r)=>{r.d(t,{default:()=>o});var s=r(0),n=r(1);const o=function(e={}){return e={readAttribute:!0,type:n.string,...e},function(t,r){if("string"!=typeof r)return;const n=t.self||t.constructor;if(e.readAttribute){Object.prototype.hasOwnProperty.call(n,"observedAttributes")||(n.observedAttributes=n.observedAttributes?[...n.observedAttributes]:[]);const e=(0,s.camelCaseToDelimited)(r);n.observedAttributes&&!n.observedAttributes.includes(e)&&n.observedAttributes.push(e)}if(e.type&&(Object.prototype.hasOwnProperty.call(n,"propertyTypes")||(n.propertyTypes=n.propertyTypes?{...n.propertyTypes}:{}),!n.propertyTypes||!e.update&&Object.prototype.hasOwnProperty.call(n,r)||(n.propertyTypes[r]=e.type)),e.writeAttribute&&(Object.prototype.hasOwnProperty.call(n,"propertiesToReflectAsAttributes")||(n.propertiesToReflectAsAttributes=n.propertiesToReflectAsAttributes?(0,s.copy)(n.propertiesToReflectAsAttributes):[]),e.update||n.propertiesToReflectAsAttributes instanceof Map&&!n.propertiesToReflectAsAttributes.has(r)||Array.isArray(n.propertiesToReflectAsAttributes)&&!n.propertiesToReflectAsAttributes.includes(r)||"object"==typeof n.propertiesToReflectAsAttributes&&!Object.prototype.hasOwnProperty.call(n.propertiesToReflectAsAttributes,r))){let t;"boolean"==typeof e.writeAttribute?e.writeAttribute&&n.propertyTypes&&Object.prototype.hasOwnProperty.call(n.propertyTypes,r)&&(t=n.propertyTypes[r]):t=e.writeAttribute,void 0!==t&&(Array.isArray(n.propertiesToReflectAsAttributes)&&(!0===e.writeAttribute?n.propertiesToReflectAsAttributes.push(r):n.normalizePropertyTypeList&&(n.propertiesToReflectAsAttributes=n.normalizePropertyTypeList(n.propertiesToReflectAsAttributes))),n.propertiesToReflectAsAttributes instanceof Map&&n.propertiesToReflectAsAttributes.set(r,t),"object"==typeof n.propertiesToReflectAsAttributes&&(n.propertiesToReflectAsAttributes[r]=t))}e.alias&&(Object.prototype.hasOwnProperty.call(n,"propertyAliases")||(n.propertyAliases=n.propertyAliases?{...n.propertyAliases}:{}),!n.propertyAliases||!e.update&&Object.prototype.hasOwnProperty.call(n,r)||(n.propertyAliases[r]=e.alias))}}},(e,t,r)=>{r.d(t,{default:()=>b});var s,n,o,i,a=r(4),p=r.n(a),l=r(5),c=r.n(l),d=(r(6),r(0)),h=r(1),u=r(2);const f=new d.Logger({name:"web-component-wrapper-web"}),m="undefined"==typeof HTMLElement?class{}:HTMLElement;let y=(s=(0,u.default)({type:h.boolean,writeAttribute:!0}),i=class e extends m{constructor(){super(),this.renderState={promise:Promise.resolve(""),pending:!1,resolve:d.NOOP},this.childComponentInstances=[],this.batchAttributeUpdates=!0,this.batchPropertyUpdates=!0,this.batchUpdates=!0,this.batchedAttributeUpdateRunning=!0,this.batchedPropertyUpdateRunning=!0,this.batchedUpdateRunning=!0,this.connectionRegistered=!1,this.pendingAttributeUpdates=[],this.parentInstance=null,this.rootInstance=void 0,this.hostDomNode=void 0,this.scope={...d.UTILITY_SCOPE},this.domNodeEventBindings=new Map,this.domNodeTemplateCache=new Map,this.externalProperties={},this.ignoreAttributeUpdateObservations=!1,this.internalProperties={},this.outputEventNames=new Set,this.instance=null,p()(this,"isRoot",o,this),this.runDomConnectionAndRenderingInSameEventQueue=!1,this.self=e,this.slots={},this.prepareNewRenderingPromise(),this.self=this.constructor,this.self._propertiesToReflectAsAttributes||(this.self._propertiesToReflectAsAttributes=this.self.normalizePropertyTypeList(this.self.propertiesToReflectAsAttributes)),this.generateAliasIndex(),this.hostDomNode=this,this.rootInstance=this,this.defineGetterAndSetterInterface()}attributeChangedCallback(e,t,r){this.ignoreAttributeUpdateObservations||t===r||this.onUpdateAttribute(e,r)}onUpdateAttribute(e,t){const r=new Promise((r=>this.pendingAttributeUpdates.push((()=>{this.evaluateStringOrNullAndSetAsProperty(e,t),this.batchAttributeUpdates?this.batchedAttributeUpdateRunning||this.batchedUpdateRunning||(this.batchedAttributeUpdateRunning=!0,this.batchedUpdateRunning=!0,(0,d.timeout)((()=>{this.batchedAttributeUpdateRunning=!1,this.batchedUpdateRunning=!1,this.render("attributeChanged")}))):this.render("attributeChanged"),r()}))));if(this.connectionRegistered)for(;this.pendingAttributeUpdates.length;)this.pendingAttributeUpdates.shift()();return r}connectedCallback(){try{this.isConnected=!0}catch{}for(this.connectionRegistered=!0,this.parentInstance=this,this.rootInstance=this,this.attachEventHandler(),this.self.determineRootBinding&&(this.determineRootBinding(),this.parentInstance!==this&&this.parentInstance.childComponentInstances&&this.parentInstance.childComponentInstances.push(this)),this.self.applyRootBinding&&this.isRoot&&(this.determineRenderScope(),this.applyBinding(this,this.scope));this.pendingAttributeUpdates.length;)this.pendingAttributeUpdates.shift()();this.batchedAttributeUpdateRunning=!1,this.batchedPropertyUpdateRunning=!1,this.batchedUpdateRunning=!1,this.grabGivenSlots(),this.reflectExternalProperties(this.externalProperties),this.runDomConnectionAndRenderingInSameEventQueue?this.render("connected"):(0,d.timeout)((()=>{this.render("connected")}))}disconnectedCallback(){this.unRender("disconnected"),this.unregisterConnectionState()}defineGetterAndSetterInterface(){const e=(0,d.unique)(Object.keys(this.self.propertyTypes).concat(this.self._propertyAliasIndex?Object.keys(this.self._propertyAliasIndex):[]));for(const t of e)Object.prototype.hasOwnProperty.call(this,t)&&this.setPropertyValue(t,this[t]),Object.defineProperty(this,t,{configurable:!0,get:()=>this.getPropertyValue(t),set:e=>{this.setPropertyValue(t,e),this.triggerPropertySpecificRendering(t,e)}})}getPropertyAlias(e){return this.self._propertyAliasIndex&&Object.prototype.hasOwnProperty.call(this.self._propertyAliasIndex,e)?this.self._propertyAliasIndex[e]:null}getPropertyValue(t){var r;const s=this.instance?.current?.properties&&(Object.prototype.hasOwnProperty.call(!e.propertyTypes,t)||Object.prototype.hasOwnProperty.call(this.instance.current.properties,t))?this.instance.current.properties[t]:null!==(r=this.internalProperties[t])&&void 0!==r?r:this.externalProperties[t];return this.instance?.current?.state&&Object.prototype.hasOwnProperty.call(this.instance.current.state,t)?this.instance.current.state[t]:s}setExternalPropertyValue(e,t){this.externalProperties[e]=t;const r=this.getPropertyAlias(e);r&&(this.externalProperties[r]=t)}setInternalPropertyValue(e,t){this.internalProperties[e]=t;const r=this.getPropertyAlias(e);r&&(this.internalProperties[r]=t)}setPropertyValue(e,t){this.reflectProperties({[e]:t}),this.setInternalPropertyValue(e,t)}triggerPropertySpecificRendering(e,t){if(this.batchPropertyUpdates)this.batchedPropertyUpdateRunning||this.batchedUpdateRunning||(this.batchedPropertyUpdateRunning=!0,this.batchedUpdateRunning=!0,(0,d.timeout)((()=>{void 0!==t&&this.isStateProperty(e)?(this.render("preStatePropertyChanged"),(0,d.timeout)((()=>{this.setInternalPropertyValue(e,void 0),this.batchedPropertyUpdateRunning=!1,this.batchedUpdateRunning=!1,this.render("postStatePropertyChanged"),this.triggerOutputEvents()}))):(this.batchedPropertyUpdateRunning=!1,this.batchedUpdateRunning=!1,this.render("propertyChanged"),this.triggerOutputEvents())})));else{const r=this.isStateProperty(e);this.render(r?"preStatePropertyChanged":"propertyChanged"),void 0!==t&&r&&(this.setInternalPropertyValue(e,void 0),this.render("postStatePropertyChanged")),this.triggerOutputEvents()}}unregisterConnectionState(){try{this.isConnected=!1}catch{}this.connectionRegistered=!1,this.slots={}}unregisterDomNodeEventBindings(){for(const e of this.domNodeEventBindings.values())for(const t of e.values())t()}applyBinding(e,t){if(e.getAttributeNames)for(const r of e.getAttributeNames()){let s;if(r.startsWith("data-bind-")?s=r.substring(10):r.startsWith("bind-")&&(s=r.substring(5)),s){const n=e.getAttribute(r);if(null===n)continue;if(s.startsWith("attribute-")||s.startsWith("property-")){const o=(0,d.evaluate)(n,t,!1,!0,e);if(o.error){f.warn("Error occurred during processing given",`attribute binding "${r}" on node:`,e,o.error);continue}s.startsWith("attribute-")?e.setAttribute(s.substring(10),o.result):e[(0,d.delimitedToCamelCase)(s.substring(9))]=o.result}else if(s.startsWith("on-")){s=(0,d.delimitedToCamelCase)(s.substring(3)),t={log:f,event:void 0,parameters:void 0,...t};const o=(0,d.compile)(n,t,!0,!0,e);o.error?f.warn("Error occurred during compiling given event",`binding "${r}" on node:`,e,o.error):this.addSecureEventListener(e,s,((...s)=>{t.event=s[0],t.parameters=s;try{o.templateFunction(...o.originalScopeNames.map((e=>t[e])))}catch(t){f.warn("Error occurred during processing","given event binding",`"${r}" on node:`,e,`Given expression "${n}" could`,"not be evaluated with given scope",'names "'+o.scopeNames.join('", "')+`": ${(0,d.represent)(t)}`)}}))}}}}applyBindings(e,t,r=!0){for(;e;)!e.attributes?.length||!r&&e.getAttribute("slot")||this.applyBinding(e,t),e.nodeName.toLowerCase().includes("-")||this.applyBindings(e.firstChild,t),e=e.nextSibling}compileDomNodeTemplate(e,t=[],r={}){r={ignoreComponents:!0,ignoreNestedComponents:!0,unsafe:this.self.renderUnsafe,...r};const s=e.nodeName.toLowerCase();if(r.ignoreComponents&&s.includes("-"))return null;if(r.unsafe){let r=e.innerHTML;if(!r&&e.template&&(r=e.template),this.self.hasCode(r)){const s=(0,d.compile)(`\`${r}\``,t);return{domNode:e,children:[],error:s.error,scopeNames:s.scopeNames,template:r,templateFunction:s.templateFunction}}return null}let n=null;if("#text"===s){const t=e.textContent;t&&this.self.hasCode(t)&&(n=t.replace(/ /g," ").trim())}const o=[],i={children:o,domNode:e};if(n){const e=(0,d.compile)(`\`${n}\``,t);i.error=e.error,i.scopeNames=e.scopeNames,i.template=n,i.templateFunction=e.templateFunction}let a=e.firstChild;for(;a;){if(!r.filter||r.filter(a)){const e=this.compileDomNodeTemplate(a,t,{...r,ignoreComponents:r.ignoreNestedComponents});e&&o.push(e)}a=a.nextSibling}return i}evaluateCompiledDomNodeTemplate(e,t){const{domNode:r,error:s,templateFunction:n,scopeNames:o}=e;if(!n||!o)return null;if(s)return f.warn("Error occurred during compiling node content:",s),null;let i=null;try{i=n(...o.map((e=>t[e])))}catch(s){f.warn(`Error occurred when "${this.self._name}" is running`,`"${String(n)}": with bound`,`names "${o.join('", "')}":`,`"${s}". Rendering node:`,r)}return i}evaluateDomNodeTemplate(e,t={},r={}){const s=(r={domNodeTemplateCache:this.domNodeTemplateCache,ignoreComponents:!0,ignoreNestedComponents:!0,unsafe:this.self.renderUnsafe,...r}).domNodeTemplateCache;if(!s.has(e)){const n={filter:r.filter,ignoreComponents:r.ignoreComponents,ignoreNestedComponents:r.ignoreNestedComponents,unsafe:r.unsafe},o=this.compileDomNodeTemplate(e,t,n);o&&s.set(e,o)}if(s.has(e)){const n=s.get(e),o=this.evaluateCompiledDomNodeTemplate(n,t);if(null!==o&&(r.unsafe&&e.innerHTML?e.innerHTML=o:e.textContent=o),n.children.length){const e=r=>{for(const s of r){const r=this.evaluateCompiledDomNodeTemplate(s,t);null!==r&&(s.domNode.textContent=r),s.children.length&&e(s.children)}};e(n.children)}}r.applyBindings&&this.applyBindings(e,t)}addSecureEventListener(e,t,r,s,n){this.domNodeEventBindings.has(e)||this.domNodeEventBindings.set(e,new Map);const o=this.domNodeEventBindings.get(e),i=o.get(t);i&&i!==r&&i();const a=()=>{e.removeEventListener(t,r,n),o.delete(t),0===o.size&&this.domNodeEventBindings.delete(e)};return o.set(t,a),e.addEventListener(t,r,s),a}determineRootBinding(){let t=this.parentNode;for(;t;){const r=t instanceof e||t.nodeName.includes("-")&&"#document-fragment"!==t.nodeName,s=null===t.parentNode&&"[object ShadowRoot]"===t.toString();r?(this.rootInstance===this&&(this.parentInstance=t,this.setPropertyValue("isRoot",!1)),this.rootInstance=t):s&&this.setPropertyValue("isRoot",!1),t=t.parentNode}}static hasCode(e){return"string"==typeof e&&e.includes("${")&&e.includes("}")&&/\${[\s\S]+}/.test(e)}static normalizePropertyTypeList(t){if("string"==typeof t&&(t=[t]),Array.isArray(t)){const r=t,s=new Map;for(const t of r)Object.prototype.hasOwnProperty.call(e.propertyTypes,t)&&s.set(t,e.propertyTypes[t]);return s}return(0,d.convertPlainObjectToMap)(t)}attachEventHandler(){if(null===this.self.eventToPropertyMapping)return;const e=this.attachExplicitDefinedOutputEventHandler();this.attachImplicitDefinedOutputEventHandler(!e)}attachExplicitDefinedOutputEventHandler(){if(!this.self.eventToPropertyMapping)return!1;let e=!1;for(const t of Object.keys(this.self.eventToPropertyMapping))Object.prototype.hasOwnProperty.call(this.internalProperties,t)||(e=!0,this.outputEventNames.add(t),this.setInternalPropertyValue(t,(async(...e)=>{const r=await this.reflectEventToProperties(t,e);r&&(e[0]=r),this.forwardEvent(t,e)})));return e}attachImplicitDefinedOutputEventHandler(e=!0){for(const[t,r]of Object.entries(this.self.propertyTypes))Object.prototype.hasOwnProperty.call(this.internalProperties,t)||![h.func,"function"].includes(r)||this.self.renderProperties.includes(t)||(this.outputEventNames.add(t),this.setInternalPropertyValue(t,((...r)=>{e&&this.reflectEventToProperties(t,r),this.forwardEvent(t,r)})))}triggerOutputEvents(){for(const e of this.outputEventNames)this.forwardEvent(e,[this.externalProperties])}forwardEvent(e,t){return e.length>3&&e.startsWith("on")&&(e=(0,d.lowerCase)(e.substring(2))),this.dispatchEvent(new CustomEvent(e,{detail:{parameters:t}}))}applySlots(t,r){for(const s of Array.from(t.querySelectorAll("slot"))){const t=s.getAttribute("name");if(null===t||"default"===t)if(this.slots.default){if(this.self.renderSlots){if(this.self.evaluateSlots)for(const e of this.slots.default)this.evaluateDomNodeTemplate(e,r);(0,d.replace)(s,this.slots.default,e.trimSlots)}}else this.slots.default=(0,d.unwrap)(s).map((e=>this.grabSlotContent(e)));else this.slots[t]?this.self.renderSlots&&(this.self.evaluateSlots&&this.evaluateDomNodeTemplate(this.slots[t],r),(0,d.replace)(s,this.slots[t],e.trimSlots)):this.slots[t]=this.grabSlotContent((0,d.unwrap)(s).filter((e=>"#text"!==e.nodeName.toLowerCase()))[0])}}grabSlotContent(e){const t=h.node.firstElementChild?e:null;if(t&&"textarea"===t.firstElementChild?.nodeName.toLowerCase()&&(!t.firstElementChild.hasAttribute("data-no-template")||"false"===t.firstElementChild.getAttribute("data-no-template"))){const e=t.firstElementChild.value;t.classList.remove("web-component-template");const r=t.cloneNode();return t.classList.add("web-component-template"),r.innerHTML="",r.template=e,r}return this.self.cloneSlots?e.cloneNode(!0):e}grabGivenSlots(){this.slots={};for(const e of Array.from(this.querySelectorAll("[slot]"))){let t=e.parentNode,r=!0;for(;t;){if(t.nodeName.includes("-")){t===this&&(r=!1);break}t=t.parentNode}if(r)continue;const s=e.getAttribute("slot")?.trim();this.slots[null!=s?s:e.nodeName.toLowerCase()]=this.grabSlotContent(e)}this.slots.default?this.slots.default=[].concat(this.slots.default):this.childNodes.length>0?this.slots.default=Array.from(this.childNodes).map((e=>this.grabSlotContent(e))):this.slots.default=[]}isStateProperty(e){return Boolean(this.instance?.current?.state&&(Object.prototype.hasOwnProperty.call(this.instance.current.state,e)||this.instance.current.state.modelState&&Object.prototype.hasOwnProperty.call(this.instance.current.state.modelState,e)))}generateAliasIndex(){if(!this.self._propertyAliasIndex){this.self._propertyAliasIndex={...this.self.propertyAliases};for(const[e,t]of Object.entries(this.self._propertyAliasIndex))Object.prototype.hasOwnProperty.call(this.self._propertyAliasIndex,t)||(this.self._propertyAliasIndex[t]=e)}}reflectExternalProperties(e){this.ignoreAttributeUpdateObservations=!0;for(const[t,r]of Object.entries(e)){if(this.setExternalPropertyValue(t,r),!this.isConnected)continue;const e=(0,d.camelCaseToDelimited)(t);if(this.self._propertiesToReflectAsAttributes?.has(t))switch(this.self._propertiesToReflectAsAttributes.get(t)){case h.boolean:case"boolean":r?""!==this.getAttribute(e)&&this.setAttribute(e,""):this.hasAttribute(e)&&this.removeAttribute(e);break;case h.func:case"function":break;case"json":if(r){const t=JSON.stringify(r);if(t&&this.getAttribute(e)!==t){this.setAttribute(e,t);break}}this.hasAttribute(e)&&this.removeAttribute(e);break;case h.number:case"number":if("number"!=typeof r||isNaN(r))this.hasAttribute(e)&&this.removeAttribute(e);else{const t=String(r);this.getAttribute(e)!==t&&this.setAttribute(e,t)}break;case h.string:case"string":r?this.getAttribute(e)!==r&&this.setAttribute(e,r):this.hasAttribute(e)&&this.removeAttribute(e);break;case h.any:case h.array:case h.arrayOf:case h.element:case h.elementType:case h.instanceOf:case h.node:case h.object:case"object":case h.objectOf:case h.shape:case h.exact:case h.symbol:default:if(r){const t=(0,d.represent)(r);if(t&&this.getAttribute(e)!==t){this.setAttribute(e,t);break}}this.hasAttribute(e)&&this.removeAttribute(e)}}this.ignoreAttributeUpdateObservations=!1}reflectProperties(e){if(this.reflectExternalProperties(e),this.instance?.current?.state&&"object"==typeof this.instance.current.state)for(const e of Object.keys(this.instance.current.state).concat(this.instance.current.state.modelState?Object.keys(this.instance.current.state.modelState):[]))Object.prototype.hasOwnProperty.call(this.internalProperties,e)&&this.setInternalPropertyValue(e,void 0);this.internalProperties.model?.state&&(delete this.internalProperties.model.state,this.setInternalPropertyValue("model",this.internalProperties.model));for(const t of this.self.controllableProperties)Object.prototype.hasOwnProperty.call(e,t)&&this.setInternalPropertyValue(t,e[t])}async reflectEventToProperties(e,t){const r=this.batchUpdates;this.batchUpdates=!1;let s=null,n=!1;if(this.self.eventToPropertyMapping&&Object.prototype.hasOwnProperty.call(this.self.eventToPropertyMapping,e)&&(0,d.isFunction)(this.self.eventToPropertyMapping[e])){const r=this.self.eventToPropertyMapping[e](...t,this),o=r&&"then"in r&&(0,d.isFunction)(r.then)?await r:r;n=!0,Array.isArray(o)?(s=o[0],this.reflectProperties(s),(0,d.extend)(!0,this.internalProperties,o[1])):null===o?n=!1:"object"==typeof o&&(s=o,this.reflectProperties(o))}if(!n&&t.length>0&&(0,d.isObject)(t[0])){let e=t[0];if("persist"in t[0]&&(0,d.isFunction)(t[0].persist)){e={};for(const r of Object.keys(this.self.propertyTypes))for(const s of[r].concat(null!==(o=this.getPropertyAlias(r))&&void 0!==o?o:[])){var o;const r=t[0].currentTarget&&Object.prototype.hasOwnProperty.call(t[0].currentTarget,s)?t[0].currentTarget[s]:this.getPropertyValue(s);r!==this.externalProperties[s]&&(e[s]=r)}}else[null,void 0].includes(e.detail?.value)||(e={...e.detail});s=e,this.reflectProperties(e)}return this.triggerRender("propertyReflected"),this.batchUpdates=r,s}evaluateStringOrNullAndSetAsProperty(e,t){const r=e.startsWith("-"),s=r?e.substring(1):e;let n=(0,d.delimitedToCamelCase)(s);const o=this.getPropertyAlias(n);if(o&&Object.prototype.hasOwnProperty.call(this.self.propertyTypes,o)&&(n=o),Object.prototype.hasOwnProperty.call(this.self.propertyTypes,n)){const s=this.self.propertyTypes[n];if(r){if(t){const r=(0,d.evaluate)(t,{...d.UTILITY_SCOPE},!1,!0,this);r.error?(f.warn("Failed to process pre-evaluation attribute",`"${e}": ${r.error}. Will be`,'set to "undefined".'),this.setInternalPropertyValue(n,void 0)):(this.setInternalPropertyValue(n,r.result),this.setExternalPropertyValue(n,r.result))}}else switch(s){case h.boolean:case"boolean":{const e=![null,"false"].includes(t);this.setInternalPropertyValue(n,e),this.setExternalPropertyValue(n,e);break}case h.func:case"function":{let r,s=null;const o=["data","event","firstArgument","firstParameter","options"];if(t){const n=(0,d.compile)(t,o.concat("parameters","scope",d.UTILITY_SCOPE_NAMES),!0,!0,this);s=n.error,r=n.templateFunction,s&&f.warn("Failed to compile given handler",`"${e}": ${s}.`)}this.setInternalPropertyValue(n,((...i)=>{let a;if(this.outputEventNames.has(n)&&this.reflectEventToProperties(n,i),!s){const s={parameters:i,...d.UTILITY_SCOPE};for(const e of o)s[e]=i[0];try{a=r?.(...o.map((e=>s[e])),i,s,...d.UTILITY_SCOPE_NAMES.map((e=>d.UTILITY_SCOPE[e])))}catch(r){f.warn("Failed to evaluate function",`"${e}" with expression`,`"${t}" and scope`,"variables",`"${o.join('", "')}" set to`,`"${(0,d.represent)(i)}":`,`${r}. Set property`,'to "undefined".')}}return this.self.renderProperties.includes(n)||this.forwardEvent(n,i),a})),s||this.setExternalPropertyValue(n,r);break}case"json":if(t){let r;try{r=JSON.parse(t)}catch(t){f.warn("Error occurred during parsing given json",`attribute "${e}":`,(0,d.represent)(t));break}this.setInternalPropertyValue(n,r),this.setExternalPropertyValue(n,(0,d.copy)(r,!1,1))}else this.setInternalPropertyValue(n,null),this.setExternalPropertyValue(n,null);break;case h.number:case"number":{if(null===t){this.setInternalPropertyValue(n,t),this.setExternalPropertyValue(n,t);break}let e=parseFloat(t);isNaN(e)&&(e=void 0),this.setInternalPropertyValue(n,e),this.setExternalPropertyValue(n,e);break}case h.string:case"string":this.setInternalPropertyValue(n,t),this.setExternalPropertyValue(n,t);break;case h.any:case h.array:case h.arrayOf:case h.element:case h.elementType:case h.instanceOf:case h.node:case h.object:case"object":case h.objectOf:case h.oneOf:case h.oneOfType:case h.shape:case h.exact:case h.symbol:default:if(t){const r=(0,d.evaluate)(t,{},!1,!0,this);if(r.error){f.warn("Error occurred during processing given",`attribute configuration "${e}":`,r.error);break}this.setInternalPropertyValue(n,r.result),this.setExternalPropertyValue(n,(0,d.copy)(r.result,!1,1))}else this.hasAttribute(e)?(this.setInternalPropertyValue(n,!0),this.setExternalPropertyValue(n,!0)):(this.setInternalPropertyValue(n,null),this.setExternalPropertyValue(n,null))}}}async waitForNestedComponentRendering(){this.childComponentInstances&&await Promise.all(this.childComponentInstances.map((e=>e.renderState.pending?e.renderState.promise:Promise.resolve())))}async resolveRenderingPromiseIfSet(e,t){t&&(await this.waitForNestedComponentRendering(),this.renderState.pending=!1,this.renderState.resolve(e),this.prepareNewRenderingPromise())}prepareNewRenderingPromise(){this.renderState.pending||(this.renderState.promise=new Promise((e=>{this.renderState.resolve=t=>{this.renderState.pending=!1,e(t)}})))}triggerRender(e){this.batchUpdates?this.batchedUpdateRunning||(this.batchedUpdateRunning=!0,(0,d.timeout)((()=>{this.batchedUpdateRunning=!1,this.render(e)}))):this.render(e)}applyShadowRootIfNotExisting(){this.self.shadowDOM&&this.hostDomNode===this&&(this.hostDomNode=(!("attachShadow"in this)&&"ShadyDOM"in window?window.ShadyDOM.wrap(this):this).attachShadow((0,d.isObject)(this.self.shadowDOM)?this.self.shadowDOM:{mode:"open"}))}determineRenderScope(e={}){this.scope={...this.parentInstance?.scope||{},...this.scope,...this.internalProperties,parentInstance:this.parentInstance,rootInstance:this.rootInstance,self:this,[(0,d.lowerCase)(this.self._name)||"instance"]:this,...e},this.scope.scope=this.scope}async render(e="unknown",t=!0){if(this.unRender("reRender",e),this.childComponentInstances=[],this.renderState.pending=!0,this.isRoot&&(await this.resolveRenderingPromiseIfSet(e,t),t&&(await Promise.all(this.self.pendingRenderPromises),this.self.pendingRenderPromises=[])),this.self.pendingRenderPromises.push(this.renderState.promise),this.determineRenderScope(),!this.self.doRender||!this.dispatchEvent(new CustomEvent("render",{detail:{reason:e,scope:this.scope}})))return void await this.resolveRenderingPromiseIfSet(e,t);const r=(0,d.evaluate)(`\`${this.self.content}\``,this.scope);if(r.error)return f.warn(`Failed to process template: ${r.error}`),this.renderState.resolve(e),void await Promise.all(this.self.pendingRenderPromises);this.applyShadowRootIfNotExisting();const s=document.createElement("div");s.innerHTML=r.result,this.applySlots(s,{...this.scope,parentInstance:this}),this.hostDomNode.innerHTML=s.innerHTML,await(0,d.timeout)(),this.waitForNestedComponentRendering().then((()=>{this.applyBindings(this.hostDomNode.firstChild,this.scope,this.self.renderSlots)})),await this.resolveRenderingPromiseIfSet(e,t)}unRender(e="unknown",t){this.unregisterDomNodeEventBindings()}},i.applyRootBinding=!0,i.pendingRenderPromises=[],i.content="<slot>Please provide a template to transclude.</slot>",i.determineRootBinding=!0,i.shadowDOM=null,i.observedAttributes=[],i.controllableProperties=[],i.eventToPropertyMapping={},i.propertyAliases={},i.propertyTypes={onClick:h.func},i.propertiesToReflectAsAttributes=[],i.renderProperties=["children"],i.doRender=!1,i.cloneSlots=!1,i.evaluateSlots=!1,i.renderSlots=!0,i.trimSlots=!0,i.renderUnsafe=!1,i._name="BaseWeb",i._propertyAliasIndex=void 0,i._propertiesToReflectAsAttributes=void 0,n=i,o=c()(n.prototype,"isRoot",[s],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),n);const b=y},e=>{e.exports=i},e=>{e.exports=a},e=>{e.exports=p},e=>{e.exports=r},(e,t,r)=>{r.d(t,{default:()=>h});var s=r(0),n=r(1),o=r(7),i=r.n(o),a=r(9),p=r(10),l=r(3);const c=new s.Logger({name:"web-component-wrapper-web"});class d extends l.default{constructor(...e){super(...e),this.unmountOnDisconnect=!0,this.compiledSlots={},this.preparedSlots={},this.reactRoot=null,this.rootReactInstance=null,this.self=d,this.wrapMemorizingWrapper=null,this.isWrapped=!1,this.reflectInstanceProperties=()=>{this.instance?.current&&this.instance.current.properties&&this.reflectProperties(this.instance.current.properties)}}connectedCallback(){this.applyComponentWrapper(),this.rootReactInstance=this,super.connectedCallback()}disconnectedCallback(){this.unRender("disconnected"),this.unmountOnDisconnect&&this.reactRoot?.unmount(),this.unregisterConnectionState()}reflectExternalProperties(e){this.isRoot&&super.reflectExternalProperties(e)}async render(e="unknown",t=!0){if(super.unRender("reRender",e),this.childComponentInstances=[],this.renderState.pending=!0,this.isRoot&&(this.self.pendingRenderPromises=[]),this.self.pendingRenderPromises.push(this.renderState.promise),this.rootReactInstance!==this||!this.dispatchEvent(new CustomEvent("render",{detail:{reason:e,scope:this.scope}})))return this.resolveRenderingPromiseIfSet(e,t);if(this.determineRenderScope(),0===Object.keys(this.compiledSlots).length&&this.preCompileSlots(),this.evaluateSlots({...this.scope,parentInstance:this}),this.prepareProperties(this.internalProperties),this.applyShadowRootIfNotExisting(),this.rootInstance!==this&&!this.reactRoot){let e=this.firstChild;for(;e;){const t=e.nextSibling;this.removeChild(e),e=t}}if(!this.reactRoot){const e=this.id||this.internalProperties.id||this.externalProperties.id||this.name||this.internalProperties.name||this.externalProperties.name;let t="";"string"==typeof e&&(t=e),this.reactRoot=(0,p.createRoot)(this.hostDomNode,{identifierPrefix:t})}(0,a.flushSync)((()=>{this.reactRoot?.render((0,o.createElement)(this.self.content,this.internalProperties)),this.resolveRenderingPromiseIfSet(e,t)})),t&&await this.renderState.promise}setPropertyValue(e,t){this.reflectProperties({[e]:(0,s.copy)(t,!1,1)}),this.setInternalPropertyValue(e,(0,s.copy)(t,!1,1))}setInternalPropertyValue(e,t){null===t?t=n.NullSymbol:void 0===t&&(t=n.UndefinedSymbol),super.setInternalPropertyValue(e,t)}preCompileDomNodes(e,t={},r=!1){if(1===(e=e.filter((e=>e.nodeType!==Node.TEXT_NODE||"string"==typeof e.nodeValue&&""!==e.nodeValue.trim()))).length)return this.preCompileDomNode(e[0],t,r);let s=1;const n=[];for(const o of e){const e=this.preCompileDomNode(o,t,r,s.toString());n.push(e),s+=1}return r?e=>(...t)=>{const r=[];for(const s of n){const n=s(e);"function"==typeof n&&r.push(n(...t))}return(0,o.createElement)(o.Fragment,{children:r})}:n}preCompileDomNode(e,t={},r=!1,n){if(r){const r=this.preCompileDomNode(e,{...t,data:void 0,firstArgument:void 0,firstParameter:void 0,options:void 0,scope:void 0,parameters:void 0},!1,n);return e=>(...t)=>{const s=t.length>0?t[0]:null;return r({...e,data:s,firstArgument:s,firstParameter:s,options:s,scope:s,parameters:t})}}if(e.nodeType===Node.TEXT_NODE){const t="string"==typeof e.nodeValue?e.nodeValue.trim():"",r=n&&t?(0,o.createElement)(o.Fragment,{children:t,key:n}):t||null;return()=>r}if(!e.getAttributeNames)return()=>null;const i={};let a;const p=this.self.isReactComponent(e);p?(e.determineRenderScope(),0===Object.keys(this.compiledSlots).length&&e.preCompileSlots(),n&&!Object.prototype.hasOwnProperty.call(i,"key")&&(i.key=n),a=e.constructor.content):(i.key=n,a=e.tagName.toLowerCase());let l=Object.keys(t);const d={};for(const r of e.getAttributeNames()){let n=e.getAttribute(r);if(null===n)continue;let o=!1,a="";if(r.startsWith("data-bind-")?a=r.substring(10):r.startsWith("bind-")&&(a=r.substring(5)),a.startsWith("attribute-")||"attributes"===a||a.startsWith("property-")||"properties"===a){const{error:t,originalScopeNames:i,templateFunction:p}=(0,s.compile)(n,l);if(t){c.warn("Error occurred during compiling given attribute",`binding "${r}" on node:`,e,t);continue}"attributes"===a||"properties"===a?o=!0:a=a.startsWith("attribute-")?a.substring(10):a.substring(9),n={originalScopeNames:i,templateFunction:p.bind(this)}}else if(a.startsWith("on-")){a=(0,s.delimitedToCamelCase)(a),Object.prototype.hasOwnProperty.call(t,"event")||(l=[...l,"event"]),Object.prototype.hasOwnProperty.call(t,"parameters")||(l=[...l,"parameters"]);const{error:o,originalScopeNames:i,scopeNames:p,templateFunction:d}=(0,s.compile)(n,l,!0);if(o){c.warn("Error occurred during compiling given event",`binding "${r}" on node:`,e,o);continue}const h=d.bind(this);n=(...o)=>{t.event=o[0],t.parameters=o;try{h(...i.map((e=>t[e])))}catch(t){c.warn("Error occurred during processing given",`event binding "${r}" on node: `,e,`Given expression "${n}" could`,"not be evaluated with given scope names",`"${p.join('", "')}":`,(0,s.represent)(t))}}}else a=r;const h={class:"className",for:"htmlFor"};Object.prototype.hasOwnProperty.call(h,a)&&(a=h[a]),a=(0,s.delimitedToCamelCase)(a),n?.originalScopeNames?d[o?"":a]=n:p||(i[a]=n)}if(!p){const r=Array.from(e.childNodes);r.length&&(i.children=this.preCompileDomNodes(r,t))}return r=>{(r={...t,...r}).scope=r;let s={...i};for(const[e,{originalScopeNames:t,templateFunction:n}]of Object.entries(d)){const o=n(...t.map((e=>r[e])));""===e?s={...s,...o}:s[e]=o}return Object.prototype.hasOwnProperty.call(s,"innerHTML")&&(s.dangerouslySetInnerHTML={__html:s.innerHTML},delete s.children,delete s.innerHTML),Object.prototype.hasOwnProperty.call(s,"textContent")?(s.children=s.textContent,delete s.textContent):p?(s={...e.internalProperties,...s},r={...s,...r,parentInstance:e},e.evaluateSlots(r),e.prepareProperties(s)):s.children&&(s.children=this.evaluatePreCompiledDomNodes(s.children,r)),(0,o.createElement)(a,s)}}evaluatePreCompiledDomNodes(e,t={}){if(!Array.isArray(e))return e(t);if(1===e.length)return e[0](t);const r=[];for(const s of e){const e=s(t);e&&r.push(e)}return r}preCompileSlots(){for(const e in this.slots)this.slots[e]&&"default"!==e&&(this.compiledSlots[e]=this.preCompileDomNode(this.slots[e],{...this.scope,parentInstance:this},[n.func,"function"].includes(this.self.propertyTypes[e])));this.slots.default&&this.slots.default.length>0&&(this.compiledSlots.children=this.preCompileDomNodes(this.slots.default,{...this.scope,parentInstance:this},[n.func,"function"].includes(this.self.propertyTypes.children)))}evaluateSlots(e){this.preparedSlots={};for(const t in this.compiledSlots)Object.prototype.hasOwnProperty.call(this.compiledSlots,t)&&("children"===t?this.preparedSlots.children=this.evaluatePreCompiledDomNodes(this.compiledSlots[t],e):this.preparedSlots[t]=this.compiledSlots[t](e))}static isReactComponent(e){const t=e.constructor;return"object"==typeof t.content&&(!t.attachWebComponentAdapterIfNotExists||"react"===t.content.webComponentAdapterWrapped)}determineRootBinding(){super.determineRootBinding();let e=this.parentNode;for(;e;){if(this.self.isReactComponent(e)){this.rootReactInstance=e;break}e=e.parentNode}}applyComponentWrapper(){if("string"==typeof this.self.content||this.isWrapped)return;this.isWrapped=!0;const e=this.self.content.wrapped||this.self.content;this.self.content.webComponentAdapterWrapped?this.wrapMemorizingWrapper&&(this.self.content=(0,o.memo)(this.self.content),this.self.content.wrapped=e):this.self.attachWebComponentAdapterIfNotExists?(this.self.content.displayName||(this.self.content.displayName=this.self._name),this.self.content=(0,o.forwardRef)(((t,r)=>((0,o.useImperativeHandle)(r,(()=>({properties:t})),[t]),(0,o.createElement)(e,t)))),(this.wrapMemorizingWrapper||null===this.wrapMemorizingWrapper)&&(this.self.content=(0,o.memo)(this.self.content)),this.self.content.wrapped=e,this.self.content.webComponentAdapterWrapped="react"):this.wrapMemorizingWrapper&&(this.self.content=(0,o.memo)(this.self.content),this.self.content.wrapped=e)}prepareProperties(e){(0,s.extend)(e,this.preparedSlots),this.self.removeKnownUnwantedPropertyKeys(this.self,e),e.ref||(this.instance=(0,o.createRef)(),e.ref=e=>{this.instance?this.instance.current=e:this.instance={current:e},this.reflectInstanceProperties()})}static removeKnownUnwantedPropertyKeys(e,t){if("string"!=typeof e.content)for(const r of["isRoot","isTrusted","__composed"])Object.prototype.hasOwnProperty.call(t,r)&&(Object.prototype.hasOwnProperty.call(e.content,"propTypes")&&!Object.prototype.hasOwnProperty.call(e.content.propTypes,r)||Object.prototype.hasOwnProperty.call(e.content,"wrapped")&&Object.prototype.hasOwnProperty.call(e.content.wrapped,"propTypes")&&!Object.prototype.hasOwnProperty.call(e.content.wrapped.propTypes,r))&&delete t[r]}}d.attachWebComponentAdapterIfNotExists=!0,d.content="div",d.react=i(),d._name="ReactWebComponent";const h=d},e=>{e.exports=n},e=>{e.exports=o},(e,t,r)=>{r.d(t,{default:()=>o});var s=r(0);const n=r(8).default,o=(e,t="NoName",r={})=>{var o,i;const a=e._name||e.___types?.name?.name||t.replace(/^(.*\/+)?([^/]+)\.tsx$/,"$2");r.propTypes&&(e.propTypes=r.propTypes);const p=e.propTypes||{},l=r.propertyAliases||e.propertyAliases||{},c=(0,s.unique)(Object.keys(p).concat(Object.keys(l)).concat(Object.values(l)));let d=r.propertiesToReflectAsAttributes||e.propertiesToReflectAsAttributes||[];if(n.propertiesToReflectAsAttributes)if(Array.isArray(d))d=[...n.propertiesToReflectAsAttributes,...d];else if(d instanceof Map)for(const e of n.propertiesToReflectAsAttributes)d.set(e,n.propertyTypes[e]);else if("object"==typeof d)for(const e of n.propertiesToReflectAsAttributes)d[e]=n.propertyTypes[e];const h=c.map((e=>(0,s.camelCaseToDelimited)(e)));class u extends n{constructor(...t){var s;super(...t),this.self=u,this.internalProperties=r.internalProperties?{...r.internalProperties}:e.internalProperties?{...e.internalProperties}:{},this.unmountOnDisconnect=null===(s=r.unmountOnDisconnect)||void 0===s||s}}u.attachWebComponentAdapterIfNotExists="boolean"!=typeof r.attachWebComponentAdapterIfNotExists||r.attachWebComponentAdapterIfNotExists,u.content=e,u.observedAttributes=n.observedAttributes.concat(h).concat(h.map((e=>`-${e}`))),u.controllableProperties=e.controllableProperties||r.controllableProperties||[],u.eventToPropertyMapping=null===r.eventToPropertyMapping?r.eventToPropertyMapping:r.eventToPropertyMapping?{...r.eventToPropertyMapping}:null===e.eventToPropertyMapping?e.eventToPropertyMapping:e.eventToPropertyMapping?{...e.eventToPropertyMapping}:{},u.propertyAliases={...n.propertyAliases,...l},u.propertiesToReflectAsAttributes=d,u.propertyTypes={...n.propertyTypes,...p},u.renderProperties=null!==(o=null!==(i=r.renderProperties)&&void 0!==i?i:e.renderProperties)&&void 0!==o?o:n.renderProperties,u._name=a;return{component:u,register:(e=(0,s.camelCaseToDelimited)(a))=>{customElements.define(e,u)}}}},,e=>{e.exports=s}],c={};function d(e){var t=c[e];if(void 0!==t)return t.exports;var r=c[e]={exports:{}};return l[e](r,r.exports,d),r.exports}d.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return d.d(t,{a:t}),t},d.d=(e,t)=>{for(var r in t)d.o(t,r)&&!d.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var h={};d.r(h);var u=d(0),f=d(1),m=d(7),y=d(13),b=d(11),g=d(8),v=d(3);return(0,y.describe)("Web",(()=>{(0,y.test)("constructor",(()=>{class e extends v.default{constructor(...e){super(...e),this.onClick=void 0}}e.observedAttributes=["is-root","on-click","on-event"],(0,y.expect)(e).toHaveProperty("content"),(0,y.expect)(e).toHaveProperty("observedAttributes"),customElements.define("test-web",e);const t=document.createElement("test-web");(0,y.expect)(t).not.toHaveProperty("clicked"),t.setAttribute("on-click","this.clicked = true"),(0,y.expect)(t).not.toHaveProperty("clicked"),document.body.appendChild(t),(0,y.expect)(t).toHaveProperty("rootInstance",t),(0,y.expect)(t).not.toHaveProperty("clicked"),t.onClick(),(0,y.expect)(t).toHaveProperty("clicked",!0);const r=y.jest.fn();t.addEventListener("click",r),(0,y.expect)(r).not.toHaveBeenCalled(),t.onClick(),(0,y.expect)(r).toHaveBeenCalled()}))})),(0,y.describe)("ReactWeb",(()=>{(0,y.test)("constructor",(async()=>{let e,t="initial";class r extends g.default{constructor(...e){super(...e),this.self=r,this.onClick=void 0,this.onEvent=void 0}}r._name="Test",r.content=({onEvent:r,property:s=t})=>(e=r,t=s,(0,m.createElement)("div",{className:s})),r.observedAttributes=["is-root","on-click","on-event"],r.propertyTypes={...v.default.propertyTypes,onEvent:f.func,property:f.string},(0,y.expect)(r).toHaveProperty("content"),(0,y.expect)(r).toHaveProperty("observedAttributes"),customElements.define("test-react",r);const s=document.createElement("test-react");(0,y.expect)(s).not.toHaveProperty("clicked"),s.setAttribute("on-click","this.clicked = true"),(0,y.expect)(s).toHaveProperty("onClick"),(0,y.expect)(s).not.toHaveProperty("clicked"),s.setAttribute("on-event","this.eventHappened = true"),(0,y.expect)(s).toHaveProperty("onEvent"),(0,y.expect)(e).not.toBeDefined(),document.body.appendChild(s),(0,y.expect)(s).toHaveProperty("rootInstance",s),(0,y.expect)(s).toHaveProperty("reactRoot"),(0,y.expect)(e).not.toBeDefined(),await(0,u.timeout)(),(0,y.expect)(e).toBeDefined(),(0,y.expect)(s).not.toHaveProperty("eventHappened"),e&&e(),(0,y.expect)(s).toHaveProperty("eventHappened",!0);const n=y.jest.fn();s.addEventListener("event",n),(0,y.expect)(n).not.toHaveBeenCalled(),e&&e(),(0,y.expect)(n).toHaveBeenCalled(),(0,y.expect)(s).not.toHaveProperty("clicked"),s.onClick(),(0,y.expect)(s).toHaveProperty("clicked",!0);const o=y.jest.fn();s.addEventListener("click",o),(0,y.expect)(o).not.toHaveBeenCalled(),s.onClick(),(0,y.expect)(o).toHaveBeenCalled(),(0,y.expect)(t).toStrictEqual("initial"),(0,y.expect)(document.querySelector("div")?.className).toStrictEqual("initial"),s.property="test",await(0,u.timeout)(),(0,y.expect)(s).toHaveProperty("property","test"),(0,y.expect)(document.querySelector("div")?.className).toStrictEqual("test")}))})),(0,y.describe)("index",(()=>{(0,y.test)("wrapAsWebComponent",(()=>{const e=(0,b.default)((()=>(0,m.createElement)("div")),"TestComponent",{eventToPropertyMapping:{},propertyAliases:{alternateName:"name"},propertiesToReflectAsAttributes:[],propTypes:{name:"string"}});(0,y.expect)(e).toHaveProperty("component"),(0,y.expect)(e).toHaveProperty("register"),(0,y.expect)(e.component).toHaveProperty("_name","TestComponent"),(0,y.expect)(e.component).toHaveProperty("propertyTypes.name","string"),(0,y.expect)(e.component).toHaveProperty("propertiesToReflectAsAttributes",["isRoot"]),(0,y.expect)(e.component).toHaveProperty("eventToPropertyMapping",{})}))})),h})()));
|