flamenco/web/flamenco-io-site/themes/hugo-geekdoc/static/js/main-51ef884d.bundle.min.js
Sybren A. Stüvel bcde49ede0 Initial checkin of a static documentation website
Building this site requires Hugo (not yet included in the README or in the
installation of dependencies in the Makefile). Still very much work in
progress, this is basically the [Geekdocks theme][1] + one page.

[1]: https://geekdocs.de/
2022-07-04 18:00:43 +02:00

2 lines
16 KiB
JavaScript

/*! For license information please see main-51ef884d.bundle.min.js.LICENSE.txt */
!function(){var t={2152:function(t){var e;e=function(){return function(){var t={686:function(t,e,n){"use strict";n.d(e,{default:function(){return E}});var r=n(279),o=n.n(r),i=n(370),c=n.n(i),a=n(817),u=n.n(a);function s(t){try{return document.execCommand(t)}catch(t){return!1}}var f=function(t){var e=u()(t);return s("cut"),e},l=function(t,e){var n=function(t){var e="rtl"===document.documentElement.getAttribute("dir"),n=document.createElement("textarea");n.style.fontSize="12pt",n.style.border="0",n.style.padding="0",n.style.margin="0",n.style.position="absolute",n.style[e?"right":"left"]="-9999px";var r=window.pageYOffset||document.documentElement.scrollTop;return n.style.top="".concat(r,"px"),n.setAttribute("readonly",""),n.value=t,n}(t);e.container.appendChild(n);var r=u()(n);return s("copy"),n.remove(),r},h=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body},n="";return"string"==typeof t?n=l(t,e):t instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(null==t?void 0:t.type)?n=l(t.value,e):(n=u()(t),s("copy")),n};function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function p(t){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(t)}function y(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function g(t,e){return g=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},g(t,e)}function v(t,e){return!e||"object"!==p(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}function b(t,e){var n="data-clipboard-".concat(t);if(e.hasAttribute(n))return e.getAttribute(n)}var _=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&g(t,e)}(u,t);var e,n,r,o,i,a=(o=u,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=m(o);if(i){var n=m(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return v(this,t)});function u(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(n=a.call(this)).resolveOptions(e),n.listenClick(t),n}return e=u,n=[{key:"resolveOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===p(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=c()(t,"click",(function(t){return e.onClick(t)}))}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget,n=this.action(e)||"copy",r=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.action,n=void 0===e?"copy":e,r=t.container,o=t.target,i=t.text;if("copy"!==n&&"cut"!==n)throw new Error('Invalid "action" value, use either "copy" or "cut"');if(void 0!==o){if(!o||"object"!==d(o)||1!==o.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===n&&o.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===n&&(o.hasAttribute("readonly")||o.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}return i?h(i,{container:r}):o?"cut"===n?f(o):h(o,{container:r}):void 0}({action:n,container:this.container,target:this.target(e),text:this.text(e)});this.emit(r?"success":"error",{action:n,text:r,trigger:e,clearSelection:function(){e&&e.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(t){return b("action",t)}},{key:"defaultTarget",value:function(t){var e=b("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return b("text",t)}},{key:"destroy",value:function(){this.listener.destroy()}}],r=[{key:"copy",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body};return h(t,e)}},{key:"cut",value:function(t){return f(t)}},{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,n=!!document.queryCommandSupported;return e.forEach((function(t){n=n&&!!document.queryCommandSupported(t)})),n}}],n&&y(e.prototype,n),r&&y(e,r),u}(o()),E=_},828:function(t){if("undefined"!=typeof Element&&!Element.prototype.matches){var e=Element.prototype;e.matches=e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector}t.exports=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}},438:function(t,e,n){var r=n(828);function o(t,e,n,r,o){var c=i.apply(this,arguments);return t.addEventListener(n,c,o),{destroy:function(){t.removeEventListener(n,c,o)}}}function i(t,e,n,o){return function(n){n.delegateTarget=r(n.target,e),n.delegateTarget&&o.call(t,n)}}t.exports=function(t,e,n,r,i){return"function"==typeof t.addEventListener?o.apply(null,arguments):"function"==typeof n?o.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,(function(t){return o(t,e,n,r,i)})))}},879:function(t,e){e.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},e.nodeList=function(t){var n=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in t&&(0===t.length||e.node(t[0]))},e.string=function(t){return"string"==typeof t||t instanceof String},e.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},370:function(t,e,n){var r=n(879),o=n(438);t.exports=function(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!r.string(e))throw new TypeError("Second argument must be a String");if(!r.fn(n))throw new TypeError("Third argument must be a Function");if(r.node(t))return function(t,e,n){return t.addEventListener(e,n),{destroy:function(){t.removeEventListener(e,n)}}}(t,e,n);if(r.nodeList(t))return function(t,e,n){return Array.prototype.forEach.call(t,(function(t){t.addEventListener(e,n)})),{destroy:function(){Array.prototype.forEach.call(t,(function(t){t.removeEventListener(e,n)}))}}}(t,e,n);if(r.string(t))return function(t,e,n){return o(document.body,t,e,n)}(t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},817:function(t){t.exports=function(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var r=window.getSelection(),o=document.createRange();o.selectNodeContents(t),r.removeAllRanges(),r.addRange(o),e=r.toString()}return e}},279:function(t){function e(){}e.prototype={on:function(t,e,n){var r=this.e||(this.e={});return(r[t]||(r[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var r=this;function o(){r.off(t,o),e.apply(n,arguments)}return o._=e,this.on(t,o,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),r=0,o=n.length;r<o;r++)n[r].fn.apply(n[r].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),r=n[t],o=[];if(r&&e)for(var i=0,c=r.length;i<c;i++)r[i].fn!==e&&r[i].fn._!==e&&o.push(r[i]);return o.length?n[t]=o:delete n[t],this}},t.exports=e,t.exports.TinyEmitter=e}},e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}return n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n(686)}().default},t.exports=e()},1860:function(t){!function(e,n){var r={version:"2.13.2",areas:{},apis:{},inherit:function(t,e){for(var n in t)e.hasOwnProperty(n)||Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n));return e},stringify:function(t,e){return void 0===t||"function"==typeof t?t+"":JSON.stringify(t,e||r.replace)},parse:function(t,e){try{return JSON.parse(t,e||r.revive)}catch(e){return t}},fn:function(t,e){for(var n in r.storeAPI[t]=e,r.apis)r.apis[n][t]=e},get:function(t,e){return t.getItem(e)},set:function(t,e,n){t.setItem(e,n)},remove:function(t,e){t.removeItem(e)},key:function(t,e){return t.key(e)},length:function(t){return t.length},clear:function(t){t.clear()},Store:function(t,e,n){var o=r.inherit(r.storeAPI,(function(t,e,n){return 0===arguments.length?o.getAll():"function"==typeof e?o.transact(t,e,n):void 0!==e?o.set(t,e,n):"string"==typeof t||"number"==typeof t?o.get(t):"function"==typeof t?o.each(t):t?o.setAll(t,e):o.clear()}));o._id=t;try{var i="__store2_test";e.setItem(i,"ok"),o._area=e,e.removeItem(i)}catch(t){o._area=r.storage("fake")}return o._ns=n||"",r.areas[t]||(r.areas[t]=o._area),r.apis[o._ns+o._id]||(r.apis[o._ns+o._id]=o),o},storeAPI:{area:function(t,e){var n=this[t];return n&&n.area||(n=r.Store(t,e,this._ns),this[t]||(this[t]=n)),n},namespace:function(t,e){if(!t)return this._ns?this._ns.substring(0,this._ns.length-1):"";var n=t,o=this[n];if(!(o&&o.namespace||(o=r.Store(this._id,this._area,this._ns+n+"."),this[n]||(this[n]=o),e)))for(var i in r.areas)o.area(i,r.areas[i]);return o},isFake:function(t){return t?(this._real=this._area,this._area=r.storage("fake")):!1===t&&(this._area=this._real||this._area),"fake"===this._area.name},toString:function(){return"store"+(this._ns?"."+this.namespace():"")+"["+this._id+"]"},has:function(t){return this._area.has?this._area.has(this._in(t)):!!(this._in(t)in this._area)},size:function(){return this.keys().length},each:function(t,e){for(var n=0,o=r.length(this._area);n<o;n++){var i=this._out(r.key(this._area,n));if(void 0!==i&&!1===t.call(this,i,this.get(i),e))break;o>r.length(this._area)&&(o--,n--)}return e||this},keys:function(t){return this.each((function(t,e,n){n.push(t)}),t||[])},get:function(t,e){var n,o=r.get(this._area,this._in(t));return"function"==typeof e&&(n=e,e=null),null!==o?r.parse(o,n):null!=e?e:o},getAll:function(t){return this.each((function(t,e,n){n[t]=e}),t||{})},transact:function(t,e,n){var r=this.get(t,n),o=e(r);return this.set(t,void 0===o?r:o),this},set:function(t,e,n){var o,i=this.get(t);return null!=i&&!1===n?e:("boolean"!=typeof n&&(o=n),r.set(this._area,this._in(t),r.stringify(e,o))||i)},setAll:function(t,e){var n,r;for(var o in t)r=t[o],this.set(o,r,e)!==r&&(n=!0);return n},add:function(t,e,n){var o=this.get(t);if(o instanceof Array)e=o.concat(e);else if(null!==o){var i=typeof o;if(i===typeof e&&"object"===i){for(var c in e)o[c]=e[c];e=o}else e=o+e}return r.set(this._area,this._in(t),r.stringify(e,n)),e},remove:function(t,e){var n=this.get(t,e);return r.remove(this._area,this._in(t)),n},clear:function(){return this._ns?this.each((function(t){r.remove(this._area,this._in(t))}),1):r.clear(this._area),this},clearAll:function(){var t=this._area;for(var e in r.areas)r.areas.hasOwnProperty(e)&&(this._area=r.areas[e],this.clear());return this._area=t,this},_in:function(t){return"string"!=typeof t&&(t=r.stringify(t)),this._ns?this._ns+t:t},_out:function(t){return this._ns?t&&0===t.indexOf(this._ns)?t.substring(this._ns.length):void 0:t}},storage:function(t){return r.inherit(r.storageAPI,{items:{},name:t})},storageAPI:{length:0,has:function(t){return this.items.hasOwnProperty(t)},key:function(t){var e=0;for(var n in this.items)if(this.has(n)&&t===e++)return n},setItem:function(t,e){this.has(t)||this.length++,this.items[t]=e},removeItem:function(t){this.has(t)&&(delete this.items[t],this.length--)},getItem:function(t){return this.has(t)?this.items[t]:null},clear:function(){for(var t in this.items)this.removeItem(t)}}},o=r.Store("local",function(){try{return localStorage}catch(t){}}());o.local=o,o._=r,o.area("session",function(){try{return sessionStorage}catch(t){}}()),o.area("page",r.storage("page")),"function"==typeof n&&void 0!==n.amd?n("store2",[],(function(){return o})):t.exports?t.exports=o:(e.store&&(r.conflict=e.store),e.store=o)}(this,this&&this.define)},546:function(t,e,n){"use strict";n.r(e),n.d(e,{applyTheme:function(){return a}});const r=n(1860),{TOGGLE_COLOR_THEMES:o,THEME:i,COLOR_THEME_AUTO:c}=n(6914);function a(t=!0){if(r.isFake())return;let e=r.namespace(i),n=document.documentElement,a=o.includes(e.get("color-theme"))?e.get("color-theme"):c;n.setAttribute("class","color-toggle-"+a),e.set("color-theme",a),a===c?n.removeAttribute("color-theme"):n.setAttribute("color-theme",a),t||location.reload()}document.addEventListener("DOMContentLoaded",(t=>{document.getElementById("gdoc-color-theme").onclick=function(){let t=r.namespace(i),e=t.get("color-theme"),n=function(t=[],e){let n=t.indexOf(e),r=0;return n<t.length-1&&(r=n+1),r}(o,e);t.set("color-theme",o[n]),a(!1)}}))},6914:function(t,e,n){"use strict";n.r(e),n.d(e,{COLOR_THEME_AUTO:function(){return i},COLOR_THEME_DARK:function(){return r},COLOR_THEME_LIGHT:function(){return o},THEME:function(){return c},TOGGLE_COLOR_THEMES:function(){return a}});const r="dark",o="light",i="auto",c="hugo-geekdoc",a=[i,r,o]},3243:function(t,e,n){"use strict";function r(t){const e=document.createElement("span");let n="pre > code";t.querySelector(".lntable")&&(n=".lntable .lntd:last-child pre > code");const r=t.querySelector(n);if(null!==r){const n=r.innerText.trim();e.classList.add("flex","align-center","justify-center","clip","gdoc-post__codecopy"),e.type="button",e.innerHTML='<svg class="gdoc-icon copy"><use xlink:href="#gdoc_copy"></use></svg><svg class="gdoc-icon check hidden"><use xlink:href="#gdoc_check"></use></svg>',e.setAttribute("data-clipboard-text",n),e.setAttribute("data-copy-feedback","Copied!"),e.setAttribute("role","button"),e.setAttribute("aria-label","Copy"),t.classList.add("gdoc-post__codecontainer"),t.insertBefore(e,t.firstChild)}}n.r(e),n.d(e,{createCopyButton:function(){return r}})}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){const{applyTheme:t}=n(546),{createCopyButton:e}=n(3243),r=n(2152);t(),document.addEventListener("DOMContentLoaded",(function(t){new r(".clip").on("success",(function(t){const e=t.trigger;e.hasAttribute("data-copy-feedback")&&(e.classList.add("gdoc-post__codecopy--success"),e.querySelector(".gdoc-icon.copy").classList.add("hidden"),e.querySelector(".gdoc-icon.check").classList.remove("hidden"),setTimeout((function(){e.classList.remove("gdoc-post__codecopy--success"),e.querySelector(".gdoc-icon.copy").classList.remove("hidden"),e.querySelector(".gdoc-icon.check").classList.add("hidden")}),3e3)),t.clearSelection()})),document.querySelectorAll(".highlight").forEach((t=>e(t)))}))}()}();