@htmlbricks/hb-sidebar-cards-navigator 0.17.13 → 0.17.16

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-sidebar-cards-navigator",
3
3
  "displayName": "Svelte-Bootstrap sidebar-cards-navigator",
4
4
  "description": "Svelte-Bootstrap sidebar-cards-navigator",
5
- "version": "0.17.13",
5
+ "version": "0.17.16",
6
6
  "main": "release/release.js",
7
7
  "publishConfig": {
8
8
  "access": "public"
@@ -30,7 +30,7 @@
30
30
  "prepublish": "npm run build:release"
31
31
  },
32
32
  "devDependencies": {
33
- "@htmlbricks/hb-jsutils": "^0.17.13",
33
+ "@htmlbricks/hb-jsutils": "^0.17.16",
34
34
  "@htmlbricks/manifester": "^0.0.22",
35
35
  "@rollup/plugin-alias": "^3.1.2",
36
36
  "@rollup/plugin-commonjs": "^18.0.0",
@@ -75,10 +75,10 @@
75
75
  "webcomponents"
76
76
  ],
77
77
  "contributors": [],
78
- "gitHead": "4e4817c35d2fa32ec72949c8584365094031a4ea",
78
+ "gitHead": "11d3f9fb8e35c39739e626dd7aaa1b4e3b1eb36a",
79
79
  "dependencies": {
80
- "@htmlbricks/hb-navbar": "^0.17.13",
81
- "@htmlbricks/hb-sidenav-link": "^0.17.13",
80
+ "@htmlbricks/hb-navbar": "^0.17.16",
81
+ "@htmlbricks/hb-sidenav-link": "^0.17.16",
82
82
  "style-to-object": "^0.3.0"
83
83
  }
84
84
  }
@@ -488,5 +488,5 @@
488
488
  "size": {},
489
489
  "iifePath": "release/release.js",
490
490
  "repoName": "@htmlbricks/hb-sidebar-cards-navigator",
491
- "version": "0.17.13"
491
+ "version": "0.17.16"
492
492
  }
@@ -1,2 +1,2 @@
1
- var release=function(){"use strict";function t(){}function n(t){return t()}function e(){return Object.create(null)}function o(t){t.forEach(n)}function r(t){return"function"==typeof t}function i(t,n){return t!=t?n==n:t!==n||t&&"object"==typeof t||"function"==typeof t}function a(t,n){t.appendChild(n)}function s(t,n,e){t.insertBefore(n,e||null)}function l(t){t.parentNode.removeChild(t)}function c(t){return document.createElement(t)}function u(t){return document.createTextNode(t)}function d(){return u(" ")}function f(){return u("")}function p(t,n,e,o){return t.addEventListener(n,e,o),()=>t.removeEventListener(n,e,o)}function h(t,n,e){null==e?t.removeAttribute(n):t.getAttribute(n)!==e&&t.setAttribute(n,e)}function g(t,n,e){n in t?t[n]="boolean"==typeof t[n]&&""===e||e:h(t,n,e)}function m(t){const n={};for(const e of t)n[e.name]=e.value;return n}let v;function y(t){v=t}function $(){if(!v)throw new Error("Function called outside component initialization");return v}function b(){const t=$();return(n,e,{cancelable:o=!1}={})=>{const r=t.$$.callbacks[n];if(r){const i=function(t,n,{bubbles:e=!1,cancelable:o=!1}={}){const r=document.createEvent("CustomEvent");return r.initCustomEvent(t,e,o,n),r}(n,e,{cancelable:o});return r.slice().forEach((n=>{n.call(t,i)})),!i.defaultPrevented}return!0}}const w=[],k=[],E=[],x=[],C=Promise.resolve();let _=!1;function L(t){E.push(t)}const T=new Set;let N=0;function O(){const t=v;do{for(;N<w.length;){const t=w[N];N++,y(t),S(t.$$)}for(y(null),w.length=0,N=0;k.length;)k.pop()();for(let t=0;t<E.length;t+=1){const n=E[t];T.has(n)||(T.add(n),n())}E.length=0}while(w.length);for(;x.length;)x.pop()();_=!1,T.clear(),y(t)}function S(t){if(null!==t.fragment){t.update(),o(t.before_update);const n=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,n),t.after_update.forEach(L)}}const A=new Set;function M(t,n){t&&t.i&&(A.delete(t),t.i(n))}function P(t,n){t.d(1),n.delete(t.key)}function j(t,n,e,o,r,i,a,s,l,c,u,d){let f=t.length,p=i.length,h=f;const g={};for(;h--;)g[t[h].key]=h;const m=[],v=new Map,y=new Map;for(h=p;h--;){const t=d(r,i,h),s=e(t);let l=a.get(s);l?o&&l.p(t,n):(l=c(s,t),l.c()),v.set(s,m[h]=l),s in g&&y.set(s,Math.abs(h-g[s]))}const $=new Set,b=new Set;function w(t){M(t,1),t.m(s,u),a.set(t.key,t),u=t.first,p--}for(;f&&p;){const n=m[p-1],e=t[f-1],o=n.key,r=e.key;n===e?(u=n.first,f--,p--):v.has(r)?!a.has(o)||$.has(o)?w(n):b.has(r)?f--:y.get(o)>y.get(r)?(b.add(o),w(n)):($.add(r),f--):(l(e,a),f--)}for(;f--;){const n=t[f];v.has(n.key)||l(n,a)}for(;p;)w(m[p-1]);return m}function D(t,n){-1===t.$$.dirty[0]&&(w.push(t),_||(_=!0,C.then(O)),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<<n%31}function I(i,a,s,c,u,d,f,p=[-1]){const h=v;y(i);const g=i.$$={fragment:null,ctx:null,props:d,update:t,not_equal:u,bound:e(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a.context||(h?h.$$.context:[])),callbacks:e(),dirty:p,skip_bound:!1,root:a.target||h.$$.root};f&&f(g.root);let m=!1;if(g.ctx=s?s(i,a.props||{},((t,n,...e)=>{const o=e.length?e[0]:n;return g.ctx&&u(g.ctx[t],g.ctx[t]=o)&&(!g.skip_bound&&g.bound[t]&&g.bound[t](o),m&&D(i,t)),n})):[],g.update(),m=!0,o(g.before_update),g.fragment=!!c&&c(g.ctx),a.target){if(a.hydrate){const t=function(t){return Array.from(t.childNodes)}(a.target);g.fragment&&g.fragment.l(t),t.forEach(l)}else g.fragment&&g.fragment.c();a.intro&&M(i.$$.fragment),function(t,e,i,a){const{fragment:s,on_mount:l,on_destroy:c,after_update:u}=t.$$;s&&s.m(e,i),a||L((()=>{const e=l.map(n).filter(r);c?c.push(...e):o(e),t.$$.on_mount=[]})),u.forEach(L)}(i,a.target,a.anchor,a.customElement),O()}y(h)}let R;"function"==typeof HTMLElement&&(R=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(n).filter(r);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,n,e){this[t]=e}disconnectedCallback(){o(this.$$.on_disconnect)}$destroy(){!function(t,n){const e=t.$$;null!==e.fragment&&(o(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}(this,1),this.$destroy=t}$on(t,n){const e=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return e.push(n),()=>{const t=e.indexOf(n);-1!==t&&e.splice(t,1)}}$set(t){var n;this.$$set&&(n=t,0!==Object.keys(n).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});var z="0.17.13",F=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,H=/\n/g,J=/^\s*/,W=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,B=/^:\s*/,V=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,q=/^[;\s]*/,K=/^\s+|\s+$/g,G="";function Q(t){return t?t.replace(K,G):G}var U=function(t,n){var e,o=null;if(!t||"string"!=typeof t)return o;for(var r,i,a=function(t,n){if("string"!=typeof t)throw new TypeError("First argument must be a string");if(!t)return[];n=n||{};var e=1,o=1;function r(t){var n=t.match(H);n&&(e+=n.length);var r=t.lastIndexOf("\n");o=~r?t.length-r:o+t.length}function i(){var t={line:e,column:o};return function(n){return n.position=new a(t),c(),n}}function a(t){this.start=t,this.end={line:e,column:o},this.source=n.source}function s(r){var i=new Error(n.source+":"+e+":"+o+": "+r);if(i.reason=r,i.filename=n.source,i.line=e,i.column=o,i.source=t,!n.silent)throw i}function l(n){var e=n.exec(t);if(e){var o=e[0];return r(o),t=t.slice(o.length),e}}function c(){l(J)}function u(t){var n;for(t=t||[];n=d();)!1!==n&&t.push(n);return t}function d(){var n=i();if("/"==t.charAt(0)&&"*"==t.charAt(1)){for(var e=2;G!=t.charAt(e)&&("*"!=t.charAt(e)||"/"!=t.charAt(e+1));)++e;if(e+=2,G===t.charAt(e-1))return s("End of comment missing");var a=t.slice(2,e-2);return o+=2,r(a),t=t.slice(e),o+=2,n({type:"comment",comment:a})}}function f(){var t=i(),n=l(W);if(n){if(d(),!l(B))return s("property missing ':'");var e=l(V),o=t({type:"declaration",property:Q(n[0].replace(F,G)),value:e?Q(e[0].replace(F,G)):G});return l(q),o}}return a.prototype.content=t,c(),function(){var t,n=[];for(u(n);t=f();)!1!==t&&(n.push(t),u(n));return n}()}(t),s="function"==typeof n,l=0,c=a.length;l<c;l++)r=(e=a[l]).property,i=e.value,s?n(r,i,e):i&&(o||(o={}),o[r]=i);return o};var X,Y=(function(t,n){n.__esModule=!0,n.LanguageTranslator=n.addComponent=n.getChildStyleToPass=void 0,n.getChildStyleToPass=function(t,n){var e,o,r="";if(t&&(null==n?void 0:n.length)&&(null===(e=Object.keys(t))||void 0===e?void 0:e.length)&&(null===(o=null==n?void 0:n.filter((function(n){return Object.keys(t).includes(n.name)})))||void 0===o?void 0:o.length))for(var i=function(e){(null==n?void 0:n.filter((function(n){return n.name===e&&n.defaultValue!==t[e]})))&&(r+="".concat(e,":").concat(t[e],";"))},a=0,s=Object.keys(t);a<s.length;a++)i(s[a]);return r},n.addComponent=function(t){var n,e=(null===(n=null==t?void 0:t.repoName.split("/"))||void 0===n?void 0:n[1])||(null==t?void 0:t.repoName);if(!e)throw new Error("wrong componentPath "+(null==t?void 0:t.repoName));if(!(null==t?void 0:t.version))throw new Error("wrong version "+(null==t?void 0:t.version));var o=(null==t?void 0:t.iifePath)||"release/release.js";if(!document.getElementById(e+"-script"))try{var r=document.createElement("script");r.id=e+"-script",r.src="https://cdn.jsdelivr.net/npm/".concat(t.repoName,"@").concat(t.version,"/").concat(o),(null==t?void 0:t.local)&&location.href.includes("localhost")&&(r.src="".concat(t.local)),document.head.appendChild(r)}catch(t){console.warn(t)}};var e=function(){function t(t){if(!(null==t?void 0:t.dictionary))throw new Error("no dictionary provided");this.dictionary=t.dictionary,this.setLang(null==t?void 0:t.lang)}return t.prototype.setLang=function(n){n||(n=t.getDefaultLang()),this.lang=n},t.prototype.translateWord=function(n,e){return t.getDictionaryWord(n,this.dictionary,e||this.lang)},t.prototype.translateDate=function(n,e,o){return t.formatDate(n,e,o||this.lang)},t.getDefaultLang=function(){var t,n,e,o,r,i="en";return(null===navigator||void 0===navigator?void 0:navigator.languages)&&(null===(e=null===(n=null===(t=navigator.languages[0])||void 0===t?void 0:t.split("-")[0])||void 0===n?void 0:n.toLowerCase())||void 0===e?void 0:e.length)&&(i=null===(r=null===(o=navigator.languages[0])||void 0===o?void 0:o.split("-")[0])||void 0===r?void 0:r.toLowerCase()),i},t.getDictionaryWord=function(n,e,o){var r;if(!n)throw new Error("no wordKey provided");if(!e)throw new Error("no dictionary provided");if(o&&(null===(r=e[o])||void 0===r?void 0:r[n]))return e[o][n];var i="",a=t.getDefaultLang();if(!o||a!==o){var s=null==e?void 0:e[a];(null==s?void 0:s[n])&&(i=s[n])}return i},t.formatDate=function(n,e,o){if(!n)throw new Error("no date provided");if("function"!=typeof n.getMonth)throw new Error("wrong date format");return new Intl.DateTimeFormat(o||t.getDefaultLang(),e).format(n)},t}();n.LanguageTranslator=e}(X={exports:{}},X.exports),X.exports),Z={vars:[],parts:[{name:"left-slot",description:""},{name:"center-slot",description:""},{name:"right-slot",description:""}]},tt={vars:[{name:"--bs-primary",defaultValue:"#07689f",valueType:"color",theme:"bootstrap"}],parts:[{name:"li",description:"list element"}]};function nt(t,n,e){const o=t.slice();return o[13]=n[e],o}function et(t,n,e){const o=t.slice();return o[16]=n[e],o}function ot(t){let n,e,o,r=[],i=new Map,a=t[0].cards;const u=t=>t[13].id;for(let n=0;n<a.length;n+=1){let e=nt(t,a,n),o=u(e);i.set(o,r[n]=lt(o,e))}return{c(){n=c("hb-navbar"),e=d();for(let t=0;t<r.length;t+=1)r[t].c();o=f()},m(t,i){s(t,n,i),s(t,e,i);for(let n=0;n<r.length;n+=1)r[n].m(t,i);s(t,o,i)},p(t,n){3&n&&(a=t[0].cards,r=j(r,n,u,1,t,a,i,o.parentNode,P,lt,o,nt))},d(t){t&&l(n),t&&l(e);for(let n=0;n<r.length;n+=1)r[n].d(t);t&&l(o)}}}function rt(t){let n,e=[],o=new Map,r=t[13].rows;const i=t=>t[16].id;for(let n=0;n<r.length;n+=1){let a=et(t,r,n),s=i(a);o.set(s,e[n]=st(s,a))}return{c(){n=c("div");for(let t=0;t<e.length;t+=1)e[t].c();h(n,"class","sidebar-card-rows-container")},m(t,o){s(t,n,o);for(let t=0;t<e.length;t+=1)e[t].m(n,null)},p(t,a){3&a&&(r=t[13].rows,e=j(e,a,i,1,t,r,o,n,P,st,null,et))},d(t){t&&l(n);for(let t=0;t<e.length;t+=1)e[t].d()}}}function it(t){let n,e,o;function r(){return t[7](t[16],t[13])}return{c(){n=c("div"),n.textContent="customLine",h(n,"class","sidebar-card-item custom-line-container")},m(t,i){s(t,n,i),e||(o=p(n,"click",r),e=!0)},p(n,e){t=n},d(t){t&&l(n),e=!1,o()}}}function at(t){let n,e,o,r;function i(...n){return t[6](t[16],t[13],...n)}return{c(){n=c("hb-sidenav-link"),g(n,"navlink",e=JSON.stringify(ut(t[16])))},m(t,e){s(t,n,e),o||(r=p(n,"pageChange",i),o=!0)},p(o,r){t=o,1&r&&e!==(e=JSON.stringify(ut(t[16])))&&g(n,"navlink",e)},d(t){t&&l(n),o=!1,r()}}}function st(t,n){let e,o;function r(t,n){return"line"===t[16].type?at:"customLine"===t[16].type?it:void 0}let i=r(n),u=i&&i(n);return{key:t,first:null,c(){e=c("div"),u&&u.c(),o=d(),h(e,"class","sidebar-card-row"),this.first=e},m(t,n){s(t,e,n),u&&u.m(e,null),a(e,o)},p(t,a){i===(i=r(n=t))&&u?u.p(n,a):(u&&u.d(1),u=i&&i(n),u&&(u.c(),u.m(e,o)))},d(t){t&&l(e),u&&u.d()}}}function lt(t,n){let e,o,r=n[13].rows&&n[13].rows.length>0&&rt(n);return{key:t,first:null,c(){e=c("div"),r&&r.c(),o=d(),h(e,"class","sidebar-card-container"),this.first=e},m(t,n){s(t,e,n),r&&r.m(e,null),a(e,o)},p(t,i){(n=t)[13].rows&&n[13].rows.length>0?r?r.p(n,i):(r=rt(n),r.c(),r.m(e,o)):r&&(r.d(1),r=null)},d(t){t&&l(e),r&&r.d()}}}function ct(n){let e,o,r,i,a=n[0]&&ot(n);return{c(){e=u("to be done, ref "),o=c("a"),o.textContent="https://web.telegram.com",r=u(" left panel\n\n"),a&&a.c(),i=f(),this.c=t,h(o,"href","https://web.telegram.org/z/")},m(t,n){s(t,e,n),s(t,o,n),s(t,r,n),a&&a.m(t,n),s(t,i,n)},p(t,[n]){t[0]?a?a.p(t,n):(a=ot(t),a.c(),a.m(i.parentNode,i)):a&&(a.d(1),a=null)},i:t,o:t,d(t){t&&l(e),t&&l(o),t&&l(r),a&&a.d(t),t&&l(i)}}}function ut(t){const n={label:t.text,key:t.id};return t.bootstrapIcon&&(n.icon=t.bootstrapIcon),t.badge&&(n.badge=t.badge),n}function dt(t,n,e){const o=$(),r=b();let i,a,{id:s}=n,{style:l}=n,{panels:c}=n;function u(t,n){const i=a.cards.find((t=>t.id===n)),l=i.rows.find((n=>n.id===t)),u=Object.assign({},a);delete u.cards;const d=Object.assign({},i);delete d.rows;!function(t,n){r(t,n),o.dispatchEvent&&o.dispatchEvent(new CustomEvent(t,{detail:n}))}("itemClick",{id:s,row:l,panel:u,card:d}),l.switchToPanelId&&e(0,a=c.find((t=>t.id===l.switchToPanelId)))}Y.addComponent({repoName:"@htmlbricks/hb-navbar",version:z}),Y.addComponent({repoName:"@htmlbricks/hb-sidenav-link",version:z});return t.$$set=t=>{"id"in t&&e(2,s=t.id),"style"in t&&e(4,l=t.style),"panels"in t&&e(3,c=t.panels)},t.$$.update=()=>{if(61&t.$$.dirty){if(s||e(2,s=""),l&&(e(5,i=U(l)),Y.getChildStyleToPass(i,null==Z?void 0:Z.vars),Y.getChildStyleToPass(i,null==tt?void 0:tt.vars)),"string"==typeof c)try{e(3,c=JSON.parse(c))}catch(t){console.error("error parsing panels",t)}!a&&(null==c?void 0:c.length)&&(e(0,a=c.find((t=>t.main))),a||e(0,a=c.find((t=>!t.parentPanelId))))}},[a,u,s,c,l,i,(t,n,e)=>{u(t.id,n.id)},(t,n)=>{u(t.id,n.id)}]}class ft extends R{constructor(t){super(),this.shadowRoot.innerHTML='<style>@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{font-family:"Roboto", sans-serif}</style>',I(this,{target:this.shadowRoot,props:m(this.attributes),customElement:!0},dt,ct,i,{id:2,style:4,panels:3},null),t&&(t.target&&s(t.target,this,t.anchor),t.props&&(this.$set(t.props),O()))}static get observedAttributes(){return["id","style","panels"]}get id(){return this.$$.ctx[2]}set id(t){this.$$set({id:t}),O()}get style(){return this.$$.ctx[4]}set style(t){this.$$set({style:t}),O()}get panels(){return this.$$.ctx[3]}set panels(t){this.$$set({panels:t}),O()}}return customElements.define("hb-sidebar-cards-navigator",ft),ft}();
1
+ var release=function(){"use strict";function t(){}function n(t){return t()}function e(){return Object.create(null)}function o(t){t.forEach(n)}function r(t){return"function"==typeof t}function i(t,n){return t!=t?n==n:t!==n||t&&"object"==typeof t||"function"==typeof t}function a(t,n){t.appendChild(n)}function s(t,n,e){t.insertBefore(n,e||null)}function l(t){t.parentNode.removeChild(t)}function c(t){return document.createElement(t)}function u(t){return document.createTextNode(t)}function d(){return u(" ")}function f(){return u("")}function p(t,n,e,o){return t.addEventListener(n,e,o),()=>t.removeEventListener(n,e,o)}function h(t,n,e){null==e?t.removeAttribute(n):t.getAttribute(n)!==e&&t.setAttribute(n,e)}function g(t,n,e){n in t?t[n]="boolean"==typeof t[n]&&""===e||e:h(t,n,e)}function m(t){const n={};for(const e of t)n[e.name]=e.value;return n}let v;function y(t){v=t}function $(){if(!v)throw new Error("Function called outside component initialization");return v}function b(){const t=$();return(n,e,{cancelable:o=!1}={})=>{const r=t.$$.callbacks[n];if(r){const i=function(t,n,{bubbles:e=!1,cancelable:o=!1}={}){const r=document.createEvent("CustomEvent");return r.initCustomEvent(t,e,o,n),r}(n,e,{cancelable:o});return r.slice().forEach((n=>{n.call(t,i)})),!i.defaultPrevented}return!0}}const w=[],k=[],E=[],x=[],C=Promise.resolve();let _=!1;function L(t){E.push(t)}const T=new Set;let N=0;function O(){const t=v;do{for(;N<w.length;){const t=w[N];N++,y(t),S(t.$$)}for(y(null),w.length=0,N=0;k.length;)k.pop()();for(let t=0;t<E.length;t+=1){const n=E[t];T.has(n)||(T.add(n),n())}E.length=0}while(w.length);for(;x.length;)x.pop()();_=!1,T.clear(),y(t)}function S(t){if(null!==t.fragment){t.update(),o(t.before_update);const n=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,n),t.after_update.forEach(L)}}const A=new Set;function M(t,n){t&&t.i&&(A.delete(t),t.i(n))}function P(t,n){t.d(1),n.delete(t.key)}function j(t,n,e,o,r,i,a,s,l,c,u,d){let f=t.length,p=i.length,h=f;const g={};for(;h--;)g[t[h].key]=h;const m=[],v=new Map,y=new Map;for(h=p;h--;){const t=d(r,i,h),s=e(t);let l=a.get(s);l?o&&l.p(t,n):(l=c(s,t),l.c()),v.set(s,m[h]=l),s in g&&y.set(s,Math.abs(h-g[s]))}const $=new Set,b=new Set;function w(t){M(t,1),t.m(s,u),a.set(t.key,t),u=t.first,p--}for(;f&&p;){const n=m[p-1],e=t[f-1],o=n.key,r=e.key;n===e?(u=n.first,f--,p--):v.has(r)?!a.has(o)||$.has(o)?w(n):b.has(r)?f--:y.get(o)>y.get(r)?(b.add(o),w(n)):($.add(r),f--):(l(e,a),f--)}for(;f--;){const n=t[f];v.has(n.key)||l(n,a)}for(;p;)w(m[p-1]);return m}function D(t,n){-1===t.$$.dirty[0]&&(w.push(t),_||(_=!0,C.then(O)),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<<n%31}function I(i,a,s,c,u,d,f,p=[-1]){const h=v;y(i);const g=i.$$={fragment:null,ctx:null,props:d,update:t,not_equal:u,bound:e(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a.context||(h?h.$$.context:[])),callbacks:e(),dirty:p,skip_bound:!1,root:a.target||h.$$.root};f&&f(g.root);let m=!1;if(g.ctx=s?s(i,a.props||{},((t,n,...e)=>{const o=e.length?e[0]:n;return g.ctx&&u(g.ctx[t],g.ctx[t]=o)&&(!g.skip_bound&&g.bound[t]&&g.bound[t](o),m&&D(i,t)),n})):[],g.update(),m=!0,o(g.before_update),g.fragment=!!c&&c(g.ctx),a.target){if(a.hydrate){const t=function(t){return Array.from(t.childNodes)}(a.target);g.fragment&&g.fragment.l(t),t.forEach(l)}else g.fragment&&g.fragment.c();a.intro&&M(i.$$.fragment),function(t,e,i,a){const{fragment:s,on_mount:l,on_destroy:c,after_update:u}=t.$$;s&&s.m(e,i),a||L((()=>{const e=l.map(n).filter(r);c?c.push(...e):o(e),t.$$.on_mount=[]})),u.forEach(L)}(i,a.target,a.anchor,a.customElement),O()}y(h)}let R;"function"==typeof HTMLElement&&(R=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(n).filter(r);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,n,e){this[t]=e}disconnectedCallback(){o(this.$$.on_disconnect)}$destroy(){!function(t,n){const e=t.$$;null!==e.fragment&&(o(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}(this,1),this.$destroy=t}$on(t,n){const e=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return e.push(n),()=>{const t=e.indexOf(n);-1!==t&&e.splice(t,1)}}$set(t){var n;this.$$set&&(n=t,0!==Object.keys(n).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});var z="0.17.16",F=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,H=/\n/g,J=/^\s*/,W=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,B=/^:\s*/,V=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,q=/^[;\s]*/,K=/^\s+|\s+$/g,G="";function Q(t){return t?t.replace(K,G):G}var U=function(t,n){var e,o=null;if(!t||"string"!=typeof t)return o;for(var r,i,a=function(t,n){if("string"!=typeof t)throw new TypeError("First argument must be a string");if(!t)return[];n=n||{};var e=1,o=1;function r(t){var n=t.match(H);n&&(e+=n.length);var r=t.lastIndexOf("\n");o=~r?t.length-r:o+t.length}function i(){var t={line:e,column:o};return function(n){return n.position=new a(t),c(),n}}function a(t){this.start=t,this.end={line:e,column:o},this.source=n.source}function s(r){var i=new Error(n.source+":"+e+":"+o+": "+r);if(i.reason=r,i.filename=n.source,i.line=e,i.column=o,i.source=t,!n.silent)throw i}function l(n){var e=n.exec(t);if(e){var o=e[0];return r(o),t=t.slice(o.length),e}}function c(){l(J)}function u(t){var n;for(t=t||[];n=d();)!1!==n&&t.push(n);return t}function d(){var n=i();if("/"==t.charAt(0)&&"*"==t.charAt(1)){for(var e=2;G!=t.charAt(e)&&("*"!=t.charAt(e)||"/"!=t.charAt(e+1));)++e;if(e+=2,G===t.charAt(e-1))return s("End of comment missing");var a=t.slice(2,e-2);return o+=2,r(a),t=t.slice(e),o+=2,n({type:"comment",comment:a})}}function f(){var t=i(),n=l(W);if(n){if(d(),!l(B))return s("property missing ':'");var e=l(V),o=t({type:"declaration",property:Q(n[0].replace(F,G)),value:e?Q(e[0].replace(F,G)):G});return l(q),o}}return a.prototype.content=t,c(),function(){var t,n=[];for(u(n);t=f();)!1!==t&&(n.push(t),u(n));return n}()}(t),s="function"==typeof n,l=0,c=a.length;l<c;l++)r=(e=a[l]).property,i=e.value,s?n(r,i,e):i&&(o||(o={}),o[r]=i);return o};var X,Y=(function(t,n){n.__esModule=!0,n.LanguageTranslator=n.addComponent=n.getChildStyleToPass=void 0,n.getChildStyleToPass=function(t,n){var e,o,r="";if(t&&(null==n?void 0:n.length)&&(null===(e=Object.keys(t))||void 0===e?void 0:e.length)&&(null===(o=null==n?void 0:n.filter((function(n){return Object.keys(t).includes(n.name)})))||void 0===o?void 0:o.length))for(var i=function(e){(null==n?void 0:n.filter((function(n){return n.name===e&&n.defaultValue!==t[e]})))&&(r+="".concat(e,":").concat(t[e],";"))},a=0,s=Object.keys(t);a<s.length;a++)i(s[a]);return r},n.addComponent=function(t){var n,e=(null===(n=null==t?void 0:t.repoName.split("/"))||void 0===n?void 0:n[1])||(null==t?void 0:t.repoName);if(!e)throw new Error("wrong componentPath "+(null==t?void 0:t.repoName));if(!(null==t?void 0:t.version))throw new Error("wrong version "+(null==t?void 0:t.version));var o=(null==t?void 0:t.iifePath)||"release/release.js";if(!document.getElementById(e+"-script"))try{var r=document.createElement("script");r.id=e+"-script",r.src="https://cdn.jsdelivr.net/npm/".concat(t.repoName,"@").concat(t.version,"/").concat(o),(null==t?void 0:t.local)&&location.href.includes("localhost")&&(r.src="".concat(t.local)),document.head.appendChild(r)}catch(t){console.warn(t)}};var e=function(){function t(t){if(!(null==t?void 0:t.dictionary))throw new Error("no dictionary provided");this.dictionary=t.dictionary,this.setLang(null==t?void 0:t.lang)}return t.prototype.setLang=function(n){n||(n=t.getDefaultLang()),this.lang=n},t.prototype.translateWord=function(n,e){return t.getDictionaryWord(n,this.dictionary,e||this.lang)},t.prototype.translateDate=function(n,e,o){return t.formatDate(n,e,o||this.lang)},t.getDefaultLang=function(){var t,n,e,o,r,i="en";return(null===navigator||void 0===navigator?void 0:navigator.languages)&&(null===(e=null===(n=null===(t=navigator.languages[0])||void 0===t?void 0:t.split("-")[0])||void 0===n?void 0:n.toLowerCase())||void 0===e?void 0:e.length)&&(i=null===(r=null===(o=navigator.languages[0])||void 0===o?void 0:o.split("-")[0])||void 0===r?void 0:r.toLowerCase()),i},t.getDictionaryWord=function(n,e,o){var r;if(!n)throw new Error("no wordKey provided");if(!e)throw new Error("no dictionary provided");if(o&&(null===(r=e[o])||void 0===r?void 0:r[n]))return e[o][n];var i="",a=t.getDefaultLang();if(!o||a!==o){var s=null==e?void 0:e[a];(null==s?void 0:s[n])&&(i=s[n])}return i},t.formatDate=function(n,e,o){if(!n)throw new Error("no date provided");if("function"!=typeof n.getMonth)throw new Error("wrong date format");return new Intl.DateTimeFormat(o||t.getDefaultLang(),e).format(n)},t}();n.LanguageTranslator=e}(X={exports:{}},X.exports),X.exports),Z={vars:[],parts:[{name:"left-slot",description:""},{name:"center-slot",description:""},{name:"right-slot",description:""}]},tt={vars:[{name:"--bs-primary",defaultValue:"#07689f",valueType:"color",theme:"bootstrap"}],parts:[{name:"li",description:"list element"}]};function nt(t,n,e){const o=t.slice();return o[13]=n[e],o}function et(t,n,e){const o=t.slice();return o[16]=n[e],o}function ot(t){let n,e,o,r=[],i=new Map,a=t[0].cards;const u=t=>t[13].id;for(let n=0;n<a.length;n+=1){let e=nt(t,a,n),o=u(e);i.set(o,r[n]=lt(o,e))}return{c(){n=c("hb-navbar"),e=d();for(let t=0;t<r.length;t+=1)r[t].c();o=f()},m(t,i){s(t,n,i),s(t,e,i);for(let n=0;n<r.length;n+=1)r[n].m(t,i);s(t,o,i)},p(t,n){3&n&&(a=t[0].cards,r=j(r,n,u,1,t,a,i,o.parentNode,P,lt,o,nt))},d(t){t&&l(n),t&&l(e);for(let n=0;n<r.length;n+=1)r[n].d(t);t&&l(o)}}}function rt(t){let n,e=[],o=new Map,r=t[13].rows;const i=t=>t[16].id;for(let n=0;n<r.length;n+=1){let a=et(t,r,n),s=i(a);o.set(s,e[n]=st(s,a))}return{c(){n=c("div");for(let t=0;t<e.length;t+=1)e[t].c();h(n,"class","sidebar-card-rows-container")},m(t,o){s(t,n,o);for(let t=0;t<e.length;t+=1)e[t].m(n,null)},p(t,a){3&a&&(r=t[13].rows,e=j(e,a,i,1,t,r,o,n,P,st,null,et))},d(t){t&&l(n);for(let t=0;t<e.length;t+=1)e[t].d()}}}function it(t){let n,e,o;function r(){return t[7](t[16],t[13])}return{c(){n=c("div"),n.textContent="customLine",h(n,"class","sidebar-card-item custom-line-container")},m(t,i){s(t,n,i),e||(o=p(n,"click",r),e=!0)},p(n,e){t=n},d(t){t&&l(n),e=!1,o()}}}function at(t){let n,e,o,r;function i(...n){return t[6](t[16],t[13],...n)}return{c(){n=c("hb-sidenav-link"),g(n,"navlink",e=JSON.stringify(ut(t[16])))},m(t,e){s(t,n,e),o||(r=p(n,"pageChange",i),o=!0)},p(o,r){t=o,1&r&&e!==(e=JSON.stringify(ut(t[16])))&&g(n,"navlink",e)},d(t){t&&l(n),o=!1,r()}}}function st(t,n){let e,o;function r(t,n){return"line"===t[16].type?at:"customLine"===t[16].type?it:void 0}let i=r(n),u=i&&i(n);return{key:t,first:null,c(){e=c("div"),u&&u.c(),o=d(),h(e,"class","sidebar-card-row"),this.first=e},m(t,n){s(t,e,n),u&&u.m(e,null),a(e,o)},p(t,a){i===(i=r(n=t))&&u?u.p(n,a):(u&&u.d(1),u=i&&i(n),u&&(u.c(),u.m(e,o)))},d(t){t&&l(e),u&&u.d()}}}function lt(t,n){let e,o,r=n[13].rows&&n[13].rows.length>0&&rt(n);return{key:t,first:null,c(){e=c("div"),r&&r.c(),o=d(),h(e,"class","sidebar-card-container"),this.first=e},m(t,n){s(t,e,n),r&&r.m(e,null),a(e,o)},p(t,i){(n=t)[13].rows&&n[13].rows.length>0?r?r.p(n,i):(r=rt(n),r.c(),r.m(e,o)):r&&(r.d(1),r=null)},d(t){t&&l(e),r&&r.d()}}}function ct(n){let e,o,r,i,a=n[0]&&ot(n);return{c(){e=u("to be done, ref "),o=c("a"),o.textContent="https://web.telegram.com",r=u(" left panel\n\n"),a&&a.c(),i=f(),this.c=t,h(o,"href","https://web.telegram.org/z/")},m(t,n){s(t,e,n),s(t,o,n),s(t,r,n),a&&a.m(t,n),s(t,i,n)},p(t,[n]){t[0]?a?a.p(t,n):(a=ot(t),a.c(),a.m(i.parentNode,i)):a&&(a.d(1),a=null)},i:t,o:t,d(t){t&&l(e),t&&l(o),t&&l(r),a&&a.d(t),t&&l(i)}}}function ut(t){const n={label:t.text,key:t.id};return t.bootstrapIcon&&(n.icon=t.bootstrapIcon),t.badge&&(n.badge=t.badge),n}function dt(t,n,e){const o=$(),r=b();let i,a,{id:s}=n,{style:l}=n,{panels:c}=n;function u(t,n){const i=a.cards.find((t=>t.id===n)),l=i.rows.find((n=>n.id===t)),u=Object.assign({},a);delete u.cards;const d=Object.assign({},i);delete d.rows;!function(t,n){r(t,n),o.dispatchEvent&&o.dispatchEvent(new CustomEvent(t,{detail:n}))}("itemClick",{id:s,row:l,panel:u,card:d}),l.switchToPanelId&&e(0,a=c.find((t=>t.id===l.switchToPanelId)))}Y.addComponent({repoName:"@htmlbricks/hb-navbar",version:z}),Y.addComponent({repoName:"@htmlbricks/hb-sidenav-link",version:z});return t.$$set=t=>{"id"in t&&e(2,s=t.id),"style"in t&&e(4,l=t.style),"panels"in t&&e(3,c=t.panels)},t.$$.update=()=>{if(61&t.$$.dirty){if(s||e(2,s=""),l&&(e(5,i=U(l)),Y.getChildStyleToPass(i,null==Z?void 0:Z.vars),Y.getChildStyleToPass(i,null==tt?void 0:tt.vars)),"string"==typeof c)try{e(3,c=JSON.parse(c))}catch(t){console.error("error parsing panels",t)}!a&&(null==c?void 0:c.length)&&(e(0,a=c.find((t=>t.main))),a||e(0,a=c.find((t=>!t.parentPanelId))))}},[a,u,s,c,l,i,(t,n,e)=>{u(t.id,n.id)},(t,n)=>{u(t.id,n.id)}]}class ft extends R{constructor(t){super(),this.shadowRoot.innerHTML='<style>@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{font-family:"Roboto", sans-serif}</style>',I(this,{target:this.shadowRoot,props:m(this.attributes),customElement:!0},dt,ct,i,{id:2,style:4,panels:3},null),t&&(t.target&&s(t.target,this,t.anchor),t.props&&(this.$set(t.props),O()))}static get observedAttributes(){return["id","style","panels"]}get id(){return this.$$.ctx[2]}set id(t){this.$$set({id:t}),O()}get style(){return this.$$.ctx[4]}set style(t){this.$$set({style:t}),O()}get panels(){return this.$$.ctx[3]}set panels(t){this.$$set({panels:t}),O()}}return customElements.define("hb-sidebar-cards-navigator",ft),ft}();
2
2
  //# sourceMappingURL=release.js.map