',
-
- btnTpl: {
- download: '' +
- '' +
- "",
-
- zoom: '",
-
- close: '",
-
- // Arrows
- arrowLeft: '",
-
- arrowRight: '",
-
- // This small close button will be appended to your html/inline/ajax content by default,
- // if "smallBtn" option is not set to false
- smallBtn: '"
- },
-
- // Container is injected into this element
- parentEl: "body",
-
- // Hide browser vertical scrollbars; use at your own risk
- hideScrollbar: true,
-
- // Focus handling
- // ==============
-
- // Try to focus on the first focusable element after opening
- autoFocus: true,
-
- // Put focus back to active element after closing
- backFocus: true,
-
- // Do not let user to focus on element outside modal content
- trapFocus: true,
-
- // Module specific options
- // =======================
-
- fullScreen: {
- autoStart: false
- },
-
- // Set `touch: false` to disable panning/swiping
- touch: {
- vertical: true, // Allow to drag content vertically
- momentum: true // Continue movement after releasing mouse/touch when panning
- },
-
- // Hash value when initializing manually,
- // set `false` to disable hash change
- hash: null,
-
- // Customize or add new media types
- // Example:
- /*
- media : {
- youtube : {
- params : {
- autoplay : 0
- }
- }
- }
- */
- media: {},
-
- slideShow: {
- autoStart: false,
- speed: 3000
- },
-
- thumbs: {
- autoStart: false, // Display thumbnails on opening
- hideOnClose: true, // Hide thumbnail grid when closing animation starts
- parentEl: ".fancybox-container", // Container is injected into this element
- axis: "y" // Vertical (y) or horizontal (x) scrolling
- },
-
- // Use mousewheel to navigate gallery
- // If 'auto' - enabled for images only
- wheel: "auto",
-
- // Callbacks
- //==========
-
- // See Documentation/API/Events for more information
- // Example:
- /*
- afterShow: function( instance, current ) {
- console.info( 'Clicked element:' );
- console.info( current.opts.$orig );
- }
- */
-
- onInit: $.noop, // When instance has been initialized
-
- beforeLoad: $.noop, // Before the content of a slide is being loaded
- afterLoad: $.noop, // When the content of a slide is done loading
-
- beforeShow: $.noop, // Before open animation starts
- afterShow: $.noop, // When content is done loading and animating
-
- beforeClose: $.noop, // Before the instance attempts to close. Return false to cancel the close.
- afterClose: $.noop, // After instance has been closed
-
- onActivate: $.noop, // When instance is brought to front
- onDeactivate: $.noop, // When other instance has been activated
-
- // Interaction
- // ===========
-
- // Use options below to customize taken action when user clicks or double clicks on the fancyBox area,
- // each option can be string or method that returns value.
- //
- // Possible values:
- // "close" - close instance
- // "next" - move to next gallery item
- // "nextOrClose" - move to next gallery item or close if gallery has only one item
- // "toggleControls" - show/hide controls
- // "zoom" - zoom image (if loaded)
- // false - do nothing
-
- // Clicked on the content
- clickContent: function (current, event) {
- return current.type === "image" ? "zoom" : false;
- },
-
- // Clicked on the slide
- clickSlide: "close",
-
- // Clicked on the background (backdrop) element;
- // if you have not changed the layout, then most likely you need to use `clickSlide` option
- clickOutside: "close",
-
- // Same as previous two, but for double click
- dblclickContent: false,
- dblclickSlide: false,
- dblclickOutside: false,
-
- // Custom options when mobile device is detected
- // =============================================
-
- mobile: {
- preventCaptionOverlap: false,
- idleTime: false,
- clickContent: function (current, event) {
- return current.type === "image" ? "toggleControls" : false;
- },
- clickSlide: function (current, event) {
- return current.type === "image" ? "toggleControls" : "close";
- },
- dblclickContent: function (current, event) {
- return current.type === "image" ? "zoom" : false;
- },
- dblclickSlide: function (current, event) {
- return current.type === "image" ? "zoom" : false;
- }
- },
-
- // Internationalization
- // ====================
-
- lang: "en",
- i18n: {
- en: {
- CLOSE: "Close",
- NEXT: "Next",
- PREV: "Previous",
- ERROR: "The requested content cannot be loaded. Please try again later.",
- PLAY_START: "Start slideshow",
- PLAY_STOP: "Pause slideshow",
- FULL_SCREEN: "Full screen",
- THUMBS: "Thumbnails",
- DOWNLOAD: "Download",
- SHARE: "Share",
- ZOOM: "Zoom"
- },
- de: {
- CLOSE: "Schließen",
- NEXT: "Weiter",
- PREV: "Zurück",
- ERROR: "Die angeforderten Daten konnten nicht geladen werden. Bitte versuchen Sie es später nochmal.",
- PLAY_START: "Diaschau starten",
- PLAY_STOP: "Diaschau beenden",
- FULL_SCREEN: "Vollbild",
- THUMBS: "Vorschaubilder",
- DOWNLOAD: "Herunterladen",
- SHARE: "Teilen",
- ZOOM: "Vergrößern"
- }
- }
- };
-
- // Few useful variables and methods
- // ================================
-
- var $W = $(window);
- var $D = $(document);
-
- var called = 0;
-
- // Check if an object is a jQuery object and not a native JavaScript object
- // ========================================================================
- var isQuery = function (obj) {
- return obj && obj.hasOwnProperty && obj instanceof $;
- };
-
- // Handle multiple browsers for "requestAnimationFrame" and "cancelAnimationFrame"
- // ===============================================================================
- var requestAFrame = (function () {
- return (
- window.requestAnimationFrame ||
- window.webkitRequestAnimationFrame ||
- window.mozRequestAnimationFrame ||
- window.oRequestAnimationFrame ||
- // if all else fails, use setTimeout
- function (callback) {
- return window.setTimeout(callback, 1000 / 60);
- }
- );
- })();
-
- var cancelAFrame = (function () {
- return (
- window.cancelAnimationFrame ||
- window.webkitCancelAnimationFrame ||
- window.mozCancelAnimationFrame ||
- window.oCancelAnimationFrame ||
- function (id) {
- window.clearTimeout(id);
- }
- );
- })();
-
- // Detect the supported transition-end event property name
- // =======================================================
- var transitionEnd = (function () {
- var el = document.createElement("fakeelement"),
- t;
-
- var transitions = {
- transition: "transitionend",
- OTransition: "oTransitionEnd",
- MozTransition: "transitionend",
- WebkitTransition: "webkitTransitionEnd"
- };
-
- for (t in transitions) {
- if (el.style[t] !== undefined) {
- return transitions[t];
- }
- }
-
- return "transitionend";
- })();
-
- // Force redraw on an element.
- // This helps in cases where the browser doesn't redraw an updated element properly
- // ================================================================================
- var forceRedraw = function ($el) {
- return $el && $el.length && $el[0].offsetHeight;
- };
-
- // Exclude array (`buttons`) options from deep merging
- // ===================================================
- var mergeOpts = function (opts1, opts2) {
- var rez = $.extend(true, {}, opts1, opts2);
-
- $.each(opts2, function (key, value) {
- if ($.isArray(value)) {
- rez[key] = value;
- }
- });
-
- return rez;
- };
-
- // How much of an element is visible in viewport
- // =============================================
-
- var inViewport = function (elem) {
- var elemCenter, rez;
-
- if (!elem || elem.ownerDocument !== document) {
- return false;
- }
-
- $(".fancybox-container").css("pointer-events", "none");
-
- elemCenter = {
- x: elem.getBoundingClientRect().left + elem.offsetWidth / 2,
- y: elem.getBoundingClientRect().top + elem.offsetHeight / 2
- };
-
- rez = document.elementFromPoint(elemCenter.x, elemCenter.y) === elem;
-
- $(".fancybox-container").css("pointer-events", "");
-
- return rez;
- };
-
- // Class definition
- // ================
-
- var FancyBox = function (content, opts, index) {
- var self = this;
-
- self.opts = mergeOpts({
- index: index
- }, $.fancybox.defaults);
-
- if ($.isPlainObject(opts)) {
- self.opts = mergeOpts(self.opts, opts);
- }
-
- if ($.fancybox.isMobile) {
- self.opts = mergeOpts(self.opts, self.opts.mobile);
- }
-
- self.id = self.opts.id || ++called;
-
- self.currIndex = parseInt(self.opts.index, 10) || 0;
- self.prevIndex = null;
-
- self.prevPos = null;
- self.currPos = 0;
-
- self.firstRun = true;
-
- // All group items
- self.group = [];
-
- // Existing slides (for current, next and previous gallery items)
- self.slides = {};
-
- // Create group elements
- self.addContent(content);
-
- if (!self.group.length) {
- return;
- }
-
- self.init();
- };
-
- $.extend(FancyBox.prototype, {
- // Create DOM structure
- // ====================
-
- init: function () {
- var self = this,
- firstItem = self.group[self.currIndex],
- firstItemOpts = firstItem.opts,
- $container,
- buttonStr;
-
- if (firstItemOpts.closeExisting) {
- $.fancybox.close(true);
- }
-
- // Hide scrollbars
- // ===============
-
- $("body").addClass("fancybox-active");
-
- if (
- !$.fancybox.getInstance() &&
- firstItemOpts.hideScrollbar !== false &&
- !$.fancybox.isMobile &&
- document.body.scrollHeight > window.innerHeight
- ) {
- $("head").append(
- '"
- );
-
- $("body").addClass("compensate-for-scrollbar");
- }
-
- // Build html markup and set references
- // ====================================
-
- // Build html code for buttons and insert into main template
- buttonStr = "";
-
- $.each(firstItemOpts.buttons, function (index, value) {
- buttonStr += firstItemOpts.btnTpl[value] || "";
- });
-
- // Create markup from base template, it will be initially hidden to
- // avoid unnecessary work like painting while initializing is not complete
- $container = $(
- self.translate(
- self,
- firstItemOpts.baseTpl
- .replace("{{buttons}}", buttonStr)
- .replace("{{arrows}}", firstItemOpts.btnTpl.arrowLeft + firstItemOpts.btnTpl.arrowRight)
- )
- )
- .attr("id", "fancybox-container-" + self.id)
- .addClass(firstItemOpts.baseClass)
- .data("FancyBox", self)
- .appendTo(firstItemOpts.parentEl);
-
- // Create object holding references to jQuery wrapped nodes
- self.$refs = {
- container: $container
- };
-
- ["bg", "inner", "infobar", "toolbar", "stage", "caption", "navigation"].forEach(function (item) {
- self.$refs[item] = $container.find(".fancybox-" + item);
- });
-
- self.trigger("onInit");
-
- // Enable events, deactive previous instances
- self.activate();
-
- // Build slides, load and reveal content
- self.jumpTo(self.currIndex);
- },
-
- // Simple i18n support - replaces object keys found in template
- // with corresponding values
- // ============================================================
-
- translate: function (obj, str) {
- var arr = obj.opts.i18n[obj.opts.lang] || obj.opts.i18n.en;
-
- return str.replace(/\{\{(\w+)\}\}/g, function (match, n) {
- return arr[n] === undefined ? match : arr[n];
- });
- },
-
- // Populate current group with fresh content
- // Check if each object has valid type and content
- // ===============================================
-
- addContent: function (content) {
- var self = this,
- items = $.makeArray(content),
- thumbs;
-
- $.each(items, function (i, item) {
- var obj = {},
- opts = {},
- $item,
- type,
- found,
- src,
- srcParts;
-
- // Step 1 - Make sure we have an object
- // ====================================
-
- if ($.isPlainObject(item)) {
- // We probably have manual usage here, something like
- // $.fancybox.open( [ { src : "image.jpg", type : "image" } ] )
-
- obj = item;
- opts = item.opts || item;
- } else if ($.type(item) === "object" && $(item).length) {
- // Here we probably have jQuery collection returned by some selector
- $item = $(item);
-
- // Support attributes like `data-options='{"touch" : false}'` and `data-touch='false'`
- opts = $item.data() || {};
- opts = $.extend(true, {}, opts, opts.options);
-
- // Here we store clicked element
- opts.$orig = $item;
-
- obj.src = self.opts.src || opts.src || $item.attr("href");
-
- // Assume that simple syntax is used, for example:
- // `$.fancybox.open( $("#test"), {} );`
- if (!obj.type && !obj.src) {
- obj.type = "inline";
- obj.src = item;
- }
- } else {
- // Assume we have a simple html code, for example:
- // $.fancybox.open( '
Hi!
' );
- obj = {
- type: "html",
- src: item + ""
- };
- }
-
- // Each gallery object has full collection of options
- obj.opts = $.extend(true, {}, self.opts, opts);
-
- // Do not merge buttons array
- if ($.isArray(opts.buttons)) {
- obj.opts.buttons = opts.buttons;
- }
-
- if ($.fancybox.isMobile && obj.opts.mobile) {
- obj.opts = mergeOpts(obj.opts, obj.opts.mobile);
- }
-
- // Step 2 - Make sure we have content type, if not - try to guess
- // ==============================================================
-
- type = obj.type || obj.opts.type;
- src = obj.src || "";
-
- if (!type && src) {
- if ((found = src.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))) {
- type = "video";
-
- if (!obj.opts.video.format) {
- obj.opts.video.format = "video/" + (found[1] === "ogv" ? "ogg" : found[1]);
- }
- } else if (src.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)) {
- type = "image";
- } else if (src.match(/\.(pdf)((\?|#).*)?$/i)) {
- type = "iframe";
- obj = $.extend(true, obj, {
- contentType: "pdf",
- opts: {
- iframe: {
- preload: false
- }
- }
- });
- } else if (src.charAt(0) === "#") {
- type = "inline";
- }
- }
-
- if (type) {
- obj.type = type;
- } else {
- self.trigger("objectNeedsType", obj);
- }
-
- if (!obj.contentType) {
- obj.contentType = $.inArray(obj.type, ["html", "inline", "ajax"]) > -1 ? "html" : obj.type;
- }
-
- // Step 3 - Some adjustments
- // =========================
-
- obj.index = self.group.length;
-
- if (obj.opts.smallBtn == "auto") {
- obj.opts.smallBtn = $.inArray(obj.type, ["html", "inline", "ajax"]) > -1;
- }
-
- if (obj.opts.toolbar === "auto") {
- obj.opts.toolbar = !obj.opts.smallBtn;
- }
-
- // Find thumbnail image, check if exists and if is in the viewport
- obj.$thumb = obj.opts.$thumb || null;
-
- if (obj.opts.$trigger && obj.index === self.opts.index) {
- obj.$thumb = obj.opts.$trigger.find("img:first");
-
- if (obj.$thumb.length) {
- obj.opts.$orig = obj.opts.$trigger;
- }
- }
-
- if (!(obj.$thumb && obj.$thumb.length) && obj.opts.$orig) {
- obj.$thumb = obj.opts.$orig.find("img:first");
- }
-
- if (obj.$thumb && !obj.$thumb.length) {
- obj.$thumb = null;
- }
-
- obj.thumb = obj.opts.thumb || (obj.$thumb ? obj.$thumb[0].src : null);
-
- // "caption" is a "special" option, it can be used to customize caption per gallery item
- if ($.type(obj.opts.caption) === "function") {
- obj.opts.caption = obj.opts.caption.apply(item, [self, obj]);
- }
-
- if ($.type(self.opts.caption) === "function") {
- obj.opts.caption = self.opts.caption.apply(item, [self, obj]);
- }
-
- // Make sure we have caption as a string or jQuery object
- if (!(obj.opts.caption instanceof $)) {
- obj.opts.caption = obj.opts.caption === undefined ? "" : obj.opts.caption + "";
- }
-
- // Check if url contains "filter" used to filter the content
- // Example: "ajax.html #something"
- if (obj.type === "ajax") {
- srcParts = src.split(/\s+/, 2);
-
- if (srcParts.length > 1) {
- obj.src = srcParts.shift();
-
- obj.opts.filter = srcParts.shift();
- }
- }
-
- // Hide all buttons and disable interactivity for modal items
- if (obj.opts.modal) {
- obj.opts = $.extend(true, obj.opts, {
- trapFocus: true,
- // Remove buttons
- infobar: 0,
- toolbar: 0,
-
- smallBtn: 0,
-
- // Disable keyboard navigation
- keyboard: 0,
-
- // Disable some modules
- slideShow: 0,
- fullScreen: 0,
- thumbs: 0,
- touch: 0,
-
- // Disable click event handlers
- clickContent: false,
- clickSlide: false,
- clickOutside: false,
- dblclickContent: false,
- dblclickSlide: false,
- dblclickOutside: false
- });
- }
-
- // Step 4 - Add processed object to group
- // ======================================
-
- self.group.push(obj);
- });
-
- // Update controls if gallery is already opened
- if (Object.keys(self.slides).length) {
- self.updateControls();
-
- // Update thumbnails, if needed
- thumbs = self.Thumbs;
-
- if (thumbs && thumbs.isActive) {
- thumbs.create();
-
- thumbs.focus();
- }
- }
- },
-
- // Attach an event handler functions for:
- // - navigation buttons
- // - browser scrolling, resizing;
- // - focusing
- // - keyboard
- // - detecting inactivity
- // ======================================
-
- addEvents: function () {
- var self = this;
-
- self.removeEvents();
-
- // Make navigation elements clickable
- // ==================================
-
- self.$refs.container
- .on("click.fb-close", "[data-fancybox-close]", function (e) {
- e.stopPropagation();
- e.preventDefault();
-
- self.close(e);
- })
- .on("touchstart.fb-prev click.fb-prev", "[data-fancybox-prev]", function (e) {
- e.stopPropagation();
- e.preventDefault();
-
- self.previous();
- })
- .on("touchstart.fb-next click.fb-next", "[data-fancybox-next]", function (e) {
- e.stopPropagation();
- e.preventDefault();
-
- self.next();
- })
- .on("click.fb", "[data-fancybox-zoom]", function (e) {
- // Click handler for zoom button
- self[self.isScaledDown() ? "scaleToActual" : "scaleToFit"]();
- });
-
- // Handle page scrolling and browser resizing
- // ==========================================
-
- $W.on("orientationchange.fb resize.fb", function (e) {
- if (e && e.originalEvent && e.originalEvent.type === "resize") {
- if (self.requestId) {
- cancelAFrame(self.requestId);
- }
-
- self.requestId = requestAFrame(function () {
- self.update(e);
- });
- } else {
- if (self.current && self.current.type === "iframe") {
- self.$refs.stage.hide();
- }
-
- setTimeout(
- function () {
- self.$refs.stage.show();
-
- self.update(e);
- },
- $.fancybox.isMobile ? 600 : 250
- );
- }
- });
-
- $D.on("keydown.fb", function (e) {
- var instance = $.fancybox ? $.fancybox.getInstance() : null,
- current = instance.current,
- keycode = e.keyCode || e.which;
-
- // Trap keyboard focus inside of the modal
- // =======================================
-
- if (keycode == 9) {
- if (current.opts.trapFocus) {
- self.focus(e);
- }
-
- return;
- }
-
- // Enable keyboard navigation
- // ==========================
-
- if (!current.opts.keyboard || e.ctrlKey || e.altKey || e.shiftKey || $(e.target).is("input,textarea,video,audio,select")) {
- return;
- }
-
- // Backspace and Esc keys
- if (keycode === 8 || keycode === 27) {
- e.preventDefault();
-
- self.close(e);
-
- return;
- }
-
- // Left arrow and Up arrow
- if (keycode === 37 || keycode === 38) {
- e.preventDefault();
-
- self.previous();
-
- return;
- }
-
- // Righ arrow and Down arrow
- if (keycode === 39 || keycode === 40) {
- e.preventDefault();
-
- self.next();
-
- return;
- }
-
- self.trigger("afterKeydown", e, keycode);
- });
-
- // Hide controls after some inactivity period
- if (self.group[self.currIndex].opts.idleTime) {
- self.idleSecondsCounter = 0;
-
- $D.on(
- "mousemove.fb-idle mouseleave.fb-idle mousedown.fb-idle touchstart.fb-idle touchmove.fb-idle scroll.fb-idle keydown.fb-idle",
- function (e) {
- self.idleSecondsCounter = 0;
-
- if (self.isIdle) {
- self.showControls();
- }
-
- self.isIdle = false;
- }
- );
-
- self.idleInterval = window.setInterval(function () {
- self.idleSecondsCounter++;
-
- if (self.idleSecondsCounter >= self.group[self.currIndex].opts.idleTime && !self.isDragging) {
- self.isIdle = true;
- self.idleSecondsCounter = 0;
-
- self.hideControls();
- }
- }, 1000);
- }
- },
-
- // Remove events added by the core
- // ===============================
-
- removeEvents: function () {
- var self = this;
-
- $W.off("orientationchange.fb resize.fb");
- $D.off("keydown.fb .fb-idle");
-
- this.$refs.container.off(".fb-close .fb-prev .fb-next");
-
- if (self.idleInterval) {
- window.clearInterval(self.idleInterval);
-
- self.idleInterval = null;
- }
- },
-
- // Change to previous gallery item
- // ===============================
-
- previous: function (duration) {
- return this.jumpTo(this.currPos - 1, duration);
- },
-
- // Change to next gallery item
- // ===========================
-
- next: function (duration) {
- return this.jumpTo(this.currPos + 1, duration);
- },
-
- // Switch to selected gallery item
- // ===============================
-
- jumpTo: function (pos, duration) {
- var self = this,
- groupLen = self.group.length,
- firstRun,
- isMoved,
- loop,
- current,
- previous,
- slidePos,
- stagePos,
- prop,
- diff;
-
- if (self.isDragging || self.isClosing || (self.isAnimating && self.firstRun)) {
- return;
- }
-
- // Should loop?
- pos = parseInt(pos, 10);
- loop = self.current ? self.current.opts.loop : self.opts.loop;
-
- if (!loop && (pos < 0 || pos >= groupLen)) {
- return false;
- }
-
- // Check if opening for the first time; this helps to speed things up
- firstRun = self.firstRun = !Object.keys(self.slides).length;
-
- // Create slides
- previous = self.current;
-
- self.prevIndex = self.currIndex;
- self.prevPos = self.currPos;
-
- current = self.createSlide(pos);
-
- if (groupLen > 1) {
- if (loop || current.index < groupLen - 1) {
- self.createSlide(pos + 1);
- }
-
- if (loop || current.index > 0) {
- self.createSlide(pos - 1);
- }
- }
-
- self.current = current;
- self.currIndex = current.index;
- self.currPos = current.pos;
-
- self.trigger("beforeShow", firstRun);
-
- self.updateControls();
-
- // Validate duration length
- current.forcedDuration = undefined;
-
- if ($.isNumeric(duration)) {
- current.forcedDuration = duration;
- } else {
- duration = current.opts[firstRun ? "animationDuration" : "transitionDuration"];
- }
-
- duration = parseInt(duration, 10);
-
- // Check if user has swiped the slides or if still animating
- isMoved = self.isMoved(current);
-
- // Make sure current slide is visible
- current.$slide.addClass("fancybox-slide--current");
-
- // Fresh start - reveal container, current slide and start loading content
- if (firstRun) {
- if (current.opts.animationEffect && duration) {
- self.$refs.container.css("transition-duration", duration + "ms");
- }
-
- self.$refs.container.addClass("fancybox-is-open").trigger("focus");
-
- // Attempt to load content into slide
- // This will later call `afterLoad` -> `revealContent`
- self.loadSlide(current);
-
- self.preload("image");
-
- return;
- }
-
- // Get actual slide/stage positions (before cleaning up)
- slidePos = $.fancybox.getTranslate(previous.$slide);
- stagePos = $.fancybox.getTranslate(self.$refs.stage);
-
- // Clean up all slides
- $.each(self.slides, function (index, slide) {
- $.fancybox.stop(slide.$slide, true);
- });
-
- if (previous.pos !== current.pos) {
- previous.isComplete = false;
- }
-
- previous.$slide.removeClass("fancybox-slide--complete fancybox-slide--current");
-
- // If slides are out of place, then animate them to correct position
- if (isMoved) {
- // Calculate horizontal swipe distance
- diff = slidePos.left - (previous.pos * slidePos.width + previous.pos * previous.opts.gutter);
-
- $.each(self.slides, function (index, slide) {
- slide.$slide.removeClass("fancybox-animated").removeClass(function (index, className) {
- return (className.match(/(^|\s)fancybox-fx-\S+/g) || []).join(" ");
- });
-
- // Make sure that each slide is in equal distance
- // This is mostly needed for freshly added slides, because they are not yet positioned
- var leftPos = slide.pos * slidePos.width + slide.pos * slide.opts.gutter;
-
- $.fancybox.setTranslate(slide.$slide, {
- top: 0,
- left: leftPos - stagePos.left + diff
- });
-
- if (slide.pos !== current.pos) {
- slide.$slide.addClass("fancybox-slide--" + (slide.pos > current.pos ? "next" : "previous"));
- }
-
- // Redraw to make sure that transition will start
- forceRedraw(slide.$slide);
-
- // Animate the slide
- $.fancybox.animate(
- slide.$slide, {
- top: 0,
- left: (slide.pos - current.pos) * slidePos.width + (slide.pos - current.pos) * slide.opts.gutter
- },
- duration,
- function () {
- slide.$slide
- .css({
- transform: "",
- opacity: ""
- })
- .removeClass("fancybox-slide--next fancybox-slide--previous");
-
- if (slide.pos === self.currPos) {
- self.complete();
- }
- }
- );
- });
- } else if (duration && current.opts.transitionEffect) {
- // Set transition effect for previously active slide
- prop = "fancybox-animated fancybox-fx-" + current.opts.transitionEffect;
-
- previous.$slide.addClass("fancybox-slide--" + (previous.pos > current.pos ? "next" : "previous"));
-
- $.fancybox.animate(
- previous.$slide,
- prop,
- duration,
- function () {
- previous.$slide.removeClass(prop).removeClass("fancybox-slide--next fancybox-slide--previous");
- },
- false
- );
- }
-
- if (current.isLoaded) {
- self.revealContent(current);
- } else {
- self.loadSlide(current);
- }
-
- self.preload("image");
- },
-
- // Create new "slide" element
- // These are gallery items that are actually added to DOM
- // =======================================================
-
- createSlide: function (pos) {
- var self = this,
- $slide,
- index;
-
- index = pos % self.group.length;
- index = index < 0 ? self.group.length + index : index;
-
- if (!self.slides[pos] && self.group[index]) {
- $slide = $('').appendTo(self.$refs.stage);
-
- self.slides[pos] = $.extend(true, {}, self.group[index], {
- pos: pos,
- $slide: $slide,
- isLoaded: false
- });
-
- self.updateSlide(self.slides[pos]);
- }
-
- return self.slides[pos];
- },
-
- // Scale image to the actual size of the image;
- // x and y values should be relative to the slide
- // ==============================================
-
- scaleToActual: function (x, y, duration) {
- var self = this,
- current = self.current,
- $content = current.$content,
- canvasWidth = $.fancybox.getTranslate(current.$slide).width,
- canvasHeight = $.fancybox.getTranslate(current.$slide).height,
- newImgWidth = current.width,
- newImgHeight = current.height,
- imgPos,
- posX,
- posY,
- scaleX,
- scaleY;
-
- if (self.isAnimating || self.isMoved() || !$content || !(current.type == "image" && current.isLoaded && !current.hasError)) {
- return;
- }
-
- self.isAnimating = true;
-
- $.fancybox.stop($content);
-
- x = x === undefined ? canvasWidth * 0.5 : x;
- y = y === undefined ? canvasHeight * 0.5 : y;
-
- imgPos = $.fancybox.getTranslate($content);
-
- imgPos.top -= $.fancybox.getTranslate(current.$slide).top;
- imgPos.left -= $.fancybox.getTranslate(current.$slide).left;
-
- scaleX = newImgWidth / imgPos.width;
- scaleY = newImgHeight / imgPos.height;
-
- // Get center position for original image
- posX = canvasWidth * 0.5 - newImgWidth * 0.5;
- posY = canvasHeight * 0.5 - newImgHeight * 0.5;
-
- // Make sure image does not move away from edges
- if (newImgWidth > canvasWidth) {
- posX = imgPos.left * scaleX - (x * scaleX - x);
-
- if (posX > 0) {
- posX = 0;
- }
-
- if (posX < canvasWidth - newImgWidth) {
- posX = canvasWidth - newImgWidth;
- }
- }
-
- if (newImgHeight > canvasHeight) {
- posY = imgPos.top * scaleY - (y * scaleY - y);
-
- if (posY > 0) {
- posY = 0;
- }
-
- if (posY < canvasHeight - newImgHeight) {
- posY = canvasHeight - newImgHeight;
- }
- }
-
- self.updateCursor(newImgWidth, newImgHeight);
-
- $.fancybox.animate(
- $content, {
- top: posY,
- left: posX,
- scaleX: scaleX,
- scaleY: scaleY
- },
- duration || 366,
- function () {
- self.isAnimating = false;
- }
- );
-
- // Stop slideshow
- if (self.SlideShow && self.SlideShow.isActive) {
- self.SlideShow.stop();
- }
- },
-
- // Scale image to fit inside parent element
- // ========================================
-
- scaleToFit: function (duration) {
- var self = this,
- current = self.current,
- $content = current.$content,
- end;
-
- if (self.isAnimating || self.isMoved() || !$content || !(current.type == "image" && current.isLoaded && !current.hasError)) {
- return;
- }
-
- self.isAnimating = true;
-
- $.fancybox.stop($content);
-
- end = self.getFitPos(current);
-
- self.updateCursor(end.width, end.height);
-
- $.fancybox.animate(
- $content, {
- top: end.top,
- left: end.left,
- scaleX: end.width / $content.width(),
- scaleY: end.height / $content.height()
- },
- duration || 366,
- function () {
- self.isAnimating = false;
- }
- );
- },
-
- // Calculate image size to fit inside viewport
- // ===========================================
-
- getFitPos: function (slide) {
- var self = this,
- $content = slide.$content,
- $slide = slide.$slide,
- width = slide.width || slide.opts.width,
- height = slide.height || slide.opts.height,
- maxWidth,
- maxHeight,
- minRatio,
- aspectRatio,
- rez = {};
-
- if (!slide.isLoaded || !$content || !$content.length) {
- return false;
- }
-
- maxWidth = $.fancybox.getTranslate(self.$refs.stage).width;
- maxHeight = $.fancybox.getTranslate(self.$refs.stage).height;
-
- maxWidth -=
- parseFloat($slide.css("paddingLeft")) +
- parseFloat($slide.css("paddingRight")) +
- parseFloat($content.css("marginLeft")) +
- parseFloat($content.css("marginRight"));
-
- maxHeight -=
- parseFloat($slide.css("paddingTop")) +
- parseFloat($slide.css("paddingBottom")) +
- parseFloat($content.css("marginTop")) +
- parseFloat($content.css("marginBottom"));
-
- if (!width || !height) {
- width = maxWidth;
- height = maxHeight;
- }
-
- minRatio = Math.min(1, maxWidth / width, maxHeight / height);
-
- width = minRatio * width;
- height = minRatio * height;
-
- // Adjust width/height to precisely fit into container
- if (width > maxWidth - 0.5) {
- width = maxWidth;
- }
-
- if (height > maxHeight - 0.5) {
- height = maxHeight;
- }
-
- if (slide.type === "image") {
- rez.top = Math.floor((maxHeight - height) * 0.5) + parseFloat($slide.css("paddingTop"));
- rez.left = Math.floor((maxWidth - width) * 0.5) + parseFloat($slide.css("paddingLeft"));
- } else if (slide.contentType === "video") {
- // Force aspect ratio for the video
- // "I say the whole world must learn of our peaceful ways… by force!"
- aspectRatio = slide.opts.width && slide.opts.height ? width / height : slide.opts.ratio || 16 / 9;
-
- if (height > width / aspectRatio) {
- height = width / aspectRatio;
- } else if (width > height * aspectRatio) {
- width = height * aspectRatio;
- }
- }
-
- rez.width = width;
- rez.height = height;
-
- return rez;
- },
-
- // Update content size and position for all slides
- // ==============================================
-
- update: function (e) {
- var self = this;
-
- $.each(self.slides, function (key, slide) {
- self.updateSlide(slide, e);
- });
- },
-
- // Update slide content position and size
- // ======================================
-
- updateSlide: function (slide, e) {
- var self = this,
- $content = slide && slide.$content,
- width = slide.width || slide.opts.width,
- height = slide.height || slide.opts.height,
- $slide = slide.$slide;
-
- // First, prevent caption overlap, if needed
- self.adjustCaption(slide);
-
- // Then resize content to fit inside the slide
- if ($content && (width || height || slide.contentType === "video") && !slide.hasError) {
- $.fancybox.stop($content);
-
- $.fancybox.setTranslate($content, self.getFitPos(slide));
-
- if (slide.pos === self.currPos) {
- self.isAnimating = false;
-
- self.updateCursor();
- }
- }
-
- // Then some adjustments
- self.adjustLayout(slide);
-
- if ($slide.length) {
- $slide.trigger("refresh");
-
- if (slide.pos === self.currPos) {
- self.$refs.toolbar
- .add(self.$refs.navigation.find(".fancybox-button--arrow_right"))
- .toggleClass("compensate-for-scrollbar", $slide.get(0).scrollHeight > $slide.get(0).clientHeight);
- }
- }
-
- self.trigger("onUpdate", slide, e);
- },
-
- // Horizontally center slide
- // =========================
-
- centerSlide: function (duration) {
- var self = this,
- current = self.current,
- $slide = current.$slide;
-
- if (self.isClosing || !current) {
- return;
- }
-
- $slide.siblings().css({
- transform: "",
- opacity: ""
- });
-
- $slide
- .parent()
- .children()
- .removeClass("fancybox-slide--previous fancybox-slide--next");
-
- $.fancybox.animate(
- $slide, {
- top: 0,
- left: 0,
- opacity: 1
- },
- duration === undefined ? 0 : duration,
- function () {
- // Clean up
- $slide.css({
- transform: "",
- opacity: ""
- });
-
- if (!current.isComplete) {
- self.complete();
- }
- },
- false
- );
- },
-
- // Check if current slide is moved (swiped)
- // ========================================
-
- isMoved: function (slide) {
- var current = slide || this.current,
- slidePos,
- stagePos;
-
- if (!current) {
- return false;
- }
-
- stagePos = $.fancybox.getTranslate(this.$refs.stage);
- slidePos = $.fancybox.getTranslate(current.$slide);
-
- return (
- !current.$slide.hasClass("fancybox-animated") &&
- (Math.abs(slidePos.top - stagePos.top) > 0.5 || Math.abs(slidePos.left - stagePos.left) > 0.5)
- );
- },
-
- // Update cursor style depending if content can be zoomed
- // ======================================================
-
- updateCursor: function (nextWidth, nextHeight) {
- var self = this,
- current = self.current,
- $container = self.$refs.container,
- canPan,
- isZoomable;
-
- if (!current || self.isClosing || !self.Guestures) {
- return;
- }
-
- $container.removeClass("fancybox-is-zoomable fancybox-can-zoomIn fancybox-can-zoomOut fancybox-can-swipe fancybox-can-pan");
-
- canPan = self.canPan(nextWidth, nextHeight);
-
- isZoomable = canPan ? true : self.isZoomable();
-
- $container.toggleClass("fancybox-is-zoomable", isZoomable);
-
- $("[data-fancybox-zoom]").prop("disabled", !isZoomable);
-
- if (canPan) {
- $container.addClass("fancybox-can-pan");
- } else if (
- isZoomable &&
- (current.opts.clickContent === "zoom" || ($.isFunction(current.opts.clickContent) && current.opts.clickContent(current) == "zoom"))
- ) {
- $container.addClass("fancybox-can-zoomIn");
- } else if (current.opts.touch && (current.opts.touch.vertical || self.group.length > 1) && current.contentType !== "video") {
- $container.addClass("fancybox-can-swipe");
- }
- },
-
- // Check if current slide is zoomable
- // ==================================
-
- isZoomable: function () {
- var self = this,
- current = self.current,
- fitPos;
-
- // Assume that slide is zoomable if:
- // - image is still loading
- // - actual size of the image is smaller than available area
- if (current && !self.isClosing && current.type === "image" && !current.hasError) {
- if (!current.isLoaded) {
- return true;
- }
-
- fitPos = self.getFitPos(current);
-
- if (fitPos && (current.width > fitPos.width || current.height > fitPos.height)) {
- return true;
- }
- }
-
- return false;
- },
-
- // Check if current image dimensions are smaller than actual
- // =========================================================
-
- isScaledDown: function (nextWidth, nextHeight) {
- var self = this,
- rez = false,
- current = self.current,
- $content = current.$content;
-
- if (nextWidth !== undefined && nextHeight !== undefined) {
- rez = nextWidth < current.width && nextHeight < current.height;
- } else if ($content) {
- rez = $.fancybox.getTranslate($content);
- rez = rez.width < current.width && rez.height < current.height;
- }
-
- return rez;
- },
-
- // Check if image dimensions exceed parent element
- // ===============================================
-
- canPan: function (nextWidth, nextHeight) {
- var self = this,
- current = self.current,
- pos = null,
- rez = false;
-
- if (current.type === "image" && (current.isComplete || (nextWidth && nextHeight)) && !current.hasError) {
- rez = self.getFitPos(current);
-
- if (nextWidth !== undefined && nextHeight !== undefined) {
- pos = {
- width: nextWidth,
- height: nextHeight
- };
- } else if (current.isComplete) {
- pos = $.fancybox.getTranslate(current.$content);
- }
-
- if (pos && rez) {
- rez = Math.abs(pos.width - rez.width) > 1.5 || Math.abs(pos.height - rez.height) > 1.5;
- }
- }
-
- return rez;
- },
-
- // Load content into the slide
- // ===========================
-
- loadSlide: function (slide) {
- var self = this,
- type,
- $slide,
- ajaxLoad;
-
- if (slide.isLoading || slide.isLoaded) {
- return;
- }
-
- slide.isLoading = true;
-
- if (self.trigger("beforeLoad", slide) === false) {
- slide.isLoading = false;
-
- return false;
- }
-
- type = slide.type;
- $slide = slide.$slide;
-
- $slide
- .off("refresh")
- .trigger("onReset")
- .addClass(slide.opts.slideClass);
-
- // Create content depending on the type
- switch (type) {
- case "image":
- self.setImage(slide);
-
- break;
-
- case "iframe":
- self.setIframe(slide);
-
- break;
-
- case "html":
- self.setContent(slide, slide.src || slide.content);
-
- break;
-
- case "video":
- self.setContent(
- slide,
- slide.opts.video.tpl
- .replace(/\{\{src\}\}/gi, slide.src)
- .replace("{{format}}", slide.opts.videoFormat || slide.opts.video.format || "")
- .replace("{{poster}}", slide.thumb || "")
- );
-
- break;
-
- case "inline":
- if ($(slide.src).length) {
- self.setContent(slide, $(slide.src));
- } else {
- self.setError(slide);
- }
-
- break;
-
- case "ajax":
- self.showLoading(slide);
-
- ajaxLoad = $.ajax(
- $.extend({}, slide.opts.ajax.settings, {
- url: slide.src,
- success: function (data, textStatus) {
- if (textStatus === "success") {
- self.setContent(slide, data);
- }
- },
- error: function (jqXHR, textStatus) {
- if (jqXHR && textStatus !== "abort") {
- self.setError(slide);
- }
- }
- })
- );
-
- $slide.one("onReset", function () {
- ajaxLoad.abort();
- });
-
- break;
-
- default:
- self.setError(slide);
-
- break;
- }
-
- return true;
- },
-
- // Use thumbnail image, if possible
- // ================================
-
- setImage: function (slide) {
- var self = this,
- ghost;
-
- // Check if need to show loading icon
- setTimeout(function () {
- var $img = slide.$image;
-
- if (!self.isClosing && slide.isLoading && (!$img || !$img.length || !$img[0].complete) && !slide.hasError) {
- self.showLoading(slide);
- }
- }, 50);
-
- //Check if image has srcset
- self.checkSrcset(slide);
-
- // This will be wrapper containing both ghost and actual image
- slide.$content = $('')
- .addClass("fancybox-is-hidden")
- .appendTo(slide.$slide.addClass("fancybox-slide--image"));
-
- // If we have a thumbnail, we can display it while actual image is loading
- // Users will not stare at black screen and actual image will appear gradually
- if (slide.opts.preload !== false && slide.opts.width && slide.opts.height && slide.thumb) {
- slide.width = slide.opts.width;
- slide.height = slide.opts.height;
-
- ghost = document.createElement("img");
-
- ghost.onerror = function () {
- $(this).remove();
-
- slide.$ghost = null;
- };
-
- ghost.onload = function () {
- self.afterLoad(slide);
- };
-
- slide.$ghost = $(ghost)
- .addClass("fancybox-image")
- .appendTo(slide.$content)
- .attr("src", slide.thumb);
- }
-
- // Start loading actual image
- self.setBigImage(slide);
- },
-
- // Check if image has srcset and get the source
- // ============================================
- checkSrcset: function (slide) {
- var srcset = slide.opts.srcset || slide.opts.image.srcset,
- found,
- temp,
- pxRatio,
- windowWidth;
-
- // If we have "srcset", then we need to find first matching "src" value.
- // This is necessary, because when you set an src attribute, the browser will preload the image
- // before any javascript or even CSS is applied.
- if (srcset) {
- pxRatio = window.devicePixelRatio || 1;
- windowWidth = window.innerWidth * pxRatio;
-
- temp = srcset.split(",").map(function (el) {
- var ret = {};
-
- el.trim()
- .split(/\s+/)
- .forEach(function (el, i) {
- var value = parseInt(el.substring(0, el.length - 1), 10);
-
- if (i === 0) {
- return (ret.url = el);
- }
-
- if (value) {
- ret.value = value;
- ret.postfix = el[el.length - 1];
- }
- });
-
- return ret;
- });
-
- // Sort by value
- temp.sort(function (a, b) {
- return a.value - b.value;
- });
-
- // Ok, now we have an array of all srcset values
- for (var j = 0; j < temp.length; j++) {
- var el = temp[j];
-
- if ((el.postfix === "w" && el.value >= windowWidth) || (el.postfix === "x" && el.value >= pxRatio)) {
- found = el;
- break;
- }
- }
-
- // If not found, take the last one
- if (!found && temp.length) {
- found = temp[temp.length - 1];
- }
-
- if (found) {
- slide.src = found.url;
-
- // If we have default width/height values, we can calculate height for matching source
- if (slide.width && slide.height && found.postfix == "w") {
- slide.height = (slide.width / slide.height) * found.value;
- slide.width = found.value;
- }
-
- slide.opts.srcset = srcset;
- }
- }
- },
-
- // Create full-size image
- // ======================
-
- setBigImage: function (slide) {
- var self = this,
- img = document.createElement("img"),
- $img = $(img);
-
- slide.$image = $img
- .one("error", function () {
- self.setError(slide);
- })
- .one("load", function () {
- var sizes;
-
- if (!slide.$ghost) {
- self.resolveImageSlideSize(slide, this.naturalWidth, this.naturalHeight);
-
- self.afterLoad(slide);
- }
-
- if (self.isClosing) {
- return;
- }
-
- if (slide.opts.srcset) {
- sizes = slide.opts.sizes;
-
- if (!sizes || sizes === "auto") {
- sizes =
- (slide.width / slide.height > 1 && $W.width() / $W.height() > 1 ? "100" : Math.round((slide.width / slide.height) * 100)) +
- "vw";
- }
-
- $img.attr("sizes", sizes).attr("srcset", slide.opts.srcset);
- }
-
- // Hide temporary image after some delay
- if (slide.$ghost) {
- setTimeout(function () {
- if (slide.$ghost && !self.isClosing) {
- slide.$ghost.hide();
- }
- }, Math.min(300, Math.max(1000, slide.height / 1600)));
- }
-
- self.hideLoading(slide);
- })
- .addClass("fancybox-image")
- .attr("src", slide.src)
- .appendTo(slide.$content);
-
- if ((img.complete || img.readyState == "complete") && $img.naturalWidth && $img.naturalHeight) {
- $img.trigger("load");
- } else if (img.error) {
- $img.trigger("error");
- }
- },
-
- // Computes the slide size from image size and maxWidth/maxHeight
- // ==============================================================
-
- resolveImageSlideSize: function (slide, imgWidth, imgHeight) {
- var maxWidth = parseInt(slide.opts.width, 10),
- maxHeight = parseInt(slide.opts.height, 10);
-
- // Sets the default values from the image
- slide.width = imgWidth;
- slide.height = imgHeight;
-
- if (maxWidth > 0) {
- slide.width = maxWidth;
- slide.height = Math.floor((maxWidth * imgHeight) / imgWidth);
- }
-
- if (maxHeight > 0) {
- slide.width = Math.floor((maxHeight * imgWidth) / imgHeight);
- slide.height = maxHeight;
- }
- },
-
- // Create iframe wrapper, iframe and bindings
- // ==========================================
-
- setIframe: function (slide) {
- var self = this,
- opts = slide.opts.iframe,
- $slide = slide.$slide,
- $iframe;
-
- slide.$content = $('')
- .css(opts.css)
- .appendTo($slide);
-
- $slide.addClass("fancybox-slide--" + slide.contentType);
-
- slide.$iframe = $iframe = $(opts.tpl.replace(/\{rnd\}/g, new Date().getTime()))
- .attr(opts.attr)
- .appendTo(slide.$content);
-
- if (opts.preload) {
- self.showLoading(slide);
-
- // Unfortunately, it is not always possible to determine if iframe is successfully loaded
- // (due to browser security policy)
-
- $iframe.on("load.fb error.fb", function (e) {
- this.isReady = 1;
-
- slide.$slide.trigger("refresh");
-
- self.afterLoad(slide);
- });
-
- // Recalculate iframe content size
- // ===============================
-
- $slide.on("refresh.fb", function () {
- var $content = slide.$content,
- frameWidth = opts.css.width,
- frameHeight = opts.css.height,
- $contents,
- $body;
-
- if ($iframe[0].isReady !== 1) {
- return;
- }
-
- try {
- $contents = $iframe.contents();
- $body = $contents.find("body");
- } catch (ignore) {}
-
- // Calculate content dimensions, if it is accessible
- if ($body && $body.length && $body.children().length) {
- // Avoid scrolling to top (if multiple instances)
- $slide.css("overflow", "visible");
-
- $content.css({
- width: "100%",
- "max-width": "100%",
- height: "9999px"
- });
-
- if (frameWidth === undefined) {
- frameWidth = Math.ceil(Math.max($body[0].clientWidth, $body.outerWidth(true)));
- }
-
- $content.css("width", frameWidth ? frameWidth : "").css("max-width", "");
-
- if (frameHeight === undefined) {
- frameHeight = Math.ceil(Math.max($body[0].clientHeight, $body.outerHeight(true)));
- }
-
- $content.css("height", frameHeight ? frameHeight : "");
-
- $slide.css("overflow", "auto");
- }
-
- $content.removeClass("fancybox-is-hidden");
- });
- } else {
- self.afterLoad(slide);
- }
-
- $iframe.attr("src", slide.src);
-
- // Remove iframe if closing or changing gallery item
- $slide.one("onReset", function () {
- // This helps IE not to throw errors when closing
- try {
- $(this)
- .find("iframe")
- .hide()
- .unbind()
- .attr("src", "//about:blank");
- } catch (ignore) {}
-
- $(this)
- .off("refresh.fb")
- .empty();
-
- slide.isLoaded = false;
- slide.isRevealed = false;
- });
- },
-
- // Wrap and append content to the slide
- // ======================================
-
- setContent: function (slide, content) {
- var self = this;
-
- if (self.isClosing) {
- return;
- }
-
- self.hideLoading(slide);
-
- if (slide.$content) {
- $.fancybox.stop(slide.$content);
- }
-
- slide.$slide.empty();
-
- // If content is a jQuery object, then it will be moved to the slide.
- // The placeholder is created so we will know where to put it back.
- if (isQuery(content) && content.parent().length) {
- // Make sure content is not already moved to fancyBox
- if (content.hasClass("fancybox-content") || content.parent().hasClass("fancybox-content")) {
- content.parents(".fancybox-slide").trigger("onReset");
- }
-
- // Create temporary element marking original place of the content
- slide.$placeholder = $("
")
- .hide()
- .insertAfter(content);
-
- // Make sure content is visible
- content.css("display", "inline-block");
- } else if (!slide.hasError) {
- // If content is just a plain text, try to convert it to html
- if ($.type(content) === "string") {
- content = $("
")
- .append($.trim(content))
- .contents();
- }
-
- // If "filter" option is provided, then filter content
- if (slide.opts.filter) {
- content = $("
")
- .html(content)
- .find(slide.opts.filter);
- }
- }
-
- slide.$slide.one("onReset", function () {
- // Pause all html5 video/audio
- $(this)
- .find("video,audio")
- .trigger("pause");
-
- // Put content back
- if (slide.$placeholder) {
- slide.$placeholder.after(content.removeClass("fancybox-content").hide()).remove();
-
- slide.$placeholder = null;
- }
-
- // Remove custom close button
- if (slide.$smallBtn) {
- slide.$smallBtn.remove();
-
- slide.$smallBtn = null;
- }
-
- // Remove content and mark slide as not loaded
- if (!slide.hasError) {
- $(this).empty();
-
- slide.isLoaded = false;
- slide.isRevealed = false;
- }
- });
-
- $(content).appendTo(slide.$slide);
-
- if ($(content).is("video,audio")) {
- $(content).addClass("fancybox-video");
-
- $(content).wrap("");
-
- slide.contentType = "video";
-
- slide.opts.width = slide.opts.width || $(content).attr("width");
- slide.opts.height = slide.opts.height || $(content).attr("height");
- }
-
- slide.$content = slide.$slide
- .children()
- .filter("div,form,main,video,audio,article,.fancybox-content")
- .first();
-
- slide.$content.siblings().hide();
-
- // Re-check if there is a valid content
- // (in some cases, ajax response can contain various elements or plain text)
- if (!slide.$content.length) {
- slide.$content = slide.$slide
- .wrapInner("")
- .children()
- .first();
- }
-
- slide.$content.addClass("fancybox-content");
-
- slide.$slide.addClass("fancybox-slide--" + slide.contentType);
-
- self.afterLoad(slide);
- },
-
- // Display error message
- // =====================
-
- setError: function (slide) {
- slide.hasError = true;
-
- slide.$slide
- .trigger("onReset")
- .removeClass("fancybox-slide--" + slide.contentType)
- .addClass("fancybox-slide--error");
-
- slide.contentType = "html";
-
- this.setContent(slide, this.translate(slide, slide.opts.errorTpl));
-
- if (slide.pos === this.currPos) {
- this.isAnimating = false;
- }
- },
-
- // Show loading icon inside the slide
- // ==================================
-
- showLoading: function (slide) {
- var self = this;
-
- slide = slide || self.current;
-
- if (slide && !slide.$spinner) {
- slide.$spinner = $(self.translate(self, self.opts.spinnerTpl))
- .appendTo(slide.$slide)
- .hide()
- .fadeIn("fast");
- }
- },
-
- // Remove loading icon from the slide
- // ==================================
-
- hideLoading: function (slide) {
- var self = this;
-
- slide = slide || self.current;
-
- if (slide && slide.$spinner) {
- slide.$spinner.stop().remove();
-
- delete slide.$spinner;
- }
- },
-
- // Adjustments after slide content has been loaded
- // ===============================================
-
- afterLoad: function (slide) {
- var self = this;
-
- if (self.isClosing) {
- return;
- }
-
- slide.isLoading = false;
- slide.isLoaded = true;
-
- self.trigger("afterLoad", slide);
-
- self.hideLoading(slide);
-
- // Add small close button
- if (slide.opts.smallBtn && (!slide.$smallBtn || !slide.$smallBtn.length)) {
- slide.$smallBtn = $(self.translate(slide, slide.opts.btnTpl.smallBtn)).appendTo(slide.$content);
- }
-
- // Disable right click
- if (slide.opts.protect && slide.$content && !slide.hasError) {
- slide.$content.on("contextmenu.fb", function (e) {
- if (e.button == 2) {
- e.preventDefault();
- }
-
- return true;
- });
-
- // Add fake element on top of the image
- // This makes a bit harder for user to select image
- if (slide.type === "image") {
- $('').appendTo(slide.$content);
- }
- }
-
- self.adjustCaption(slide);
-
- self.adjustLayout(slide);
-
- if (slide.pos === self.currPos) {
- self.updateCursor();
- }
-
- self.revealContent(slide);
- },
-
- // Prevent caption overlap,
- // fix css inconsistency across browsers
- // =====================================
-
- adjustCaption: function (slide) {
- var self = this,
- current = slide || self.current,
- caption = current.opts.caption,
- preventOverlap = current.opts.preventCaptionOverlap,
- $caption = self.$refs.caption,
- $clone,
- captionH = false;
-
- $caption.toggleClass("fancybox-caption--separate", preventOverlap);
-
- if (preventOverlap && caption && caption.length) {
- if (current.pos !== self.currPos) {
- $clone = $caption.clone().appendTo($caption.parent());
-
- $clone
- .children()
- .eq(0)
- .empty()
- .html(caption);
-
- captionH = $clone.outerHeight(true);
-
- $clone.empty().remove();
- } else if (self.$caption) {
- captionH = self.$caption.outerHeight(true);
- }
-
- current.$slide.css("padding-bottom", captionH || "");
- }
- },
-
- // Simple hack to fix inconsistency across browsers, described here (affects Edge, too):
- // https://bugzilla.mozilla.org/show_bug.cgi?id=748518
- // ====================================================================================
-
- adjustLayout: function (slide) {
- var self = this,
- current = slide || self.current,
- scrollHeight,
- marginBottom,
- inlinePadding,
- actualPadding;
-
- if (current.isLoaded && current.opts.disableLayoutFix !== true) {
- current.$content.css("margin-bottom", "");
-
- // If we would always set margin-bottom for the content,
- // then it would potentially break vertical align
- if (current.$content.outerHeight() > current.$slide.height() + 0.5) {
- inlinePadding = current.$slide[0].style["padding-bottom"];
- actualPadding = current.$slide.css("padding-bottom");
-
- if (parseFloat(actualPadding) > 0) {
- scrollHeight = current.$slide[0].scrollHeight;
-
- current.$slide.css("padding-bottom", 0);
-
- if (Math.abs(scrollHeight - current.$slide[0].scrollHeight) < 1) {
- marginBottom = actualPadding;
- }
-
- current.$slide.css("padding-bottom", inlinePadding);
- }
- }
-
- current.$content.css("margin-bottom", marginBottom);
- }
- },
-
- // Make content visible
- // This method is called right after content has been loaded or
- // user navigates gallery and transition should start
- // ============================================================
-
- revealContent: function (slide) {
- var self = this,
- $slide = slide.$slide,
- end = false,
- start = false,
- isMoved = self.isMoved(slide),
- isRevealed = slide.isRevealed,
- effect,
- effectClassName,
- duration,
- opacity;
-
- slide.isRevealed = true;
-
- effect = slide.opts[self.firstRun ? "animationEffect" : "transitionEffect"];
- duration = slide.opts[self.firstRun ? "animationDuration" : "transitionDuration"];
-
- duration = parseInt(slide.forcedDuration === undefined ? duration : slide.forcedDuration, 10);
-
- if (isMoved || slide.pos !== self.currPos || !duration) {
- effect = false;
- }
-
- // Check if can zoom
- if (effect === "zoom") {
- if (slide.pos === self.currPos && duration && slide.type === "image" && !slide.hasError && (start = self.getThumbPos(slide))) {
- end = self.getFitPos(slide);
- } else {
- effect = "fade";
- }
- }
-
- // Zoom animation
- // ==============
- if (effect === "zoom") {
- self.isAnimating = true;
-
- end.scaleX = end.width / start.width;
- end.scaleY = end.height / start.height;
-
- // Check if we need to animate opacity
- opacity = slide.opts.zoomOpacity;
-
- if (opacity == "auto") {
- opacity = Math.abs(slide.width / slide.height - start.width / start.height) > 0.1;
- }
-
- if (opacity) {
- start.opacity = 0.1;
- end.opacity = 1;
- }
-
- // Draw image at start position
- $.fancybox.setTranslate(slide.$content.removeClass("fancybox-is-hidden"), start);
-
- forceRedraw(slide.$content);
-
- // Start animation
- $.fancybox.animate(slide.$content, end, duration, function () {
- self.isAnimating = false;
-
- self.complete();
- });
-
- return;
- }
-
- self.updateSlide(slide);
-
- // Simply show content if no effect
- // ================================
- if (!effect) {
- slide.$content.removeClass("fancybox-is-hidden");
-
- if (!isRevealed && isMoved && slide.type === "image" && !slide.hasError) {
- slide.$content.hide().fadeIn("fast");
- }
-
- if (slide.pos === self.currPos) {
- self.complete();
- }
-
- return;
- }
-
- // Prepare for CSS transiton
- // =========================
- $.fancybox.stop($slide);
-
- //effectClassName = "fancybox-animated fancybox-slide--" + (slide.pos >= self.prevPos ? "next" : "previous") + " fancybox-fx-" + effect;
- effectClassName = "fancybox-slide--" + (slide.pos >= self.prevPos ? "next" : "previous") + " fancybox-animated fancybox-fx-" + effect;
-
- $slide.addClass(effectClassName).removeClass("fancybox-slide--current"); //.addClass(effectClassName);
-
- slide.$content.removeClass("fancybox-is-hidden");
-
- // Force reflow
- forceRedraw($slide);
-
- if (slide.type !== "image") {
- slide.$content.hide().show(0);
- }
-
- $.fancybox.animate(
- $slide,
- "fancybox-slide--current",
- duration,
- function () {
- $slide.removeClass(effectClassName).css({
- transform: "",
- opacity: ""
- });
-
- if (slide.pos === self.currPos) {
- self.complete();
- }
- },
- true
- );
- },
-
- // Check if we can and have to zoom from thumbnail
- //================================================
-
- getThumbPos: function (slide) {
- var rez = false,
- $thumb = slide.$thumb,
- thumbPos,
- btw,
- brw,
- bbw,
- blw;
-
- if (!$thumb || !inViewport($thumb[0])) {
- return false;
- }
-
- thumbPos = $.fancybox.getTranslate($thumb);
-
- btw = parseFloat($thumb.css("border-top-width") || 0);
- brw = parseFloat($thumb.css("border-right-width") || 0);
- bbw = parseFloat($thumb.css("border-bottom-width") || 0);
- blw = parseFloat($thumb.css("border-left-width") || 0);
-
- rez = {
- top: thumbPos.top + btw,
- left: thumbPos.left + blw,
- width: thumbPos.width - brw - blw,
- height: thumbPos.height - btw - bbw,
- scaleX: 1,
- scaleY: 1
- };
-
- return thumbPos.width > 0 && thumbPos.height > 0 ? rez : false;
- },
-
- // Final adjustments after current gallery item is moved to position
- // and it`s content is loaded
- // ==================================================================
-
- complete: function () {
- var self = this,
- current = self.current,
- slides = {},
- $el;
-
- if (self.isMoved() || !current.isLoaded) {
- return;
- }
-
- if (!current.isComplete) {
- current.isComplete = true;
-
- current.$slide.siblings().trigger("onReset");
-
- self.preload("inline");
-
- // Trigger any CSS transiton inside the slide
- forceRedraw(current.$slide);
-
- current.$slide.addClass("fancybox-slide--complete");
-
- // Remove unnecessary slides
- $.each(self.slides, function (key, slide) {
- if (slide.pos >= self.currPos - 1 && slide.pos <= self.currPos + 1) {
- slides[slide.pos] = slide;
- } else if (slide) {
- $.fancybox.stop(slide.$slide);
-
- slide.$slide.off().remove();
- }
- });
-
- self.slides = slides;
- }
-
- self.isAnimating = false;
-
- self.updateCursor();
-
- self.trigger("afterShow");
-
- // Autoplay first html5 video/audio
- if (!!current.opts.video.autoStart) {
- current.$slide
- .find("video,audio")
- .filter(":visible:first")
- .trigger("play")
- .one("ended", function () {
- if (Document.exitFullscreen) {
- Document.exitFullscreen();
- } else if (this.webkitExitFullscreen) {
- this.webkitExitFullscreen();
- }
-
- self.next();
- });
- }
-
- // Try to focus on the first focusable element
- if (current.opts.autoFocus && current.contentType === "html") {
- // Look for the first input with autofocus attribute
- $el = current.$content.find("input[autofocus]:enabled:visible:first");
-
- if ($el.length) {
- $el.trigger("focus");
- } else {
- self.focus(null, true);
- }
- }
-
- // Avoid jumping
- current.$slide.scrollTop(0).scrollLeft(0);
- },
-
- // Preload next and previous slides
- // ================================
-
- preload: function (type) {
- var self = this,
- prev,
- next;
-
- if (self.group.length < 2) {
- return;
- }
-
- next = self.slides[self.currPos + 1];
- prev = self.slides[self.currPos - 1];
-
- if (prev && prev.type === type) {
- self.loadSlide(prev);
- }
-
- if (next && next.type === type) {
- self.loadSlide(next);
- }
- },
-
- // Try to find and focus on the first focusable element
- // ====================================================
-
- focus: function (e, firstRun) {
- var self = this,
- focusableStr = [
- "a[href]",
- "area[href]",
- 'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',
- "select:not([disabled]):not([aria-hidden])",
- "textarea:not([disabled]):not([aria-hidden])",
- "button:not([disabled]):not([aria-hidden])",
- "iframe",
- "object",
- "embed",
- "video",
- "audio",
- "[contenteditable]",
- '[tabindex]:not([tabindex^="-"])'
- ].join(","),
- focusableItems,
- focusedItemIndex;
-
- if (self.isClosing) {
- return;
- }
-
- if (e || !self.current || !self.current.isComplete) {
- // Focus on any element inside fancybox
- focusableItems = self.$refs.container.find("*:visible");
- } else {
- // Focus inside current slide
- focusableItems = self.current.$slide.find("*:visible" + (firstRun ? ":not(.fancybox-close-small)" : ""));
- }
-
- focusableItems = focusableItems.filter(focusableStr).filter(function () {
- return $(this).css("visibility") !== "hidden" && !$(this).hasClass("disabled");
- });
-
- if (focusableItems.length) {
- focusedItemIndex = focusableItems.index(document.activeElement);
-
- if (e && e.shiftKey) {
- // Back tab
- if (focusedItemIndex < 0 || focusedItemIndex == 0) {
- e.preventDefault();
-
- focusableItems.eq(focusableItems.length - 1).trigger("focus");
- }
- } else {
- // Outside or Forward tab
- if (focusedItemIndex < 0 || focusedItemIndex == focusableItems.length - 1) {
- if (e) {
- e.preventDefault();
- }
-
- focusableItems.eq(0).trigger("focus");
- }
- }
- } else {
- self.$refs.container.trigger("focus");
- }
- },
-
- // Activates current instance - brings container to the front and enables keyboard,
- // notifies other instances about deactivating
- // =================================================================================
-
- activate: function () {
- var self = this;
-
- // Deactivate all instances
- $(".fancybox-container").each(function () {
- var instance = $(this).data("FancyBox");
-
- // Skip self and closing instances
- if (instance && instance.id !== self.id && !instance.isClosing) {
- instance.trigger("onDeactivate");
-
- instance.removeEvents();
-
- instance.isVisible = false;
- }
- });
-
- self.isVisible = true;
-
- if (self.current || self.isIdle) {
- self.update();
-
- self.updateControls();
- }
-
- self.trigger("onActivate");
-
- self.addEvents();
- },
-
- // Start closing procedure
- // This will start "zoom-out" animation if needed and clean everything up afterwards
- // =================================================================================
-
- close: function (e, d) {
- var self = this,
- current = self.current,
- effect,
- duration,
- $content,
- domRect,
- opacity,
- start,
- end;
-
- var done = function () {
- self.cleanUp(e);
- };
-
- if (self.isClosing) {
- return false;
- }
-
- self.isClosing = true;
-
- // If beforeClose callback prevents closing, make sure content is centered
- if (self.trigger("beforeClose", e) === false) {
- self.isClosing = false;
-
- requestAFrame(function () {
- self.update();
- });
-
- return false;
- }
-
- // Remove all events
- // If there are multiple instances, they will be set again by "activate" method
- self.removeEvents();
-
- $content = current.$content;
- effect = current.opts.animationEffect;
- duration = $.isNumeric(d) ? d : effect ? current.opts.animationDuration : 0;
-
- current.$slide.removeClass("fancybox-slide--complete fancybox-slide--next fancybox-slide--previous fancybox-animated");
-
- if (e !== true) {
- $.fancybox.stop(current.$slide);
- } else {
- effect = false;
- }
-
- // Remove other slides
- current.$slide
- .siblings()
- .trigger("onReset")
- .remove();
-
- // Trigger animations
- if (duration) {
- self.$refs.container
- .removeClass("fancybox-is-open")
- .addClass("fancybox-is-closing")
- .css("transition-duration", duration + "ms");
- }
-
- // Clean up
- self.hideLoading(current);
-
- self.hideControls(true);
-
- self.updateCursor();
-
- // Check if possible to zoom-out
- if (
- effect === "zoom" &&
- !($content && duration && current.type === "image" && !self.isMoved() && !current.hasError && (end = self.getThumbPos(current)))
- ) {
- effect = "fade";
- }
-
- if (effect === "zoom") {
- $.fancybox.stop($content);
-
- domRect = $.fancybox.getTranslate($content);
-
- start = {
- top: domRect.top,
- left: domRect.left,
- scaleX: domRect.width / end.width,
- scaleY: domRect.height / end.height,
- width: end.width,
- height: end.height
- };
-
- // Check if we need to animate opacity
- opacity = current.opts.zoomOpacity;
-
- if (opacity == "auto") {
- opacity = Math.abs(current.width / current.height - end.width / end.height) > 0.1;
- }
-
- if (opacity) {
- end.opacity = 0;
- }
-
- $.fancybox.setTranslate($content, start);
-
- forceRedraw($content);
-
- $.fancybox.animate($content, end, duration, done);
-
- return true;
- }
-
- if (effect && duration) {
- $.fancybox.animate(
- current.$slide.addClass("fancybox-slide--previous").removeClass("fancybox-slide--current"),
- "fancybox-animated fancybox-fx-" + effect,
- duration,
- done
- );
- } else {
- // If skip animation
- if (e === true) {
- setTimeout(done, duration);
- } else {
- done();
- }
- }
-
- return true;
- },
-
- // Final adjustments after removing the instance
- // =============================================
-
- cleanUp: function (e) {
- var self = this,
- instance,
- $focus = self.current.opts.$orig,
- x,
- y;
-
- self.current.$slide.trigger("onReset");
-
- self.$refs.container.empty().remove();
-
- self.trigger("afterClose", e);
-
- // Place back focus
- if (!!self.current.opts.backFocus) {
- if (!$focus || !$focus.length || !$focus.is(":visible")) {
- $focus = self.$trigger;
- }
-
- if ($focus && $focus.length) {
- x = window.scrollX;
- y = window.scrollY;
-
- $focus.trigger("focus");
-
- $("html, body")
- .scrollTop(y)
- .scrollLeft(x);
- }
- }
-
- self.current = null;
-
- // Check if there are other instances
- instance = $.fancybox.getInstance();
-
- if (instance) {
- instance.activate();
- } else {
- $("body").removeClass("fancybox-active compensate-for-scrollbar");
-
- $("#fancybox-style-noscroll").remove();
- }
- },
-
- // Call callback and trigger an event
- // ==================================
-
- trigger: function (name, slide) {
- var args = Array.prototype.slice.call(arguments, 1),
- self = this,
- obj = slide && slide.opts ? slide : self.current,
- rez;
-
- if (obj) {
- args.unshift(obj);
- } else {
- obj = self;
- }
-
- args.unshift(self);
-
- if ($.isFunction(obj.opts[name])) {
- rez = obj.opts[name].apply(obj, args);
- }
-
- if (rez === false) {
- return rez;
- }
-
- if (name === "afterClose" || !self.$refs) {
- $D.trigger(name + ".fb", args);
- } else {
- self.$refs.container.trigger(name + ".fb", args);
- }
- },
-
- // Update infobar values, navigation button states and reveal caption
- // ==================================================================
-
- updateControls: function () {
- var self = this,
- current = self.current,
- index = current.index,
- $container = self.$refs.container,
- $caption = self.$refs.caption,
- caption = current.opts.caption;
-
- // Recalculate content dimensions
- current.$slide.trigger("refresh");
-
- // Set caption
- if (caption && caption.length) {
- self.$caption = $caption;
-
- $caption
- .children()
- .eq(0)
- .html(caption);
- } else {
- self.$caption = null;
- }
-
- if (!self.hasHiddenControls && !self.isIdle) {
- self.showControls();
- }
-
- // Update info and navigation elements
- $container.find("[data-fancybox-count]").html(self.group.length);
- $container.find("[data-fancybox-index]").html(index + 1);
-
- $container.find("[data-fancybox-prev]").prop("disabled", !current.opts.loop && index <= 0);
- $container.find("[data-fancybox-next]").prop("disabled", !current.opts.loop && index >= self.group.length - 1);
-
- if (current.type === "image") {
- // Re-enable buttons; update download button source
- $container
- .find("[data-fancybox-zoom]")
- .show()
- .end()
- .find("[data-fancybox-download]")
- .attr("href", current.opts.image.src || current.src)
- .show();
- } else if (current.opts.toolbar) {
- $container.find("[data-fancybox-download],[data-fancybox-zoom]").hide();
- }
-
- // Make sure focus is not on disabled button/element
- if ($(document.activeElement).is(":hidden,[disabled]")) {
- self.$refs.container.trigger("focus");
- }
- },
-
- // Hide toolbar and caption
- // ========================
-
- hideControls: function (andCaption) {
- var self = this,
- arr = ["infobar", "toolbar", "nav"];
-
- if (andCaption || !self.current.opts.preventCaptionOverlap) {
- arr.push("caption");
- }
-
- this.$refs.container.removeClass(
- arr
- .map(function (i) {
- return "fancybox-show-" + i;
- })
- .join(" ")
- );
-
- this.hasHiddenControls = true;
- },
-
- showControls: function () {
- var self = this,
- opts = self.current ? self.current.opts : self.opts,
- $container = self.$refs.container;
-
- self.hasHiddenControls = false;
- self.idleSecondsCounter = 0;
-
- $container
- .toggleClass("fancybox-show-toolbar", !!(opts.toolbar && opts.buttons))
- .toggleClass("fancybox-show-infobar", !!(opts.infobar && self.group.length > 1))
- .toggleClass("fancybox-show-caption", !!self.$caption)
- .toggleClass("fancybox-show-nav", !!(opts.arrows && self.group.length > 1))
- .toggleClass("fancybox-is-modal", !!opts.modal);
- },
-
- // Toggle toolbar and caption
- // ==========================
-
- toggleControls: function () {
- if (this.hasHiddenControls) {
- this.showControls();
- } else {
- this.hideControls();
- }
- }
- });
-
- $.fancybox = {
- version: "{fancybox-version}",
- defaults: defaults,
-
- // Get current instance and execute a command.
- //
- // Examples of usage:
- //
- // $instance = $.fancybox.getInstance();
- // $.fancybox.getInstance().jumpTo( 1 );
- // $.fancybox.getInstance( 'jumpTo', 1 );
- // $.fancybox.getInstance( function() {
- // console.info( this.currIndex );
- // });
- // ======================================================
-
- getInstance: function (command) {
- var instance = $('.fancybox-container:not(".fancybox-is-closing"):last').data("FancyBox"),
- args = Array.prototype.slice.call(arguments, 1);
-
- if (instance instanceof FancyBox) {
- if ($.type(command) === "string") {
- instance[command].apply(instance, args);
- } else if ($.type(command) === "function") {
- command.apply(instance, args);
- }
-
- return instance;
- }
-
- return false;
- },
-
- // Create new instance
- // ===================
-
- open: function (items, opts, index) {
- return new FancyBox(items, opts, index);
- },
-
- // Close current or all instances
- // ==============================
-
- close: function (all) {
- var instance = this.getInstance();
-
- if (instance) {
- instance.close();
-
- // Try to find and close next instance
- if (all === true) {
- this.close(all);
- }
- }
- },
-
- // Close all instances and unbind all events
- // =========================================
-
- destroy: function () {
- this.close(true);
-
- $D.add("body").off("click.fb-start", "**");
- },
-
- // Try to detect mobile devices
- // ============================
-
- isMobile: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),
-
- // Detect if 'translate3d' support is available
- // ============================================
-
- use3d: (function () {
- var div = document.createElement("div");
-
- return (
- window.getComputedStyle &&
- window.getComputedStyle(div) &&
- window.getComputedStyle(div).getPropertyValue("transform") &&
- !(document.documentMode && document.documentMode < 11)
- );
- })(),
-
- // Helper function to get current visual state of an element
- // returns array[ top, left, horizontal-scale, vertical-scale, opacity ]
- // =====================================================================
-
- getTranslate: function ($el) {
- var domRect;
-
- if (!$el || !$el.length) {
- return false;
- }
-
- domRect = $el[0].getBoundingClientRect();
-
- return {
- top: domRect.top || 0,
- left: domRect.left || 0,
- width: domRect.width,
- height: domRect.height,
- opacity: parseFloat($el.css("opacity"))
- };
- },
-
- // Shortcut for setting "translate3d" properties for element
- // Can set be used to set opacity, too
- // ========================================================
-
- setTranslate: function ($el, props) {
- var str = "",
- css = {};
-
- if (!$el || !props) {
- return;
- }
-
- if (props.left !== undefined || props.top !== undefined) {
- str =
- (props.left === undefined ? $el.position().left : props.left) +
- "px, " +
- (props.top === undefined ? $el.position().top : props.top) +
- "px";
-
- if (this.use3d) {
- str = "translate3d(" + str + ", 0px)";
- } else {
- str = "translate(" + str + ")";
- }
- }
-
- if (props.scaleX !== undefined && props.scaleY !== undefined) {
- str += " scale(" + props.scaleX + ", " + props.scaleY + ")";
- } else if (props.scaleX !== undefined) {
- str += " scaleX(" + props.scaleX + ")";
- }
-
- if (str.length) {
- css.transform = str;
- }
-
- if (props.opacity !== undefined) {
- css.opacity = props.opacity;
- }
-
- if (props.width !== undefined) {
- css.width = props.width;
- }
-
- if (props.height !== undefined) {
- css.height = props.height;
- }
-
- return $el.css(css);
- },
-
- // Simple CSS transition handler
- // =============================
-
- animate: function ($el, to, duration, callback, leaveAnimationName) {
- var self = this,
- from;
-
- if ($.isFunction(duration)) {
- callback = duration;
- duration = null;
- }
-
- self.stop($el);
-
- from = self.getTranslate($el);
-
- $el.on(transitionEnd, function (e) {
- // Skip events from child elements and z-index change
- if (e && e.originalEvent && (!$el.is(e.originalEvent.target) || e.originalEvent.propertyName == "z-index")) {
- return;
- }
-
- self.stop($el);
-
- if ($.isNumeric(duration)) {
- $el.css("transition-duration", "");
- }
-
- if ($.isPlainObject(to)) {
- if (to.scaleX !== undefined && to.scaleY !== undefined) {
- self.setTranslate($el, {
- top: to.top,
- left: to.left,
- width: from.width * to.scaleX,
- height: from.height * to.scaleY,
- scaleX: 1,
- scaleY: 1
- });
- }
- } else if (leaveAnimationName !== true) {
- $el.removeClass(to);
- }
-
- if ($.isFunction(callback)) {
- callback(e);
- }
- });
-
- if ($.isNumeric(duration)) {
- $el.css("transition-duration", duration + "ms");
- }
-
- // Start animation by changing CSS properties or class name
- if ($.isPlainObject(to)) {
- if (to.scaleX !== undefined && to.scaleY !== undefined) {
- delete to.width;
- delete to.height;
-
- if ($el.parent().hasClass("fancybox-slide--image")) {
- $el.parent().addClass("fancybox-is-scaling");
- }
- }
-
- $.fancybox.setTranslate($el, to);
- } else {
- $el.addClass(to);
- }
-
- // Make sure that `transitionend` callback gets fired
- $el.data(
- "timer",
- setTimeout(function () {
- $el.trigger(transitionEnd);
- }, duration + 33)
- );
- },
-
- stop: function ($el, callCallback) {
- if ($el && $el.length) {
- clearTimeout($el.data("timer"));
-
- if (callCallback) {
- $el.trigger(transitionEnd);
- }
-
- $el.off(transitionEnd).css("transition-duration", "");
-
- $el.parent().removeClass("fancybox-is-scaling");
- }
- }
- };
-
- // Default click handler for "fancyboxed" links
- // ============================================
-
- function _run(e, opts) {
- var items = [],
- index = 0,
- $target,
- value,
- instance;
-
- // Avoid opening multiple times
- if (e && e.isDefaultPrevented()) {
- return;
- }
-
- e.preventDefault();
-
- opts = opts || {};
-
- if (e && e.data) {
- opts = mergeOpts(e.data.options, opts);
- }
-
- $target = opts.$target || $(e.currentTarget).trigger("blur");
- instance = $.fancybox.getInstance();
-
- if (instance && instance.$trigger && instance.$trigger.is($target)) {
- return;
- }
-
- if (opts.selector) {
- items = $(opts.selector);
- } else {
- // Get all related items and find index for clicked one
- value = $target.attr("data-fancybox") || "";
-
- if (value) {
- items = e.data ? e.data.items : [];
- items = items.length ? items.filter('[data-fancybox="' + value + '"]') : $('[data-fancybox="' + value + '"]');
- } else {
- items = [$target];
- }
- }
-
- index = $(items).index($target);
-
- // Sometimes current item can not be found
- if (index < 0) {
- index = 0;
- }
-
- instance = $.fancybox.open(items, opts, index);
-
- // Save last active element
- instance.$trigger = $target;
- }
-
- // Create a jQuery plugin
- // ======================
-
- $.fn.fancybox = function (options) {
- var selector;
-
- options = options || {};
- selector = options.selector || false;
-
- if (selector) {
- // Use body element instead of document so it executes first
- $("body")
- .off("click.fb-start", selector)
- .on("click.fb-start", selector, {
- options: options
- }, _run);
- } else {
- this.off("click.fb-start").on(
- "click.fb-start", {
- items: this,
- options: options
- },
- _run
- );
- }
-
- return this;
- };
-
- // Self initializing plugin for all elements having `data-fancybox` attribute
- // ==========================================================================
-
- $D.on("click.fb-start", "[data-fancybox]", _run);
-
- // Enable "trigger elements"
- // =========================
-
- $D.on("click.fb-start", "[data-fancybox-trigger]", function (e) {
- $('[data-fancybox="' + $(this).attr("data-fancybox-trigger") + '"]')
- .eq($(this).attr("data-fancybox-index") || 0)
- .trigger("click.fb-start", {
- $trigger: $(this)
- });
- });
-
- // Track focus event for better accessibility styling
- // ==================================================
- (function () {
- var buttonStr = ".fancybox-button",
- focusStr = "fancybox-focus",
- $pressed = null;
-
- $D.on("mousedown mouseup focus blur", buttonStr, function (e) {
- switch (e.type) {
- case "mousedown":
- $pressed = $(this);
- break;
- case "mouseup":
- $pressed = null;
- break;
- case "focusin":
- $(buttonStr).removeClass(focusStr);
-
- if (!$(this).is($pressed) && !$(this).is("[disabled]")) {
- $(this).addClass(focusStr);
- }
- break;
- case "focusout":
- $(buttonStr).removeClass(focusStr);
- break;
- }
- });
- })();
-})(window, document, jQuery);
\ No newline at end of file
diff --git a/assets/js/highlight.js b/assets/js/highlight.js
index 4370be46..b897ec47 100644
--- a/assets/js/highlight.js
+++ b/assets/js/highlight.js
@@ -1,1326 +1,5491 @@
/*
- Highlight.js 10.6.0 (eb122d3b)
+ Highlight.js 10.7.2 (00233d63)
License: BSD-3-Clause
- Copyright (c) 2006-2020, Ivan Sagalaev
+ Copyright (c) 2006-2021, Ivan Sagalaev
*/
-var hljs=function(){"use strict";function e(t){
-return t instanceof Map?t.clear=t.delete=t.set=()=>{
-throw Error("map is read-only")}:t instanceof Set&&(t.add=t.clear=t.delete=()=>{
-throw Error("set is read-only")
-}),Object.freeze(t),Object.getOwnPropertyNames(t).forEach((n=>{var s=t[n]
-;"object"!=typeof s||Object.isFrozen(s)||e(s)})),t}var t=e,n=e;t.default=n
-;class s{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data}
-ignoreMatch(){this.ignore=!0}}function r(e){
-return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")
-}function a(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t]
-;return t.forEach((e=>{for(const t in e)n[t]=e[t]})),n}const i=e=>!!e.kind
-;class o{constructor(e,t){
-this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){
-this.buffer+=r(e)}openNode(e){if(!i(e))return;let t=e.kind
-;e.sublanguage||(t=`${this.classPrefix}${t}`),this.span(t)}closeNode(e){
-i(e)&&(this.buffer+="")}value(){return this.buffer}span(e){
-this.buffer+=``}}class l{constructor(){this.rootNode={
-children:[]},this.stack=[this.rootNode]}get top(){
-return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){
-this.top.children.push(e)}openNode(e){const t={kind:e,children:[]}
-;this.add(t),this.stack.push(t)}closeNode(){
-if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){
-for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}
-walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){
-return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),
-t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){
-"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{
-l._collapse(e)})))}}class c extends l{constructor(e){super(),this.options=e}
-addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())}
-addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root
-;n.kind=t,n.sublanguage=!0,this.add(n)}toHTML(){
-return new o(this,this.options).value()}finalize(){return!0}}function u(e){
-return e?"string"==typeof e?e:e.source:null}
-const g="[a-zA-Z]\\w*",d="[a-zA-Z_]\\w*",h="\\b\\d+(\\.\\d+)?",f="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",p="\\b(0b[01]+)",m={
-begin:"\\\\[\\s\\S]",relevance:0},b={className:"string",begin:"'",end:"'",
-illegal:"\\n",contains:[m]},x={className:"string",begin:'"',end:'"',
-illegal:"\\n",contains:[m]},E={
-begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
-},v=(e,t,n={})=>{const s=a({className:"comment",begin:e,end:t,contains:[]},n)
-;return s.contains.push(E),s.contains.push({className:"doctag",
-begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),s
-},w=v("//","$"),N=v("/\\*","\\*/"),y=v("#","$");var R=Object.freeze({
-__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:g,UNDERSCORE_IDENT_RE:d,
-NUMBER_RE:h,C_NUMBER_RE:f,BINARY_NUMBER_RE:p,
-RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",
-SHEBANG:(e={})=>{const t=/^#![ ]*\//
-;return e.binary&&(e.begin=((...e)=>e.map((e=>u(e))).join(""))(t,/.*\b/,e.binary,/\b.*/)),
-a({className:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{
-0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:m,APOS_STRING_MODE:b,
-QUOTE_STRING_MODE:x,PHRASAL_WORDS_MODE:E,COMMENT:v,C_LINE_COMMENT_MODE:w,
-C_BLOCK_COMMENT_MODE:N,HASH_COMMENT_MODE:y,NUMBER_MODE:{className:"number",
-begin:h,relevance:0},C_NUMBER_MODE:{className:"number",begin:f,relevance:0},
-BINARY_NUMBER_MODE:{className:"number",begin:p,relevance:0},CSS_NUMBER_MODE:{
-className:"number",
-begin:h+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",
-relevance:0},REGEXP_MODE:{begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp",
-begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[m,{begin:/\[/,end:/\]/,
-relevance:0,contains:[m]}]}]},TITLE_MODE:{className:"title",begin:g,relevance:0
-},UNDERSCORE_TITLE_MODE:{className:"title",begin:d,relevance:0},METHOD_GUARD:{
-begin:"\\.\\s*[a-zA-Z_]\\w*",relevance:0},END_SAME_AS_BEGIN:e=>Object.assign(e,{
-"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{
-t.data._beginMatch!==e[1]&&t.ignoreMatch()}})});function _(e,t){
-"."===e.input[e.index-1]&&t.ignoreMatch()}function k(e,t){
-t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",
-e.__beforeBegin=_,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,
-void 0===e.relevance&&(e.relevance=0))}function O(e,t){
-Array.isArray(e.illegal)&&(e.illegal=((...e)=>"("+e.map((e=>u(e))).join("|")+")")(...e.illegal))
-}function M(e,t){if(e.match){
-if(e.begin||e.end)throw Error("begin & end are not supported with match")
-;e.begin=e.match,delete e.match}}function A(e,t){
-void 0===e.relevance&&(e.relevance=1)}
-const L=["of","and","for","in","not","or","if","then","parent","list","value"]
-;function B(e,t,n="keyword"){const s={}
-;return"string"==typeof e?r(n,e.split(" ")):Array.isArray(e)?r(n,e):Object.keys(e).forEach((n=>{
-Object.assign(s,B(e[n],t,n))})),s;function r(e,n){
-t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((t=>{const n=t.split("|")
-;s[n[0]]=[e,I(n[0],n[1])]}))}}function I(e,t){
-return t?Number(t):(e=>L.includes(e.toLowerCase()))(e)?0:1}
-function T(e,{plugins:t}){function n(t,n){
-return RegExp(u(t),"m"+(e.case_insensitive?"i":"")+(n?"g":""))}class s{
-constructor(){
-this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}
-addRule(e,t){
-t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),
-this.matchAt+=(e=>RegExp(e.toString()+"|").exec("").length-1)(e)+1}compile(){
-0===this.regexes.length&&(this.exec=()=>null)
-;const e=this.regexes.map((e=>e[1]));this.matcherRe=n(((e,t="|")=>{
-const n=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;let s=0,r=""
-;for(let a=0;a0&&(r+=t),r+="(";o.length>0;){const e=n.exec(o);if(null==e){r+=o;break}
-r+=o.substring(0,e.index),
-o=o.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?r+="\\"+(Number(e[1])+i):(r+=e[0],
-"("===e[0]&&s++)}r+=")"}return r})(e),!0),this.lastIndex=0}exec(e){
-this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e)
-;if(!t)return null
-;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),s=this.matchIndexes[n]
-;return t.splice(0,n),Object.assign(t,s)}}class r{constructor(){
-this.rules=[],this.multiRegexes=[],
-this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){
-if(this.multiRegexes[e])return this.multiRegexes[e];const t=new s
-;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))),
-t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){
-return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){
-this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){
-const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex
-;let n=t.exec(e)
-;if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{
-const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}
-return n&&(this.regexIndex+=n.position+1,
-this.regexIndex===this.count&&this.considerAll()),n}}
-if(e.compilerExtensions||(e.compilerExtensions=[]),
-e.contains&&e.contains.includes("self"))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.")
-;return e.classNameAliases=a(e.classNameAliases||{}),function t(s,i){const o=s
-;if(s.compiled)return o
-;[M].forEach((e=>e(s,i))),e.compilerExtensions.forEach((e=>e(s,i))),
-s.__beforeBegin=null,[k,O,A].forEach((e=>e(s,i))),s.compiled=!0;let l=null
-;if("object"==typeof s.keywords&&(l=s.keywords.$pattern,
-delete s.keywords.$pattern),
-s.keywords&&(s.keywords=B(s.keywords,e.case_insensitive)),
-s.lexemes&&l)throw Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ")
-;return l=l||s.lexemes||/\w+/,
-o.keywordPatternRe=n(l,!0),i&&(s.begin||(s.begin=/\B|\b/),
-o.beginRe=n(s.begin),s.endSameAsBegin&&(s.end=s.begin),
-s.end||s.endsWithParent||(s.end=/\B|\b/),
-s.end&&(o.endRe=n(s.end)),o.terminatorEnd=u(s.end)||"",
-s.endsWithParent&&i.terminatorEnd&&(o.terminatorEnd+=(s.end?"|":"")+i.terminatorEnd)),
-s.illegal&&(o.illegalRe=n(s.illegal)),
-s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map((e=>(e=>(e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((t=>a(e,{
-variants:null},t)))),e.cachedVariants?e.cachedVariants:j(e)?a(e,{
-starts:e.starts?a(e.starts):null
-}):Object.isFrozen(e)?a(e):e))("self"===e?s:e)))),s.contains.forEach((e=>{t(e,o)
-})),s.starts&&t(s.starts,i),o.matcher=(e=>{const t=new r
-;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin"
-}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"
-}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t})(o),o}(e)}function j(e){
-return!!e&&(e.endsWithParent||j(e.starts))}function S(e){const t={
-props:["language","code","autodetect"],data:()=>({detectedLanguage:"",
-unknownLanguage:!1}),computed:{className(){
-return this.unknownLanguage?"":"hljs "+this.detectedLanguage},highlighted(){
-if(!this.autoDetect&&!e.getLanguage(this.language))return console.warn(`The language "${this.language}" you specified could not be found.`),
-this.unknownLanguage=!0,r(this.code);let t={}
-;return this.autoDetect?(t=e.highlightAuto(this.code),
-this.detectedLanguage=t.language):(t=e.highlight(this.language,this.code,this.ignoreIllegals),
-this.detectedLanguage=this.language),t.value},autoDetect(){
-return!(this.language&&(e=this.autodetect,!e&&""!==e));var e},
-ignoreIllegals:()=>!0},render(e){return e("pre",{},[e("code",{
-class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{
-Component:t,VuePlugin:{install(e){e.component("highlightjs",t)}}}}const P={
-"after:highlightBlock":({block:e,result:t,text:n})=>{const s=C(e)
-;if(!s.length)return;const a=document.createElement("div")
-;a.innerHTML=t.value,t.value=((e,t,n)=>{let s=0,a="";const i=[];function o(){
-return e.length&&t.length?e[0].offset!==t[0].offset?e[0].offset"}function c(e){
-a+=""+D(e)+">"}function u(e){("start"===e.event?l:c)(e.node)}
-for(;e.length||t.length;){let t=o()
-;if(a+=r(n.substring(s,t[0].offset)),s=t[0].offset,t===e){i.reverse().forEach(c)
-;do{u(t.splice(0,1)[0]),t=o()}while(t===e&&t.length&&t[0].offset===s)
-;i.reverse().forEach(l)
-}else"start"===t[0].event?i.push(t[0].node):i.pop(),u(t.splice(0,1)[0])}
-return a+r(n.substr(s))})(s,C(a),n)}};function D(e){
-return e.nodeName.toLowerCase()}function C(e){const t=[];return function e(n,s){
-for(let r=n.firstChild;r;r=r.nextSibling)3===r.nodeType?s+=r.nodeValue.length:1===r.nodeType&&(t.push({
-event:"start",offset:s,node:r}),s=e(r,s),D(r).match(/br|hr|img|input/)||t.push({
-event:"stop",offset:s,node:r}));return s}(e,0),t}const H=e=>{console.error(e)
-},U=(e,...t)=>{console.log("WARN: "+e,...t)},$=(e,t)=>{
-console.log(`Deprecated as of ${e}. ${t}`)},z=r,K=a,G=Symbol("nomatch")
-;return(e=>{const n=Object.create(null),r=Object.create(null),a=[];let i=!0
-;const o=/(^(<[^>]+>|\t|)+|\n)/gm,l="Could not find the language '{}', did you forget to load/include a language module?",u={
-disableAutodetect:!0,name:"Plain text",contains:[]};let g={
-noHighlightRe:/^(no-?highlight)$/i,
-languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",
-tabReplace:null,useBR:!1,languages:null,__emitter:c};function d(e){
-return g.noHighlightRe.test(e)}function h(e,t,n,s){const r={code:t,language:e}
-;M("before:highlight",r);const a=r.result?r.result:f(r.language,r.code,n,s)
-;return a.code=r.code,M("after:highlight",a),a}function f(e,t,r,o){const c=t
-;function u(e,t){const n=w.case_insensitive?t[0].toLowerCase():t[0]
-;return Object.prototype.hasOwnProperty.call(e.keywords,n)&&e.keywords[n]}
-function d(){null!=R.subLanguage?(()=>{if(""===M)return;let e=null
-;if("string"==typeof R.subLanguage){
-if(!n[R.subLanguage])return void O.addText(M)
-;e=f(R.subLanguage,M,!0,k[R.subLanguage]),k[R.subLanguage]=e.top
-}else e=p(M,R.subLanguage.length?R.subLanguage:null)
-;R.relevance>0&&(A+=e.relevance),O.addSublanguage(e.emitter,e.language)
-})():(()=>{if(!R.keywords)return void O.addText(M);let e=0
-;R.keywordPatternRe.lastIndex=0;let t=R.keywordPatternRe.exec(M),n="";for(;t;){
-n+=M.substring(e,t.index);const s=u(R,t);if(s){const[e,r]=s
-;O.addText(n),n="",A+=r;const a=w.classNameAliases[e]||e;O.addKeyword(t[0],a)
-}else n+=t[0];e=R.keywordPatternRe.lastIndex,t=R.keywordPatternRe.exec(M)}
-n+=M.substr(e),O.addText(n)})(),M=""}function h(e){
-return e.className&&O.openNode(w.classNameAliases[e.className]||e.className),
-R=Object.create(e,{parent:{value:R}}),R}function m(e,t,n){let r=((e,t)=>{
-const n=e&&e.exec(t);return n&&0===n.index})(e.endRe,n);if(r){if(e["on:end"]){
-const n=new s(e);e["on:end"](t,n),n.ignore&&(r=!1)}if(r){
-for(;e.endsParent&&e.parent;)e=e.parent;return e}}
-if(e.endsWithParent)return m(e.parent,t,n)}function b(e){
-return 0===R.matcher.regexIndex?(M+=e[0],1):(I=!0,0)}function x(e){
-const t=e[0],n=c.substr(e.index),s=m(R,e,n);if(!s)return G;const r=R
-;r.skip?M+=t:(r.returnEnd||r.excludeEnd||(M+=t),d(),r.excludeEnd&&(M=t));do{
-R.className&&O.closeNode(),R.skip||R.subLanguage||(A+=R.relevance),R=R.parent
-}while(R!==s.parent)
-;return s.starts&&(s.endSameAsBegin&&(s.starts.endRe=s.endRe),
-h(s.starts)),r.returnEnd?0:t.length}let E={};function v(t,n){const a=n&&n[0]
-;if(M+=t,null==a)return d(),0
-;if("begin"===E.type&&"end"===n.type&&E.index===n.index&&""===a){
-if(M+=c.slice(n.index,n.index+1),!i){const t=Error("0 width match regex")
-;throw t.languageName=e,t.badRule=E.rule,t}return 1}
-if(E=n,"begin"===n.type)return function(e){
-const t=e[0],n=e.rule,r=new s(n),a=[n.__beforeBegin,n["on:begin"]]
-;for(const n of a)if(n&&(n(e,r),r.ignore))return b(t)
-;return n&&n.endSameAsBegin&&(n.endRe=RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")),
-n.skip?M+=t:(n.excludeBegin&&(M+=t),
-d(),n.returnBegin||n.excludeBegin||(M=t)),h(n),n.returnBegin?0:t.length}(n)
-;if("illegal"===n.type&&!r){
-const e=Error('Illegal lexeme "'+a+'" for mode "'+(R.className||"")+'"')
-;throw e.mode=R,e}if("end"===n.type){const e=x(n);if(e!==G)return e}
-if("illegal"===n.type&&""===a)return 1
-;if(B>1e5&&B>3*n.index)throw Error("potential infinite loop, way more iterations than matches")
-;return M+=a,a.length}const w=_(e)
-;if(!w)throw H(l.replace("{}",e)),Error('Unknown language: "'+e+'"')
-;const N=T(w,{plugins:a});let y="",R=o||N;const k={},O=new g.__emitter(g);(()=>{
-const e=[];for(let t=R;t!==w;t=t.parent)t.className&&e.unshift(t.className)
-;e.forEach((e=>O.openNode(e)))})();let M="",A=0,L=0,B=0,I=!1;try{
-for(R.matcher.considerAll();;){
-B++,I?I=!1:R.matcher.considerAll(),R.matcher.lastIndex=L
-;const e=R.matcher.exec(c);if(!e)break;const t=v(c.substring(L,e.index),e)
-;L=e.index+t}return v(c.substr(L)),O.closeAllNodes(),O.finalize(),y=O.toHTML(),{
-relevance:Math.floor(A),value:y,language:e,illegal:!1,emitter:O,top:R}}catch(t){
-if(t.message&&t.message.includes("Illegal"))return{illegal:!0,illegalBy:{
-msg:t.message,context:c.slice(L-100,L+100),mode:t.mode},sofar:y,relevance:0,
-value:z(c),emitter:O};if(i)return{illegal:!1,relevance:0,value:z(c),emitter:O,
-language:e,top:R,errorRaised:t};throw t}}function p(e,t){
-t=t||g.languages||Object.keys(n);const s=(e=>{const t={relevance:0,
-emitter:new g.__emitter(g),value:z(e),illegal:!1,top:u}
-;return t.emitter.addText(e),t})(e),r=t.filter(_).filter(O).map((t=>f(t,e,!1)))
-;r.unshift(s);const a=r.sort(((e,t)=>{
-if(e.relevance!==t.relevance)return t.relevance-e.relevance
-;if(e.language&&t.language){if(_(e.language).supersetOf===t.language)return 1
-;if(_(t.language).supersetOf===e.language)return-1}return 0})),[i,o]=a,l=i
-;return l.second_best=o,l}const m={"before:highlightBlock":({block:e})=>{
-g.useBR&&(e.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/ /g,"\n"))
-},"after:highlightBlock":({result:e})=>{
-g.useBR&&(e.value=e.value.replace(/\n/g," "))}},b=/^(<[^>]+>|\t)+/gm,x={
-"after:highlightBlock":({result:e})=>{
-g.tabReplace&&(e.value=e.value.replace(b,(e=>e.replace(/\t/g,g.tabReplace))))}}
-;function E(e){let t=null;const n=(e=>{let t=e.className+" "
-;t+=e.parentNode?e.parentNode.className:"";const n=g.languageDetectRe.exec(t)
-;if(n){const t=_(n[1])
-;return t||(U(l.replace("{}",n[1])),U("Falling back to no-highlight mode for this block.",e)),
-t?n[1]:"no-highlight"}return t.split(/\s+/).find((e=>d(e)||_(e)))})(e)
-;if(d(n))return;M("before:highlightBlock",{block:e,language:n}),t=e
-;const s=t.textContent,a=n?h(n,s,!0):p(s);M("after:highlightBlock",{block:e,
-result:a,text:s}),e.innerHTML=a.value,((e,t,n)=>{const s=t?r[t]:n
-;e.classList.add("hljs"),s&&e.classList.add(s)})(e,n,a.language),e.result={
-language:a.language,re:a.relevance,relavance:a.relevance
-},a.second_best&&(e.second_best={language:a.second_best.language,
-re:a.second_best.relevance,relavance:a.second_best.relevance})}const v=()=>{
-v.called||(v.called=!0,
-$("10.6.0","initHighlighting() is deprecated. Use highlightAll() instead."),
-document.querySelectorAll("pre code").forEach(E))};let w=!1,N=!1;function y(){
-N?document.querySelectorAll("pre code").forEach(E):w=!0}function _(e){
-return e=(e||"").toLowerCase(),n[e]||n[r[e]]}function k(e,{languageName:t}){
-"string"==typeof e&&(e=[e]),e.forEach((e=>{r[e]=t}))}function O(e){const t=_(e)
-;return t&&!t.disableAutodetect}function M(e,t){const n=e;a.forEach((e=>{
-e[n]&&e[n](t)}))}
-"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(()=>{
-N=!0,w&&y()}),!1),Object.assign(e,{highlight:h,highlightAuto:p,highlightAll:y,
-fixMarkup:e=>{
-return $("10.2.0","fixMarkup will be removed entirely in v11.0"),$("10.2.0","Please see https://github.com/highlightjs/highlight.js/issues/2534"),
-t=e,
-g.tabReplace||g.useBR?t.replace(o,(e=>"\n"===e?g.useBR?" ":e:g.tabReplace?e.replace(/\t/g,g.tabReplace):e)):t
-;var t},highlightBlock:E,configure:e=>{
-e.useBR&&($("10.3.0","'useBR' will be removed entirely in v11.0"),
-$("10.3.0","Please see https://github.com/highlightjs/highlight.js/issues/2559")),
-g=K(g,e)},initHighlighting:v,initHighlightingOnLoad:()=>{
-$("10.6.0","initHighlightingOnLoad() is deprecated. Use highlightAll() instead."),
-w=!0},registerLanguage:(t,s)=>{let r=null;try{r=s(e)}catch(e){
-if(H("Language definition for '{}' could not be registered.".replace("{}",t)),
-!i)throw e;H(e),r=u}
-r.name||(r.name=t),n[t]=r,r.rawDefinition=s.bind(null,e),r.aliases&&k(r.aliases,{
-languageName:t})},listLanguages:()=>Object.keys(n),getLanguage:_,
-registerAliases:k,requireLanguage:e=>{
-$("10.4.0","requireLanguage will be removed entirely in v11."),
-$("10.4.0","Please see https://github.com/highlightjs/highlight.js/pull/2844")
-;const t=_(e);if(t)return t
-;throw Error("The '{}' language is required, but not loaded.".replace("{}",e))},
-autoDetection:O,inherit:K,addPlugin:e=>{a.push(e)},vuePlugin:S(e).VuePlugin
-}),e.debugMode=()=>{i=!1},e.safeMode=()=>{i=!0},e.versionString="10.6.0"
-;for(const e in R)"object"==typeof R[e]&&t(R[e])
-;return Object.assign(e,R),e.addPlugin(m),e.addPlugin(P),e.addPlugin(x),e})({})
-}();"object"==typeof exports&&"undefined"!=typeof module&&(module.exports=hljs);
-hljs.registerLanguage("apache",(()=>{"use strict";return e=>{const n={
-className:"number",begin:/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(:\d{1,5})?/}
-;return{name:"Apache config",aliases:["apacheconf"],case_insensitive:!0,
-contains:[e.HASH_COMMENT_MODE,{className:"section",begin:/<\/?/,end:/>/,
-contains:[n,{className:"number",begin:/:\d{1,5}/
-},e.inherit(e.QUOTE_STRING_MODE,{relevance:0})]},{className:"attribute",
-begin:/\w+/,relevance:0,keywords:{
-nomarkup:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"
-},starts:{end:/$/,relevance:0,keywords:{literal:"on off all deny allow"},
-contains:[{className:"meta",begin:/\s\[/,end:/\]$/},{className:"variable",
-begin:/[\$%]\{/,end:/\}/,contains:["self",{className:"number",begin:/[$%]\d+/}]
-},n,{className:"number",begin:/\d+/},e.QUOTE_STRING_MODE]}}],illegal:/\S/}}
+var hljs = function() {
+ "use strict";
+
+ function e(t) {
+ return t instanceof Map ? t.clear = t.delete = t.set = () => {
+ throw Error("map is read-only")
+ } : t instanceof Set && (t.add = t.clear = t.delete = () => {
+ throw Error("set is read-only")
+ }), Object.freeze(t), Object.getOwnPropertyNames(t).forEach((n => {
+ var i = t[n];
+ "object" != typeof i || Object.isFrozen(i) || e(i)
+ })), t
+ }
+ var t = e,
+ n = e;
+ t.default = n;
+ class i {
+ constructor(e) {
+ void 0 === e.data && (e.data = {}), this.data = e.data, this.isMatchIgnored = !1
+ }
+ ignoreMatch() {
+ this.isMatchIgnored = !0
+ }
+ }
+
+ function s(e) {
+ return e.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """).replace(/'/g, "'")
+ }
+
+ function a(e, ...t) {
+ const n = Object.create(null);
+ for (const t in e) n[t] = e[t];
+ return t.forEach((e => {
+ for (const t in e) n[t] = e[t]
+ })), n
+ }
+ const r = e => !!e.kind;
+ class l {
+ constructor(e, t) {
+ this.buffer = "", this.classPrefix = t.classPrefix, e.walk(this)
+ }
+ addText(e) {
+ this.buffer += s(e)
+ }
+ openNode(e) {
+ if (!r(e)) return;
+ let t = e.kind;
+ e.sublanguage || (t = `${this.classPrefix}${t}`), this.span(t)
+ }
+ closeNode(e) {
+ r(e) && (this.buffer += "")
+ }
+ value() {
+ return this.buffer
+ }
+ span(e) {
+ this.buffer += ``
+ }
+ }
+ class o {
+ constructor() {
+ this.rootNode = {
+ children: []
+ }, this.stack = [this.rootNode]
+ }
+ get top() {
+ return this.stack[this.stack.length - 1]
+ }
+ get root() {
+ return this.rootNode
+ }
+ add(e) {
+ this.top.children.push(e)
+ }
+ openNode(e) {
+ const t = {
+ kind: e,
+ children: []
+ };
+ this.add(t), this.stack.push(t)
+ }
+ closeNode() {
+ if (this.stack.length > 1) return this.stack.pop()
+ }
+ closeAllNodes() {
+ for (; this.closeNode(););
+ }
+ toJSON() {
+ return JSON.stringify(this.rootNode, null, 4)
+ }
+ walk(e) {
+ return this.constructor._walk(e, this.rootNode)
+ }
+ static _walk(e, t) {
+ return "string" == typeof t ? e.addText(t) : t.children && (e.openNode(t), t.children.forEach((t => this._walk(e, t))), e.closeNode(t)), e
+ }
+ static _collapse(e) {
+ "string" != typeof e && e.children && (e.children.every((e => "string" == typeof e)) ? e.children = [e.children.join("")] : e.children.forEach((e => {
+ o._collapse(e)
+ })))
+ }
+ }
+ class c extends o {
+ constructor(e) {
+ super(), this.options = e
+ }
+ addKeyword(e, t) {
+ "" !== e && (this.openNode(t), this.addText(e), this.closeNode())
+ }
+ addText(e) {
+ "" !== e && this.add(e)
+ }
+ addSublanguage(e, t) {
+ const n = e.root;
+ n.kind = t, n.sublanguage = !0, this.add(n)
+ }
+ toHTML() {
+ return new l(this, this.options).value()
+ }
+ finalize() {
+ return !0
+ }
+ }
+
+ function g(e) {
+ return e ? "string" == typeof e ? e : e.source : null
+ }
+ const u = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./,
+ h = "[a-zA-Z]\\w*",
+ d = "[a-zA-Z_]\\w*",
+ f = "\\b\\d+(\\.\\d+)?",
+ p = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",
+ m = "\\b(0b[01]+)",
+ b = {
+ begin: "\\\\[\\s\\S]",
+ relevance: 0
+ },
+ E = {
+ className: "string",
+ begin: "'",
+ end: "'",
+ illegal: "\\n",
+ contains: [b]
+ },
+ x = {
+ className: "string",
+ begin: '"',
+ end: '"',
+ illegal: "\\n",
+ contains: [b]
+ },
+ v = {
+ begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
+ },
+ w = (e, t, n = {}) => {
+ const i = a({
+ className: "comment",
+ begin: e,
+ end: t,
+ contains: []
+ }, n);
+ return i.contains.push(v), i.contains.push({
+ className: "doctag",
+ begin: "(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",
+ relevance: 0
+ }), i
+ },
+ y = w("//", "$"),
+ N = w("/\\*", "\\*/"),
+ R = w("#", "$");
+ var _ = Object.freeze({
+ __proto__: null,
+ MATCH_NOTHING_RE: /\b\B/,
+ IDENT_RE: h,
+ UNDERSCORE_IDENT_RE: d,
+ NUMBER_RE: f,
+ C_NUMBER_RE: p,
+ BINARY_NUMBER_RE: m,
+ RE_STARTERS_RE: "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",
+ SHEBANG: (e = {}) => {
+ const t = /^#![ ]*\//;
+ return e.binary && (e.begin = ((...e) => e.map((e => g(e))).join(""))(t, /.*\b/, e.binary, /\b.*/)),
+ a({
+ className: "meta",
+ begin: t,
+ end: /$/,
+ relevance: 0,
+ "on:begin": (e, t) => {
+ 0 !== e.index && t.ignoreMatch()
+ }
+ }, e)
+ },
+ BACKSLASH_ESCAPE: b,
+ APOS_STRING_MODE: E,
+ QUOTE_STRING_MODE: x,
+ PHRASAL_WORDS_MODE: v,
+ COMMENT: w,
+ C_LINE_COMMENT_MODE: y,
+ C_BLOCK_COMMENT_MODE: N,
+ HASH_COMMENT_MODE: R,
+ NUMBER_MODE: {
+ className: "number",
+ begin: f,
+ relevance: 0
+ },
+ C_NUMBER_MODE: {
+ className: "number",
+ begin: p,
+ relevance: 0
+ },
+ BINARY_NUMBER_MODE: {
+ className: "number",
+ begin: m,
+ relevance: 0
+ },
+ CSS_NUMBER_MODE: {
+ className: "number",
+ begin: f + "(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",
+ relevance: 0
+ },
+ REGEXP_MODE: {
+ begin: /(?=\/[^/\n]*\/)/,
+ contains: [{
+ className: "regexp",
+ begin: /\//,
+ end: /\/[gimuy]*/,
+ illegal: /\n/,
+ contains: [b, {
+ begin: /\[/,
+ end: /\]/,
+ relevance: 0,
+ contains: [b]
+ }]
+ }]
+ },
+ TITLE_MODE: {
+ className: "title",
+ begin: h,
+ relevance: 0
+ },
+ UNDERSCORE_TITLE_MODE: {
+ className: "title",
+ begin: d,
+ relevance: 0
+ },
+ METHOD_GUARD: {
+ begin: "\\.\\s*[a-zA-Z_]\\w*",
+ relevance: 0
+ },
+ END_SAME_AS_BEGIN: e => Object.assign(e, {
+ "on:begin": (e, t) => {
+ t.data._beginMatch = e[1]
+ },
+ "on:end": (e, t) => {
+ t.data._beginMatch !== e[1] && t.ignoreMatch()
+ }
+ })
+ });
+
+ function k(e, t) {
+ "." === e.input[e.index - 1] && t.ignoreMatch()
+ }
+
+ function M(e, t) {
+ t && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = k, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, void 0 === e.relevance && (e.relevance = 0))
+ }
+
+ function O(e, t) {
+ Array.isArray(e.illegal) && (e.illegal = ((...e) => "(" + e.map((e => g(e))).join("|") + ")")(...e.illegal))
+ }
+
+ function A(e, t) {
+ if (e.match) {
+ if (e.begin || e.end) throw Error("begin & end are not supported with match");
+ e.begin = e.match, delete e.match
+ }
+ }
+
+ function L(e, t) {
+ void 0 === e.relevance && (e.relevance = 1)
+ }
+ const I = ["of", "and", "for", "in", "not", "or", "if", "then", "parent", "list", "value"];
+
+ function j(e, t, n = "keyword") {
+ const i = {};
+ return "string" == typeof e ? s(n, e.split(" ")) : Array.isArray(e) ? s(n, e) : Object.keys(e).forEach((n => {
+ Object.assign(i, j(e[n], t, n))
+ })), i;
+
+ function s(e, n) {
+ t && (n = n.map((e => e.toLowerCase()))), n.forEach((t => {
+ const n = t.split("|");
+ i[n[0]] = [e, B(n[0], n[1])]
+ }))
+ }
+ }
+
+ function B(e, t) {
+ return t ? Number(t) : (e => I.includes(e.toLowerCase()))(e) ? 0 : 1
+ }
+
+ function T(e, {
+ plugins: t
+ }) {
+ function n(t, n) {
+ return RegExp(g(t), "m" + (e.case_insensitive ? "i" : "") + (n ? "g" : ""))
+ }
+ class i {
+ constructor() {
+ this.matchIndexes = {}, this.regexes = [], this.matchAt = 1, this.position = 0
+ }
+ addRule(e, t) {
+ t.position = this.position++, this.matchIndexes[this.matchAt] = t, this.regexes.push([t, e]),
+ this.matchAt += (e => RegExp(e.toString() + "|").exec("").length - 1)(e) + 1
+ }
+ compile() {
+ 0 === this.regexes.length && (this.exec = () => null);
+ const e = this.regexes.map((e => e[1]));
+ this.matcherRe = n(((e, t = "|") => {
+ let n = 0;
+ return e.map((e => {
+ n += 1;
+ const t = n;
+ let i = g(e),
+ s = "";
+ for (; i.length > 0;) {
+ const e = u.exec(i);
+ if (!e) {
+ s += i;
+ break
+ }
+ s += i.substring(0, e.index), i = i.substring(e.index + e[0].length), "\\" === e[0][0] && e[1] ? s += "\\" + (Number(e[1]) + t) : (s += e[0], "(" === e[0] && n++)
+ }
+ return s
+ })).map((e => `(${e})`)).join(t)
+ })(e), !0), this.lastIndex = 0
+ }
+ exec(e) {
+ this.matcherRe.lastIndex = this.lastIndex;
+ const t = this.matcherRe.exec(e);
+ if (!t) return null;
+ const n = t.findIndex(((e, t) => t > 0 && void 0 !== e)),
+ i = this.matchIndexes[n];
+ return t.splice(0, n), Object.assign(t, i)
+ }
+ }
+ class s {
+ constructor() {
+ this.rules = [], this.multiRegexes = [],
+ this.count = 0, this.lastIndex = 0, this.regexIndex = 0
+ }
+ getMatcher(e) {
+ if (this.multiRegexes[e]) return this.multiRegexes[e];
+ const t = new i;
+ return this.rules.slice(e).forEach((([e, n]) => t.addRule(e, n))),
+ t.compile(), this.multiRegexes[e] = t, t
+ }
+ resumingScanAtSamePosition() {
+ return 0 !== this.regexIndex
+ }
+ considerAll() {
+ this.regexIndex = 0
+ }
+ addRule(e, t) {
+ this.rules.push([e, t]), "begin" === t.type && this.count++
+ }
+ exec(e) {
+ const t = this.getMatcher(this.regexIndex);
+ t.lastIndex = this.lastIndex;
+ let n = t.exec(e);
+ if (this.resumingScanAtSamePosition())
+ if (n && n.index === this.lastIndex);
+ else {
+ const t = this.getMatcher(0);
+ t.lastIndex = this.lastIndex + 1, n = t.exec(e)
+ }
+ return n && (this.regexIndex += n.position + 1, this.regexIndex === this.count && this.considerAll()), n
+ }
+ }
+ if (e.compilerExtensions || (e.compilerExtensions = []), e.contains && e.contains.includes("self")) throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
+ return e.classNameAliases = a(e.classNameAliases || {}),
+ function t(i, r) {
+ const l = i;
+ if (i.isCompiled) return l;
+ [A].forEach((e => e(i, r))), e.compilerExtensions.forEach((e => e(i, r))),
+ i.__beforeBegin = null, [M, O, L].forEach((e => e(i, r))), i.isCompiled = !0;
+ let o = null;
+ if ("object" == typeof i.keywords && (o = i.keywords.$pattern, delete i.keywords.$pattern), i.keywords && (i.keywords = j(i.keywords, e.case_insensitive)), i.lexemes && o) throw Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");
+ return o = o || i.lexemes || /\w+/,
+ l.keywordPatternRe = n(o, !0), r && (i.begin || (i.begin = /\B|\b/), l.beginRe = n(i.begin), i.endSameAsBegin && (i.end = i.begin), i.end || i.endsWithParent || (i.end = /\B|\b/), i.end && (l.endRe = n(i.end)), l.terminatorEnd = g(i.end) || "", i.endsWithParent && r.terminatorEnd && (l.terminatorEnd += (i.end ? "|" : "") + r.terminatorEnd)),
+ i.illegal && (l.illegalRe = n(i.illegal)),
+ i.contains || (i.contains = []), i.contains = [].concat(...i.contains.map((e => (e => (e.variants && !e.cachedVariants && (e.cachedVariants = e.variants.map((t => a(e, {
+ variants: null
+ }, t)))), e.cachedVariants ? e.cachedVariants : S(e) ? a(e, {
+ starts: e.starts ? a(e.starts) : null
+ }) : Object.isFrozen(e) ? a(e) : e))("self" === e ? i : e)))), i.contains.forEach((e => {
+ t(e, l)
+ })), i.starts && t(i.starts, r), l.matcher = (e => {
+ const t = new s;
+ return e.contains.forEach((e => t.addRule(e.begin, {
+ rule: e,
+ type: "begin"
+ }))), e.terminatorEnd && t.addRule(e.terminatorEnd, {
+ type: "end"
+ }), e.illegal && t.addRule(e.illegal, {
+ type: "illegal"
+ }), t
+ })(l), l
+ }(e)
+ }
+
+ function S(e) {
+ return !!e && (e.endsWithParent || S(e.starts))
+ }
+
+ function P(e) {
+ const t = {
+ props: ["language", "code", "autodetect"],
+ data: () => ({
+ detectedLanguage: "",
+ unknownLanguage: !1
+ }),
+ computed: {
+ className() {
+ return this.unknownLanguage ? "" : "hljs " + this.detectedLanguage
+ },
+ highlighted() {
+ if (!this.autoDetect && !e.getLanguage(this.language)) return console.warn(`The language "${this.language}" you specified could not be found.`),
+ this.unknownLanguage = !0, s(this.code);
+ let t = {};
+ return this.autoDetect ? (t = e.highlightAuto(this.code), this.detectedLanguage = t.language) : (t = e.highlight(this.language, this.code, this.ignoreIllegals), this.detectedLanguage = this.language), t.value
+ },
+ autoDetect() {
+ return !(this.language && (e = this.autodetect, !e && "" !== e));
+ var e
+ },
+ ignoreIllegals: () => !0
+ },
+ render(e) {
+ return e("pre", {}, [e("code", {
+ class: this.className,
+ domProps: {
+ innerHTML: this.highlighted
+ }
+ })])
+ }
+ };
+ return {
+ Component: t,
+ VuePlugin: {
+ install(e) {
+ e.component("highlightjs", t)
+ }
+ }
+ }
+ }
+ const D = {
+ "after:highlightElement": ({
+ el: e,
+ result: t,
+ text: n
+ }) => {
+ const i = H(e);
+ if (!i.length) return;
+ const a = document.createElement("div");
+ a.innerHTML = t.value, t.value = ((e, t, n) => {
+ let i = 0,
+ a = "";
+ const r = [];
+
+ function l() {
+ return e.length && t.length ? e[0].offset !== t[0].offset ? e[0].offset < t[0].offset ? e : t : "start" === t[0].event ? e : t : e.length ? e : t
+ }
+
+ function o(e) {
+ a += "<" + C(e) + [].map.call(e.attributes, (function(e) {
+ return " " + e.nodeName + '="' + s(e.value) + '"'
+ })).join("") + ">"
+ }
+
+ function c(e) {
+ a += "" + C(e) + ">"
+ }
+
+ function g(e) {
+ ("start" === e.event ? o : c)(e.node)
+ }
+ for (; e.length || t.length;) {
+ let t = l();
+ if (a += s(n.substring(i, t[0].offset)), i = t[0].offset, t === e) {
+ r.reverse().forEach(c);
+ do {
+ g(t.splice(0, 1)[0]), t = l()
+ } while (t === e && t.length && t[0].offset === i);
+ r.reverse().forEach(o)
+ } else "start" === t[0].event ? r.push(t[0].node) : r.pop(), g(t.splice(0, 1)[0])
+ }
+ return a + s(n.substr(i))
+ })(i, H(a), n)
+ }
+ };
+
+ function C(e) {
+ return e.nodeName.toLowerCase()
+ }
+
+ function H(e) {
+ const t = [];
+ return function e(n, i) {
+ for (let s = n.firstChild; s; s = s.nextSibling) 3 === s.nodeType ? i += s.nodeValue.length : 1 === s.nodeType && (t.push({
+ event: "start",
+ offset: i,
+ node: s
+ }), i = e(s, i), C(s).match(/br|hr|img|input/) || t.push({
+ event: "stop",
+ offset: i,
+ node: s
+ }));
+ return i
+ }(e, 0), t
+ }
+ const $ = {},
+ U = e => {
+ console.error(e)
+ },
+ z = (e, ...t) => {
+ console.log("WARN: " + e, ...t)
+ },
+ K = (e, t) => {
+ $[`${e}/${t}`] || (console.log(`Deprecated as of ${e}. ${t}`), $[`${e}/${t}`] = !0)
+ },
+ G = s,
+ V = a,
+ W = Symbol("nomatch");
+ return (e => {
+ const n = Object.create(null),
+ s = Object.create(null),
+ a = [];
+ let r = !0;
+ const l = /(^(<[^>]+>|\t|)+|\n)/gm,
+ o = "Could not find the language '{}', did you forget to load/include a language module?",
+ g = {
+ disableAutodetect: !0,
+ name: "Plain text",
+ contains: []
+ };
+ let u = {
+ noHighlightRe: /^(no-?highlight)$/i,
+ languageDetectRe: /\blang(?:uage)?-([\w-]+)\b/i,
+ classPrefix: "hljs-",
+ tabReplace: null,
+ useBR: !1,
+ languages: null,
+ __emitter: c
+ };
+
+ function h(e) {
+ return u.noHighlightRe.test(e)
+ }
+
+ function d(e, t, n, i) {
+ let s = "",
+ a = "";
+ "object" == typeof t ? (s = e, n = t.ignoreIllegals, a = t.language, i = void 0) : (K("10.7.0", "highlight(lang, code, ...args) has been deprecated."), K("10.7.0", "Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"), a = e, s = t);
+ const r = {
+ code: s,
+ language: a
+ };
+ M("before:highlight", r);
+ const l = r.result ? r.result : f(r.language, r.code, n, i);
+ return l.code = r.code, M("after:highlight", l), l
+ }
+
+ function f(e, t, s, l) {
+ function c(e, t) {
+ const n = v.case_insensitive ? t[0].toLowerCase() : t[0];
+ return Object.prototype.hasOwnProperty.call(e.keywords, n) && e.keywords[n]
+ }
+
+ function g() {
+ null != R.subLanguage ? (() => {
+ if ("" === M) return;
+ let e = null;
+ if ("string" == typeof R.subLanguage) {
+ if (!n[R.subLanguage]) return void k.addText(M);
+ e = f(R.subLanguage, M, !0, _[R.subLanguage]), _[R.subLanguage] = e.top
+ } else e = p(M, R.subLanguage.length ? R.subLanguage : null);
+ R.relevance > 0 && (O += e.relevance), k.addSublanguage(e.emitter, e.language)
+ })() : (() => {
+ if (!R.keywords) return void k.addText(M);
+ let e = 0;
+ R.keywordPatternRe.lastIndex = 0;
+ let t = R.keywordPatternRe.exec(M),
+ n = "";
+ for (; t;) {
+ n += M.substring(e, t.index);
+ const i = c(R, t);
+ if (i) {
+ const [e, s] = i;
+ if (k.addText(n), n = "", O += s, e.startsWith("_")) n += t[0];
+ else {
+ const n = v.classNameAliases[e] || e;
+ k.addKeyword(t[0], n)
+ }
+ } else n += t[0];
+ e = R.keywordPatternRe.lastIndex, t = R.keywordPatternRe.exec(M)
+ }
+ n += M.substr(e), k.addText(n)
+ })(), M = ""
+ }
+
+ function h(e) {
+ return e.className && k.openNode(v.classNameAliases[e.className] || e.className),
+ R = Object.create(e, {
+ parent: {
+ value: R
+ }
+ }), R
+ }
+
+ function d(e, t, n) {
+ let s = ((e, t) => {
+ const n = e && e.exec(t);
+ return n && 0 === n.index
+ })(e.endRe, n);
+ if (s) {
+ if (e["on:end"]) {
+ const n = new i(e);
+ e["on:end"](t, n), n.isMatchIgnored && (s = !1)
+ }
+ if (s) {
+ for (; e.endsParent && e.parent;) e = e.parent;
+ return e
+ }
+ }
+ if (e.endsWithParent) return d(e.parent, t, n)
+ }
+
+ function m(e) {
+ return 0 === R.matcher.regexIndex ? (M += e[0], 1) : (I = !0, 0)
+ }
+
+ function b(e) {
+ const n = e[0],
+ i = t.substr(e.index),
+ s = d(R, e, i);
+ if (!s) return W;
+ const a = R;
+ a.skip ? M += n : (a.returnEnd || a.excludeEnd || (M += n), g(), a.excludeEnd && (M = n));
+ do {
+ R.className && k.closeNode(), R.skip || R.subLanguage || (O += R.relevance), R = R.parent
+ } while (R !== s.parent);
+ return s.starts && (s.endSameAsBegin && (s.starts.endRe = s.endRe), h(s.starts)), a.returnEnd ? 0 : n.length
+ }
+ let E = {};
+
+ function x(n, a) {
+ const l = a && a[0];
+ if (M += n, null == l) return g(), 0;
+ if ("begin" === E.type && "end" === a.type && E.index === a.index && "" === l) {
+ if (M += t.slice(a.index, a.index + 1), !r) {
+ const t = Error("0 width match regex");
+ throw t.languageName = e, t.badRule = E.rule, t
+ }
+ return 1
+ }
+ if (E = a, "begin" === a.type) return function(e) {
+ const t = e[0],
+ n = e.rule,
+ s = new i(n),
+ a = [n.__beforeBegin, n["on:begin"]];
+ for (const n of a)
+ if (n && (n(e, s), s.isMatchIgnored)) return m(t);
+ return n && n.endSameAsBegin && (n.endRe = RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), "m")),
+ n.skip ? M += t : (n.excludeBegin && (M += t), g(), n.returnBegin || n.excludeBegin || (M = t)), h(n), n.returnBegin ? 0 : t.length
+ }(a);
+ if ("illegal" === a.type && !s) {
+ const e = Error('Illegal lexeme "' + l + '" for mode "' + (R.className || "") + '"');
+ throw e.mode = R, e
+ }
+ if ("end" === a.type) {
+ const e = b(a);
+ if (e !== W) return e
+ }
+ if ("illegal" === a.type && "" === l) return 1;
+ if (L > 1e5 && L > 3 * a.index) throw Error("potential infinite loop, way more iterations than matches");
+ return M += l, l.length
+ }
+ const v = N(e);
+ if (!v) throw U(o.replace("{}", e)), Error('Unknown language: "' + e + '"');
+ const w = T(v, {
+ plugins: a
+ });
+ let y = "",
+ R = l || w;
+ const _ = {},
+ k = new u.__emitter(u);
+ (() => {
+ const e = [];
+ for (let t = R; t !== v; t = t.parent) t.className && e.unshift(t.className);
+ e.forEach((e => k.openNode(e)))
+ })();
+ let M = "",
+ O = 0,
+ A = 0,
+ L = 0,
+ I = !1;
+ try {
+ for (R.matcher.considerAll();;) {
+ L++, I ? I = !1 : R.matcher.considerAll(), R.matcher.lastIndex = A;
+ const e = R.matcher.exec(t);
+ if (!e) break;
+ const n = x(t.substring(A, e.index), e);
+ A = e.index + n
+ }
+ return x(t.substr(A)), k.closeAllNodes(), k.finalize(), y = k.toHTML(), {
+ relevance: Math.floor(O),
+ value: y,
+ language: e,
+ illegal: !1,
+ emitter: k,
+ top: R
+ }
+ } catch (n) {
+ if (n.message && n.message.includes("Illegal")) return {
+ illegal: !0,
+ illegalBy: {
+ msg: n.message,
+ context: t.slice(A - 100, A + 100),
+ mode: n.mode
+ },
+ sofar: y,
+ relevance: 0,
+ value: G(t),
+ emitter: k
+ };
+ if (r) return {
+ illegal: !1,
+ relevance: 0,
+ value: G(t),
+ emitter: k,
+ language: e,
+ top: R,
+ errorRaised: n
+ };
+ throw n
+ }
+ }
+
+ function p(e, t) {
+ t = t || u.languages || Object.keys(n);
+ const i = (e => {
+ const t = {
+ relevance: 0,
+ emitter: new u.__emitter(u),
+ value: G(e),
+ illegal: !1,
+ top: g
+ };
+ return t.emitter.addText(e), t
+ })(e),
+ s = t.filter(N).filter(k).map((t => f(t, e, !1)));
+ s.unshift(i);
+ const a = s.sort(((e, t) => {
+ if (e.relevance !== t.relevance) return t.relevance - e.relevance;
+ if (e.language && t.language) {
+ if (N(e.language).supersetOf === t.language) return 1;
+ if (N(t.language).supersetOf === e.language) return -1
+ }
+ return 0
+ })),
+ [r, l] = a,
+ o = r;
+ return o.second_best = l, o
+ }
+ const m = {
+ "before:highlightElement": ({
+ el: e
+ }) => {
+ u.useBR && (e.innerHTML = e.innerHTML.replace(/\n/g, "").replace(/ /g, "\n"))
+ },
+ "after:highlightElement": ({
+ result: e
+ }) => {
+ u.useBR && (e.value = e.value.replace(/\n/g, " "))
+ }
+ },
+ b = /^(<[^>]+>|\t)+/gm,
+ E = {
+ "after:highlightElement": ({
+ result: e
+ }) => {
+ u.tabReplace && (e.value = e.value.replace(b, (e => e.replace(/\t/g, u.tabReplace))))
+ }
+ };
+
+ function x(e) {
+ let t = null;
+ const n = (e => {
+ let t = e.className + " ";
+ t += e.parentNode ? e.parentNode.className : "";
+ const n = u.languageDetectRe.exec(t);
+ if (n) {
+ const t = N(n[1]);
+ return t || (z(o.replace("{}", n[1])), z("Falling back to no-highlight mode for this block.", e)),
+ t ? n[1] : "no-highlight"
+ }
+ return t.split(/\s+/).find((e => h(e) || N(e)))
+ })(e);
+ if (h(n)) return;
+ M("before:highlightElement", {
+ el: e,
+ language: n
+ }), t = e;
+ const i = t.textContent,
+ a = n ? d(i, {
+ language: n,
+ ignoreIllegals: !0
+ }) : p(i);
+ M("after:highlightElement", {
+ el: e,
+ result: a,
+ text: i
+ }), e.innerHTML = a.value, ((e, t, n) => {
+ const i = t ? s[t] : n;
+ e.classList.add("hljs"), i && e.classList.add(i)
+ })(e, n, a.language), e.result = {
+ language: a.language,
+ re: a.relevance,
+ relavance: a.relevance
+ }, a.second_best && (e.second_best = {
+ language: a.second_best.language,
+ re: a.second_best.relevance,
+ relavance: a.second_best.relevance
+ })
+ }
+ const v = () => {
+ v.called || (v.called = !0, K("10.6.0", "initHighlighting() is deprecated. Use highlightAll() instead."), document.querySelectorAll("pre code").forEach(x))
+ };
+ let w = !1;
+
+ function y() {
+ "loading" !== document.readyState ? document.querySelectorAll("pre code").forEach(x) : w = !0
+ }
+
+ function N(e) {
+ return e = (e || "").toLowerCase(), n[e] || n[s[e]]
+ }
+
+ function R(e, {
+ languageName: t
+ }) {
+ "string" == typeof e && (e = [e]), e.forEach((e => {
+ s[e.toLowerCase()] = t
+ }))
+ }
+
+ function k(e) {
+ const t = N(e);
+ return t && !t.disableAutodetect
+ }
+
+ function M(e, t) {
+ const n = e;
+ a.forEach((e => {
+ e[n] && e[n](t)
+ }))
+ }
+ "undefined" != typeof window && window.addEventListener && window.addEventListener("DOMContentLoaded", (() => {
+ w && y()
+ }), !1), Object.assign(e, {
+ highlight: d,
+ highlightAuto: p,
+ highlightAll: y,
+ fixMarkup: e => {
+ return K("10.2.0", "fixMarkup will be removed entirely in v11.0"), K("10.2.0", "Please see https://github.com/highlightjs/highlight.js/issues/2534"),
+ t = e,
+ u.tabReplace || u.useBR ? t.replace(l, (e => "\n" === e ? u.useBR ? " " : e : u.tabReplace ? e.replace(/\t/g, u.tabReplace) : e)) : t;
+ var t
+ },
+ highlightElement: x,
+ highlightBlock: e => (K("10.7.0", "highlightBlock will be removed entirely in v12.0"), K("10.7.0", "Please use highlightElement now."), x(e)),
+ configure: e => {
+ e.useBR && (K("10.3.0", "'useBR' will be removed entirely in v11.0"), K("10.3.0", "Please see https://github.com/highlightjs/highlight.js/issues/2559")),
+ u = V(u, e)
+ },
+ initHighlighting: v,
+ initHighlightingOnLoad: () => {
+ K("10.6.0", "initHighlightingOnLoad() is deprecated. Use highlightAll() instead."),
+ w = !0
+ },
+ registerLanguage: (t, i) => {
+ let s = null;
+ try {
+ s = i(e)
+ } catch (e) {
+ if (U("Language definition for '{}' could not be registered.".replace("{}", t)), !r) throw e;
+ U(e), s = g
+ }
+ s.name || (s.name = t), n[t] = s, s.rawDefinition = i.bind(null, e), s.aliases && R(s.aliases, {
+ languageName: t
+ })
+ },
+ unregisterLanguage: e => {
+ delete n[e];
+ for (const t of Object.keys(s)) s[t] === e && delete s[t]
+ },
+ listLanguages: () => Object.keys(n),
+ getLanguage: N,
+ registerAliases: R,
+ requireLanguage: e => {
+ K("10.4.0", "requireLanguage will be removed entirely in v11."),
+ K("10.4.0", "Please see https://github.com/highlightjs/highlight.js/pull/2844");
+ const t = N(e);
+ if (t) return t;
+ throw Error("The '{}' language is required, but not loaded.".replace("{}", e))
+ },
+ autoDetection: k,
+ inherit: V,
+ addPlugin: e => {
+ (e => {
+ e["before:highlightBlock"] && !e["before:highlightElement"] && (e["before:highlightElement"] = t => {
+ e["before:highlightBlock"](Object.assign({
+ block: t.el
+ }, t))
+ }), e["after:highlightBlock"] && !e["after:highlightElement"] && (e["after:highlightElement"] = t => {
+ e["after:highlightBlock"](Object.assign({
+ block: t.el
+ }, t))
+ })
+ })(e), a.push(e)
+ },
+ vuePlugin: P(e).VuePlugin
+ }), e.debugMode = () => {
+ r = !1
+ }, e.safeMode = () => {
+ r = !0
+ }, e.versionString = "10.7.2";
+ for (const e in _) "object" == typeof _[e] && t(_[e]);
+ return Object.assign(e, _), e.addPlugin(m), e.addPlugin(D), e.addPlugin(E), e
+ })({})
+}();
+"object" == typeof exports && "undefined" != typeof module && (module.exports = hljs);
+hljs.registerLanguage("apache", (() => {
+ "use strict";
+ return e => {
+ const n = {
+ className: "number",
+ begin: /\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(:\d{1,5})?/
+ };
+ return {
+ name: "Apache config",
+ aliases: ["apacheconf"],
+ case_insensitive: !0,
+ contains: [e.HASH_COMMENT_MODE, {
+ className: "section",
+ begin: /<\/?/,
+ end: />/,
+ contains: [n, {
+ className: "number",
+ begin: /:\d{1,5}/
+ }, e.inherit(e.QUOTE_STRING_MODE, {
+ relevance: 0
+ })]
+ }, {
+ className: "attribute",
+ begin: /\w+/,
+ relevance: 0,
+ keywords: {
+ nomarkup: "order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"
+ },
+ starts: {
+ end: /$/,
+ relevance: 0,
+ keywords: {
+ literal: "on off all deny allow"
+ },
+ contains: [{
+ className: "meta",
+ begin: /\s\[/,
+ end: /\]$/
+ }, {
+ className: "variable",
+ begin: /[\$%]\{/,
+ end: /\}/,
+ contains: ["self", {
+ className: "number",
+ begin: /[$%]\d+/
+ }]
+ }, n, {
+ className: "number",
+ begin: /\d+/
+ }, e.QUOTE_STRING_MODE]
+ }
+ }],
+ illegal: /\S/
+ }
+ }
})());
-hljs.registerLanguage("bash",(()=>{"use strict";function e(...e){
-return e.map((e=>{return(s=e)?"string"==typeof s?s:s.source:null;var s
-})).join("")}return s=>{const n={},t={begin:/\$\{/,end:/\}/,contains:["self",{
-begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{
-begin:e(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},t]});const a={
-className:"subst",begin:/\$\(/,end:/\)/,contains:[s.BACKSLASH_ESCAPE]},i={
-begin:/<<-?\s*(?=\w+)/,starts:{contains:[s.END_SAME_AS_BEGIN({begin:/(\w+)/,
-end:/(\w+)/,className:"string"})]}},c={className:"string",begin:/"/,end:/"/,
-contains:[s.BACKSLASH_ESCAPE,n,a]};a.contains.push(c);const o={begin:/\$\(\(/,
-end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},s.NUMBER_MODE,n]
-},r=s.SHEBANG({binary:"(fish|bash|zsh|sh|csh|ksh|tcsh|dash|scsh)",relevance:10
-}),l={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,
-contains:[s.inherit(s.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{
-name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z._-]+\b/,
-keyword:"if then else elif fi for while in do done case esac function",
-literal:"true false",
-built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp"
-},contains:[r,s.SHEBANG(),l,o,s.HASH_COMMENT_MODE,i,c,{className:"",begin:/\\"/
-},{className:"string",begin:/'/,end:/'/},n]}}})());
-hljs.registerLanguage("c",(()=>{"use strict";function e(e){
-return((...e)=>e.map((e=>(e=>e?"string"==typeof e?e:e.source:null)(e))).join(""))("(",e,")?")
-}return t=>{const n=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]
-}),r="[a-zA-Z_]\\w*::",a="(decltype\\(auto\\)|"+e(r)+"[a-zA-Z_]\\w*"+e("<[^<>]+>")+")",i={
-className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},s={className:"string",
-variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",
-contains:[t.BACKSLASH_ESCAPE]},{
-begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",
-end:"'",illegal:"."},t.END_SAME_AS_BEGIN({
-begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},o={
-className:"number",variants:[{begin:"\\b(0b[01']+)"},{
-begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"
-},{
-begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"
-}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{
-"meta-keyword":"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"
-},contains:[{begin:/\\\n/,relevance:0},t.inherit(s,{className:"meta-string"}),{
-className:"meta-string",begin:/<.*?>/,end:/$/,illegal:"\\n"
-},n,t.C_BLOCK_COMMENT_MODE]},l={className:"title",begin:e(r)+t.IDENT_RE,
-relevance:0},d=e(r)+t.IDENT_RE+"\\s*\\(",u={
-keyword:"int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid wchar_t short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignas alignof constexpr consteval constinit decltype concept co_await co_return co_yield requires noexcept static_assert thread_local restrict final override atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq",
-built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr _Bool complex _Complex imaginary _Imaginary",
-literal:"true false nullptr NULL"},m=[c,i,n,t.C_BLOCK_COMMENT_MODE,o,s],p={
-variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{
-beginKeywords:"new throw return else",end:/;/}],keywords:u,contains:m.concat([{
-begin:/\(/,end:/\)/,keywords:u,contains:m.concat(["self"]),relevance:0}]),
-relevance:0},_={className:"function",begin:"("+a+"[\\*&\\s]+)+"+d,
-returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:u,illegal:/[^\w\s\*&:<>.]/,
-contains:[{begin:"decltype\\(auto\\)",keywords:u,relevance:0},{begin:d,
-returnBegin:!0,contains:[l],relevance:0},{className:"params",begin:/\(/,
-end:/\)/,keywords:u,relevance:0,contains:[n,t.C_BLOCK_COMMENT_MODE,s,o,i,{
-begin:/\(/,end:/\)/,keywords:u,relevance:0,
-contains:["self",n,t.C_BLOCK_COMMENT_MODE,s,o,i]}]
-},i,n,t.C_BLOCK_COMMENT_MODE,c]};return{name:"C",aliases:["c","h"],keywords:u,
-disableAutodetect:!0,illegal:"",contains:[].concat(p,_,m,[c,{
-begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",
-end:">",keywords:u,contains:["self",i]},{begin:t.IDENT_RE+"::",keywords:u},{
-className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,
-contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{
-preprocessor:c,strings:s,keywords:u}}}})());
-hljs.registerLanguage("coffeescript",(()=>{"use strict"
-;const e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],n=["true","false","null","undefined","NaN","Infinity"],a=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"])
-;return r=>{const t={
-keyword:e.concat(["then","unless","until","loop","by","when","and","or","is","isnt","not"]).filter((i=["var","const","let","function","static"],
-e=>!i.includes(e))),literal:n.concat(["yes","no","on","off"]),
-built_in:a.concat(["npm","print"])};var i;const s="[A-Za-z$_][0-9A-Za-z$_]*",o={
-className:"subst",begin:/#\{/,end:/\}/,keywords:t
-},c=[r.BINARY_NUMBER_MODE,r.inherit(r.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",
-relevance:0}}),{className:"string",variants:[{begin:/'''/,end:/'''/,
-contains:[r.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[r.BACKSLASH_ESCAPE]
-},{begin:/"""/,end:/"""/,contains:[r.BACKSLASH_ESCAPE,o]},{begin:/"/,end:/"/,
-contains:[r.BACKSLASH_ESCAPE,o]}]},{className:"regexp",variants:[{begin:"///",
-end:"///",contains:[o,r.HASH_COMMENT_MODE]},{begin:"//[gim]{0,3}(?=\\W)",
-relevance:0},{begin:/\/(?![ *]).*?(?![\\]).\/[gim]{0,3}(?=\W)/}]},{begin:"@"+s
-},{subLanguage:"javascript",excludeBegin:!0,excludeEnd:!0,variants:[{
-begin:"```",end:"```"},{begin:"`",end:"`"}]}];o.contains=c
-;const l=r.inherit(r.TITLE_MODE,{begin:s}),d="(\\(.*\\)\\s*)?\\B[-=]>",g={
-className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/,
-end:/\)/,keywords:t,contains:["self"].concat(c)}]};return{name:"CoffeeScript",
-aliases:["coffee","cson","iced"],keywords:t,illegal:/\/\*/,
-contains:c.concat([r.COMMENT("###","###"),r.HASH_COMMENT_MODE,{
-className:"function",begin:"^\\s*"+s+"\\s*=\\s*"+d,end:"[-=]>",returnBegin:!0,
-contains:[l,g]},{begin:/[:\(,=]\s*/,relevance:0,contains:[{className:"function",
-begin:d,end:"[-=]>",returnBegin:!0,contains:[g]}]},{className:"class",
-beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{
-beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[l]},l]
-},{begin:s+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}})());
-hljs.registerLanguage("cpp",(()=>{"use strict";function e(e){
-return((...e)=>e.map((e=>(e=>e?"string"==typeof e?e:e.source:null)(e))).join(""))("(",e,")?")
-}return t=>{const n=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]
-}),r="[a-zA-Z_]\\w*::",a="(decltype\\(auto\\)|"+e(r)+"[a-zA-Z_]\\w*"+e("<[^<>]+>")+")",i={
-className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},s={className:"string",
-variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",
-contains:[t.BACKSLASH_ESCAPE]},{
-begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",
-end:"'",illegal:"."},t.END_SAME_AS_BEGIN({
-begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},o={
-className:"number",variants:[{begin:"\\b(0b[01']+)"},{
-begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"
-},{
-begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"
-}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{
-"meta-keyword":"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"
-},contains:[{begin:/\\\n/,relevance:0},t.inherit(s,{className:"meta-string"}),{
-className:"meta-string",begin:/<.*?>/,end:/$/,illegal:"\\n"
-},n,t.C_BLOCK_COMMENT_MODE]},l={className:"title",begin:e(r)+t.IDENT_RE,
-relevance:0},d=e(r)+t.IDENT_RE+"\\s*\\(",u={
-keyword:"int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid wchar_t short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignas alignof constexpr consteval constinit decltype concept co_await co_return co_yield requires noexcept static_assert thread_local restrict final override atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq",
-built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr _Bool complex _Complex imaginary _Imaginary",
-literal:"true false nullptr NULL"},m=[c,i,n,t.C_BLOCK_COMMENT_MODE,o,s],p={
-variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{
-beginKeywords:"new throw return else",end:/;/}],keywords:u,contains:m.concat([{
-begin:/\(/,end:/\)/,keywords:u,contains:m.concat(["self"]),relevance:0}]),
-relevance:0},_={className:"function",begin:"("+a+"[\\*&\\s]+)+"+d,
-returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:u,illegal:/[^\w\s\*&:<>.]/,
-contains:[{begin:"decltype\\(auto\\)",keywords:u,relevance:0},{begin:d,
-returnBegin:!0,contains:[l],relevance:0},{className:"params",begin:/\(/,
-end:/\)/,keywords:u,relevance:0,contains:[n,t.C_BLOCK_COMMENT_MODE,s,o,i,{
-begin:/\(/,end:/\)/,keywords:u,relevance:0,
-contains:["self",n,t.C_BLOCK_COMMENT_MODE,s,o,i]}]
-},i,n,t.C_BLOCK_COMMENT_MODE,c]};return{name:"C++",
-aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:u,illegal:"",
-contains:[].concat(p,_,m,[c,{
-begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",
-end:">",keywords:u,contains:["self",i]},{begin:t.IDENT_RE+"::",keywords:u},{
-className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,
-contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{
-preprocessor:c,strings:s,keywords:u}}}})());
-hljs.registerLanguage("csharp",(()=>{"use strict";return e=>{var n={
-keyword:["abstract","as","base","break","case","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"].concat(["add","alias","and","ascending","async","await","by","descending","equals","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","remove","select","set","unmanaged","value|0","var","when","where","with","yield"]),
-built_in:["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","unit","ushort"],
-literal:["default","false","null","true"]},a=e.inherit(e.TITLE_MODE,{
-begin:"[a-zA-Z](\\.?\\w)*"}),i={className:"number",variants:[{
-begin:"\\b(0b[01']+)"},{
-begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{
-begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"
-}],relevance:0},s={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]
-},t=e.inherit(s,{illegal:/\n/}),r={className:"subst",begin:/\{/,end:/\}/,
-keywords:n},l=e.inherit(r,{illegal:/\n/}),c={className:"string",begin:/\$"/,
-end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/
-},e.BACKSLASH_ESCAPE,l]},o={className:"string",begin:/\$@"/,end:'"',contains:[{
-begin:/\{\{/},{begin:/\}\}/},{begin:'""'},r]},d=e.inherit(o,{illegal:/\n/,
-contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},l]})
-;r.contains=[o,c,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,e.C_BLOCK_COMMENT_MODE],
-l.contains=[d,c,t,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,e.inherit(e.C_BLOCK_COMMENT_MODE,{
-illegal:/\n/})];var g={variants:[o,c,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]
-},E={begin:"<",end:">",contains:[{beginKeywords:"in out"},a]
-},_=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",b={
-begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],
-keywords:n,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,
-contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{
-begin:"\x3c!--|--\x3e"},{begin:"?",end:">"}]}]
-}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",
-end:"$",keywords:{
-"meta-keyword":"if else elif endif define undef warning error line region endregion pragma checksum"
-}},g,i,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,
-illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"
-},a,E,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",
-relevance:0,end:/[{;=]/,illegal:/[^\s:]/,
-contains:[a,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{
-beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,
-contains:[a,E,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",
-begin:"^\\s*\\[",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{
-className:"meta-string",begin:/"/,end:/"/}]},{
-beginKeywords:"new return throw await else",relevance:0},{className:"function",
-begin:"("+_+"\\s+)+"+e.IDENT_RE+"\\s*(<.+>\\s*)?\\(",returnBegin:!0,
-end:/\s*[{;=]/,excludeEnd:!0,keywords:n,contains:[{
-beginKeywords:"public private protected static internal protected abstract async extern override unsafe virtual new sealed partial",
-relevance:0},{begin:e.IDENT_RE+"\\s*(<.+>\\s*)?\\(",returnBegin:!0,
-contains:[e.TITLE_MODE,E],relevance:0},{className:"params",begin:/\(/,end:/\)/,
-excludeBegin:!0,excludeEnd:!0,keywords:n,relevance:0,
-contains:[g,i,e.C_BLOCK_COMMENT_MODE]
-},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},b]}}})());
-hljs.registerLanguage("css",(()=>{"use strict"
-;const e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],t=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],o=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],r=["align-content","align-items","align-self","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","auto","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","clip-path","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-variant-ligatures","font-variation-settings","font-weight","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inherit","initial","justify-content","left","letter-spacing","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","mask","max-height","max-width","min-height","min-width","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","perspective","perspective-origin","pointer-events","position","quotes","resize","right","src","tab-size","table-layout","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-indent","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","white-space","widows","width","word-break","word-spacing","word-wrap","z-index"].reverse()
-;return n=>{const a=(e=>({IMPORTANT:{className:"meta",begin:"!important"},
-HEXCOLOR:{className:"number",begin:"#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})"},
-ATTRIBUTE_SELECTOR_MODE:{className:"selector-attr",begin:/\[/,end:/\]/,
-illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]}
-}))(n),l=[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE];return{name:"CSS",
-case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},
-classNameAliases:{keyframePosition:"selector-tag"},
-contains:[n.C_BLOCK_COMMENT_MODE,{begin:/-(webkit|moz|ms|o)-(?=[a-z])/
-},n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0
-},{className:"selector-class",begin:"\\.[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0
-},a.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{
-begin:":("+i.join("|")+")"},{begin:"::("+o.join("|")+")"}]},{
-className:"attribute",begin:"\\b("+r.join("|")+")\\b"},{begin:":",end:"[;}]",
-contains:[a.HEXCOLOR,a.IMPORTANT,n.CSS_NUMBER_MODE,...l,{
-begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"
-},contains:[{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]
-},{className:"built_in",begin:/[\w-]+(?=\()/}]},{
-begin:(s=/@/,((...e)=>e.map((e=>(e=>e?"string"==typeof e?e:e.source:null)(e))).join(""))("(?=",s,")")),
-end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",
-begin:/@-?\w[\w]*(-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,
-relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",
-attribute:t.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"
-},...l,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",
-begin:"\\b("+e.join("|")+")\\b"}]};var s}})());
-hljs.registerLanguage("diff",(()=>{"use strict";return e=>({name:"Diff",
-aliases:["patch"],contains:[{className:"meta",relevance:10,variants:[{
-begin:/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/},{begin:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{
-begin:/^--- +\d+,\d+ +----$/}]},{className:"comment",variants:[{begin:/Index: /,
-end:/$/},{begin:/^index/,end:/$/},{begin:/={3,}/,end:/$/},{begin:/^-{3}/,end:/$/
-},{begin:/^\*{3} /,end:/$/},{begin:/^\+{3}/,end:/$/},{begin:/^\*{15}$/},{
-begin:/^diff --git/,end:/$/}]},{className:"addition",begin:/^\+/,end:/$/},{
-className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,
-end:/$/}]})})());
-hljs.registerLanguage("go",(()=>{"use strict";return e=>{const n={
-keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",
-literal:"true false iota nil",
-built_in:"append cap close complex copy imag len make new panic print println real recover delete"
-};return{name:"Go",aliases:["golang"],keywords:n,illegal:"",
-contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",
-variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{
-className:"number",variants:[{begin:e.C_NUMBER_RE+"[i]",relevance:1
-},e.C_NUMBER_MODE]},{begin:/:=/},{className:"function",beginKeywords:"func",
-end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",
-begin:/\(/,end:/\)/,keywords:n,illegal:/["']/}]}]}}})());
-hljs.registerLanguage("http",(()=>{"use strict";function e(...e){
-return e.map((e=>{return(n=e)?"string"==typeof n?n:n.source:null;var n
-})).join("")}return n=>{const a="HTTP/(2|1\\.[01])",s=[{className:"attribute",
-begin:e("^",/[A-Za-z][A-Za-z0-9-]*/,"(?=\\:\\s)"),starts:{contains:[{
-className:"punctuation",begin:/: /,relevance:0,starts:{end:"$",relevance:0}}]}
-},{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}}];return{
-name:"HTTP",aliases:["https"],illegal:/\S/,contains:[{begin:"^(?="+a+" \\d{3})",
-end:/$/,contains:[{className:"meta",begin:a},{className:"number",
-begin:"\\b\\d{3}\\b"}],starts:{end:/\b\B/,illegal:/\S/,contains:s}},{
-begin:"(?=^[A-Z]+ (.*?) "+a+"$)",end:/$/,contains:[{className:"string",
-begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0},{className:"meta",begin:a},{
-className:"keyword",begin:"[A-Z]+"}],starts:{end:/\b\B/,illegal:/\S/,contains:s}
-}]}}})());
-hljs.registerLanguage("ini",(()=>{"use strict";function e(e){
-return e?"string"==typeof e?e:e.source:null}function n(...n){
-return n.map((n=>e(n))).join("")}return s=>{const a={className:"number",
-relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:s.NUMBER_RE}]
-},i=s.COMMENT();i.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const t={
-className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/
-}]},r={className:"literal",begin:/\bon|off|true|false|yes|no\b/},l={
-className:"string",contains:[s.BACKSLASH_ESCAPE],variants:[{begin:"'''",
-end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'
-},{begin:"'",end:"'"}]},c={begin:/\[/,end:/\]/,contains:[i,r,t,l,a,"self"],
-relevance:0
-},g="("+[/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/].map((n=>e(n))).join("|")+")"
-;return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,
-contains:[i,{className:"section",begin:/\[+/,end:/\]+/},{
-begin:n(g,"(\\s*\\.\\s*",g,")*",n("(?=",/\s*=\s*[^#\s]/,")")),className:"attr",
-starts:{end:/$/,contains:[i,c,r,t,l,a]}}]}}})());
-hljs.registerLanguage("java",(()=>{"use strict"
-;var e="\\.([0-9](_*[0-9])*)",n="[0-9a-fA-F](_*[0-9a-fA-F])*",a={
-className:"number",variants:[{
-begin:`(\\b([0-9](_*[0-9])*)((${e})|\\.)?|(${e}))[eE][+-]?([0-9](_*[0-9])*)[fFdD]?\\b`
-},{begin:`\\b([0-9](_*[0-9])*)((${e})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{
-begin:`(${e})[fFdD]?\\b`},{begin:"\\b([0-9](_*[0-9])*)[fFdD]\\b"},{
-begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?([0-9](_*[0-9])*)[fFdD]?\\b`
-},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{
-begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],
-relevance:0};return e=>{
-var n="false synchronized int abstract float private char boolean var static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do",s={
-className:"meta",begin:"@[\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*",
-contains:[{begin:/\(/,end:/\)/,contains:["self"]}]};const r=a;return{
-name:"Java",aliases:["jsp"],keywords:n,illegal:/<\/|#/,
-contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,
-relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{
-begin:/import java\.[a-z]+\./,keywords:"import",relevance:2
-},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{
-className:"class",beginKeywords:"class interface enum",end:/[{;=]/,
-excludeEnd:!0,relevance:1,keywords:"class interface enum",illegal:/[:"\[\]]/,
-contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{
-beginKeywords:"new throw return else",relevance:0},{className:"class",
-begin:"record\\s+"+e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,excludeEnd:!0,
-end:/[{;=]/,keywords:n,contains:[{beginKeywords:"record"},{
-begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,
-contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,
-keywords:n,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE]
-},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"function",
-begin:"([\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*(<[\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*(\\s*,\\s*[\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*)*>)?\\s+)+"+e.UNDERSCORE_IDENT_RE+"\\s*\\(",
-returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:n,contains:[{
-begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,
-contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,
-keywords:n,relevance:0,
-contains:[s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,r,e.C_BLOCK_COMMENT_MODE]
-},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},r,s]}}})());
-hljs.registerLanguage("javascript",(()=>{"use strict"
-;const e="[A-Za-z$_][0-9A-Za-z$_]*",n=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],a=["true","false","null","undefined","NaN","Infinity"],s=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"])
-;function r(e){return t("(?=",e,")")}function t(...e){return e.map((e=>{
-return(n=e)?"string"==typeof n?n:n.source:null;var n})).join("")}return i=>{
-const c=e,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,
-isTrulyOpeningTag:(e,n)=>{const a=e[0].length+e.index,s=e.input[a]
-;"<"!==s?">"===s&&(((e,{after:n})=>{const a=""+e[0].slice(1)
-;return-1!==e.input.indexOf(a,n)})(e,{after:a
-})||n.ignoreMatch()):n.ignoreMatch()}},l={$pattern:e,keyword:n,literal:a,
-built_in:s},b="\\.([0-9](_?[0-9])*)",g="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={
-className:"number",variants:[{
-begin:`(\\b(${g})((${b})|\\.)?|(${b}))[eE][+-]?([0-9](_?[0-9])*)\\b`},{
-begin:`\\b(${g})\\b((${b})\\b|\\.)?|(${b})\\b`},{
-begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{
-begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{
-begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{
-begin:"\\b0[0-7]+n?\\b"}],relevance:0},E={className:"subst",begin:"\\$\\{",
-end:"\\}",keywords:l,contains:[]},u={begin:"html`",end:"",starts:{end:"`",
-returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,E],subLanguage:"xml"}},_={
-begin:"css`",end:"",starts:{end:"`",returnEnd:!1,
-contains:[i.BACKSLASH_ESCAPE,E],subLanguage:"css"}},m={className:"string",
-begin:"`",end:"`",contains:[i.BACKSLASH_ESCAPE,E]},N={className:"comment",
-variants:[i.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{
-className:"doctag",begin:"@[A-Za-z]+",contains:[{className:"type",begin:"\\{",
-end:"\\}",relevance:0},{className:"variable",begin:c+"(?=\\s*(-)|$)",
-endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]
-}),i.C_BLOCK_COMMENT_MODE,i.C_LINE_COMMENT_MODE]
-},y=[i.APOS_STRING_MODE,i.QUOTE_STRING_MODE,u,_,m,d,i.REGEXP_MODE]
-;E.contains=y.concat({begin:/\{/,end:/\}/,keywords:l,contains:["self"].concat(y)
-});const f=[].concat(N,E.contains),A=f.concat([{begin:/\(/,end:/\)/,keywords:l,
-contains:["self"].concat(f)}]),p={className:"params",begin:/\(/,end:/\)/,
-excludeBegin:!0,excludeEnd:!0,keywords:l,contains:A};return{name:"Javascript",
-aliases:["js","jsx","mjs","cjs"],keywords:l,exports:{PARAMS_CONTAINS:A},
-illegal:/#(?![$_A-z])/,contains:[i.SHEBANG({label:"shebang",binary:"node",
-relevance:5}),{label:"use_strict",className:"meta",relevance:10,
-begin:/^\s*['"]use (strict|asm)['"]/
-},i.APOS_STRING_MODE,i.QUOTE_STRING_MODE,u,_,m,N,d,{
-begin:t(/[{,\n]\s*/,r(t(/(((\/\/.*$)|(\/\*(\*[^/]|[^*])*\*\/))\s*)*/,c+"\\s*:"))),
-relevance:0,contains:[{className:"attr",begin:c+r("\\s*:"),relevance:0}]},{
-begin:"("+i.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",
-keywords:"return throw case",contains:[N,i.REGEXP_MODE,{className:"function",
-begin:"(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+i.UNDERSCORE_IDENT_RE+")\\s*=>",
-returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{
-begin:i.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0
-},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:A}]}]
-},{begin:/,/,relevance:0},{className:"",begin:/\s/,end:/\s*/,skip:!0},{
-variants:[{begin:"<>",end:">"},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,
-end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,
-contains:["self"]}]}],relevance:0},{className:"function",
-beginKeywords:"function",end:/[{;]/,excludeEnd:!0,keywords:l,
-contains:["self",i.inherit(i.TITLE_MODE,{begin:c}),p],illegal:/%/},{
-beginKeywords:"while if switch catch for"},{className:"function",
-begin:i.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
-returnBegin:!0,contains:[p,i.inherit(i.TITLE_MODE,{begin:c})]},{variants:[{
-begin:"\\."+c},{begin:"\\$"+c}],relevance:0},{className:"class",
-beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"[\]]/,contains:[{
-beginKeywords:"extends"},i.UNDERSCORE_TITLE_MODE]},{begin:/\b(?=constructor)/,
-end:/[{;]/,excludeEnd:!0,contains:[i.inherit(i.TITLE_MODE,{begin:c}),"self",p]
-},{begin:"(get|set)\\s+(?="+c+"\\()",end:/\{/,keywords:"get set",
-contains:[i.inherit(i.TITLE_MODE,{begin:c}),{begin:/\(\)/},p]},{begin:/\$[(.]/}]
-}}})());
-hljs.registerLanguage("json",(()=>{"use strict";return n=>{const e={
-literal:"true false null"
-},i=[n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE],a=[n.QUOTE_STRING_MODE,n.C_NUMBER_MODE],l={
-end:",",endsWithParent:!0,excludeEnd:!0,contains:a,keywords:e},t={begin:/\{/,
-end:/\}/,contains:[{className:"attr",begin:/"/,end:/"/,
-contains:[n.BACKSLASH_ESCAPE],illegal:"\\n"},n.inherit(l,{begin:/:/
-})].concat(i),illegal:"\\S"},s={begin:"\\[",end:"\\]",contains:[n.inherit(l)],
-illegal:"\\S"};return a.push(t,s),i.forEach((n=>{a.push(n)})),{name:"JSON",
-contains:a,keywords:e,illegal:"\\S"}}})());
-hljs.registerLanguage("kotlin",(()=>{"use strict"
-;var e="\\.([0-9](_*[0-9])*)",n="[0-9a-fA-F](_*[0-9a-fA-F])*",a={
-className:"number",variants:[{
-begin:`(\\b([0-9](_*[0-9])*)((${e})|\\.)?|(${e}))[eE][+-]?([0-9](_*[0-9])*)[fFdD]?\\b`
-},{begin:`\\b([0-9](_*[0-9])*)((${e})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{
-begin:`(${e})[fFdD]?\\b`},{begin:"\\b([0-9](_*[0-9])*)[fFdD]\\b"},{
-begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?([0-9](_*[0-9])*)[fFdD]?\\b`
-},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{
-begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],
-relevance:0};return e=>{const n={
-keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",
-built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",
-literal:"true false null"},i={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"
-},s={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},t={
-className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},r={className:"string",
-variants:[{begin:'"""',end:'"""(?=[^"])',contains:[t,s]},{begin:"'",end:"'",
-illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,
-contains:[e.BACKSLASH_ESCAPE,t,s]}]};s.contains.push(r);const l={
-className:"meta",
-begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"
-},c={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,
-end:/\)/,contains:[e.inherit(r,{className:"meta-string"})]}]
-},o=a,b=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),E={
-variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,
-contains:[]}]},d=E;return d.variants[1].contains=[E],E.variants[1].contains=[d],
-{name:"Kotlin",aliases:["kt"],keywords:n,contains:[e.COMMENT("/\\*\\*","\\*/",{
-relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]
-}),e.C_LINE_COMMENT_MODE,b,{className:"keyword",
-begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",
-begin:/@\w+/}]}},i,l,c,{className:"function",beginKeywords:"fun",end:"[(]|$",
-returnBegin:!0,excludeEnd:!0,keywords:n,relevance:5,contains:[{
-begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,
-contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/,end:/>/,
-keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,
-endsParent:!0,keywords:n,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,
-endsWithParent:!0,contains:[E,e.C_LINE_COMMENT_MODE,b],relevance:0
-},e.C_LINE_COMMENT_MODE,b,l,c,r,e.C_NUMBER_MODE]},b]},{className:"class",
-beginKeywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,
-illegal:"extends implements",contains:[{
-beginKeywords:"public protected internal private constructor"
-},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/,end:/>/,excludeBegin:!0,
-excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,]|$/,
-excludeBegin:!0,returnEnd:!0},l,c]},r,{className:"meta",begin:"^#!/usr/bin/env",
-end:"$",illegal:"\n"},o]}}})());
-hljs.registerLanguage("less",(()=>{"use strict"
-;const e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],t=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],o=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],n=["align-content","align-items","align-self","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","auto","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","clip-path","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-variant-ligatures","font-variation-settings","font-weight","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inherit","initial","justify-content","left","letter-spacing","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","mask","max-height","max-width","min-height","min-width","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","perspective","perspective-origin","pointer-events","position","quotes","resize","right","src","tab-size","table-layout","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-indent","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","white-space","widows","width","word-break","word-spacing","word-wrap","z-index"].reverse(),r=i.concat(o)
-;return a=>{const s=(e=>({IMPORTANT:{className:"meta",begin:"!important"},
-HEXCOLOR:{className:"number",begin:"#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})"},
-ATTRIBUTE_SELECTOR_MODE:{className:"selector-attr",begin:/\[/,end:/\]/,
-illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]}
-}))(a),l=r,d="([\\w-]+|@\\{[\\w-]+\\})",c=[],g=[],b=e=>({className:"string",
-begin:"~?"+e+".*?"+e}),m=(e,t,i)=>({className:e,begin:t,relevance:i}),u={
-$pattern:/[a-z-]+/,keyword:"and or not only",attribute:t.join(" ")},p={
-begin:"\\(",end:"\\)",contains:g,keywords:u,relevance:0}
-;g.push(a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,b("'"),b('"'),a.CSS_NUMBER_MODE,{
-begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",
-excludeEnd:!0}
-},s.HEXCOLOR,p,m("variable","@@?[\\w-]+",10),m("variable","@\\{[\\w-]+\\}"),m("built_in","~?`[^`]*?`"),{
-className:"attribute",begin:"[\\w-]+\\s*:",end:":",returnBegin:!0,excludeEnd:!0
-},s.IMPORTANT);const f=g.concat({begin:/\{/,end:/\}/,contains:c}),h={
-beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"
-}].concat(g)},w={begin:d+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,
-contains:[{begin:/-(webkit|moz|ms|o)-/},{className:"attribute",
-begin:"\\b("+n.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,
-illegal:"[<=$]",relevance:0,contains:g}}]},v={className:"keyword",
-begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",
-starts:{end:"[;{}]",keywords:u,returnEnd:!0,contains:g,relevance:0}},y={
-className:"variable",variants:[{begin:"@[\\w-]+\\s*:",relevance:15},{
-begin:"@[\\w-]+"}],starts:{end:"[;}]",returnEnd:!0,contains:f}},k={variants:[{
-begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:d,end:/\{/}],returnBegin:!0,
-returnEnd:!0,illegal:"[<='$\"]",relevance:0,
-contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,h,m("keyword","all\\b"),m("variable","@\\{[\\w-]+\\}"),{
-begin:"\\b("+e.join("|")+")\\b",className:"selector-tag"
-},m("selector-tag",d+"%?",0),m("selector-id","#"+d),m("selector-class","\\."+d,0),m("selector-tag","&",0),s.ATTRIBUTE_SELECTOR_MODE,{
-className:"selector-pseudo",begin:":("+i.join("|")+")"},{
-className:"selector-pseudo",begin:"::("+o.join("|")+")"},{begin:"\\(",end:"\\)",
-contains:f},{begin:"!important"}]},E={begin:`[\\w-]+:(:)?(${l.join("|")})`,
-returnBegin:!0,contains:[k]}
-;return c.push(a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,v,y,E,w,k),{
-name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:c}}})());
-hljs.registerLanguage("lua",(()=>{"use strict";return e=>{
-const t="\\[=*\\[",a="\\]=*\\]",n={begin:t,end:a,contains:["self"]
-},o=[e.COMMENT("--(?!\\[=*\\[)","$"),e.COMMENT("--\\[=*\\[",a,{contains:[n],
-relevance:10})];return{name:"Lua",keywords:{$pattern:e.UNDERSCORE_IDENT_RE,
-literal:"true false nil",
-keyword:"and break do else elseif end for goto if in local not or repeat return then until while",
-built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"
-},contains:o.concat([{className:"function",beginKeywords:"function",end:"\\)",
-contains:[e.inherit(e.TITLE_MODE,{
-begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",
-begin:"\\(",endsWithParent:!0,contains:o}].concat(o)
-},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",
-begin:t,end:a,contains:[n],relevance:5}])}}})());
-hljs.registerLanguage("makefile",(()=>{"use strict";return e=>{const i={
-className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",
-contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%\^\+\*]/}]},a={className:"string",
-begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,i]},n={className:"variable",
-begin:/\$\([\w-]+\s/,end:/\)/,keywords:{
-built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"
-},contains:[i]},s={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},r={
-className:"section",begin:/^[^\s]+:/,end:/$/,contains:[i]};return{
-name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,
-keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"
-},contains:[e.HASH_COMMENT_MODE,i,a,n,s,{className:"meta",begin:/^\.PHONY:/,
-end:/$/,keywords:{$pattern:/[\.\w]+/,"meta-keyword":".PHONY"}},r]}}})());
-hljs.registerLanguage("xml",(()=>{"use strict";function e(e){
-return e?"string"==typeof e?e:e.source:null}function n(e){return a("(?=",e,")")}
-function a(...n){return n.map((n=>e(n))).join("")}function s(...n){
-return"("+n.map((n=>e(n))).join("|")+")"}return e=>{
-const t=a(/[A-Z_]/,a("(",/[A-Z0-9_.-]*:/,")?"),/[A-Z0-9_.-]*/),i={
-className:"symbol",begin:/&[a-z]+;|[0-9]+;|[a-f0-9]+;/},r={begin:/\s/,
-contains:[{className:"meta-keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]
-},c=e.inherit(r,{begin:/\(/,end:/\)/}),l=e.inherit(e.APOS_STRING_MODE,{
-className:"meta-string"}),g=e.inherit(e.QUOTE_STRING_MODE,{
-className:"meta-string"}),m={endsWithParent:!0,illegal:/,relevance:0,
-contains:[{className:"attr",begin:/[A-Za-z0-9._:-]+/,relevance:0},{begin:/=\s*/,
-relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,
-end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]
-}]};return{name:"HTML, XML",
-aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],
-case_insensitive:!0,contains:[{className:"meta",begin://,
-relevance:10,contains:[r,g,l,c,{begin:/\[/,end:/\]/,contains:[{className:"meta",
-begin://,contains:[r,c,g,l]}]}]},e.COMMENT(//,{
-relevance:10}),{begin://,relevance:10},i,{
-className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{className:"tag",
-begin:/