text: {var component={name:"submit",version:[3,1,1],ccm:{url:"https://ccmjs.github.io/ccm/versions/ccm-16.5.1.js",integrity:"sha384-KZGgSb/NYKtO8XoAg5kU8K9O+dx3rbTwExHW1H6/b5JodEnfNIUdMCmTE/PAF0Of",crossorigin:"anonymous"},config:{data:{store:["ccm.store"]}},Instance:function(){let self=this;let my;let $;const inputs=[];let element;this.ready=(callback=>{$=self.ccm.helper;my=$.privatize(self);if(!my.inner)return callback();if(typeof my.inner==="string"){const div=document.createElement("div");div.innerHTML=my.inner;my.inner=div}if(!$.isElementNode(my.inner))my.inner=$.html(my.inner);[...my.inner.querySelectorAll("input")].map(input=>{const type=input.getAttribute("type");switch(type){case"button":case"checkbox":case"color":case"date":case"datetime-local":case"email":case"file":case"hidden":case"image":case"month":case"number":case"password":case"radio":case"range":case"reset":case"search":case"submit":case"tel":case"text":case"time":case"url":case"week":break;default:if(!my[type])return;let loading=$.loading(self);inputs.push({elem:loading,type:type,name:input.name});input.parentNode.replaceChild(loading,input)}});self.logger&&self.logger.log("ready",$.clone(my));callback()});this.start=(callback=>{if(!my.inner){callback&&callback();return}const inner=my.inner.cloneNode(true);my.content?my.content.start({inner:inner},proceed):proceed();function proceed(content){$.setContent(self.element,content?content.root:inner);element=content?content.element:self.element;const submit=element.querySelector("input[type=submit]");if(submit){submit.disabled=true;const form=document.createElement("form");element.parentNode.replaceChild(form,element);form.appendChild(element);form.onsubmit=(()=>{if(self.user)self.user.login(proceed);else proceed();return false;function proceed(){let results=self.getValue();if(self.logger)self.logger.log("submit",results);self.onfinish&&$.onFinish(self,results)}})}$.dataset(my.data,dataset=>{self.logger&&self.logger.log("start",$.clone(dataset));$.fillForm(element,dataset);let counter=1;inputs.map(input=>{counter++;my[input.type].start({data:{store:["ccm.store",{config:dataset[input.name]}],key:"config"}},instance=>{input.instance=instance;input.elem.parentNode.replaceChild(instance.root,input.elem);check()})});check();function check(){counter--;if(counter>0)return;if(submit)submit.disabled=false;callback&&callback()}})}});this.getValue=(()=>{let results=$.formData(element);inputs.map(input=>results[input.name]=input.instance.getValue());return $.clone(results)})}};function p(){window.ccm[v].component(component)}const f="ccm."+component.name+(component.version?"-"+component.version.join("."):"")+".js";if(window.ccm&&null===window.ccm.files[f])window.ccm.files[f]=component;else{const n=window.ccm&&window.ccm.components[component.name];n&&n.ccm&&(component.ccm=n.ccm),"string"===typeof component.ccm&&(component.ccm={url:component.ccm});var v=component.ccm.url.split("/").pop().split("-");if(v.length>1?(v=v[1].split("."),v.pop(),"min"===v[v.length-1]&&v.pop(),v=v.join(".")):v="latest",window.ccm&&window.ccm[v])p();else{const e=document.createElement("script");document.head.appendChild(e),component.ccm.integrity&&e.setAttribute("integrity",component.ccm.integrity),component.ccm.crossorigin&&e.setAttribute("crossorigin",component.ccm.crossorigin),e.onload=function(){p(),document.head.removeChild(e)},e.src=component.ccm.url}}}