-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathkompakkt-standalone.min.js
3 lines (2 loc) · 4.45 KB
/
kompakkt-standalone.min.js
1
2
3
function a(a,b){(null==b||b>a.length)&&(b=a.length);for(var c=0,d=new Array(b);c<b;c++)d[c]=a[c];return d}function b(a,c,d){return(b=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(a){return!1}}()?function b(a,c,d){var f=[null];f.push.apply(f,c);var g=new(Function.bind.apply(a,f));return d&&e(g,d.prototype),g}:Reflect.construct).apply(null,arguments)}function c(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}function d(a){return d=Object.setPrototypeOf?Object.getPrototypeOf:function d(a){return a.__proto__||Object.getPrototypeOf(a)},d(a)}function e(a,b){return e=Object.setPrototypeOf||function e(a,b){return a.__proto__=b,a},e(a,b)}function f(a,b){return function(a){if(Array.isArray(a))return a}(a)||function(a,b){var c,d,e=null==a?null:"undefined"!=typeof Symbol&&a[Symbol.iterator]||a["@@iterator"];if(null!=e){var f=[],g=!0,h=!1;try{for(e=e.call(a);!(g=(c=e.next()).done)&&(f.push(c.value),!b||f.length!==b);g=!0);}catch(i){h=!0,d=i}finally{try{g||null==e.return||e.return()}finally{if(h)throw d}}return f}}(a,b)||g(a,b)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(b,c){if(b){if("string"==typeof b)return a(b,c);var d=Object.prototype.toString.call(b).slice(8,-1);if("Object"===d&&b.constructor&&(d=b.constructor.name),"Map"===d||"Set"===d)return Array.from(d);if("Arguments"===d||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d))return a(b,c)}}function h(a){var c="function"==typeof Map?new Map:void 0;return h=function h(a){var f;if(null===a||(f=a,-1===Function.toString.call(f).indexOf("[native code]")))return a;if("function"!=typeof a)throw new TypeError("Super expression must either be null or a function");if(void 0!==c){if(c.has(a))return c.get(a);c.set(a,g)}function g(){return b(a,arguments,d(this).constructor)}return g.prototype=Object.create(a.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),e(g,a)},h(a)}var i=function(a){"use strict";!function(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),b&&e(a,b)}(i,a);var b,g,h,j,k,l=(b=i,g=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(a){return!1}}(),function(){var a,c,e,f,h=d(b);if(g){var i=d(this).constructor;f=Reflect.construct(h,arguments,i)}else f=h.apply(this,arguments);return c=this,(e=f)&&("object"==(a=e,a&&"undefined"!=typeof Symbol&&a.constructor===Symbol?"symbol":typeof a)||"function"==typeof e)?e:function(a){if(void 0===a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}(c)});function i(){var a;return!function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}(this,i),(a=l.call(this)).attachShadow({mode:"open"}),a}return h=i,j=[{key:"connectedCallback",value:function(){this.buildSrc()}},{key:"buildSrc",value:function(){var a={standalone:!0,minimal:!0},b=!0,c=!1,d=void 0;try{for(var e,g=["instance","endpoint","resource","settings","annotations","minimal"][Symbol.iterator]();!(b=(e=g.next()).done);b=!0){var h=e.value,i=this.attributes.getNamedItem(h);if(i){var j=i.nodeName,k=i.nodeValue;a[j]=k}}}catch(l){c=!0,d=l}finally{try{b||null==g.return||g.return()}finally{if(c)throw d}}var m=new URL(null!==(q=a.instance)&& void 0!==q?q:"https://kompakkt.de/viewer/index.html"),n=!0,o=!1,p=void 0;try{for(var q,r,s=Object.entries(a)[Symbol.iterator]();!(n=(r=s.next()).done);n=!0){var t=f(r.value,2),u=t[0],v=t[1];v&&m.searchParams.set(u,encodeURIComponent(v.toString()))}}catch(l){o=!0,p=l}finally{try{n||null==s.return||s.return()}finally{if(o)throw p}}var w=document.createElement("iframe");w.src=m.toString(),w.allowFullscreen=!0,w.style.height="100%",w.style.width="100%",w.style.border="none",this.shadowRoot.append(w),this.style.display="block"}}],c(h.prototype,j),k&&c(h,k),i}(h(HTMLElement));customElements.define("app-kompakkt",i)
//# sourceMappingURL=kompakkt-standalone.min.js.map