"use strict";(self.webpackChunklernplattform_frontend=self.webpackChunklernplattform_frontend||[]).push([[92078],{"common/aurelia-attributes/attach-to":function(t,e,i){var o,n=this&&this.__decorate||function(t,e,i,o){var n,s=arguments.length,a=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(a=(s<3?n(a):s>3?n(e,i,a):n(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a},s=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(e,"__esModule",{value:!0}),e.AttachToCustomAttribute=void 0;const a=i("aurelia-framework");let r=class{constructor(t){this.element=t,this.originalPositionAnchor=document.createComment("attach-to"),this.value=null}attached(){this.attachToTarget()}detached(){this.originalPositionAnchor.remove(),this.element.remove()}valueChanged(){this.element.isConnected&&this.attachToTarget()}attachToTarget(){this.value?(this.originalPositionAnchor.isConnected||this.element.parentElement.insertBefore(this.originalPositionAnchor,this.element),this.value.append(this.element)):this.originalPositionAnchor.isConnected&&this.originalPositionAnchor.replaceWith(this.element)}};r=n([(0,a.autoinject)(),s("design:paramtypes",["function"==typeof(o="undefined"!=typeof Element&&Element)?o:Object])],r),e.AttachToCustomAttribute=r},"common/aurelia-attributes/attached-emitter":function(t,e,i){var o,n=this&&this.__decorate||function(t,e,i,o){var n,s=arguments.length,a=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(a=(s<3?n(a):s>3?n(e,i,a):n(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a},s=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(e,"__esModule",{value:!0}),e.AttachedEmitterCustomAttribute=void 0;const a=i("aurelia-framework"),r=i(707359);let c=class{constructor(t){this.element=t,this.name=""}attached(){r.DomUtils.fireEvent(this.element,{name:"attached",detail:{name:this.name},bubbles:!0})}};n([(0,a.bindable)({primaryProperty:!0}),s("design:type",Object)],c.prototype,"name",void 0),c=n([a.autoinject,s("design:paramtypes",["function"==typeof(o="undefined"!=typeof Element&&Element)?o:Object])],c),e.AttachedEmitterCustomAttribute=c},"common/aurelia-attributes/class-list":function(t,e,i){i.r(e),i.d(e,{ClassListCustomAttribute:function(){return r}});var o,n=i("aurelia-framework"),s=i(969743),a=i.n(s);let r=class{constructor(t){this.element=t,this.currentClasses=[]}attached(){this.element.classList.add(...this.currentClasses)}detached(){this.element.classList.remove(...this.currentClasses)}valueChanged(t,e){if(this.currentClasses=t,!this.element.isConnected)return;const i=a()(t,null!=e?e:[]),o=a()(null!=e?e:[],t);this.element.classList.remove(...o),this.element.classList.add(...i)}};r=function(t,e,i,o){var n,s=arguments.length,a=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(a=(s<3?n(a):s>3?n(e,i,a):n(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a}([(0,n.autoinject)(),function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}("design:paramtypes",["function"==typeof(o="undefined"!=typeof Element&&Element)?o:Object])],r)},"common/aurelia-attributes/href-ext":function(t,e,i){i.r(e),i.d(e,{HrefExtCustomAttribute:function(){return u}});var o,n,s=i("aurelia-framework"),a=i(147098),r=i(227270),c=i(707359);let u=class{constructor(t,e){this.value="",this.disposables=[],this.domElement=t,this.subscriptionManager=e.createSubscriptionManager()}attached(){this.valueChanged()}detached(){this.uninstall()}valueChanged(){this.domElement.isConnected&&(this.uninstall(),this.value&&this.install(this.value))}install(t){r.AppUtils.isMobileApp?this.subscriptionManager.subscribeToDomEvent(this.domElement,"click",(()=>r.AppUtils.openExternal(t))):this.disposables.push(c.DomUtils.applyAttributeModification(this.domElement,"href",t,{force:!1}),c.DomUtils.applyAttributeModification(this.domElement,"target","_blank",{force:!1}))}uninstall(){this.disposables.forEach((t=>t.dispose())),this.disposables=[],this.subscriptionManager.disposeSubscriptions()}};u=function(t,e,i,o){var n,s=arguments.length,a=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(a=(s<3?n(a):s>3?n(e,i,a):n(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a}([(0,s.autoinject)(),function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}("design:paramtypes",["function"==typeof(o="undefined"!=typeof Element&&Element)?o:Object,"function"==typeof(n=void 0!==a.SubscriptionManagerService&&a.SubscriptionManagerService)?n:Object])],u)},"common/aurelia-attributes/index":function(t,e,i){function o(t){t.globalResources("common/aurelia-attributes/attach-to"),t.globalResources("common/aurelia-attributes/attached-emitter"),t.globalResources("common/aurelia-attributes/class-list"),t.globalResources("common/aurelia-attributes/href-ext"),t.globalResources("common/aurelia-attributes/real-touch"),t.globalResources("common/aurelia-attributes/stop-propagation"),t.globalResources("common/aurelia-attributes/use-as-button")}i.r(e),i.d(e,{configure:function(){return o}}),i(516566)},"common/aurelia-attributes/real-touch":function(t,e,i){i.r(e),i.d(e,{RealTouchCustomAttribute:function(){return u}});var o,n,s=i("aurelia-framework"),a=i(147098),r=function(t,e,i,o){var n,s=arguments.length,a=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(a=(s<3?n(a):s>3?n(e,i,a):n(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a},c=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let u=class{constructor(t,e){this.onTouchCallback=null,this.touchStartPosition={x:0,y:0},this.touchEndPosition={x:0,y:0},this.touchDistanceTolerance=10,this.subscriptionManager=e.createSubscriptionManager(),this.domElement=t}bind(){this.subscriptionManager.subscribeToDomEvent(this.domElement,"touchstart",(t=>{const e=t;this.touchStartPosition={x:e.touches[0].pageX,y:e.touches[0].pageY}})),this.subscriptionManager.subscribeToDomEvent(this.domElement,"touchend",(t=>{const e=t;this.touchEndPosition={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY},this.isScroll()||null===this.onTouchCallback||this.onTouchCallback(e)}))}unbind(){this.subscriptionManager.disposeSubscriptions()}isScroll(){return Math.sqrt(Math.pow(this.touchEndPosition.x-this.touchStartPosition.x,2)+Math.pow(this.touchEndPosition.y-this.touchStartPosition.y,2))>this.touchDistanceTolerance}};r([(0,s.bindable)(),c("design:type",Object)],u.prototype,"onTouchCallback",void 0),u=r([(0,s.autoinject)(),c("design:paramtypes",["function"==typeof(o="undefined"!=typeof Element&&Element)?o:Object,"function"==typeof(n=void 0!==a.SubscriptionManagerService&&a.SubscriptionManagerService)?n:Object])],u)},"common/aurelia-attributes/stop-propagation":function(t,e,i){var o,n,s=this&&this.__decorate||function(t,e,i,o){var n,s=arguments.length,a=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(a=(s<3?n(a):s>3?n(e,i,a):n(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a},a=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(e,"__esModule",{value:!0}),e.StopPropagationCustomAttribute=void 0;const r=i("aurelia-framework"),c=i(147098);let u=class{constructor(t,e){this.subscriptionManager=e.createSubscriptionManager(),this.domElement=t}bind(){this.subscriptionManager.subscribeToDomEvent(this.domElement,"click",(t=>{t.stopPropagation()}))}unbind(){this.subscriptionManager.disposeSubscriptions()}};u=s([(0,r.autoinject)(),a("design:paramtypes",["function"==typeof(o="undefined"!=typeof Element&&Element)?o:Object,"function"==typeof(n=void 0!==c.SubscriptionManagerService&&c.SubscriptionManagerService)?n:Object])],u),e.StopPropagationCustomAttribute=u},"common/aurelia-attributes/use-as-button":function(t,e,i){var o,n,s=this&&this.__decorate||function(t,e,i,o){var n,s=arguments.length,a=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(a=(s<3?n(a):s>3?n(e,i,a):n(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a},a=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(e,"__esModule",{value:!0}),e.UseAsButtonCustomAttribute=void 0;const r=i("aurelia-framework"),c=i(147098),u=i(865969),l=i(707359);let f=class{constructor(t,e){this.value="",this.disposables=[],this.element=t,this.subscriptionManager=e.createSubscriptionManager()}attached(){this.valueChanged()}detached(){this.subscriptionManager.disposeSubscriptions()}fireClickEvent(){l.DomUtils.fireEvent(this.element,{name:"click",bubbles:!0})}valueChanged(){this.element.isConnected&&(this.uninstall(),this.getValue()&&this.install())}install(){this.disposables.push(l.DomUtils.applyAttributeModification(this.element,"tabindex","0",{force:!1}),l.DomUtils.applyAttributeModification(this.element,"role","button",{force:!1}),l.DomUtils.applyAttributeModification(this.element,"href","javascript:void(0)",{force:!0})),this.subscriptionManager.subscribeToDomEvent(this.element,"keyup",(t=>{const e=t,i=[u.KeyboardKey.Space];"a"!==this.element.tagName.toLowerCase()&&i.push(u.KeyboardKey.Enter),"key"in e&&i.includes(e.key)&&this.fireClickEvent()}))}uninstall(){this.disposables.forEach((t=>t.dispose())),this.disposables=[],this.subscriptionManager.disposeSubscriptions()}getValue(){return""===this.value||!!this.value}};f=s([(0,r.autoinject)(),a("design:paramtypes",["function"==typeof(o="undefined"!=typeof Element&&Element)?o:Object,"function"==typeof(n=void 0!==c.SubscriptionManagerService&&c.SubscriptionManagerService)?n:Object])],f),e.UseAsButtonCustomAttribute=f},920668:function(t,e,i){e.Y=void 0;const o=i(399180);e.Y=class{constructor(t){this.context=t,this.bufferSourceNode=null,this.src=null,this.audioBuffer=null,this.endedCallback=null,this.volumeNode=t.createGain(),this.volumeNode.gain.value=1,this.volumeNode.connect(t.destination)}dispose(){this.destroyBufferSource(),this.volumeNode.disconnect(),this.endedCallback=null}async play(t,e=0){if(this.destroyBufferSource(),t!==this.src&&(this.src=t,this.audioBuffer=null,this.audioBuffer=await this.loadAudio(t),t!==this.src))return;const i=this.context.createBufferSource();i.buffer=this.audioBuffer,i.connect(this.volumeNode),i.start(this.context.currentTime,e),i.onended=()=>{var t;return null===(t=this.endedCallback)||void 0===t?void 0:t.call(this)},this.bufferSourceNode=i}stop(){this.destroyBufferSource()}setVolume(t){this.volumeNode.gain.value=t}onEnded(t){this.endedCallback=t}destroyBufferSource(){this.bufferSourceNode&&(this.bufferSourceNode.onended=null,this.bufferSourceNode.stop(this.context.currentTime),this.bufferSourceNode.disconnect(),this.bufferSourceNode=null)}async loadAudio(t){const e=await o.HttpRequestUtils.getArrayBuffer({url:t});return this.context.decodeAudioData(e)}}},423575:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationToken=void 0,e.CancellationToken=class{constructor(t){this.onCancel=t,this._canceled=!1}get canceled(){return this._canceled}cancel(){var t;this.canceled||(this._canceled=!0,null===(t=this.onCancel)||void 0===t||t.call(this))}}},793234:function(t,e,i){i.d(e,{M:function(){return o}});class o{constructor(){}static get deviceReady(){return o.deviceReadyPromise}}o.deviceReadyPromise=new Promise((t=>{document.addEventListener("deviceready",(()=>{t(!0)}),!1)}))},597228:function(t,e,i){i.d(e,{A:function(){return n}});var o=i(699464);class n extends o.WebSocketConnection{constructor(t,e,i,o){super(e,i,o),this.stateGetter=t}emit(t,e,i){const o=Object.create(null,{emit:{get:()=>super.emit}});return n=this,s=void 0,r=function*(){const{distinarConnectionData:n}=yield this.stateGetter();if(null==n)return;const s={connection:n,data:e};return null==i?o.emit.call(this,t,s):o.emit.call(this,t,s,i)},new((a=void 0)||(a=Promise))((function(t,e){function i(t){try{c(r.next(t))}catch(t){e(t)}}function o(t){try{c(r.throw(t))}catch(t){e(t)}}function c(e){var n;e.done?t(e.value):(n=e.value,n instanceof a?n:new a((function(t){t(n)}))).then(i,o)}c((r=r.apply(n,s||[])).next())}));var n,s,a,r}}}}]);