0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-10 22:24:19 +01:00
Bootstrap/site/static/docs/4.3/assets/js/docs.min.js

22 lines
22 KiB
JavaScript
Raw Normal View History

2019-07-12 23:56:26 +02:00
!function(e,t){"use strict";"function"==typeof define&&define.amd?define([],t):"object"==typeof module&&module.exports?module.exports=t():(e.AnchorJS=t(),e.anchors=new e.AnchorJS)}(this,function(){"use strict";return function(e){function t(e){e.icon=e.hasOwnProperty("icon")?e.icon:"",e.visible=e.hasOwnProperty("visible")?e.visible:"hover",e.placement=e.hasOwnProperty("placement")?e.placement:"right",e.ariaLabel=e.hasOwnProperty("ariaLabel")?e.ariaLabel:"Anchor",e.class=e.hasOwnProperty("class")?e.class:"",e.truncate=e.hasOwnProperty("truncate")?Math.floor(e.truncate):64}function n(e){var t;if("string"==typeof e||e instanceof String)t=[].slice.call(document.querySelectorAll(e));else{if(!(Array.isArray(e)||e instanceof NodeList))throw new Error("The selector provided to AnchorJS was invalid.");t=[].slice.call(e)}return t}this.options=e||{},this.elements=[],t(this.options),this.isTouchDevice=function(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)},this.add=function(e){var o,r,i,A,a,c,l,s,u,f,d,h=[];if(t(this.options),"touch"===(d=this.options.visible)&&(d=this.isTouchDevice()?"always":"hover"),e||(e="h2, h3, h4, h5, h6"),0===(o=n(e)).length)return this;for(function(){if(null===document.head.querySelector("style.anchorjs")){var e,t=document.createElement("style");t.className="anchorjs",t.appendChild(document.createTextNode("")),void 0===(e=document.head.querySelector('[rel="stylesheet"], style'))?document.head.appendChild(t):document.head.insertBefore(t,e),t.sheet.insertRule(" .anchorjs-link { opacity: 0; text-decoration: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }",t.sheet.cssRules.length),t.sheet.insertRule(" *:hover > .anchorjs-link, .anchorjs-link:focus { opacity: 1; }",t.sheet.cssRules.length),t.sheet.insertRule(" [data-anchorjs-icon]::after { content: attr(data-anchorjs-icon); }",t.sheet.cssRules.length),t.sheet.insertRule(' @font-face { font-family: "anchorjs-icons"; src: url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype"); }',t.sheet.cssRules.length)}}(),r=document.querySelectorAll("[id]"),i=[].map.call(r,function(e){return e.id}),a=0;a<o.length;a++)if(this.hasAnchorJSLink(o[a]))h.push(a);else{if(o[a].hasAttribute("id"))A=o[a].getAttribute("id");else if(o[a].hasAttribute("data-anchor-id"))A=o[a].getAttribute("data-anchor-id");else{for(u=s=this.urlify(o[a].textContent),l=0;void 0!==c&&(u=s+"-"+l),l+=1,-1!==(c=i.indexOf(u)););c=void 0,i.push(u),o[a].setAttribute("id",u),A=u}A.replace(/-/g," "),(f=document.createElement("a")).className="anchorjs-link "+this.options.class,f.href="#"+A,f.setAttribute("aria-label",this.options.ariaLabel),f.setAttribute("data-anchorjs-icon",this.options.icon),"always"===d&&(f.style.opacity="1"),"<EFBFBD>
2017-12-31 04:41:36 +01:00
/*!
2018-12-16 00:13:22 +01:00
* clipboard.js v2.0.4
2017-10-01 21:14:55 +02:00
* https://zenorocha.github.io/clipboard.js
2018-03-31 22:59:37 +02:00
*
2017-10-01 21:14:55 +02:00
* Licensed MIT © Zeno Rocha
*/
2019-07-12 23:56:26 +02:00
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ClipboardJS=t():e.ClipboardJS=t()}(this,function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=c(n(1)),A=c(n(3)),a=c(n(4));function c(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return o.resolveOptions(n),o.listenClick(e),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,A.default),r(t,[{key:"resolveOptions",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===o(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=(0,a.default)(e,"click",function(e){return t.onClick(e)})}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new i.default({action:this.action(t),target:this.target(t),text:this.text(t),container:this.container,trigger:t,emitter:this})}},{key:"defaultAction",value:function(e){return s("action",e)}},{key:"defaultTarget",value:function(e){var t=s("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return s("text",e)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,n=!!document.queryCommandSupported;return t.forEach(function(e){n=n&&!!document.queryCommandSupported(e)}),n}}]),t}();function s(e,t){var n="data-clipboard-"+e;if(t.hasAttribute(n))return t.getAttribute(n)}e.exports=l},function(e,t,n){"use strict";var o,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==t
2018-09-19 06:35:40 +02:00
/*!
2018-12-16 00:13:22 +01:00
* bsCustomFileInput v1.3.1 (https://github.com/Johann-S/bs-custom-file-input)
2018-09-19 06:35:40 +02:00
* Copyright 2018 Johann-S <johann.servoire@gmail.com>
* Licensed under MIT (https://github.com/Johann-S/bs-custom-file-input/blob/master/LICENSE)
*/
2019-07-12 23:56:26 +02:00
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.bsCustomFileInput=t()}(this,function(){"use strict";var e={CUSTOMFILE:'.custom-file input[type="file"]',CUSTOMFILELABEL:".custom-file-label",FORM:"form",INPUT:"input"},t=function(e){if(0<e.childNodes.length)for(var t=[].slice.call(e.childNodes),n=0;n<t.length;n++){var o=t[n];if(3!==o.nodeType)return o}return e},n=function(n){var o=n.bsCustomFileInput.defaultText,r=n.parentNode.querySelector(e.CUSTOMFILELABEL);r&&(t(r).innerHTML=o)},o=!!window.File,r=function(e){if(e.hasAttribute("multiple")&&o)return[].slice.call(e.files).map(function(e){return e.name}).join(", ");if(-1===e.value.indexOf("fakepath"))return e.value;var t=e.value.split("\\");return t[t.length-1]};function i(){var o=this.parentNode.querySelector(e.CUSTOMFILELABEL);if(o){var i=t(o),A=r(this);A.length?i.innerHTML=A:n(this)}}function A(){for(var t=[].slice.call(this.querySelectorAll(e.INPUT)).filter(function(e){return!!e.bsCustomFileInput}),o=0,r=t.length;o<r;o++)n(t[o])}var a="bsCustomFileInput",c="reset",l="change";return{init:function(t,n){void 0===t&&(t=e.CUSTOMFILE),void 0===n&&(n=e.FORM);for(var o,r,s,u=[].slice.call(document.querySelectorAll(t)),f=[].slice.call(document.querySelectorAll(n)),d=0,h=u.length;d<h;d++){var p=u[d];Object.defineProperty(p,a,{value:{defaultText:(o=p,r=void 0,void 0,r="",s=o.parentNode.querySelector(e.CUSTOMFILELABEL),s&&(r=s.innerHTML),r)},writable:!0}),p.addEventListener(l,i)}for(var y=0,m=f.length;y<m;y++)f[y].addEventListener(c,A),Object.defineProperty(f[y],a,{value:!0,writable:!0})},destroy:function(){for(var t=[].slice.call(document.querySelectorAll(e.FORM)).filter(function(e){return!!e.bsCustomFileInput}),o=[].slice.call(document.querySelectorAll(e.INPUT)).filter(function(e){return!!e.bsCustomFileInput}),r=0,s=o.length;r<s;r++){var u=o[r];n(u),u[a]=void 0,u.removeEventListener(l,i)}for(var f=0,d=t.length;f<d;f++)t[f].removeEventListener(c,A),t[f][a]=void 0}}});
2017-12-31 04:41:36 +01:00
/*!
* JavaScript for Bootstrap's docs (https://getbootstrap.com/)
2019-01-08 18:49:55 +01:00
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Licensed under the Creative Commons Attribution 3.0 Unported License.
* For details, see https://creativecommons.org/licenses/by/3.0/.
2015-08-13 05:14:14 +02:00
*/
2019-07-12 23:56:26 +02:00
(function(){"use strict";function e(e){return[].slice.call(e)}var t=document.querySelectorAll(".js-sidenav-group");var n;var o;t.forEach(e=>{n=Boolean(e.querySelector("li"));o=e.querySelector("a");if(n){o.addEventListener("click",function(e){e.preventDefault();e.target.parentNode.classList.toggle("active")},true)}});e(document.querySelectorAll(".tooltip-demo")).forEach(function(e){new bootstrap.Tooltip(e,{selector:'[data-toggle="tooltip"]'})});e(document.querySelectorAll('[data-toggle="popover"]')).forEach(function(e){new bootstrap.Popover(e)});e(document.querySelectorAll(".toast")).forEach(function(e){var t=new bootstrap.Toast(e,{autohide:false});t.show()});e(document.querySelectorAll(".tooltip-test")).forEach(function(e){new bootstrap.Tooltip(e)});e(document.querySelectorAll(".popover-test")).forEach(function(e){new bootstrap.Popover(e)});e(document.querySelectorAll('.bd-example-indeterminate [type="checkbox"]')).forEach(function(e){e.indeterminate=true});e(document.querySelectorAll('.bd-content [href="#"]')).forEach(function(e){e.addEventListener("click",function(e){e.preventDefault()})});var r=document.getElementById("exampleModal");if(r){r.addEventListener("show.bs.modal",function(e){var t=e.relatedTarget;var n=t.getAttribute("data-whatever");var o=r.querySelector(".modal-title");var i=r.querySelector(".modal-body input");o.innerHTML="New message to "+n;i.value=n})}var i=document.getElementById("btnToggleAnimatedProgress");if(i){i.addEventListener("click",function(){i.parentNode.querySelector(".progress-bar-striped").classList.toggle("progress-bar-animated")})}var A='<div class="bd-clipboard"><button type="button" class="btn-clipboard" title="Copy to clipboard">Copy</button></div>';e(document.querySelectorAll("figure.highlight, div.highlight")).forEach(function(e){e.insertAdjacentHTML("beforebegin",A)});e(document.querySelectorAll(".btn-clipboard")).forEach(function(e){var t=new bootstrap.Tooltip(e);e.addEventListener("mouseleave",function(){t.hide()})});var a=new ClipboardJS(".btn-clipboard",{target:function(e){return e.parentNode.nextElementSibling}});a.on("success",function(e){var t=bootstrap.Tooltip._getInstance(e.trigger);e.trigger.setAttribute("title","Copied!");t._fixTitle();t.show();e.trigger.setAttribute("title","Copy to clipboard");t._fixTitle();e.clearSelection()});a.on("error",function(e){var t=/Mac/i.test(navigator.userAgent)?"⌘":"Ctrl-";var n="Press "+t+"C to copy";var o=bootstrap.Tooltip._getInstance(e.trigger);e.trigger.setAttribute("title",n);o._fixTitle();o.show();e.trigger.setAttribute("title","Copy to clipboard");o._fixTitle()});anchors.options={icon:"#"};anchors.add(".bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5");e(document.querySelectorAll(".bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5")).forEach(function(e){e.innerHTML='<span class="bd-content-title">'+e.innerHTML+"</span>"});bsCustomFileInput.init()})();(function(){"use strict";if(!window.docsearch){return}var e=document.getElementById("search-input");var t=e.getAttribute("data-docs-version");function n(){var e=window.location;var t=e.origin;if(!t){var n=e.port?":"+e.port:"";t=e.protocol+"//"+e.hostname+n}return t}window.docsearch({apiKey:"5990ad008512000bba2cf951ccf0332f",indexName:"bootstrap",inputSelector:"#search-input",algoliaOptions:{facetFilters:["version:"+t]},transformData:function(e){return e.map(function(e){var t=n();var o="https://getbootstrap.com";e.url=t.indexOf(o)!==-1?e.url:e.url.replace(o,"");if(e.anchor==="content"){e.url=e.url.replace(/#content$/,"");e.anchor=null}return e})},debug:false})})();