@htmlbricks/hb-input-datetime 0.20.10 → 0.20.12

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@htmlbricks/hb-input-datetime",
3
3
  "displayName": "Svelte-Bootstrap Date Input WebComponent",
4
4
  "description": "Svelte-Bootstrap Date Input WebComponent",
5
- "version": "0.20.10",
5
+ "version": "0.20.12",
6
6
  "main": "release/release.js",
7
7
  "publishConfig": {
8
8
  "access": "public"
@@ -75,9 +75,9 @@
75
75
  "webcomponents"
76
76
  ],
77
77
  "contributors": [],
78
- "gitHead": "2e56f9077c0850aec6893d44a396cd7b4f894fb1",
78
+ "gitHead": "89b7167e53c12fd897008a70ab8dc3380796a8dc",
79
79
  "dependencies": {
80
- "@htmlbricks/hb-input-date": "^0.20.10",
81
- "@htmlbricks/hb-input-number": "^0.20.10"
80
+ "@htmlbricks/hb-input-date": "^0.20.12",
81
+ "@htmlbricks/hb-input-number": "^0.20.12"
82
82
  }
83
83
  }
@@ -308,5 +308,5 @@
308
308
  "size": {},
309
309
  "iifePath": "release/release.js",
310
310
  "repoName": "@htmlbricks/hb-input-datetime",
311
- "version": "0.20.10"
311
+ "version": "0.20.12"
312
312
  }
@@ -1,2 +1,2 @@
1
- var release=function(){"use strict";function e(){}function t(e){return e()}function n(){return Object.create(null)}function o(e){e.forEach(t)}function r(e){return"function"==typeof e}function a(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function i(e,t){e.appendChild(t)}function s(e,t,n){e.insertBefore(t,n||null)}function l(e){e.parentNode&&e.parentNode.removeChild(e)}function d(e){return document.createElement(e)}function c(e){return document.createTextNode(e)}function u(){return c(" ")}function f(){return c("")}function m(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function p(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function b(e,t,n){t in e?e[t]="boolean"==typeof e[t]&&""===n||n:p(e,t,n)}function h(e){const t={};for(const n of e)t[n.name]=n.value;return t}let v;function g(e){v=e}function y(){if(!v)throw new Error("Function called outside component initialization");return v}function w(){const e=y();return(t,n,{cancelable:o=!1}={})=>{const r=e.$$.callbacks[t];if(r){const a=function(e,t,{bubbles:n=!1,cancelable:o=!1}={}){const r=document.createEvent("CustomEvent");return r.initCustomEvent(e,n,o,t),r}(t,n,{cancelable:o});return r.slice().forEach((t=>{t.call(e,a)})),!a.defaultPrevented}return!0}}const $=[],k=[];let x=[];const _=[],S=Promise.resolve();let E=!1;function T(e){x.push(e)}const C=new Set;let N=0;function O(){if(0!==N)return;const e=v;do{try{for(;N<$.length;){const e=$[N];N++,g(e),V(e.$$)}}catch(e){throw $.length=0,N=0,e}for(g(null),$.length=0,N=0;k.length;)k.pop()();for(let e=0;e<x.length;e+=1){const t=x[e];C.has(t)||(C.add(t),t())}x.length=0}while($.length);for(;_.length;)_.pop()();E=!1,C.clear(),g(e)}function V(e){if(null!==e.fragment){e.update(),o(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(T)}}const L=new Set;function D(e,t){const n=e.$$;null!==n.fragment&&(!function(e){const t=[],n=[];x.forEach((o=>-1===e.indexOf(o)?t.push(o):n.push(o))),n.forEach((e=>e())),x=t}(n.after_update),o(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function M(e,t){-1===e.$$.dirty[0]&&($.push(e),E||(E=!0,S.then(O)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function A(a,i,s,d,c,u,f,m=[-1]){const p=v;g(a);const b=a.$$={fragment:null,ctx:[],props:u,update:e,not_equal:c,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(i.context||(p?p.$$.context:[])),callbacks:n(),dirty:m,skip_bound:!1,root:i.target||p.$$.root};f&&f(b.root);let h=!1;if(b.ctx=s?s(a,i.props||{},((e,t,...n)=>{const o=n.length?n[0]:t;return b.ctx&&c(b.ctx[e],b.ctx[e]=o)&&(!b.skip_bound&&b.bound[e]&&b.bound[e](o),h&&M(a,e)),t})):[],b.update(),h=!0,o(b.before_update),b.fragment=!!d&&d(b.ctx),i.target){if(i.hydrate){const e=function(e){return Array.from(e.childNodes)}(i.target);b.fragment&&b.fragment.l(e),e.forEach(l)}else b.fragment&&b.fragment.c();i.intro&&((y=a.$$.fragment)&&y.i&&(L.delete(y),y.i(w))),function(e,n,a,i){const{fragment:s,after_update:l}=e.$$;s&&s.m(n,a),i||T((()=>{const n=e.$$.on_mount.map(t).filter(r);e.$$.on_destroy?e.$$.on_destroy.push(...n):o(n),e.$$.on_mount=[]})),l.forEach(T)}(a,i.target,i.anchor,i.customElement),O()}var y,w;g(p)}let j;"function"==typeof HTMLElement&&(j=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:e}=this.$$;this.$$.on_disconnect=e.map(t).filter(r);for(const e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(e,t,n){this[e]=n}disconnectedCallback(){o(this.$$.on_disconnect)}$destroy(){D(this,1),this.$destroy=e}$on(t,n){if(!r(n))return e;const o=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return o.push(n),()=>{const e=o.indexOf(n);-1!==e&&o.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}});var q,z=(function(e,t){t.__esModule=!0,t.LanguageTranslator=t.addComponent=t.getChildStyleToPass=void 0,t.getChildStyleToPass=function(e,t){var n,o,r="";if(e&&(null==t?void 0:t.length)&&(null===(n=Object.keys(e))||void 0===n?void 0:n.length)&&(null===(o=null==t?void 0:t.filter((function(t){return Object.keys(e).includes(t.name)})))||void 0===o?void 0:o.length))for(var a=function(n){(null==t?void 0:t.filter((function(t){return t.name===n&&t.defaultValue!==e[n]})))&&(r+="".concat(n,":").concat(e[n],";"))},i=0,s=Object.keys(e);i<s.length;i++)a(s[i]);return r},t.addComponent=function(e){var t,n=(null===(t=null==e?void 0:e.repoName.split("/"))||void 0===t?void 0:t[1])||(null==e?void 0:e.repoName);if(!n)throw new Error("wrong componentPath "+(null==e?void 0:e.repoName));if(!(null==e?void 0:e.version))throw new Error("wrong version "+(null==e?void 0:e.version));var o=(null==e?void 0:e.iifePath)||"release/release.js";if(!document.getElementById(n+"-script"))try{var r=document.createElement("script");r.id=n+"-script",r.src="https://cdn.jsdelivr.net/npm/".concat(e.repoName,"@").concat(e.version,"/").concat(o),(null==e?void 0:e.local)&&location.href.includes("localhost")&&(r.src="".concat(e.local)),document.head.appendChild(r)}catch(e){console.warn(e)}};var n=function(){function e(e){if(!(null==e?void 0:e.dictionary))throw new Error("no dictionary provided");this.dictionary=e.dictionary,this.setLang(null==e?void 0:e.lang)}return e.prototype.setLang=function(t){t||(t=e.getDefaultLang()),this.lang=t},e.prototype.translateWord=function(t,n){return e.getDictionaryWord(t,this.dictionary,n||this.lang)},e.prototype.translateDate=function(t,n,o){return e.formatDate(t,n,o||this.lang)},e.getDefaultLang=function(){var e,t,n,o,r,a="en";return(null===navigator||void 0===navigator?void 0:navigator.languages)&&(null===(n=null===(t=null===(e=navigator.languages[0])||void 0===e?void 0:e.split("-")[0])||void 0===t?void 0:t.toLowerCase())||void 0===n?void 0:n.length)&&(a=null===(r=null===(o=navigator.languages[0])||void 0===o?void 0:o.split("-")[0])||void 0===r?void 0:r.toLowerCase()),a},e.getDictionaryWord=function(t,n,o){var r;if(!t)throw new Error("no wordKey provided");if(!n)throw new Error("no dictionary provided");if(o&&(null===(r=n[o])||void 0===r?void 0:r[t]))return n[o][t];var a="",i=e.getDefaultLang();if(!o||i!==o){var s=null==n?void 0:n[i];(null==s?void 0:s[t])&&(a=s[t])}return a},e.formatDate=function(t,n,o){if(!t)throw new Error("no date provided");if("function"!=typeof t.getMonth)throw new Error("wrong date format");return new Intl.DateTimeFormat(o||e.getDefaultLang(),n).format(t)},e}();t.LanguageTranslator=n}(q={exports:{}},q.exports),q.exports),P={vars:[{name:"--bs-primary",valueType:"color",theme:"bootstrap",defaultValue:"#07689f"},{name:"--bs-secondary",valueType:"color",theme:"bootstrap",defaultValue:"#c9d6df"},{name:"--bs-success",valueType:"color",theme:"bootstrap",defaultValue:"#11d3bc"},{name:"--bs-info",valueType:"color",theme:"bootstrap",defaultValue:"#a2d5f2"},{name:"--bs-warning",valueType:"color",theme:"bootstrap",defaultValue:"#ffc107"},{name:"--bs-danger",valueType:"color",theme:"bootstrap",defaultValue:"#f67280"}],parts:[{name:"invalid-feedback",description:""}]},J={vars:[{name:"--bs-primary",valueType:"color",theme:"bootstrap",defaultValue:"#07689f"},{name:"--bs-secondary",valueType:"color",theme:"bootstrap",defaultValue:"#c9d6df"},{name:"--bs-success",valueType:"color",theme:"bootstrap",defaultValue:"#11d3bc"},{name:"--bs-info",valueType:"color",theme:"bootstrap",defaultValue:"#a2d5f2"},{name:"--bs-warning",valueType:"color",theme:"bootstrap",defaultValue:"#ffc107"},{name:"--bs-danger",valueType:"color",theme:"bootstrap",defaultValue:"#f67280"}],parts:[{name:"invalid-feedback",description:""}]},I=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,R=/\n/g,F=/^\s*/,H=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,B=/^:\s*/,W=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,U=/^[;\s]*/,K=/^\s+|\s+$/g,Y="";function G(e){return e?e.replace(K,Y):Y}var Q=function(e,t){var n,o=null;if(!e||"string"!=typeof e)return o;for(var r,a,i=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,o=1;function r(e){var t=e.match(R);t&&(n+=t.length);var r=e.lastIndexOf("\n");o=~r?e.length-r:o+e.length}function a(){var e={line:n,column:o};return function(t){return t.position=new i(e),d(),t}}function i(e){this.start=e,this.end={line:n,column:o},this.source=t.source}function s(r){var a=new Error(t.source+":"+n+":"+o+": "+r);if(a.reason=r,a.filename=t.source,a.line=n,a.column=o,a.source=e,!t.silent)throw a}function l(t){var n=t.exec(e);if(n){var o=n[0];return r(o),e=e.slice(o.length),n}}function d(){l(F)}function c(e){var t;for(e=e||[];t=u();)!1!==t&&e.push(t);return e}function u(){var t=a();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;Y!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,Y===e.charAt(n-1))return s("End of comment missing");var i=e.slice(2,n-2);return o+=2,r(i),e=e.slice(n),o+=2,t({type:"comment",comment:i})}}function f(){var e=a(),t=l(H);if(t){if(u(),!l(B))return s("property missing ':'");var n=l(W),o=e({type:"declaration",property:G(t[0].replace(I,Y)),value:n?G(n[0].replace(I,Y)):Y});return l(U),o}}return i.prototype.content=e,d(),function(){var e,t=[];for(c(t);e=f();)!1!==e&&(t.push(e),c(t));return t}()}(e),s="function"==typeof t,l=0,d=i.length;l<d;l++)r=(n=i[l]).property,a=n.value,s?t(r,a,n):a&&(o||(o={}),o[r]=a);return o},X="0.20.10";function Z(e){let t,n,r,a,h,v,g,y,w,$,k,x,_,S,E,T=!e[1]?.params?.removeSeconds&&ee(e);return{c(){var o,i,s,l;t=d("div"),n=d("hb-input-date"),a=u(),h=d("div"),v=d("hb-input-number"),y=c("\n\t\t\n\t\t:\n\t\t"),w=d("div"),$=d("hb-input-number"),x=u(),T&&T.c(),_=f(),b(n,"schemaentry",r=JSON.stringify(e[3])),b(n,"style",e[7]),o=t,i="margin-right",null==(s="20px")?o.style.removeProperty(i):o.style.setProperty(i,s,l?"important":""),p(t,"class","input"),b(v,"schemaentry",g=JSON.stringify(e[4])),b(v,"style",e[8]),p(h,"class","input"),b($,"schemaentry",k=JSON.stringify(e[5])),b($,"style",e[8]),p(w,"class","input")},m(o,r){s(o,t,r),i(t,n),s(o,a,r),s(o,h,r),i(h,v),s(o,y,r),s(o,w,r),i(w,$),s(o,x,r),T&&T.m(o,r),s(o,_,r),S||(E=[m(n,"setValue",e[26]),m(v,"setValue",e[27]),m($,"setValue",e[28])],S=!0)},p(e,t){8&t[0]&&r!==(r=JSON.stringify(e[3]))&&b(n,"schemaentry",r),128&t[0]&&b(n,"style",e[7]),16&t[0]&&g!==(g=JSON.stringify(e[4]))&&b(v,"schemaentry",g),256&t[0]&&b(v,"style",e[8]),32&t[0]&&k!==(k=JSON.stringify(e[5]))&&b($,"schemaentry",k),256&t[0]&&b($,"style",e[8]),e[1]?.params?.removeSeconds?T&&(T.d(1),T=null):T?T.p(e,t):(T=ee(e),T.c(),T.m(_.parentNode,_))},d(e){e&&l(t),e&&l(a),e&&l(h),e&&l(y),e&&l(w),e&&l(x),T&&T.d(e),e&&l(_),S=!1,o(E)}}}function ee(e){let t,n,o,r,a,u;return{c(){t=c(":\n\t\t\t"),n=d("div"),o=d("hb-input-number"),b(o,"schemaentry",r=JSON.stringify(e[6])),b(o,"style",e[8]),p(n,"class","input")},m(r,l){s(r,t,l),s(r,n,l),i(n,o),a||(u=m(o,"setValue",e[29]),a=!0)},p(e,t){64&t[0]&&r!==(r=JSON.stringify(e[6]))&&b(o,"schemaentry",r),256&t[0]&&b(o,"style",e[8])},d(e){e&&l(t),e&&l(n),a=!1,u()}}}function te(e){let t,n,o=e[1].validationTip+"";return{c(){t=d("div"),n=c(o),p(t,"part","invalid-feedback"),p(t,"class","invalid-feedback mb-1")},m(e,o){s(e,t,o),i(t,n)},p(e,t){2&t[0]&&o!==(o=e[1].validationTip+"")&&function(e,t){t=""+t,e.data!==t&&(e.data=t)}(n,o)},d(e){e&&l(t)}}}function ne(t){let n,o,r,a,i=t[3]&&t[4]&&t[5]&&Z(t),c=t[1]?.validationTip&&"yes"===t[0]&&te(t);return{c(){n=d("div"),i&&i.c(),r=u(),c&&c.c(),a=f(),this.c=e,p(n,"class",o="form-control "+("yes"===t[0]&&t[1]?.required?t[2]?"is-valid":"is-invalid":""))},m(e,t){s(e,n,t),i&&i.m(n,null),s(e,r,t),c&&c.m(e,t),s(e,a,t)},p(e,t){e[3]&&e[4]&&e[5]?i?i.p(e,t):(i=Z(e),i.c(),i.m(n,null)):i&&(i.d(1),i=null),7&t[0]&&o!==(o="form-control "+("yes"===e[0]&&e[1]?.required?e[2]?"is-valid":"is-invalid":""))&&p(n,"class",o),e[1]?.validationTip&&"yes"===e[0]?c?c.p(e,t):(c=te(e),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null)},i:e,o:e,d(e){e&&l(n),i&&i.d(),e&&l(r),c&&c.d(e),e&&l(a)}}}function oe(e,t,n){var o,r;let a,i,s,l,d,c,u,f,m,p,{style:b}=t,{set_value:h}=t,{set_valid:v}=t,{show_validation:g}=t,{schemaentry:$}=t,k="",x="",_=!1;const S=y(),E=w();function T(e,t){E(e,t),S.dispatchEvent&&S.dispatchEvent(new CustomEvent(e,{detail:t}))}let C,N=!0;function O(e){console.log("changeDate",e),n(20,s=e)}function V(e){console.log("changeHour",e),n(21,l=e),d||n(5,m.value=0,m),c||n(6,p.value=0,p)}function L(e){console.log("changeMinutes",e),n(22,d=e),c||n(6,p.value=0,p)}function D(e){console.log("changeSeconds",e),n(23,c=e)}return e.$$set=e=>{"style"in e&&n(15,b=e.style),"set_value"in e&&n(13,h=e.set_value),"set_valid"in e&&n(14,v=e.set_valid),"show_validation"in e&&n(0,g=e.show_validation),"schemaentry"in e&&n(1,$=e.schemaentry)},e.$$.update=()=>{if(67100799&e.$$.dirty[0]){if(b&&(n(18,a=Q(b)),n(7,k=z.getChildStyleToPass(a,null==J?void 0:J.vars)),n(8,x=z.getChildStyleToPass(a,null==P?void 0:P.vars))),g||n(0,g="no"),$&&"string"==typeof $&&n(1,$=JSON.parse($)),n(13,h=!(!h&&"no"===h)),n(14,v=!(!v&&"no"===v)),(null==$?void 0:$.value)&&(C!==(null==$?void 0:$.value)||N)){let e;console.info("computing values",$.value),n(25,N=!1);try{e=new Date($.value)}catch(e){console.error("invalid input value on input-datetime",$.value,e)}console.info("now date is",e.valueOf()),e&&e.valueOf()>1e4&&e.valueOf()<1e13?(console.info("converting date"),n(20,s=`${e.getFullYear()}-${e.getMonth().toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")}`),n(21,l=e.getHours()),n(22,d=e.getMinutes()),n(23,c=e.getSeconds()),n(3,u={id:"date",type:"date",value:s,required:!0}),n(4,f={id:"hours",type:"number",value:l,required:!0,params:{min:0,max:23}}),n(5,m={id:"minutes",type:"number",value:d,required:!0,params:{min:0,max:59}}),n(6,p={id:"seconds",type:"number",value:c,required:!0,params:{min:0,max:59}})):console.error("invalid data value on input-datetime",i)}if(!s||!l&&0!==l||!d&&0!==d)console.log("reset to 0 datetime"),n(19,i=null),u||n(3,u={id:"date",type:"date",required:!0}),f||n(4,f={id:"hours",type:"number",required:!0,params:{min:0,max:23},placeholder:"hours"}),m||n(5,m={id:"minutes",type:"number",required:!0,params:{min:0,max:59},placeholder:"minutes"}),p||n(6,p={id:"seconds",type:"number",required:!0,params:{min:0,max:59},placeholder:"seconds"});else{console.log("NOW",s,l,d);try{n(19,i=new Date(`${s} ${l.toString().padStart(2,"0")}:${d.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")||"00"}`).toISOString())}catch(e){console.error("convert error",e)}}if(n(24,C=null==$?void 0:$.value),$)if($.required)if(i){let e,t;(null===n(16,o=null==$?void 0:$.params)||void 0===o?void 0:o.min)&&(e=new Date($.params.min)),(null===n(17,r=null==$?void 0:$.params)||void 0===r?void 0:r.max)&&(t=new Date($.params.max));const a=new Date(i);(!e||a.valueOf()>=e.valueOf())&&(!t||a.valueOf()<=t.valueOf())?n(2,_=!0):n(2,_=!1)}else n(2,_=!1);else n(2,_=!0);else n(2,_=!1);z.addComponent({repoName:"@htmlbricks/hb-input-number",version:X}),z.addComponent({repoName:"@htmlbricks/hb-input-date",version:X}),setTimeout((()=>{h&&T("setValue",{value:i,id:null==$?void 0:$.id}),v&&T("setValid",{valid:_,id:null==$?void 0:$.id})}),0)}},[g,$,_,u,f,m,p,k,x,O,V,L,D,h,v,b,o,r,a,i,s,l,d,c,C,N,e=>{e.detail?.value&&O(e.detail.value)},e=>{(e.detail?.value||0===e.detail.value)&&V(e.detail.value)},e=>{(e.detail?.value||0===e.detail.value)&&L(e.detail.value)},e=>{(e.detail?.value||0===e.detail.value)&&D(e.detail.value)}]}class re extends j{constructor(e){super();const t=document.createElement("style");t.textContent="@import url(\"https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap\");:host{--bs-blue:var(--bs-primary,#07689f);--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:var(--bs-danger,#f67280);--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:var(--bs-warning,#ffc107);--bs-teal:#20c997;--bs-cyan:var(--bs-info,#a2d5f2);--bs-white:#fff;--bs-gray:var(--bs-secondary,#c9d6df);--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:var(--bs-secondary,#c9d6df);--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:var(--bs-primary,#07689f);--bs-secondary:var(--bs-secondary,#c9d6df);--bs-success:var(--bs-warning,#ffc107);--bs-info:var(--bs-info,#a2d5f2);--bs-warning:#ffc107;--bs-danger:var(--bs-danger,#f67280);--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:13, 110, 253;--bs-secondary-rgb:108, 117, 125;--bs-success-rgb:25, 135, 84;--bs-info-rgb:13, 202, 240;--bs-warning-rgb:255, 193, 7;--bs-danger-rgb:220, 53, 69;--bs-light-rgb:248, 249, 250;--bs-dark-rgb:33, 37, 41;--bs-white-rgb:255, 255, 255;--bs-black-rgb:0, 0, 0;--bs-body-color-rgb:33, 37, 41;--bs-body-bg-rgb:255, 255, 255;--bs-font-sans-serif:system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", \"Liberation Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";--bs-font-monospace:SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#212529;--bs-body-bg:#fff}*,*::before,*::after{box-sizing:border-box}@media(prefers-reduced-motion: no-preference){:host{scroll-behavior:smooth}}@media(min-width: 1200px){}@media(min-width: 1200px){}@media(min-width: 1200px){}@media(min-width: 1200px){}::-moz-focus-inner{padding:0;border-style:none}@media(min-width: 1200px){}::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-text,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}.form-control{display:block;width:100%;padding:0.375rem 0.75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;appearance:none;border-radius:0.25rem;transition:border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out}@media(prefers-reduced-motion: reduce){.form-control{transition:none}}.form-control:focus{color:#212529;background-color:#fff;border-color:#86b7fe;outline:0;box-shadow:0 0 0 0.25rem rgba(13, 110, 253, 0.25)}.form-control::-webkit-date-and-time-value{height:1.5em}.form-control::placeholder{color:var(--bs-secondary,#c9d6df);opacity:1}.form-control:disabled{background-color:#e9ecef;opacity:1}.form-control::file-selector-button{padding:0.375rem 0.75rem;margin:-0.375rem -0.75rem;margin-inline-end:0.75rem;color:#212529;background-color:#e9ecef;pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:1px;border-radius:0;transition:color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out}@media(prefers-reduced-motion: reduce){.form-control::file-selector-button{transition:none}}.form-control:hover:not(:disabled):not([readonly])::file-selector-button{background-color:#dde0e3}.form-control::-webkit-file-upload-button{padding:0.375rem 0.75rem;margin:-0.375rem -0.75rem;margin-inline-end:0.75rem;color:#212529;background-color:#e9ecef;pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:1px;border-radius:0;transition:color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out}@media(prefers-reduced-motion: reduce){.form-control::-webkit-file-upload-button{transition:none}}.form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button{background-color:#dde0e3}@media(prefers-reduced-motion: reduce){}@media(prefers-reduced-motion: reduce){}@media(prefers-reduced-motion: reduce){}@media(prefers-reduced-motion: reduce){}@media(prefers-reduced-motion: reduce){}.form-control.is-valid{border-color:var(--bs-warning,#ffc107);padding-right:calc(1.5em + 0.75rem);background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e\");background-repeat:no-repeat;background-position:right calc(0.375em + 0.1875rem) center;background-size:calc(0.75em + 0.375rem) calc(0.75em + 0.375rem)}.form-control.is-valid:focus{border-color:var(--bs-warning,#ffc107);box-shadow:0 0 0 0.25rem rgba(25, 135, 84, 0.25)}.invalid-feedback{display:none;width:100%;margin-top:0.25rem;font-size:0.875em;color:var(--bs-danger,#f67280)}.is-invalid~.invalid-feedback{display:block}.form-control.is-invalid{border-color:var(--bs-danger,#f67280);padding-right:calc(1.5em + 0.75rem);background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e\");background-repeat:no-repeat;background-position:right calc(0.375em + 0.1875rem) center;background-size:calc(0.75em + 0.375rem) calc(0.75em + 0.375rem)}.form-control.is-invalid:focus{border-color:var(--bs-danger,#f67280);box-shadow:0 0 0 0.25rem rgba(220, 53, 69, 0.25)}@media(prefers-reduced-motion: reduce){}@keyframes placeholder-glow{50%{opacity:0.2}}@keyframes placeholder-wave{100%{mask-position:-200% 0%}}@media(min-width: 576px){}@media(min-width: 768px){}@media(min-width: 992px){}@media(min-width: 1200px){}@media(min-width: 1400px){}:host{font-family:\"Roboto\", sans-serif}.input{display:inline-block}hb-input-date{max-width:140px;display:inline-block}hb-input-number{width:100px;display:inline-block}",this.shadowRoot.appendChild(t),A(this,{target:this.shadowRoot,props:h(this.attributes),customElement:!0},oe,ne,a,{style:15,set_value:13,set_valid:14,show_validation:0,schemaentry:1},null,[-1,-1]),e&&(e.target&&s(e.target,this,e.anchor),e.props&&(this.$set(e.props),O()))}static get observedAttributes(){return["style","set_value","set_valid","show_validation","schemaentry"]}get style(){return this.$$.ctx[15]}set style(e){this.$$set({style:e}),O()}get set_value(){return this.$$.ctx[13]}set set_value(e){this.$$set({set_value:e}),O()}get set_valid(){return this.$$.ctx[14]}set set_valid(e){this.$$set({set_valid:e}),O()}get show_validation(){return this.$$.ctx[0]}set show_validation(e){this.$$set({show_validation:e}),O()}get schemaentry(){return this.$$.ctx[1]}set schemaentry(e){this.$$set({schemaentry:e}),O()}}return customElements.define("hb-input-datetime",re),re}();
1
+ var release=function(){"use strict";function e(){}function t(e){return e()}function n(){return Object.create(null)}function o(e){e.forEach(t)}function r(e){return"function"==typeof e}function a(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function i(e,t){e.appendChild(t)}function s(e,t,n){e.insertBefore(t,n||null)}function l(e){e.parentNode&&e.parentNode.removeChild(e)}function d(e){return document.createElement(e)}function c(e){return document.createTextNode(e)}function u(){return c(" ")}function f(){return c("")}function m(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function p(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function b(e,t,n){t in e?e[t]="boolean"==typeof e[t]&&""===n||n:p(e,t,n)}function h(e){const t={};for(const n of e)t[n.name]=n.value;return t}let v;function g(e){v=e}function y(){if(!v)throw new Error("Function called outside component initialization");return v}function w(){const e=y();return(t,n,{cancelable:o=!1}={})=>{const r=e.$$.callbacks[t];if(r){const a=function(e,t,{bubbles:n=!1,cancelable:o=!1}={}){const r=document.createEvent("CustomEvent");return r.initCustomEvent(e,n,o,t),r}(t,n,{cancelable:o});return r.slice().forEach((t=>{t.call(e,a)})),!a.defaultPrevented}return!0}}const $=[],k=[];let x=[];const _=[],S=Promise.resolve();let E=!1;function T(e){x.push(e)}const C=new Set;let N=0;function O(){if(0!==N)return;const e=v;do{try{for(;N<$.length;){const e=$[N];N++,g(e),V(e.$$)}}catch(e){throw $.length=0,N=0,e}for(g(null),$.length=0,N=0;k.length;)k.pop()();for(let e=0;e<x.length;e+=1){const t=x[e];C.has(t)||(C.add(t),t())}x.length=0}while($.length);for(;_.length;)_.pop()();E=!1,C.clear(),g(e)}function V(e){if(null!==e.fragment){e.update(),o(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(T)}}const L=new Set;function D(e,t){const n=e.$$;null!==n.fragment&&(!function(e){const t=[],n=[];x.forEach((o=>-1===e.indexOf(o)?t.push(o):n.push(o))),n.forEach((e=>e())),x=t}(n.after_update),o(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function M(e,t){-1===e.$$.dirty[0]&&($.push(e),E||(E=!0,S.then(O)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function A(a,i,s,d,c,u,f,m=[-1]){const p=v;g(a);const b=a.$$={fragment:null,ctx:[],props:u,update:e,not_equal:c,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(i.context||(p?p.$$.context:[])),callbacks:n(),dirty:m,skip_bound:!1,root:i.target||p.$$.root};f&&f(b.root);let h=!1;if(b.ctx=s?s(a,i.props||{},((e,t,...n)=>{const o=n.length?n[0]:t;return b.ctx&&c(b.ctx[e],b.ctx[e]=o)&&(!b.skip_bound&&b.bound[e]&&b.bound[e](o),h&&M(a,e)),t})):[],b.update(),h=!0,o(b.before_update),b.fragment=!!d&&d(b.ctx),i.target){if(i.hydrate){const e=function(e){return Array.from(e.childNodes)}(i.target);b.fragment&&b.fragment.l(e),e.forEach(l)}else b.fragment&&b.fragment.c();i.intro&&((y=a.$$.fragment)&&y.i&&(L.delete(y),y.i(w))),function(e,n,a,i){const{fragment:s,after_update:l}=e.$$;s&&s.m(n,a),i||T((()=>{const n=e.$$.on_mount.map(t).filter(r);e.$$.on_destroy?e.$$.on_destroy.push(...n):o(n),e.$$.on_mount=[]})),l.forEach(T)}(a,i.target,i.anchor,i.customElement),O()}var y,w;g(p)}let j;"function"==typeof HTMLElement&&(j=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:e}=this.$$;this.$$.on_disconnect=e.map(t).filter(r);for(const e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(e,t,n){this[e]=n}disconnectedCallback(){o(this.$$.on_disconnect)}$destroy(){D(this,1),this.$destroy=e}$on(t,n){if(!r(n))return e;const o=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return o.push(n),()=>{const e=o.indexOf(n);-1!==e&&o.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}});var q,z=(function(e,t){t.__esModule=!0,t.LanguageTranslator=t.addComponent=t.getChildStyleToPass=void 0,t.getChildStyleToPass=function(e,t){var n,o,r="";if(e&&(null==t?void 0:t.length)&&(null===(n=Object.keys(e))||void 0===n?void 0:n.length)&&(null===(o=null==t?void 0:t.filter((function(t){return Object.keys(e).includes(t.name)})))||void 0===o?void 0:o.length))for(var a=function(n){(null==t?void 0:t.filter((function(t){return t.name===n&&t.defaultValue!==e[n]})))&&(r+="".concat(n,":").concat(e[n],";"))},i=0,s=Object.keys(e);i<s.length;i++)a(s[i]);return r},t.addComponent=function(e){var t,n=(null===(t=null==e?void 0:e.repoName.split("/"))||void 0===t?void 0:t[1])||(null==e?void 0:e.repoName);if(!n)throw new Error("wrong componentPath "+(null==e?void 0:e.repoName));if(!(null==e?void 0:e.version))throw new Error("wrong version "+(null==e?void 0:e.version));var o=(null==e?void 0:e.iifePath)||"release/release.js";if(!document.getElementById(n+"-script"))try{var r=document.createElement("script");r.id=n+"-script",r.src="https://cdn.jsdelivr.net/npm/".concat(e.repoName,"@").concat(e.version,"/").concat(o),(null==e?void 0:e.local)&&location.href.includes("localhost")&&(r.src="".concat(e.local)),document.head.appendChild(r)}catch(e){console.warn(e)}};var n=function(){function e(e){if(!(null==e?void 0:e.dictionary))throw new Error("no dictionary provided");this.dictionary=e.dictionary,this.setLang(null==e?void 0:e.lang)}return e.prototype.setLang=function(t){t||(t=e.getDefaultLang()),this.lang=t},e.prototype.translateWord=function(t,n){return e.getDictionaryWord(t,this.dictionary,n||this.lang)},e.prototype.translateDate=function(t,n,o){return e.formatDate(t,n,o||this.lang)},e.getDefaultLang=function(){var e,t,n,o,r,a="en";return(null===navigator||void 0===navigator?void 0:navigator.languages)&&(null===(n=null===(t=null===(e=navigator.languages[0])||void 0===e?void 0:e.split("-")[0])||void 0===t?void 0:t.toLowerCase())||void 0===n?void 0:n.length)&&(a=null===(r=null===(o=navigator.languages[0])||void 0===o?void 0:o.split("-")[0])||void 0===r?void 0:r.toLowerCase()),a},e.getDictionaryWord=function(t,n,o){var r;if(!t)throw new Error("no wordKey provided");if(!n)throw new Error("no dictionary provided");if(o&&(null===(r=n[o])||void 0===r?void 0:r[t]))return n[o][t];var a="",i=e.getDefaultLang();if(!o||i!==o){var s=null==n?void 0:n[i];(null==s?void 0:s[t])&&(a=s[t])}return a},e.formatDate=function(t,n,o){if(!t)throw new Error("no date provided");if("function"!=typeof t.getMonth)throw new Error("wrong date format");return new Intl.DateTimeFormat(o||e.getDefaultLang(),n).format(t)},e}();t.LanguageTranslator=n}(q={exports:{}},q.exports),q.exports),P={vars:[{name:"--bs-primary",valueType:"color",theme:"bootstrap",defaultValue:"#07689f"},{name:"--bs-secondary",valueType:"color",theme:"bootstrap",defaultValue:"#c9d6df"},{name:"--bs-success",valueType:"color",theme:"bootstrap",defaultValue:"#11d3bc"},{name:"--bs-info",valueType:"color",theme:"bootstrap",defaultValue:"#a2d5f2"},{name:"--bs-warning",valueType:"color",theme:"bootstrap",defaultValue:"#ffc107"},{name:"--bs-danger",valueType:"color",theme:"bootstrap",defaultValue:"#f67280"}],parts:[{name:"invalid-feedback",description:""}]},J={vars:[{name:"--bs-primary",valueType:"color",theme:"bootstrap",defaultValue:"#07689f"},{name:"--bs-secondary",valueType:"color",theme:"bootstrap",defaultValue:"#c9d6df"},{name:"--bs-success",valueType:"color",theme:"bootstrap",defaultValue:"#11d3bc"},{name:"--bs-info",valueType:"color",theme:"bootstrap",defaultValue:"#a2d5f2"},{name:"--bs-warning",valueType:"color",theme:"bootstrap",defaultValue:"#ffc107"},{name:"--bs-danger",valueType:"color",theme:"bootstrap",defaultValue:"#f67280"}],parts:[{name:"invalid-feedback",description:""}]},I=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,R=/\n/g,F=/^\s*/,H=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,B=/^:\s*/,W=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,U=/^[;\s]*/,K=/^\s+|\s+$/g,Y="";function G(e){return e?e.replace(K,Y):Y}var Q=function(e,t){var n,o=null;if(!e||"string"!=typeof e)return o;for(var r,a,i=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,o=1;function r(e){var t=e.match(R);t&&(n+=t.length);var r=e.lastIndexOf("\n");o=~r?e.length-r:o+e.length}function a(){var e={line:n,column:o};return function(t){return t.position=new i(e),d(),t}}function i(e){this.start=e,this.end={line:n,column:o},this.source=t.source}function s(r){var a=new Error(t.source+":"+n+":"+o+": "+r);if(a.reason=r,a.filename=t.source,a.line=n,a.column=o,a.source=e,!t.silent)throw a}function l(t){var n=t.exec(e);if(n){var o=n[0];return r(o),e=e.slice(o.length),n}}function d(){l(F)}function c(e){var t;for(e=e||[];t=u();)!1!==t&&e.push(t);return e}function u(){var t=a();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;Y!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,Y===e.charAt(n-1))return s("End of comment missing");var i=e.slice(2,n-2);return o+=2,r(i),e=e.slice(n),o+=2,t({type:"comment",comment:i})}}function f(){var e=a(),t=l(H);if(t){if(u(),!l(B))return s("property missing ':'");var n=l(W),o=e({type:"declaration",property:G(t[0].replace(I,Y)),value:n?G(n[0].replace(I,Y)):Y});return l(U),o}}return i.prototype.content=e,d(),function(){var e,t=[];for(c(t);e=f();)!1!==e&&(t.push(e),c(t));return t}()}(e),s="function"==typeof t,l=0,d=i.length;l<d;l++)r=(n=i[l]).property,a=n.value,s?t(r,a,n):a&&(o||(o={}),o[r]=a);return o},X="0.20.12";function Z(e){let t,n,r,a,h,v,g,y,w,$,k,x,_,S,E,T=!e[1]?.params?.removeSeconds&&ee(e);return{c(){var o,i,s,l;t=d("div"),n=d("hb-input-date"),a=u(),h=d("div"),v=d("hb-input-number"),y=c("\n\t\t\n\t\t:\n\t\t"),w=d("div"),$=d("hb-input-number"),x=u(),T&&T.c(),_=f(),b(n,"schemaentry",r=JSON.stringify(e[3])),b(n,"style",e[7]),o=t,i="margin-right",null==(s="20px")?o.style.removeProperty(i):o.style.setProperty(i,s,l?"important":""),p(t,"class","input"),b(v,"schemaentry",g=JSON.stringify(e[4])),b(v,"style",e[8]),p(h,"class","input"),b($,"schemaentry",k=JSON.stringify(e[5])),b($,"style",e[8]),p(w,"class","input")},m(o,r){s(o,t,r),i(t,n),s(o,a,r),s(o,h,r),i(h,v),s(o,y,r),s(o,w,r),i(w,$),s(o,x,r),T&&T.m(o,r),s(o,_,r),S||(E=[m(n,"setValue",e[26]),m(v,"setValue",e[27]),m($,"setValue",e[28])],S=!0)},p(e,t){8&t[0]&&r!==(r=JSON.stringify(e[3]))&&b(n,"schemaentry",r),128&t[0]&&b(n,"style",e[7]),16&t[0]&&g!==(g=JSON.stringify(e[4]))&&b(v,"schemaentry",g),256&t[0]&&b(v,"style",e[8]),32&t[0]&&k!==(k=JSON.stringify(e[5]))&&b($,"schemaentry",k),256&t[0]&&b($,"style",e[8]),e[1]?.params?.removeSeconds?T&&(T.d(1),T=null):T?T.p(e,t):(T=ee(e),T.c(),T.m(_.parentNode,_))},d(e){e&&l(t),e&&l(a),e&&l(h),e&&l(y),e&&l(w),e&&l(x),T&&T.d(e),e&&l(_),S=!1,o(E)}}}function ee(e){let t,n,o,r,a,u;return{c(){t=c(":\n\t\t\t"),n=d("div"),o=d("hb-input-number"),b(o,"schemaentry",r=JSON.stringify(e[6])),b(o,"style",e[8]),p(n,"class","input")},m(r,l){s(r,t,l),s(r,n,l),i(n,o),a||(u=m(o,"setValue",e[29]),a=!0)},p(e,t){64&t[0]&&r!==(r=JSON.stringify(e[6]))&&b(o,"schemaentry",r),256&t[0]&&b(o,"style",e[8])},d(e){e&&l(t),e&&l(n),a=!1,u()}}}function te(e){let t,n,o=e[1].validationTip+"";return{c(){t=d("div"),n=c(o),p(t,"part","invalid-feedback"),p(t,"class","invalid-feedback mb-1")},m(e,o){s(e,t,o),i(t,n)},p(e,t){2&t[0]&&o!==(o=e[1].validationTip+"")&&function(e,t){t=""+t,e.data!==t&&(e.data=t)}(n,o)},d(e){e&&l(t)}}}function ne(t){let n,o,r,a,i=t[3]&&t[4]&&t[5]&&Z(t),c=t[1]?.validationTip&&"yes"===t[0]&&te(t);return{c(){n=d("div"),i&&i.c(),r=u(),c&&c.c(),a=f(),this.c=e,p(n,"class",o="form-control "+("yes"===t[0]&&t[1]?.required?t[2]?"is-valid":"is-invalid":""))},m(e,t){s(e,n,t),i&&i.m(n,null),s(e,r,t),c&&c.m(e,t),s(e,a,t)},p(e,t){e[3]&&e[4]&&e[5]?i?i.p(e,t):(i=Z(e),i.c(),i.m(n,null)):i&&(i.d(1),i=null),7&t[0]&&o!==(o="form-control "+("yes"===e[0]&&e[1]?.required?e[2]?"is-valid":"is-invalid":""))&&p(n,"class",o),e[1]?.validationTip&&"yes"===e[0]?c?c.p(e,t):(c=te(e),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null)},i:e,o:e,d(e){e&&l(n),i&&i.d(),e&&l(r),c&&c.d(e),e&&l(a)}}}function oe(e,t,n){var o,r;let a,i,s,l,d,c,u,f,m,p,{style:b}=t,{set_value:h}=t,{set_valid:v}=t,{show_validation:g}=t,{schemaentry:$}=t,k="",x="",_=!1;const S=y(),E=w();function T(e,t){E(e,t),S.dispatchEvent&&S.dispatchEvent(new CustomEvent(e,{detail:t}))}let C,N=!0;function O(e){console.log("changeDate",e),n(20,s=e)}function V(e){console.log("changeHour",e),n(21,l=e),d||n(5,m.value=0,m),c||n(6,p.value=0,p)}function L(e){console.log("changeMinutes",e),n(22,d=e),c||n(6,p.value=0,p)}function D(e){console.log("changeSeconds",e),n(23,c=e)}return e.$$set=e=>{"style"in e&&n(15,b=e.style),"set_value"in e&&n(13,h=e.set_value),"set_valid"in e&&n(14,v=e.set_valid),"show_validation"in e&&n(0,g=e.show_validation),"schemaentry"in e&&n(1,$=e.schemaentry)},e.$$.update=()=>{if(67100799&e.$$.dirty[0]){if(b&&(n(18,a=Q(b)),n(7,k=z.getChildStyleToPass(a,null==J?void 0:J.vars)),n(8,x=z.getChildStyleToPass(a,null==P?void 0:P.vars))),g||n(0,g="no"),$&&"string"==typeof $&&n(1,$=JSON.parse($)),n(13,h=!(!h&&"no"===h)),n(14,v=!(!v&&"no"===v)),(null==$?void 0:$.value)&&(C!==(null==$?void 0:$.value)||N)){let e;console.info("computing values",$.value),n(25,N=!1);try{e=new Date($.value)}catch(e){console.error("invalid input value on input-datetime",$.value,e)}console.info("now date is",e.valueOf()),e&&e.valueOf()>1e4&&e.valueOf()<1e13?(console.info("converting date"),n(20,s=`${e.getFullYear()}-${e.getMonth().toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")}`),n(21,l=e.getHours()),n(22,d=e.getMinutes()),n(23,c=e.getSeconds()),n(3,u={id:"date",type:"date",value:s,required:!0}),n(4,f={id:"hours",type:"number",value:l,required:!0,params:{min:0,max:23}}),n(5,m={id:"minutes",type:"number",value:d,required:!0,params:{min:0,max:59}}),n(6,p={id:"seconds",type:"number",value:c,required:!0,params:{min:0,max:59}})):console.error("invalid data value on input-datetime",i)}if(!s||!l&&0!==l||!d&&0!==d)console.log("reset to 0 datetime"),n(19,i=null),u||n(3,u={id:"date",type:"date",required:!0}),f||n(4,f={id:"hours",type:"number",required:!0,params:{min:0,max:23},placeholder:"hours"}),m||n(5,m={id:"minutes",type:"number",required:!0,params:{min:0,max:59},placeholder:"minutes"}),p||n(6,p={id:"seconds",type:"number",required:!0,params:{min:0,max:59},placeholder:"seconds"});else{console.log("NOW",s,l,d);try{n(19,i=new Date(`${s} ${l.toString().padStart(2,"0")}:${d.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")||"00"}`).toISOString())}catch(e){console.error("convert error",e)}}if(n(24,C=null==$?void 0:$.value),$)if($.required)if(i){let e,t;(null===n(16,o=null==$?void 0:$.params)||void 0===o?void 0:o.min)&&(e=new Date($.params.min)),(null===n(17,r=null==$?void 0:$.params)||void 0===r?void 0:r.max)&&(t=new Date($.params.max));const a=new Date(i);(!e||a.valueOf()>=e.valueOf())&&(!t||a.valueOf()<=t.valueOf())?n(2,_=!0):n(2,_=!1)}else n(2,_=!1);else n(2,_=!0);else n(2,_=!1);z.addComponent({repoName:"@htmlbricks/hb-input-number",version:X}),z.addComponent({repoName:"@htmlbricks/hb-input-date",version:X}),setTimeout((()=>{h&&T("setValue",{value:i,id:null==$?void 0:$.id}),v&&T("setValid",{valid:_,id:null==$?void 0:$.id})}),0)}},[g,$,_,u,f,m,p,k,x,O,V,L,D,h,v,b,o,r,a,i,s,l,d,c,C,N,e=>{e.detail?.value&&O(e.detail.value)},e=>{(e.detail?.value||0===e.detail.value)&&V(e.detail.value)},e=>{(e.detail?.value||0===e.detail.value)&&L(e.detail.value)},e=>{(e.detail?.value||0===e.detail.value)&&D(e.detail.value)}]}class re extends j{constructor(e){super();const t=document.createElement("style");t.textContent="@import url(\"https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap\");:host{--bs-blue:var(--bs-primary,#07689f);--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:var(--bs-danger,#f67280);--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:var(--bs-warning,#ffc107);--bs-teal:#20c997;--bs-cyan:var(--bs-info,#a2d5f2);--bs-white:#fff;--bs-gray:var(--bs-secondary,#c9d6df);--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:var(--bs-secondary,#c9d6df);--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:var(--bs-primary,#07689f);--bs-secondary:var(--bs-secondary,#c9d6df);--bs-success:var(--bs-warning,#ffc107);--bs-info:var(--bs-info,#a2d5f2);--bs-warning:#ffc107;--bs-danger:var(--bs-danger,#f67280);--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:13, 110, 253;--bs-secondary-rgb:108, 117, 125;--bs-success-rgb:25, 135, 84;--bs-info-rgb:13, 202, 240;--bs-warning-rgb:255, 193, 7;--bs-danger-rgb:220, 53, 69;--bs-light-rgb:248, 249, 250;--bs-dark-rgb:33, 37, 41;--bs-white-rgb:255, 255, 255;--bs-black-rgb:0, 0, 0;--bs-body-color-rgb:33, 37, 41;--bs-body-bg-rgb:255, 255, 255;--bs-font-sans-serif:system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", \"Liberation Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";--bs-font-monospace:SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#212529;--bs-body-bg:#fff}*,*::before,*::after{box-sizing:border-box}@media(prefers-reduced-motion: no-preference){:host{scroll-behavior:smooth}}@media(min-width: 1200px){}@media(min-width: 1200px){}@media(min-width: 1200px){}@media(min-width: 1200px){}::-moz-focus-inner{padding:0;border-style:none}@media(min-width: 1200px){}::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-text,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}.form-control{display:block;width:100%;padding:0.375rem 0.75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;appearance:none;border-radius:0.25rem;transition:border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out}@media(prefers-reduced-motion: reduce){.form-control{transition:none}}.form-control:focus{color:#212529;background-color:#fff;border-color:#86b7fe;outline:0;box-shadow:0 0 0 0.25rem rgba(13, 110, 253, 0.25)}.form-control::-webkit-date-and-time-value{height:1.5em}.form-control::placeholder{color:var(--bs-secondary,#c9d6df);opacity:1}.form-control:disabled{background-color:#e9ecef;opacity:1}.form-control::file-selector-button{padding:0.375rem 0.75rem;margin:-0.375rem -0.75rem;margin-inline-end:0.75rem;color:#212529;background-color:#e9ecef;pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:1px;border-radius:0;transition:color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out}@media(prefers-reduced-motion: reduce){.form-control::file-selector-button{transition:none}}.form-control:hover:not(:disabled):not([readonly])::file-selector-button{background-color:#dde0e3}.form-control::-webkit-file-upload-button{padding:0.375rem 0.75rem;margin:-0.375rem -0.75rem;margin-inline-end:0.75rem;color:#212529;background-color:#e9ecef;pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:1px;border-radius:0;transition:color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out}@media(prefers-reduced-motion: reduce){.form-control::-webkit-file-upload-button{transition:none}}.form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button{background-color:#dde0e3}@media(prefers-reduced-motion: reduce){}@media(prefers-reduced-motion: reduce){}@media(prefers-reduced-motion: reduce){}@media(prefers-reduced-motion: reduce){}@media(prefers-reduced-motion: reduce){}.form-control.is-valid{border-color:var(--bs-warning,#ffc107);padding-right:calc(1.5em + 0.75rem);background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e\");background-repeat:no-repeat;background-position:right calc(0.375em + 0.1875rem) center;background-size:calc(0.75em + 0.375rem) calc(0.75em + 0.375rem)}.form-control.is-valid:focus{border-color:var(--bs-warning,#ffc107);box-shadow:0 0 0 0.25rem rgba(25, 135, 84, 0.25)}.invalid-feedback{display:none;width:100%;margin-top:0.25rem;font-size:0.875em;color:var(--bs-danger,#f67280)}.is-invalid~.invalid-feedback{display:block}.form-control.is-invalid{border-color:var(--bs-danger,#f67280);padding-right:calc(1.5em + 0.75rem);background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e\");background-repeat:no-repeat;background-position:right calc(0.375em + 0.1875rem) center;background-size:calc(0.75em + 0.375rem) calc(0.75em + 0.375rem)}.form-control.is-invalid:focus{border-color:var(--bs-danger,#f67280);box-shadow:0 0 0 0.25rem rgba(220, 53, 69, 0.25)}@media(prefers-reduced-motion: reduce){}@keyframes placeholder-glow{50%{opacity:0.2}}@keyframes placeholder-wave{100%{mask-position:-200% 0%}}@media(min-width: 576px){}@media(min-width: 768px){}@media(min-width: 992px){}@media(min-width: 1200px){}@media(min-width: 1400px){}:host{font-family:\"Roboto\", sans-serif}.input{display:inline-block}hb-input-date{max-width:140px;display:inline-block}hb-input-number{width:100px;display:inline-block}",this.shadowRoot.appendChild(t),A(this,{target:this.shadowRoot,props:h(this.attributes),customElement:!0},oe,ne,a,{style:15,set_value:13,set_valid:14,show_validation:0,schemaentry:1},null,[-1,-1]),e&&(e.target&&s(e.target,this,e.anchor),e.props&&(this.$set(e.props),O()))}static get observedAttributes(){return["style","set_value","set_valid","show_validation","schemaentry"]}get style(){return this.$$.ctx[15]}set style(e){this.$$set({style:e}),O()}get set_value(){return this.$$.ctx[13]}set set_value(e){this.$$set({set_value:e}),O()}get set_valid(){return this.$$.ctx[14]}set set_valid(e){this.$$set({set_valid:e}),O()}get show_validation(){return this.$$.ctx[0]}set show_validation(e){this.$$set({show_validation:e}),O()}get schemaentry(){return this.$$.ctx[1]}set schemaentry(e){this.$$set({schemaentry:e}),O()}}return customElements.define("hb-input-datetime",re),re}();
2
2
  //# sourceMappingURL=release.js.map