@htmlbricks/hb-modal-video 0.20.13 → 0.20.14
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 +3 -3
- package/release/manifest.json +1 -1
- package/release/release.js +1 -1
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@htmlbricks/hb-modal-video",
|
|
3
3
|
"displayName": "Svelte-Bootstrap Video Modal WebComponent",
|
|
4
4
|
"description": "Svelte-Bootstrap Video Modal WebComponent",
|
|
5
|
-
"version": "0.20.
|
|
5
|
+
"version": "0.20.14",
|
|
6
6
|
"main": "release/release.js",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"wc-js-utils": "^0.0.1"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@htmlbricks/hb-dialog": "^0.20.
|
|
73
|
+
"@htmlbricks/hb-dialog": "^0.20.14"
|
|
74
74
|
},
|
|
75
75
|
"keywords": [
|
|
76
76
|
"svelte",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"webcomponents"
|
|
79
79
|
],
|
|
80
80
|
"contributors": [],
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "c84e5b078c97ae6f095adf39897b0294da01dea3"
|
|
82
82
|
}
|
package/release/manifest.json
CHANGED
package/release/release.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var release=function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function o(t){t.forEach(e)}function r(t){return"function"==typeof t}function i(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}let a,l;function s(t,e){return a||(a=document.createElement("a")),a.href=e,t===a.href}function c(t,e){t.appendChild(e)}function u(t,e,n){t.insertBefore(e,n||null)}function d(t){t.parentNode&&t.parentNode.removeChild(t)}function f(t){return document.createElement(t)}function p(t){return document.createTextNode(t)}function h(){return p(" ")}function m(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function v(t,e,n){e in t?t[e]="boolean"==typeof t[e]&&""===n||n:m(t,e,n)}function g(t,e,n,o){null==n?t.style.removeProperty(e):t.style.setProperty(e,n,o?"important":"")}function $(t){const e={};for(const n of t)e[n.name]=n.value;return e}function y(t){l=t}function b(){if(!l)throw new Error("Function called outside component initialization");return l}function w(){const t=b();return(e,n,{cancelable:o=!1}={})=>{const r=t.$$.callbacks[e];if(r){const i=function(t,e,{bubbles:n=!1,cancelable:o=!1}={}){const r=document.createEvent("CustomEvent");return r.initCustomEvent(t,n,o,e),r}(e,n,{cancelable:o});return r.slice().forEach((e=>{e.call(t,i)})),!i.defaultPrevented}return!0}}const E=[],x=[];let _=[];const C=[],k=Promise.resolve();let T=!1;function L(t){_.push(t)}const A=new Set;let D=0;function N(){if(0!==D)return;const t=l;do{try{for(;D<E.length;){const t=E[D];D++,y(t),P(t.$$)}}catch(t){throw E.length=0,D=0,t}for(y(null),E.length=0,D=0;x.length;)x.pop()();for(let t=0;t<_.length;t+=1){const e=_[t];A.has(e)||(A.add(e),e())}_.length=0}while(E.length);for(;C.length;)C.pop()();T=!1,A.clear(),y(t)}function P(t){if(null!==t.fragment){t.update(),o(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(L)}}const V=new Set;function j(t,e){const n=t.$$;null!==n.fragment&&(!function(t){const e=[],n=[];_.forEach((o=>-1===t.indexOf(o)?e.push(o):n.push(o))),n.forEach((t=>t())),_=e}(n.after_update),o(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function O(t,e){-1===t.$$.dirty[0]&&(E.push(t),T||(T=!0,k.then(N)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function S(i,a,s,c,u,f,p,h=[-1]){const m=l;y(i);const v=i.$$={fragment:null,ctx:[],props:f,update:t,not_equal:u,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a.context||(m?m.$$.context:[])),callbacks:n(),dirty:h,skip_bound:!1,root:a.target||m.$$.root};p&&p(v.root);let g=!1;if(v.ctx=s?s(i,a.props||{},((t,e,...n)=>{const o=n.length?n[0]:e;return v.ctx&&u(v.ctx[t],v.ctx[t]=o)&&(!v.skip_bound&&v.bound[t]&&v.bound[t](o),g&&O(i,t)),e})):[],v.update(),g=!0,o(v.before_update),v.fragment=!!c&&c(v.ctx),a.target){if(a.hydrate){const t=function(t){return Array.from(t.childNodes)}(a.target);v.fragment&&v.fragment.l(t),t.forEach(d)}else v.fragment&&v.fragment.c();a.intro&&(($=i.$$.fragment)&&$.i&&(V.delete($),$.i(b))),function(t,n,i,a){const{fragment:l,after_update:s}=t.$$;l&&l.m(n,i),a||L((()=>{const n=t.$$.on_mount.map(e).filter(r);t.$$.on_destroy?t.$$.on_destroy.push(...n):o(n),t.$$.on_mount=[]})),s.forEach(L)}(i,a.target,a.anchor,a.customElement),N()}var $,b;y(m)}let M;"function"==typeof HTMLElement&&(M=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(e).filter(r);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){o(this.$$.on_disconnect)}$destroy(){j(this,1),this.$destroy=t}$on(e,n){if(!r(n))return t;const o=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return o.push(n),()=>{const t=o.indexOf(n);-1!==t&&o.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});var F,I=(function(t,e){e.__esModule=!0,e.LanguageTranslator=e.addComponent=e.getChildStyleToPass=void 0,e.getChildStyleToPass=function(t,e){var n,o,r="";if(t&&(null==e?void 0:e.length)&&(null===(n=Object.keys(t))||void 0===n?void 0:n.length)&&(null===(o=null==e?void 0:e.filter((function(e){return Object.keys(t).includes(e.name)})))||void 0===o?void 0:o.length))for(var i=function(n){(null==e?void 0:e.filter((function(e){return e.name===n&&e.defaultValue!==t[n]})))&&(r+="".concat(n,":").concat(t[n],";"))},a=0,l=Object.keys(t);a<l.length;a++)i(l[a]);return r},e.addComponent=function(t){var e,n=(null===(e=null==t?void 0:t.repoName.split("/"))||void 0===e?void 0:e[1])||(null==t?void 0:t.repoName);if(!n)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(n+"-script"))try{var r=document.createElement("script");r.id=n+"-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 n=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(e){e||(e=t.getDefaultLang()),this.lang=e},t.prototype.translateWord=function(e,n){return t.getDictionaryWord(e,this.dictionary,n||this.lang)},t.prototype.translateDate=function(e,n,o){return t.formatDate(e,n,o||this.lang)},t.getDefaultLang=function(){var t,e,n,o,r,i="en";return(null===navigator||void 0===navigator?void 0:navigator.languages)&&(null===(n=null===(e=null===(t=navigator.languages[0])||void 0===t?void 0:t.split("-")[0])||void 0===e?void 0:e.toLowerCase())||void 0===n?void 0:n.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(e,n,o){var r;if(!e)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[e]))return n[o][e];var i="",a=t.getDefaultLang();if(!o||a!==o){var l=null==n?void 0:n[a];(null==l?void 0:l[e])&&(i=l[e])}return i},t.formatDate=function(e,n,o){if(!e)throw new Error("no date provided");if("function"!=typeof e.getMonth)throw new Error("wrong date format");return new Intl.DateTimeFormat(o||t.getDefaultLang(),n).format(e)},t}();e.LanguageTranslator=n}(F={exports:{}},F.exports),F.exports),R=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,z=/\n/g,W=/^\s*/,B=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,H=/^:\s*/,Y=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,q=/^[;\s]*/,K=/^\s+|\s+$/g,G="";function J(t){return t?t.replace(K,G):G}var Q=function(t,e){var n,o=null;if(!t||"string"!=typeof t)return o;for(var r,i,a=function(t,e){if("string"!=typeof t)throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var n=1,o=1;function r(t){var e=t.match(z);e&&(n+=e.length);var r=t.lastIndexOf("\n");o=~r?t.length-r:o+t.length}function i(){var t={line:n,column:o};return function(e){return e.position=new a(t),c(),e}}function a(t){this.start=t,this.end={line:n,column:o},this.source=e.source}function l(r){var i=new Error(e.source+":"+n+":"+o+": "+r);if(i.reason=r,i.filename=e.source,i.line=n,i.column=o,i.source=t,!e.silent)throw i}function s(e){var n=e.exec(t);if(n){var o=n[0];return r(o),t=t.slice(o.length),n}}function c(){s(W)}function u(t){var e;for(t=t||[];e=d();)!1!==e&&t.push(e);return t}function d(){var e=i();if("/"==t.charAt(0)&&"*"==t.charAt(1)){for(var n=2;G!=t.charAt(n)&&("*"!=t.charAt(n)||"/"!=t.charAt(n+1));)++n;if(n+=2,G===t.charAt(n-1))return l("End of comment missing");var a=t.slice(2,n-2);return o+=2,r(a),t=t.slice(n),o+=2,e({type:"comment",comment:a})}}function f(){var t=i(),e=s(B);if(e){if(d(),!s(H))return l("property missing ':'");var n=s(Y),o=t({type:"declaration",property:J(e[0].replace(R,G)),value:n?J(n[0].replace(R,G)):G});return s(q),o}}return a.prototype.content=t,c(),function(){var t,e=[];for(u(e);t=f();)!1!==t&&(e.push(t),u(e));return e}()}(t),l="function"==typeof e,s=0,c=a.length;s<c;s++)r=(n=a[s]).property,i=n.value,l?e(r,i,n):i&&(o||(o={}),o[r]=i);return o},U={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"},{name:"--hb-modal-max-width",valueType:"htmlsize",defaultValue:"500px"}],parts:[{name:"modal-dialog",description:"The modal dialog"}]},X="0.20.13";function Z(t){let e,n,o,r;return{c(){e=f("span"),n=f("slot"),o=p("Video: "),r=p(t[2]),m(n,"name","title"),m(e,"slot","title")},m(t,i){u(t,e,i),c(e,n),c(n,o),c(n,r)},p(t,e){4&e&&function(t,e){e=""+e,t.data!==e&&(t.data=e)}(r,t[2])},d(t){t&&d(e)}}}function tt(t){let e;function n(t,e){return"youtube"===t[3]?nt:et}let o=n(t),r=o(t);return{c(){r.c(),e=p("")},m(t,n){r.m(t,n),u(t,e,n)},p(t,i){o===(o=n(t))&&r?r.p(t,i):(r.d(1),r=o(t),r&&(r.c(),r.m(e.parentNode,e)))},d(t){r.d(t),t&&d(e)}}}function et(t){let e,n,o,r,i,a;return{c(){e=f("div"),n=f("video"),o=f("track"),r=f("source"),a=p("\n\t\t\t\t\t\tYour browser does not support the video tag."),m(o,"kind","captions"),s(r.src,i=t[1])||m(r,"src",i),m(r,"type","video/mp4"),n.controls=!0,g(n,"aspect-ratio","16 / 9"),g(n,"width","100%"),g(e,"aspect-ratio","16 / 9"),g(e,"width","100%"),g(e,"text-align","center"),g(e,"background-color","black")},m(t,i){u(t,e,i),c(e,n),c(n,o),c(n,r),c(n,a)},p(t,e){2&e&&!s(r.src,i=t[1])&&m(r,"src",i)},d(t){t&&d(e)}}}function nt(t){let e,n,o;return{c(){e=f("div"),n=f("iframe"),g(n,"border","0"),g(n,"aspect-ratio","16 / 9"),g(n,"width","100%"),s(n.src,o=t[1])||m(n,"src",o),m(n,"title","YouTube video"),n.allowFullscreen=!0,g(e,"ratio","16/9"),g(e,"width","100%"),g(e,"text-align","center")},m(t,o){u(t,e,o),c(e,n)},p(t,e){2&e&&!s(n.src,o=t[1])&&m(n,"src",o)},d(t){t&&d(e)}}}function ot(e){let n,o,r,i,a,l,s,p,g=e[2]&&Z(e),$=e[1]&&tt(e);return{c(){n=f("hb-dialog"),g&&g.c(),o=h(),r=f("div"),$&&$.c(),i=h(),a=f("span"),this.c=t,m(r,"slot","body-content"),m(a,"slot","modal-footer"),v(n,"style",e[4]),v(n,"id",e[0]),v(n,"show",l=e[1]?"yes":"no")},m(t,l){var d,f,h,m;u(t,n,l),g&&g.m(n,null),c(n,o),c(n,r),$&&$.m(r,null),c(n,i),c(n,a),s||(d=n,f="modalShow",h=e[9],d.addEventListener(f,h,m),p=()=>d.removeEventListener(f,h,m),s=!0)},p(t,[e]){t[2]?g?g.p(t,e):(g=Z(t),g.c(),g.m(n,o)):g&&(g.d(1),g=null),t[1]?$?$.p(t,e):($=tt(t),$.c(),$.m(r,null)):$&&($.d(1),$=null),16&e&&v(n,"style",t[4]),1&e&&v(n,"id",t[0]),2&e&&l!==(l=t[1]?"yes":"no")&&v(n,"show",l)},i:t,o:t,d(t){t&&d(n),g&&g.d(),$&&$.d(),s=!1,p()}}}function rt(t,e,n){let o,{style:r}=e,i="";const a=b(),l=w();I.addComponent({repoName:"@htmlbricks/hb-dialog",version:X});let{id:s}=e,{item:c}=e,{uri:u}=e,{title:d}=e,{provider:f}=e;function p(t){t.show?n(0,c=t.id):(n(0,c=""),n(1,u=""),n(2,d="")),function(t,e){l(t,e),a.dispatchEvent&&a.dispatchEvent(new CustomEvent(t,{detail:e}))}("videoModalEvent",{id:c,show:t.show})}return t.$$set=t=>{"style"in t&&n(7,r=t.style),"id"in t&&n(6,s=t.id),"item"in t&&n(0,c=t.item),"uri"in t&&n(1,u=t.uri),"title"in t&&n(2,d=t.title),"provider"in t&&n(3,f=t.provider)},t.$$.update=()=>{463&t.$$.dirty&&(s||n(6,s=null),r&&(n(8,o=Q(r)),n(4,i=I.getChildStyleToPass(o,null==U?void 0:U.vars))),c||n(0,c="defaultItem"),u||n(1,u=""),d||n(2,d=""),f||n(3,f=""))},[c,u,d,f,i,p,s,r,o,t=>p(t.detail)]}class it extends M{constructor(t){super();const e=document.createElement("style");e.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{font-family:"Roboto", sans-serif}',this.shadowRoot.appendChild(e),S(this,{target:this.shadowRoot,props:$(this.attributes),customElement:!0},rt,ot,i,{style:7,id:6,item:0,uri:1,title:2,provider:3},null),t&&(t.target&&u(t.target,this,t.anchor),t.props&&(this.$set(t.props),N()))}static get observedAttributes(){return["style","id","item","uri","title","provider"]}get style(){return this.$$.ctx[7]}set style(t){this.$$set({style:t}),N()}get id(){return this.$$.ctx[6]}set id(t){this.$$set({id:t}),N()}get item(){return this.$$.ctx[0]}set item(t){this.$$set({item:t}),N()}get uri(){return this.$$.ctx[1]}set uri(t){this.$$set({uri:t}),N()}get title(){return this.$$.ctx[2]}set title(t){this.$$set({title:t}),N()}get provider(){return this.$$.ctx[3]}set provider(t){this.$$set({provider:t}),N()}}return customElements.define("hb-modal-video",it),it}();
|
|
1
|
+
var release=function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function o(t){t.forEach(e)}function r(t){return"function"==typeof t}function i(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}let a,l;function s(t,e){return a||(a=document.createElement("a")),a.href=e,t===a.href}function c(t,e){t.appendChild(e)}function u(t,e,n){t.insertBefore(e,n||null)}function d(t){t.parentNode&&t.parentNode.removeChild(t)}function f(t){return document.createElement(t)}function p(t){return document.createTextNode(t)}function h(){return p(" ")}function m(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function v(t,e,n){e in t?t[e]="boolean"==typeof t[e]&&""===n||n:m(t,e,n)}function g(t,e,n,o){null==n?t.style.removeProperty(e):t.style.setProperty(e,n,o?"important":"")}function $(t){const e={};for(const n of t)e[n.name]=n.value;return e}function y(t){l=t}function b(){if(!l)throw new Error("Function called outside component initialization");return l}function w(){const t=b();return(e,n,{cancelable:o=!1}={})=>{const r=t.$$.callbacks[e];if(r){const i=function(t,e,{bubbles:n=!1,cancelable:o=!1}={}){const r=document.createEvent("CustomEvent");return r.initCustomEvent(t,n,o,e),r}(e,n,{cancelable:o});return r.slice().forEach((e=>{e.call(t,i)})),!i.defaultPrevented}return!0}}const E=[],x=[];let _=[];const C=[],k=Promise.resolve();let T=!1;function L(t){_.push(t)}const A=new Set;let D=0;function N(){if(0!==D)return;const t=l;do{try{for(;D<E.length;){const t=E[D];D++,y(t),P(t.$$)}}catch(t){throw E.length=0,D=0,t}for(y(null),E.length=0,D=0;x.length;)x.pop()();for(let t=0;t<_.length;t+=1){const e=_[t];A.has(e)||(A.add(e),e())}_.length=0}while(E.length);for(;C.length;)C.pop()();T=!1,A.clear(),y(t)}function P(t){if(null!==t.fragment){t.update(),o(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(L)}}const V=new Set;function j(t,e){const n=t.$$;null!==n.fragment&&(!function(t){const e=[],n=[];_.forEach((o=>-1===t.indexOf(o)?e.push(o):n.push(o))),n.forEach((t=>t())),_=e}(n.after_update),o(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function O(t,e){-1===t.$$.dirty[0]&&(E.push(t),T||(T=!0,k.then(N)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function S(i,a,s,c,u,f,p,h=[-1]){const m=l;y(i);const v=i.$$={fragment:null,ctx:[],props:f,update:t,not_equal:u,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a.context||(m?m.$$.context:[])),callbacks:n(),dirty:h,skip_bound:!1,root:a.target||m.$$.root};p&&p(v.root);let g=!1;if(v.ctx=s?s(i,a.props||{},((t,e,...n)=>{const o=n.length?n[0]:e;return v.ctx&&u(v.ctx[t],v.ctx[t]=o)&&(!v.skip_bound&&v.bound[t]&&v.bound[t](o),g&&O(i,t)),e})):[],v.update(),g=!0,o(v.before_update),v.fragment=!!c&&c(v.ctx),a.target){if(a.hydrate){const t=function(t){return Array.from(t.childNodes)}(a.target);v.fragment&&v.fragment.l(t),t.forEach(d)}else v.fragment&&v.fragment.c();a.intro&&(($=i.$$.fragment)&&$.i&&(V.delete($),$.i(b))),function(t,n,i,a){const{fragment:l,after_update:s}=t.$$;l&&l.m(n,i),a||L((()=>{const n=t.$$.on_mount.map(e).filter(r);t.$$.on_destroy?t.$$.on_destroy.push(...n):o(n),t.$$.on_mount=[]})),s.forEach(L)}(i,a.target,a.anchor,a.customElement),N()}var $,b;y(m)}let M;"function"==typeof HTMLElement&&(M=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(e).filter(r);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){o(this.$$.on_disconnect)}$destroy(){j(this,1),this.$destroy=t}$on(e,n){if(!r(n))return t;const o=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return o.push(n),()=>{const t=o.indexOf(n);-1!==t&&o.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});var F,I=(function(t,e){e.__esModule=!0,e.LanguageTranslator=e.addComponent=e.getChildStyleToPass=void 0,e.getChildStyleToPass=function(t,e){var n,o,r="";if(t&&(null==e?void 0:e.length)&&(null===(n=Object.keys(t))||void 0===n?void 0:n.length)&&(null===(o=null==e?void 0:e.filter((function(e){return Object.keys(t).includes(e.name)})))||void 0===o?void 0:o.length))for(var i=function(n){(null==e?void 0:e.filter((function(e){return e.name===n&&e.defaultValue!==t[n]})))&&(r+="".concat(n,":").concat(t[n],";"))},a=0,l=Object.keys(t);a<l.length;a++)i(l[a]);return r},e.addComponent=function(t){var e,n=(null===(e=null==t?void 0:t.repoName.split("/"))||void 0===e?void 0:e[1])||(null==t?void 0:t.repoName);if(!n)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(n+"-script"))try{var r=document.createElement("script");r.id=n+"-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 n=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(e){e||(e=t.getDefaultLang()),this.lang=e},t.prototype.translateWord=function(e,n){return t.getDictionaryWord(e,this.dictionary,n||this.lang)},t.prototype.translateDate=function(e,n,o){return t.formatDate(e,n,o||this.lang)},t.getDefaultLang=function(){var t,e,n,o,r,i="en";return(null===navigator||void 0===navigator?void 0:navigator.languages)&&(null===(n=null===(e=null===(t=navigator.languages[0])||void 0===t?void 0:t.split("-")[0])||void 0===e?void 0:e.toLowerCase())||void 0===n?void 0:n.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(e,n,o){var r;if(!e)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[e]))return n[o][e];var i="",a=t.getDefaultLang();if(!o||a!==o){var l=null==n?void 0:n[a];(null==l?void 0:l[e])&&(i=l[e])}return i},t.formatDate=function(e,n,o){if(!e)throw new Error("no date provided");if("function"!=typeof e.getMonth)throw new Error("wrong date format");return new Intl.DateTimeFormat(o||t.getDefaultLang(),n).format(e)},t}();e.LanguageTranslator=n}(F={exports:{}},F.exports),F.exports),R=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,z=/\n/g,W=/^\s*/,B=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,H=/^:\s*/,Y=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,q=/^[;\s]*/,K=/^\s+|\s+$/g,G="";function J(t){return t?t.replace(K,G):G}var Q=function(t,e){var n,o=null;if(!t||"string"!=typeof t)return o;for(var r,i,a=function(t,e){if("string"!=typeof t)throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var n=1,o=1;function r(t){var e=t.match(z);e&&(n+=e.length);var r=t.lastIndexOf("\n");o=~r?t.length-r:o+t.length}function i(){var t={line:n,column:o};return function(e){return e.position=new a(t),c(),e}}function a(t){this.start=t,this.end={line:n,column:o},this.source=e.source}function l(r){var i=new Error(e.source+":"+n+":"+o+": "+r);if(i.reason=r,i.filename=e.source,i.line=n,i.column=o,i.source=t,!e.silent)throw i}function s(e){var n=e.exec(t);if(n){var o=n[0];return r(o),t=t.slice(o.length),n}}function c(){s(W)}function u(t){var e;for(t=t||[];e=d();)!1!==e&&t.push(e);return t}function d(){var e=i();if("/"==t.charAt(0)&&"*"==t.charAt(1)){for(var n=2;G!=t.charAt(n)&&("*"!=t.charAt(n)||"/"!=t.charAt(n+1));)++n;if(n+=2,G===t.charAt(n-1))return l("End of comment missing");var a=t.slice(2,n-2);return o+=2,r(a),t=t.slice(n),o+=2,e({type:"comment",comment:a})}}function f(){var t=i(),e=s(B);if(e){if(d(),!s(H))return l("property missing ':'");var n=s(Y),o=t({type:"declaration",property:J(e[0].replace(R,G)),value:n?J(n[0].replace(R,G)):G});return s(q),o}}return a.prototype.content=t,c(),function(){var t,e=[];for(u(e);t=f();)!1!==t&&(e.push(t),u(e));return e}()}(t),l="function"==typeof e,s=0,c=a.length;s<c;s++)r=(n=a[s]).property,i=n.value,l?e(r,i,n):i&&(o||(o={}),o[r]=i);return o},U={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"},{name:"--hb-modal-max-width",valueType:"htmlsize",defaultValue:"500px"}],parts:[{name:"modal-dialog",description:"The modal dialog"}]},X="0.20.14";function Z(t){let e,n,o,r;return{c(){e=f("span"),n=f("slot"),o=p("Video: "),r=p(t[2]),m(n,"name","title"),m(e,"slot","title")},m(t,i){u(t,e,i),c(e,n),c(n,o),c(n,r)},p(t,e){4&e&&function(t,e){e=""+e,t.data!==e&&(t.data=e)}(r,t[2])},d(t){t&&d(e)}}}function tt(t){let e;function n(t,e){return"youtube"===t[3]?nt:et}let o=n(t),r=o(t);return{c(){r.c(),e=p("")},m(t,n){r.m(t,n),u(t,e,n)},p(t,i){o===(o=n(t))&&r?r.p(t,i):(r.d(1),r=o(t),r&&(r.c(),r.m(e.parentNode,e)))},d(t){r.d(t),t&&d(e)}}}function et(t){let e,n,o,r,i,a;return{c(){e=f("div"),n=f("video"),o=f("track"),r=f("source"),a=p("\n\t\t\t\t\t\tYour browser does not support the video tag."),m(o,"kind","captions"),s(r.src,i=t[1])||m(r,"src",i),m(r,"type","video/mp4"),n.controls=!0,g(n,"aspect-ratio","16 / 9"),g(n,"width","100%"),g(e,"aspect-ratio","16 / 9"),g(e,"width","100%"),g(e,"text-align","center"),g(e,"background-color","black")},m(t,i){u(t,e,i),c(e,n),c(n,o),c(n,r),c(n,a)},p(t,e){2&e&&!s(r.src,i=t[1])&&m(r,"src",i)},d(t){t&&d(e)}}}function nt(t){let e,n,o;return{c(){e=f("div"),n=f("iframe"),g(n,"border","0"),g(n,"aspect-ratio","16 / 9"),g(n,"width","100%"),s(n.src,o=t[1])||m(n,"src",o),m(n,"title","YouTube video"),n.allowFullscreen=!0,g(e,"ratio","16/9"),g(e,"width","100%"),g(e,"text-align","center")},m(t,o){u(t,e,o),c(e,n)},p(t,e){2&e&&!s(n.src,o=t[1])&&m(n,"src",o)},d(t){t&&d(e)}}}function ot(e){let n,o,r,i,a,l,s,p,g=e[2]&&Z(e),$=e[1]&&tt(e);return{c(){n=f("hb-dialog"),g&&g.c(),o=h(),r=f("div"),$&&$.c(),i=h(),a=f("span"),this.c=t,m(r,"slot","body-content"),m(a,"slot","modal-footer"),v(n,"style",e[4]),v(n,"id",e[0]),v(n,"show",l=e[1]?"yes":"no")},m(t,l){var d,f,h,m;u(t,n,l),g&&g.m(n,null),c(n,o),c(n,r),$&&$.m(r,null),c(n,i),c(n,a),s||(d=n,f="modalShow",h=e[9],d.addEventListener(f,h,m),p=()=>d.removeEventListener(f,h,m),s=!0)},p(t,[e]){t[2]?g?g.p(t,e):(g=Z(t),g.c(),g.m(n,o)):g&&(g.d(1),g=null),t[1]?$?$.p(t,e):($=tt(t),$.c(),$.m(r,null)):$&&($.d(1),$=null),16&e&&v(n,"style",t[4]),1&e&&v(n,"id",t[0]),2&e&&l!==(l=t[1]?"yes":"no")&&v(n,"show",l)},i:t,o:t,d(t){t&&d(n),g&&g.d(),$&&$.d(),s=!1,p()}}}function rt(t,e,n){let o,{style:r}=e,i="";const a=b(),l=w();I.addComponent({repoName:"@htmlbricks/hb-dialog",version:X});let{id:s}=e,{item:c}=e,{uri:u}=e,{title:d}=e,{provider:f}=e;function p(t){t.show?n(0,c=t.id):(n(0,c=""),n(1,u=""),n(2,d="")),function(t,e){l(t,e),a.dispatchEvent&&a.dispatchEvent(new CustomEvent(t,{detail:e}))}("videoModalEvent",{id:c,show:t.show})}return t.$$set=t=>{"style"in t&&n(7,r=t.style),"id"in t&&n(6,s=t.id),"item"in t&&n(0,c=t.item),"uri"in t&&n(1,u=t.uri),"title"in t&&n(2,d=t.title),"provider"in t&&n(3,f=t.provider)},t.$$.update=()=>{463&t.$$.dirty&&(s||n(6,s=null),r&&(n(8,o=Q(r)),n(4,i=I.getChildStyleToPass(o,null==U?void 0:U.vars))),c||n(0,c="defaultItem"),u||n(1,u=""),d||n(2,d=""),f||n(3,f=""))},[c,u,d,f,i,p,s,r,o,t=>p(t.detail)]}class it extends M{constructor(t){super();const e=document.createElement("style");e.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{font-family:"Roboto", sans-serif}',this.shadowRoot.appendChild(e),S(this,{target:this.shadowRoot,props:$(this.attributes),customElement:!0},rt,ot,i,{style:7,id:6,item:0,uri:1,title:2,provider:3},null),t&&(t.target&&u(t.target,this,t.anchor),t.props&&(this.$set(t.props),N()))}static get observedAttributes(){return["style","id","item","uri","title","provider"]}get style(){return this.$$.ctx[7]}set style(t){this.$$set({style:t}),N()}get id(){return this.$$.ctx[6]}set id(t){this.$$set({id:t}),N()}get item(){return this.$$.ctx[0]}set item(t){this.$$set({item:t}),N()}get uri(){return this.$$.ctx[1]}set uri(t){this.$$set({uri:t}),N()}get title(){return this.$$.ctx[2]}set title(t){this.$$set({title:t}),N()}get provider(){return this.$$.ctx[3]}set provider(t){this.$$set({provider:t}),N()}}return customElements.define("hb-modal-video",it),it}();
|
|
2
2
|
//# sourceMappingURL=release.js.map
|