Files
Probability-and-Statistics-…/_static/207.a2b404e695486dde.js
T
2026-04-02 07:47:45 -04:00

3 lines
85 KiB
JavaScript
Executable File

/*! For license information please see 207.a2b404e695486dde.js.LICENSE.txt */
"use strict";(self.webpackChunkWebComponents=self.webpackChunkWebComponents||[]).push([[207],{78207:(e,t,n)=>{function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}function l(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}n.d(t,{z:()=>Mn});var c=l(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),d=l(/Edge/i),u=l(/firefox/i),h=l(/safari/i)&&!l(/chrome/i)&&!l(/android/i),g=l(/iP(ad|od|hone)/i),p=l(/chrome/i)&&l(/android/i),f={capture:!1,passive:!1};function m(e,t,n){e.addEventListener(t,n,!c&&f)}function b(e,t,n){e.removeEventListener(t,n,!c&&f)}function v(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function _(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function y(e,t,n,r){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&v(e,t):v(e,t))||r&&e===n)return e;if(e===n)break}while(e=_(e))}return null}var E,w=/\s+/g;function x(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(w," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(w," ")}}function S(e,t,n){var r=e&&e.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in r||-1!==t.indexOf("webkit")||(t="-webkit-"+t),r[t]=n+("string"==typeof n?"":"px")}}function A(e,t){var n="";if("string"==typeof e)n=e;else do{var r=S(e,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function k(e,t,n){if(e){var r=e.getElementsByTagName(t),o=0,i=r.length;if(n)for(;o<i;o++)n(r[o],o);return r}return[]}function N(){return document.scrollingElement||document.documentElement}function O(e,t,n,r,o){if(e.getBoundingClientRect||e===window){var i,a,s,l,d,u,h;if(e!==window&&e.parentNode&&e!==N()?(a=(i=e.getBoundingClientRect()).top,s=i.left,l=i.bottom,d=i.right,u=i.height,h=i.width):(a=0,s=0,l=window.innerHeight,d=window.innerWidth,u=window.innerHeight,h=window.innerWidth),(t||n)&&e!==window&&(o=o||e.parentNode,!c))do{if(o&&o.getBoundingClientRect&&("none"!==S(o,"transform")||n&&"static"!==S(o,"position"))){var g=o.getBoundingClientRect();a-=g.top+parseInt(S(o,"border-top-width")),s-=g.left+parseInt(S(o,"border-left-width")),l=a+i.height,d=s+i.width;break}}while(o=o.parentNode);if(r&&e!==window){var p=A(o||e),f=p&&p.a,m=p&&p.d;p&&(l=(a/=m)+(u/=m),d=(s/=f)+(h/=f))}return{top:a,left:s,bottom:l,right:d,width:h,height:u}}}function C(e,t,n){for(var r=B(e,!0),o=O(e)[t];r;){var i=O(r)[n];if(!("top"===n||"left"===n?o>=i:o<=i))return r;if(r===N())break;r=B(r,!1)}return!1}function T(e,t,n,r){for(var o=0,i=0,a=e.children;i<a.length;){if("none"!==a[i].style.display&&a[i]!==Pe.ghost&&(r||a[i]!==Pe.dragged)&&y(a[i],n.draggable,e,!1)){if(o===t)return a[i];o++}i++}return null}function D(e,t){for(var n=e.lastElementChild;n&&(n===Pe.ghost||"none"===S(n,"display")||t&&!v(n,t));)n=n.previousElementSibling;return n||null}function M(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===Pe.clone||t&&!v(e,t)||n++;return n}function I(e){var t=0,n=0,r=N();if(e)do{var o=A(e),i=o.a,a=o.d;t+=e.scrollLeft*i,n+=e.scrollTop*a}while(e!==r&&(e=e.parentNode));return[t,n]}function B(e,t){if(!e||!e.getBoundingClientRect)return N();var n=e,r=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=S(n);if(n.clientWidth<n.scrollWidth&&("auto"==o.overflowX||"scroll"==o.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==o.overflowY||"scroll"==o.overflowY)){if(!n.getBoundingClientRect||n===document.body)return N();if(r||t)return n;r=!0}}}while(n=n.parentNode);return N()}function R(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function L(e,t){return function(){if(!E){var n=arguments;1===n.length?e.call(this,n[0]):e.apply(this,n),E=setTimeout((function(){E=void 0}),t)}}}function P(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function j(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}var $="Sortable"+(new Date).getTime();function z(){var e,t=[];return{captureAnimationState:function(){t=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(e){if("none"!==S(e,"display")&&e!==Pe.ghost){t.push({target:e,rect:O(e)});var n=o({},t[t.length-1].rect);if(e.thisAnimationDuration){var r=A(e,!0);r&&(n.top-=r.f,n.left-=r.e)}e.fromRect=n}}))},addAnimationState:function(e){t.push(e)},removeAnimationState:function(e){t.splice(function(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var r in t)if(t.hasOwnProperty(r)&&t[r]===e[n][r])return Number(n);return-1}(t,{target:e}),1)},animateAll:function(n){var r=this;if(!this.options.animation)return clearTimeout(e),void("function"==typeof n&&n());var o=!1,i=0;t.forEach((function(e){var t=0,n=e.target,a=n.fromRect,s=O(n),l=n.prevFromRect,c=n.prevToRect,d=e.rect,u=A(n,!0);u&&(s.top-=u.f,s.left-=u.e),n.toRect=s,n.thisAnimationDuration&&R(l,s)&&!R(a,s)&&(d.top-s.top)/(d.left-s.left)==(a.top-s.top)/(a.left-s.left)&&(t=function(e,t,n,r){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*r.animation}(d,l,c,r.options)),R(s,a)||(n.prevFromRect=a,n.prevToRect=s,t||(t=r.options.animation),r.animate(n,d,s,t)),t&&(o=!0,i=Math.max(i,t),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),t),n.thisAnimationDuration=t)})),clearTimeout(e),o?e=setTimeout((function(){"function"==typeof n&&n()}),i):"function"==typeof n&&n(),t=[]},animate:function(e,t,n,r){if(r){S(e,"transition",""),S(e,"transform","");var o=A(this.el),i=o&&o.a,a=o&&o.d,s=(t.left-n.left)/(i||1),l=(t.top-n.top)/(a||1);e.animatingX=!!s,e.animatingY=!!l,S(e,"transform","translate3d("+s+"px,"+l+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),S(e,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),S(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){S(e,"transition",""),S(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),r)}}}}var F=[],H={initializeByDefault:!0},X={mount:function(e){for(var t in H)H.hasOwnProperty(t)&&!(t in e)&&(e[t]=H[t]);F.forEach((function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")})),F.push(e)},pluginEvent:function(e,t,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var i=e+"Global";F.forEach((function(r){t[r.pluginName]&&(t[r.pluginName][i]&&t[r.pluginName][i](o({sortable:t},n)),t.options[r.pluginName]&&t[r.pluginName][e]&&t[r.pluginName][e](o({sortable:t},n)))}))},initializePlugins:function(e,t,n,r){for(var o in F.forEach((function(r){var o=r.pluginName;if(e.options[o]||r.initializeByDefault){var i=new r(e,t,e.options);i.sortable=e,i.options=e.options,e[o]=i,s(n,i.defaults)}})),e.options)if(e.options.hasOwnProperty(o)){var i=this.modifyOption(e,o,e.options[o]);void 0!==i&&(e.options[o]=i)}},getEventProperties:function(e,t){var n={};return F.forEach((function(r){"function"==typeof r.eventProperties&&s(n,r.eventProperties.call(t[r.pluginName],e))})),n},modifyOption:function(e,t,n){var r;return F.forEach((function(o){e[o.pluginName]&&o.optionListeners&&"function"==typeof o.optionListeners[t]&&(r=o.optionListeners[t].call(e[o.pluginName],n))})),r}},U=["evt"],Y=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(n,U);X.pluginEvent.bind(Pe)(e,t,o({dragEl:W,parentEl:G,ghostEl:q,rootEl:Z,nextEl:V,lastDownEl:J,cloneEl:Q,cloneHidden:ee,dragStarted:ge,putSortable:ae,activeSortable:Pe.active,originalEvent:r,oldIndex:te,oldDraggableIndex:re,newIndex:ne,newDraggableIndex:oe,hideGhostForTarget:Ie,unhideGhostForTarget:Be,cloneNowHidden:function(){ee=!0},cloneNowShown:function(){ee=!1},dispatchSortableEvent:function(e){K({sortable:t,name:e,originalEvent:r})}},i))};function K(e){!function(e){var t=e.sortable,n=e.rootEl,r=e.name,i=e.targetEl,a=e.cloneEl,s=e.toEl,l=e.fromEl,u=e.oldIndex,h=e.newIndex,g=e.oldDraggableIndex,p=e.newDraggableIndex,f=e.originalEvent,m=e.putSortable,b=e.extraEventProperties;if(t=t||n&&n[$]){var v,_=t.options,y="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||c||d?(v=document.createEvent("Event")).initEvent(r,!0,!0):v=new CustomEvent(r,{bubbles:!0,cancelable:!0}),v.to=s||n,v.from=l||n,v.item=i||n,v.clone=a,v.oldIndex=u,v.newIndex=h,v.oldDraggableIndex=g,v.newDraggableIndex=p,v.originalEvent=f,v.pullMode=m?m.lastPutMode:void 0;var E=o(o({},b),X.getEventProperties(r,t));for(var w in E)v[w]=E[w];n&&n.dispatchEvent(v),_[y]&&_[y].call(t,v)}}(o({putSortable:ae,cloneEl:Q,targetEl:W,rootEl:Z,oldIndex:te,oldDraggableIndex:re,newIndex:ne,newDraggableIndex:oe},e))}var W,G,q,Z,V,J,Q,ee,te,ne,re,oe,ie,ae,se,le,ce,de,ue,he,ge,pe,fe,me,be,ve=!1,_e=!1,ye=[],Ee=!1,we=!1,xe=[],Se=!1,Ae=[],ke="undefined"!=typeof document,Ne=g,Oe=d||c?"cssFloat":"float",Ce=ke&&!p&&!g&&"draggable"in document.createElement("div"),Te=function(){if(ke){if(c)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),De=function(e,t){var n=S(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=T(e,0,t),i=T(e,1,t),a=o&&S(o),s=i&&S(i),l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+O(o).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+O(i).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&a.float&&"none"!==a.float){var d="left"===a.float?"left":"right";return!i||"both"!==s.clear&&s.clear!==d?"horizontal":"vertical"}return o&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||l>=r&&"none"===n[Oe]||i&&"none"===n[Oe]&&l+c>r)?"vertical":"horizontal"},Me=function(e){function t(e,n){return function(r,o,i,a){var s=r.options.group.name&&o.options.group.name&&r.options.group.name===o.options.group.name;if(null==e&&(n||s))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(r,o,i,a),n)(r,o,i,a);var l=(n?r:o).options.group.name;return!0===e||"string"==typeof e&&e===l||e.join&&e.indexOf(l)>-1}}var n={},r=e.group;r&&"object"==i(r)||(r={name:r}),n.name=r.name,n.checkPull=t(r.pull,!0),n.checkPut=t(r.put),n.revertClone=r.revertClone,e.group=n},Ie=function(){!Te&&q&&S(q,"display","none")},Be=function(){!Te&&q&&S(q,"display","")};ke&&document.addEventListener("click",(function(e){if(_e)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),_e=!1,!1}),!0);var Re=function(e){if(W){e=e.touches?e.touches[0]:e;var t=(o=e.clientX,i=e.clientY,ye.some((function(e){var t=e[$].options.emptyInsertThreshold;if(t&&!D(e)){var n=O(e),r=o>=n.left-t&&o<=n.right+t,s=i>=n.top-t&&i<=n.bottom+t;return r&&s?a=e:void 0}})),a);if(t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[$]._onDragOver(n)}}var o,i,a},Le=function(e){W&&W.parentNode[$]._isOutsideThisEl(e.target)};function Pe(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=s({},t),e[$]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return De(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Pe.supportPointer&&"PointerEvent"in window&&!h,emptyInsertThreshold:5};for(var r in X.initializePlugins(this,e,n),n)!(r in t)&&(t[r]=n[r]);for(var o in Me(t),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!t.forceFallback&&Ce,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?m(e,"pointerdown",this._onTapStart):(m(e,"mousedown",this._onTapStart),m(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(m(e,"dragover",this),m(e,"dragenter",this)),ye.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),s(this,z())}function je(e,t,n,r,o,i,a,s){var l,u,h=e[$],g=h.options.onMove;return!window.CustomEvent||c||d?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=t,l.from=e,l.dragged=n,l.draggedRect=r,l.related=o||t,l.relatedRect=i||O(t),l.willInsertAfter=s,l.originalEvent=a,e.dispatchEvent(l),g&&(u=g.call(h,l,a)),u}function $e(e){e.draggable=!1}function ze(){Se=!1}function Fe(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,r=0;n--;)r+=t.charCodeAt(n);return r.toString(36)}function He(e){return setTimeout(e,0)}function Xe(e){return clearTimeout(e)}Pe.prototype={constructor:Pe,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(pe=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,W):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,r=this.options,o=r.preventOnFilter,i=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,s=(a||e).target,l=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,c=r.filter;if(function(e){Ae.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var r=t[n];r.checked&&Ae.push(r)}}(n),!W&&!(/mousedown|pointerdown/.test(i)&&0!==e.button||r.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!h||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=y(s,r.draggable,n,!1))&&s.animated||J===s)){if(te=M(s),re=M(s,r.draggable),"function"==typeof c){if(c.call(this,e,s,this))return K({sortable:t,rootEl:l,name:"filter",targetEl:s,toEl:n,fromEl:n}),Y("filter",t,{evt:e}),void(o&&e.cancelable&&e.preventDefault())}else if(c&&(c=c.split(",").some((function(r){if(r=y(l,r.trim(),n,!1))return K({sortable:t,rootEl:r,name:"filter",targetEl:s,fromEl:n,toEl:n}),Y("filter",t,{evt:e}),!0}))))return void(o&&e.cancelable&&e.preventDefault());r.handle&&!y(l,r.handle,n,!1)||this._prepareDragStart(e,a,s)}}},_prepareDragStart:function(e,t,n){var r,o=this,i=o.el,a=o.options,s=i.ownerDocument;if(n&&!W&&n.parentNode===i){var l=O(n);if(Z=i,G=(W=n).parentNode,V=W.nextSibling,J=n,ie=a.group,Pe.dragged=W,se={target:W,clientX:(t||e).clientX,clientY:(t||e).clientY},ue=se.clientX-l.left,he=se.clientY-l.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,W.style["will-change"]="all",r=function(){Y("delayEnded",o,{evt:e}),Pe.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!u&&o.nativeDraggable&&(W.draggable=!0),o._triggerDragStart(e,t),K({sortable:o,name:"choose",originalEvent:e}),x(W,a.chosenClass,!0))},a.ignore.split(",").forEach((function(e){k(W,e.trim(),$e)})),m(s,"dragover",Re),m(s,"mousemove",Re),m(s,"touchmove",Re),m(s,"mouseup",o._onDrop),m(s,"touchend",o._onDrop),m(s,"touchcancel",o._onDrop),u&&this.nativeDraggable&&(this.options.touchStartThreshold=4,W.draggable=!0),Y("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&(d||c))r();else{if(Pe.eventCanceled)return void this._onDrop();m(s,"mouseup",o._disableDelayedDrag),m(s,"touchend",o._disableDelayedDrag),m(s,"touchcancel",o._disableDelayedDrag),m(s,"mousemove",o._delayedDragTouchMoveHandler),m(s,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&m(s,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(r,a.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){W&&$e(W),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;b(e,"mouseup",this._disableDelayedDrag),b(e,"touchend",this._disableDelayedDrag),b(e,"touchcancel",this._disableDelayedDrag),b(e,"mousemove",this._delayedDragTouchMoveHandler),b(e,"touchmove",this._delayedDragTouchMoveHandler),b(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?m(document,"pointermove",this._onTouchMove):m(document,t?"touchmove":"mousemove",this._onTouchMove):(m(W,"dragend",this),m(Z,"dragstart",this._onDragStart));try{document.selection?He((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(ve=!1,Z&&W){Y("dragStarted",this,{evt:t}),this.nativeDraggable&&m(document,"dragover",Le);var n=this.options;!e&&x(W,n.dragClass,!1),x(W,n.ghostClass,!0),Pe.active=this,e&&this._appendGhost(),K({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(le){this._lastX=le.clientX,this._lastY=le.clientY,Ie();for(var e=document.elementFromPoint(le.clientX,le.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(le.clientX,le.clientY))!==t;)t=e;if(W.parentNode[$]._isOutsideThisEl(e),t)do{if(t[$]&&t[$]._onDragOver({clientX:le.clientX,clientY:le.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=t.parentNode);Be()}},_onTouchMove:function(e){if(se){var t=this.options,n=t.fallbackTolerance,r=t.fallbackOffset,o=e.touches?e.touches[0]:e,i=q&&A(q,!0),a=q&&i&&i.a,s=q&&i&&i.d,l=Ne&&be&&I(be),c=(o.clientX-se.clientX+r.x)/(a||1)+(l?l[0]-xe[0]:0)/(a||1),d=(o.clientY-se.clientY+r.y)/(s||1)+(l?l[1]-xe[1]:0)/(s||1);if(!Pe.active&&!ve){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(q){i?(i.e+=c-(ce||0),i.f+=d-(de||0)):i={a:1,b:0,c:0,d:1,e:c,f:d};var u="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");S(q,"webkitTransform",u),S(q,"mozTransform",u),S(q,"msTransform",u),S(q,"transform",u),ce=c,de=d,le=o}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!q){var e=this.options.fallbackOnBody?document.body:Z,t=O(W,!0,Ne,!0,e),n=this.options;if(Ne){for(be=e;"static"===S(be,"position")&&"none"===S(be,"transform")&&be!==document;)be=be.parentNode;be!==document.body&&be!==document.documentElement?(be===document&&(be=N()),t.top+=be.scrollTop,t.left+=be.scrollLeft):be=N(),xe=I(be)}x(q=W.cloneNode(!0),n.ghostClass,!1),x(q,n.fallbackClass,!0),x(q,n.dragClass,!0),S(q,"transition",""),S(q,"transform",""),S(q,"box-sizing","border-box"),S(q,"margin",0),S(q,"top",t.top),S(q,"left",t.left),S(q,"width",t.width),S(q,"height",t.height),S(q,"opacity","0.8"),S(q,"position",Ne?"absolute":"fixed"),S(q,"zIndex","100000"),S(q,"pointerEvents","none"),Pe.ghost=q,e.appendChild(q),S(q,"transform-origin",ue/parseInt(q.style.width)*100+"% "+he/parseInt(q.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,r=e.dataTransfer,o=n.options;Y("dragStart",this,{evt:e}),Pe.eventCanceled?this._onDrop():(Y("setupClone",this),Pe.eventCanceled||((Q=j(W)).draggable=!1,Q.style["will-change"]="",this._hideClone(),x(Q,this.options.chosenClass,!1),Pe.clone=Q),n.cloneId=He((function(){Y("clone",n),Pe.eventCanceled||(n.options.removeCloneOnHide||Z.insertBefore(Q,W),n._hideClone(),K({sortable:n,name:"clone"}))})),!t&&x(W,o.dragClass,!0),t?(_e=!0,n._loopId=setInterval(n._emulateDragOver,50)):(b(document,"mouseup",n._onDrop),b(document,"touchend",n._onDrop),b(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",o.setData&&o.setData.call(n,r,W)),m(document,"drop",n),S(W,"transform","translateZ(0)")),ve=!0,n._dragStartId=He(n._dragStarted.bind(n,t,e)),m(document,"selectstart",n),ge=!0,h&&S(document.body,"user-select","none"))},_onDragOver:function(e){var t,n,r,i,a=this.el,s=e.target,l=this.options,c=l.group,d=Pe.active,u=ie===c,h=l.sort,g=ae||d,p=this,f=!1;if(!Se){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),s=y(s,l.draggable,a,!0),z("dragOver"),Pe.eventCanceled)return f;if(W.contains(e.target)||s.animated&&s.animatingX&&s.animatingY||p._ignoreWhileAnimating===s)return H(!1);if(_e=!1,d&&!l.disabled&&(u?h||(r=G!==Z):ae===this||(this.lastPutMode=ie.checkPull(this,d,W,e))&&c.checkPut(this,d,W,e))){if(i="vertical"===this._getDirection(e,s),t=O(W),z("dragOverValid"),Pe.eventCanceled)return f;if(r)return G=Z,F(),this._hideClone(),z("revert"),Pe.eventCanceled||(V?Z.insertBefore(W,V):Z.appendChild(W)),H(!0);var m=D(a,l.draggable);if(!m||function(e,t,n){var r=O(D(n.el,n.options.draggable));return t?e.clientX>r.right+10||e.clientX<=r.right&&e.clientY>r.bottom&&e.clientX>=r.left:e.clientX>r.right&&e.clientY>r.top||e.clientX<=r.right&&e.clientY>r.bottom+10}(e,i,this)&&!m.animated){if(m===W)return H(!1);if(m&&a===e.target&&(s=m),s&&(n=O(s)),!1!==je(Z,a,W,t,s,n,e,!!s))return F(),a.appendChild(W),G=a,X(),H(!0)}else if(m&&function(e,t,n){var r=O(T(n.el,0,n.options,!0));return t?e.clientX<r.left-10||e.clientY<r.top&&e.clientX<r.right:e.clientY<r.top-10||e.clientY<r.bottom&&e.clientX<r.left}(e,i,this)){var b=T(a,0,l,!0);if(b===W)return H(!1);if(n=O(s=b),!1!==je(Z,a,W,t,s,n,e,!1))return F(),a.insertBefore(W,b),G=a,X(),H(!0)}else if(s.parentNode===a){n=O(s);var v,_,E,w=W.parentNode!==a,A=!function(e,t,n){var r=n?e.left:e.top,o=n?e.right:e.bottom,i=n?e.width:e.height,a=n?t.left:t.top,s=n?t.right:t.bottom,l=n?t.width:t.height;return r===a||o===s||r+i/2===a+l/2}(W.animated&&W.toRect||t,s.animated&&s.toRect||n,i),k=i?"top":"left",N=C(s,"top","top")||C(W,"top","top"),I=N?N.scrollTop:void 0;if(pe!==s&&(_=n[k],Ee=!1,we=!A&&l.invertSwap||w),v=function(e,t,n,r,o,i,a,s){var l=r?e.clientY:e.clientX,c=r?n.height:n.width,d=r?n.top:n.left,u=r?n.bottom:n.right,h=!1;if(!a)if(s&&me<c*o){if(!Ee&&(1===fe?l>d+c*i/2:l<u-c*i/2)&&(Ee=!0),Ee)h=!0;else if(1===fe?l<d+me:l>u-me)return-fe}else if(l>d+c*(1-o)/2&&l<u-c*(1-o)/2)return function(e){return M(W)<M(e)?1:-1}(t);return(h=h||a)&&(l<d+c*i/2||l>u-c*i/2)?l>d+c/2?1:-1:0}(e,s,n,i,A?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,we,pe===s),0!==v){var B=M(W);do{B-=v,E=G.children[B]}while(E&&("none"===S(E,"display")||E===q))}if(0===v||E===s)return H(!1);pe=s,fe=v;var R=s.nextElementSibling,L=!1,j=je(Z,a,W,t,s,n,e,L=1===v);if(!1!==j)return 1!==j&&-1!==j||(L=1===j),Se=!0,setTimeout(ze,30),F(),L&&!R?a.appendChild(W):s.parentNode.insertBefore(W,L?R:s),N&&P(N,0,I-N.scrollTop),G=W.parentNode,void 0===_||we||(me=Math.abs(_-O(s)[k])),X(),H(!0)}if(a.contains(W))return H(!1)}return!1}function z(l,c){Y(l,p,o({evt:e,isOwner:u,axis:i?"vertical":"horizontal",revert:r,dragRect:t,targetRect:n,canSort:h,fromSortable:g,target:s,completed:H,onMove:function(n,r){return je(Z,a,W,t,n,O(n),e,r)},changed:X},c))}function F(){z("dragOverAnimationCapture"),p.captureAnimationState(),p!==g&&g.captureAnimationState()}function H(t){return z("dragOverCompleted",{insertion:t}),t&&(u?d._hideClone():d._showClone(p),p!==g&&(x(W,ae?ae.options.ghostClass:d.options.ghostClass,!1),x(W,l.ghostClass,!0)),ae!==p&&p!==Pe.active?ae=p:p===Pe.active&&ae&&(ae=null),g===p&&(p._ignoreWhileAnimating=s),p.animateAll((function(){z("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==g&&(g.animateAll(),g._ignoreWhileAnimating=null)),(s===W&&!W.animated||s===a&&!s.animated)&&(pe=null),l.dragoverBubble||e.rootEl||s===document||(W.parentNode[$]._isOutsideThisEl(e.target),!t&&Re(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),f=!0}function X(){ne=M(W),oe=M(W,l.draggable),K({sortable:p,name:"change",toEl:a,newIndex:ne,newDraggableIndex:oe,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){b(document,"mousemove",this._onTouchMove),b(document,"touchmove",this._onTouchMove),b(document,"pointermove",this._onTouchMove),b(document,"dragover",Re),b(document,"mousemove",Re),b(document,"touchmove",Re)},_offUpEvents:function(){var e=this.el.ownerDocument;b(e,"mouseup",this._onDrop),b(e,"touchend",this._onDrop),b(e,"pointerup",this._onDrop),b(e,"touchcancel",this._onDrop),b(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;ne=M(W),oe=M(W,n.draggable),Y("drop",this,{evt:e}),G=W&&W.parentNode,ne=M(W),oe=M(W,n.draggable),Pe.eventCanceled||(ve=!1,we=!1,Ee=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Xe(this.cloneId),Xe(this._dragStartId),this.nativeDraggable&&(b(document,"drop",this),b(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),h&&S(document.body,"user-select",""),S(W,"transform",""),e&&(ge&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),q&&q.parentNode&&q.parentNode.removeChild(q),(Z===G||ae&&"clone"!==ae.lastPutMode)&&Q&&Q.parentNode&&Q.parentNode.removeChild(Q),W&&(this.nativeDraggable&&b(W,"dragend",this),$e(W),W.style["will-change"]="",ge&&!ve&&x(W,ae?ae.options.ghostClass:this.options.ghostClass,!1),x(W,this.options.chosenClass,!1),K({sortable:this,name:"unchoose",toEl:G,newIndex:null,newDraggableIndex:null,originalEvent:e}),Z!==G?(ne>=0&&(K({rootEl:G,name:"add",toEl:G,fromEl:Z,originalEvent:e}),K({sortable:this,name:"remove",toEl:G,originalEvent:e}),K({rootEl:G,name:"sort",toEl:G,fromEl:Z,originalEvent:e}),K({sortable:this,name:"sort",toEl:G,originalEvent:e})),ae&&ae.save()):ne!==te&&ne>=0&&(K({sortable:this,name:"update",toEl:G,originalEvent:e}),K({sortable:this,name:"sort",toEl:G,originalEvent:e})),Pe.active&&(null!=ne&&-1!==ne||(ne=te,oe=re),K({sortable:this,name:"end",toEl:G,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){Y("nulling",this),Z=W=G=q=V=Q=J=ee=se=le=ge=ne=oe=te=re=pe=fe=ae=ie=Pe.dragged=Pe.ghost=Pe.clone=Pe.active=null,Ae.forEach((function(e){e.checked=!0})),Ae.length=ce=de=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":W&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,r=0,o=n.length,i=this.options;r<o;r++)y(e=n[r],i.draggable,this.el,!1)&&t.push(e.getAttribute(i.dataIdAttr)||Fe(e));return t},sort:function(e,t){var n={},r=this.el;this.toArray().forEach((function(e,t){var o=r.children[t];y(o,this.options.draggable,r,!1)&&(n[e]=o)}),this),t&&this.captureAnimationState(),e.forEach((function(e){n[e]&&(r.removeChild(n[e]),r.appendChild(n[e]))})),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return y(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];var r=X.modifyOption(this,e,t);n[e]=void 0!==r?r:t,"group"===e&&Me(n)},destroy:function(){Y("destroy",this);var e=this.el;e[$]=null,b(e,"mousedown",this._onTapStart),b(e,"touchstart",this._onTapStart),b(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(b(e,"dragover",this),b(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),ye.splice(ye.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!ee){if(Y("hideClone",this),Pe.eventCanceled)return;S(Q,"display","none"),this.options.removeCloneOnHide&&Q.parentNode&&Q.parentNode.removeChild(Q),ee=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(ee){if(Y("showClone",this),Pe.eventCanceled)return;W.parentNode!=Z||this.options.group.revertClone?V?Z.insertBefore(Q,V):Z.appendChild(Q):Z.insertBefore(Q,W),this.options.group.revertClone&&this.animate(W,Q),S(Q,"display",""),ee=!1}}else this._hideClone()}},ke&&m(document,"touchmove",(function(e){(Pe.active||ve)&&e.cancelable&&e.preventDefault()})),Pe.utils={on:m,off:b,css:S,find:k,is:function(e,t){return!!y(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},throttle:L,closest:y,toggleClass:x,clone:j,index:M,nextTick:He,cancelNextTick:Xe,detectDirection:De,getChild:T},Pe.get=function(e){return e[$]},Pe.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach((function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(Pe.utils=o(o({},Pe.utils),e.utils)),X.mount(e)}))},Pe.create=function(e,t){return new Pe(e,t)},Pe.version="1.14.0";var Ue,Ye,Ke,We,Ge,qe,Ze=[],Ve=!1;function Je(){Ze.forEach((function(e){clearInterval(e.pid)})),Ze=[]}function Qe(){clearInterval(qe)}var et,tt=L((function(e,t,n,r){if(t.scroll){var o,i=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,s=t.scrollSensitivity,l=t.scrollSpeed,c=N(),d=!1;Ye!==n&&(Ye=n,Je(),Ue=t.scroll,o=t.scrollFn,!0===Ue&&(Ue=B(n,!0)));var u=0,h=Ue;do{var g=h,p=O(g),f=p.top,m=p.bottom,b=p.left,v=p.right,_=p.width,y=p.height,E=void 0,w=void 0,x=g.scrollWidth,A=g.scrollHeight,k=S(g),C=g.scrollLeft,T=g.scrollTop;g===c?(E=_<x&&("auto"===k.overflowX||"scroll"===k.overflowX||"visible"===k.overflowX),w=y<A&&("auto"===k.overflowY||"scroll"===k.overflowY||"visible"===k.overflowY)):(E=_<x&&("auto"===k.overflowX||"scroll"===k.overflowX),w=y<A&&("auto"===k.overflowY||"scroll"===k.overflowY));var D=E&&(Math.abs(v-i)<=s&&C+_<x)-(Math.abs(b-i)<=s&&!!C),M=w&&(Math.abs(m-a)<=s&&T+y<A)-(Math.abs(f-a)<=s&&!!T);if(!Ze[u])for(var I=0;I<=u;I++)Ze[I]||(Ze[I]={});Ze[u].vx==D&&Ze[u].vy==M&&Ze[u].el===g||(Ze[u].el=g,Ze[u].vx=D,Ze[u].vy=M,clearInterval(Ze[u].pid),0==D&&0==M||(d=!0,Ze[u].pid=setInterval(function(){r&&0===this.layer&&Pe.active._onTouchMove(Ge);var t=Ze[this.layer].vy?Ze[this.layer].vy*l:0,n=Ze[this.layer].vx?Ze[this.layer].vx*l:0;"function"==typeof o&&"continue"!==o.call(Pe.dragged.parentNode[$],n,t,e,Ge,Ze[this.layer].el)||P(Ze[this.layer].el,n,t)}.bind({layer:u}),24))),u++}while(t.bubbleScroll&&h!==c&&(h=B(h,!1)));Ve=d}}),30),nt=function(e){var t=e.originalEvent,n=e.putSortable,r=e.dragEl,o=e.activeSortable,i=e.dispatchSortableEvent,a=e.hideGhostForTarget,s=e.unhideGhostForTarget;if(t){var l=n||o;a();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,d=document.elementFromPoint(c.clientX,c.clientY);s(),l&&!l.el.contains(d)&&(i("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function rt(){}function ot(){}rt.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=T(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(t,r):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:nt},s(rt,{pluginName:"revertOnSpill"}),ot.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:nt},s(ot,{pluginName:"removeOnSpill"}),Pe.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?m(document,"dragover",this._handleAutoScroll):this.options.supportPointer?m(document,"pointermove",this._handleFallbackAutoScroll):t.touches?m(document,"touchmove",this._handleFallbackAutoScroll):m(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?b(document,"dragover",this._handleAutoScroll):(b(document,"pointermove",this._handleFallbackAutoScroll),b(document,"touchmove",this._handleFallbackAutoScroll),b(document,"mousemove",this._handleFallbackAutoScroll)),Qe(),Je(),clearTimeout(E),E=void 0},nulling:function(){Ge=Ye=Ue=Ve=qe=Ke=We=null,Ze.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,r=(e.touches?e.touches[0]:e).clientX,o=(e.touches?e.touches[0]:e).clientY,i=document.elementFromPoint(r,o);if(Ge=e,t||this.options.forceAutoScrollFallback||d||c||h){tt(e,this.options,i,t);var a=B(i,!0);!Ve||qe&&r===Ke&&o===We||(qe&&Qe(),qe=setInterval((function(){var i=B(document.elementFromPoint(r,o),!0);i!==a&&(a=i,Je()),tt(e,n.options,i,t)}),10),Ke=r,We=o)}else{if(!this.options.bubbleScroll||B(i,!0)===N())return void Je();tt(e,this.options,B(i,!1),!1)}}},s(e,{pluginName:"scroll",initializeByDefault:!0})}),Pe.mount(ot,rt),function(e){var t;(t=e.InputAction||(e.InputAction={})).ADD="add",t.MOVE="move",t.REMOVE="remove"}(et||(et={}));var it={exports:{}};function at(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((function(t){var n=e[t];"object"!=typeof n||Object.isFrozen(n)||at(n)})),e}it.exports=at,it.exports.default=at;class st{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function lt(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function ct(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t];return t.forEach((function(e){for(const t in e)n[t]=e[t]})),n}const dt=e=>!!e.scope||e.sublanguage&&e.language;class ut{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=lt(e)}openNode(e){if(!dt(e))return;let t="";t=e.sublanguage?`language-${e.language}`:((e,{prefix:t})=>{if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map(((e,t)=>`${e}${"_".repeat(t+1)}`))].join(" ")}return`${t}${e}`})(e.scope,{prefix:this.classPrefix}),this.span(t)}closeNode(e){dt(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const ht=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class gt{constructor(){this.rootNode=ht(),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=ht({scope:e});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=>{gt._collapse(e)})))}}class pt extends gt{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.sublanguage=!0,n.language=t,this.add(n)}toHTML(){return new ut(this,this.options).value()}finalize(){return!0}}function ft(e){return e?"string"==typeof e?e:e.source:null}function mt(e){return _t("(?=",e,")")}function bt(e){return _t("(?:",e,")*")}function vt(e){return _t("(?:",e,")?")}function _t(...e){return e.map((e=>ft(e))).join("")}function yt(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e);return"("+(t.capture?"":"?:")+e.map((e=>ft(e))).join("|")+")"}function Et(e){return new RegExp(e.toString()+"|").exec("").length-1}const wt=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function xt(e,{joinWith:t}){let n=0;return e.map((e=>{n+=1;const t=n;let r=ft(e),o="";for(;r.length>0;){const e=wt.exec(r);if(!e){o+=r;break}o+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?o+="\\"+String(Number(e[1])+t):(o+=e[0],"("===e[0]&&n++)}return o})).map((e=>`(${e})`)).join(t)}const St="[a-zA-Z]\\w*",At="[a-zA-Z_]\\w*",kt="\\b\\d+(\\.\\d+)?",Nt="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Ot="\\b(0b[01]+)",Ct={begin:"\\\\[\\s\\S]",relevance:0},Tt={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Ct]},Dt={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Ct]},Mt=function(e,t,n={}){const r=ct({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const o=yt("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:_t(/[ ]+/,"(",o,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},It=Mt("//","$"),Bt=Mt("/\\*","\\*/"),Rt=Mt("#","$"),Lt={scope:"number",begin:kt,relevance:0},Pt={scope:"number",begin:Nt,relevance:0},jt={scope:"number",begin:Ot,relevance:0},$t={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[Ct,{begin:/\[/,end:/\]/,relevance:0,contains:[Ct]}]}]},zt={scope:"title",begin:St,relevance:0},Ft={scope:"title",begin:At,relevance:0},Ht={begin:"\\.\\s*"+At,relevance:0};var Xt=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:St,UNDERSCORE_IDENT_RE:At,NUMBER_RE:kt,C_NUMBER_RE:Nt,BINARY_NUMBER_RE:Ot,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=_t(t,/.*\b/,e.binary,/\b.*/)),ct({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:Ct,APOS_STRING_MODE:Tt,QUOTE_STRING_MODE:Dt,PHRASAL_WORDS_MODE:{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/},COMMENT:Mt,C_LINE_COMMENT_MODE:It,C_BLOCK_COMMENT_MODE:Bt,HASH_COMMENT_MODE:Rt,NUMBER_MODE:Lt,C_NUMBER_MODE:Pt,BINARY_NUMBER_MODE:jt,REGEXP_MODE:$t,TITLE_MODE:zt,UNDERSCORE_TITLE_MODE:Ft,METHOD_GUARD:Ht,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})}});function Ut(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function Yt(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function Kt(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Ut,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function Wt(e,t){Array.isArray(e.illegal)&&(e.illegal=yt(...e.illegal))}function Gt(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function qt(e,t){void 0===e.relevance&&(e.relevance=1)}const Zt=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach((t=>{delete e[t]})),e.keywords=n.keywords,e.begin=_t(n.beforeMatch,mt(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},Vt=["of","and","for","in","not","or","if","then","parent","list","value"];function Jt(e,t,n="keyword"){const r=Object.create(null);return"string"==typeof e?o(n,e.split(" ")):Array.isArray(e)?o(n,e):Object.keys(e).forEach((function(n){Object.assign(r,Jt(e[n],t,n))})),r;function o(e,n){t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((function(t){const n=t.split("|");r[n[0]]=[e,Qt(n[0],n[1])]}))}}function Qt(e,t){return t?Number(t):function(e){return Vt.includes(e.toLowerCase())}(e)?0:1}const en={},tn=e=>{console.error(e)},nn=(e,...t)=>{console.log(`WARN: ${e}`,...t)},rn=(e,t)=>{en[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),en[`${e}/${t}`]=!0)},on=new Error;function an(e,t,{key:n}){let r=0;const o=e[n],i={},a={};for(let e=1;e<=t.length;e++)a[e+r]=o[e],i[e+r]=!0,r+=Et(t[e-1]);e[n]=a,e[n]._emit=i,e[n]._multi=!0}function sn(e){!function(e){e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,delete e.scope)}(e),"string"==typeof e.beginScope&&(e.beginScope={_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope}),function(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw tn("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),on;if("object"!=typeof e.beginScope||null===e.beginScope)throw tn("beginScope must be object"),on;an(e,e.begin,{key:"beginScope"}),e.begin=xt(e.begin,{joinWith:""})}}(e),function(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw tn("skip, excludeEnd, returnEnd not compatible with endScope: {}"),on;if("object"!=typeof e.endScope||null===e.endScope)throw tn("endScope must be object"),on;an(e,e.end,{key:"endScope"}),e.end=xt(e.end,{joinWith:""})}}(e)}function ln(e){function t(t,n){return new RegExp(ft(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(n?"g":""))}class n{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+=Et(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=t(xt(e,{joinWith:"|"}),!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)),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}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 n;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 new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=ct(e.classNameAliases||{}),function n(o,i){const a=o;if(o.isCompiled)return a;[Yt,Gt,sn,Zt].forEach((e=>e(o,i))),e.compilerExtensions.forEach((e=>e(o,i))),o.__beforeBegin=null,[Kt,Wt,qt].forEach((e=>e(o,i))),o.isCompiled=!0;let s=null;return"object"==typeof o.keywords&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),s=o.keywords.$pattern,delete o.keywords.$pattern),s=s||/\w+/,o.keywords&&(o.keywords=Jt(o.keywords,e.case_insensitive)),a.keywordPatternRe=t(s,!0),i&&(o.begin||(o.begin=/\B|\b/),a.beginRe=t(a.begin),o.end||o.endsWithParent||(o.end=/\B|\b/),o.end&&(a.endRe=t(a.end)),a.terminatorEnd=ft(a.end)||"",o.endsWithParent&&i.terminatorEnd&&(a.terminatorEnd+=(o.end?"|":"")+i.terminatorEnd)),o.illegal&&(a.illegalRe=t(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map((function(e){return function(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return ct(e,{variants:null},t)}))),e.cachedVariants?e.cachedVariants:cn(e)?ct(e,{starts:e.starts?ct(e.starts):null}):Object.isFrozen(e)?ct(e):e}("self"===e?o:e)}))),o.contains.forEach((function(e){n(e,a)})),o.starts&&n(o.starts,i),a.matcher=function(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}(a),a}(e)}function cn(e){return!!e&&(e.endsWithParent||cn(e.starts))}class dn extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const un=lt,hn=ct,gn=Symbol("nomatch");var pn=function(e){const t=Object.create(null),n=Object.create(null),r=[];let o=!0;const i="Could not find the language '{}', did you forget to load/include a language module?",a={disableAutodetect:!0,name:"Plain text",contains:[]};let s={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:pt};function l(e){return s.noHighlightRe.test(e)}function c(e,t,n){let r="",o="";"object"==typeof t?(r=e,n=t.ignoreIllegals,o=t.language):(rn("10.7.0","highlight(lang, code, ...args) has been deprecated."),rn("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),o=e,r=t),void 0===n&&(n=!0);const i={code:r,language:o};v("before:highlight",i);const a=i.result?i.result:d(i.language,i.code,n);return a.code=i.code,v("after:highlight",a),a}function d(e,n,r,a){const l=Object.create(null);function c(){if(!S.keywords)return void k.addText(N);let e=0;S.keywordPatternRe.lastIndex=0;let t=S.keywordPatternRe.exec(N),n="";for(;t;){n+=N.substring(e,t.index);const o=E.case_insensitive?t[0].toLowerCase():t[0],i=(r=o,S.keywords[r]);if(i){const[e,r]=i;if(k.addText(n),n="",l[o]=(l[o]||0)+1,l[o]<=7&&(O+=r),e.startsWith("_"))n+=t[0];else{const n=E.classNameAliases[e]||e;k.addKeyword(t[0],n)}}else n+=t[0];e=S.keywordPatternRe.lastIndex,t=S.keywordPatternRe.exec(N)}var r;n+=N.substring(e),k.addText(n)}function h(){null!=S.subLanguage?function(){if(""===N)return;let e=null;if("string"==typeof S.subLanguage){if(!t[S.subLanguage])return void k.addText(N);e=d(S.subLanguage,N,!0,A[S.subLanguage]),A[S.subLanguage]=e._top}else e=u(N,S.subLanguage.length?S.subLanguage:null);S.relevance>0&&(O+=e.relevance),k.addSublanguage(e._emitter,e.language)}():c(),N=""}function g(e,t){let n=1;const r=t.length-1;for(;n<=r;){if(!e._emit[n]){n++;continue}const r=E.classNameAliases[e[n]]||e[n],o=t[n];r?k.addKeyword(o,r):(N=o,c(),N=""),n++}}function p(e,t){return e.scope&&"string"==typeof e.scope&&k.openNode(E.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(k.addKeyword(N,E.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),N=""):e.beginScope._multi&&(g(e.beginScope,t),N="")),S=Object.create(e,{parent:{value:S}}),S}function m(e,t,n){let r=function(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 st(e);e["on:end"](t,n),n.isMatchIgnored&&(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===S.matcher.regexIndex?(N+=e[0],1):(D=!0,0)}function v(e){const t=e[0],r=n.substring(e.index),o=m(S,e,r);if(!o)return gn;const i=S;S.endScope&&S.endScope._wrap?(h(),k.addKeyword(t,S.endScope._wrap)):S.endScope&&S.endScope._multi?(h(),g(S.endScope,e)):i.skip?N+=t:(i.returnEnd||i.excludeEnd||(N+=t),h(),i.excludeEnd&&(N=t));do{S.scope&&k.closeNode(),S.skip||S.subLanguage||(O+=S.relevance),S=S.parent}while(S!==o.parent);return o.starts&&p(o.starts,e),i.returnEnd?0:t.length}let _={};function y(t,i){const a=i&&i[0];if(N+=t,null==a)return h(),0;if("begin"===_.type&&"end"===i.type&&_.index===i.index&&""===a){if(N+=n.slice(i.index,i.index+1),!o){const t=new Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=_.rule,t}return 1}if(_=i,"begin"===i.type)return function(e){const t=e[0],n=e.rule,r=new st(n),o=[n.__beforeBegin,n["on:begin"]];for(const n of o)if(n&&(n(e,r),r.isMatchIgnored))return b(t);return n.skip?N+=t:(n.excludeBegin&&(N+=t),h(),n.returnBegin||n.excludeBegin||(N=t)),p(n,e),n.returnBegin?0:t.length}(i);if("illegal"===i.type&&!r){const e=new Error('Illegal lexeme "'+a+'" for mode "'+(S.scope||"<unnamed>")+'"');throw e.mode=S,e}if("end"===i.type){const e=v(i);if(e!==gn)return e}if("illegal"===i.type&&""===a)return 1;if(T>1e5&&T>3*i.index)throw new Error("potential infinite loop, way more iterations than matches");return N+=a,a.length}const E=f(e);if(!E)throw tn(i.replace("{}",e)),new Error('Unknown language: "'+e+'"');const w=ln(E);let x="",S=a||w;const A={},k=new s.__emitter(s);!function(){const e=[];for(let t=S;t!==E;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach((e=>k.openNode(e)))}();let N="",O=0,C=0,T=0,D=!1;try{for(S.matcher.considerAll();;){T++,D?D=!1:S.matcher.considerAll(),S.matcher.lastIndex=C;const e=S.matcher.exec(n);if(!e)break;const t=y(n.substring(C,e.index),e);C=e.index+t}return y(n.substring(C)),k.closeAllNodes(),k.finalize(),x=k.toHTML(),{language:e,value:x,relevance:O,illegal:!1,_emitter:k,_top:S}}catch(t){if(t.message&&t.message.includes("Illegal"))return{language:e,value:un(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:C,context:n.slice(C-100,C+100),mode:t.mode,resultSoFar:x},_emitter:k};if(o)return{language:e,value:un(n),illegal:!1,relevance:0,errorRaised:t,_emitter:k,_top:S};throw t}}function u(e,n){n=n||s.languages||Object.keys(t);const r=function(e){const t={value:un(e),illegal:!1,relevance:0,_top:a,_emitter:new s.__emitter(s)};return t._emitter.addText(e),t}(e),o=n.filter(f).filter(b).map((t=>d(t,e,!1)));o.unshift(r);const i=o.sort(((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(f(e.language).supersetOf===t.language)return 1;if(f(t.language).supersetOf===e.language)return-1}return 0})),[l,c]=i,u=l;return u.secondBest=c,u}function h(e){let t=null;const r=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=s.languageDetectRe.exec(t);if(n){const t=f(n[1]);return t||(nn(i.replace("{}",n[1])),nn("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find((e=>l(e)||f(e)))}(e);if(l(r))return;if(v("before:highlightElement",{el:e,language:r}),e.children.length>0&&(s.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(e)),s.throwUnescapedHTML))throw new dn("One of your code blocks includes unescaped HTML.",e.innerHTML);t=e;const o=t.textContent,a=r?c(o,{language:r,ignoreIllegals:!0}):u(o);e.innerHTML=a.value,function(e,t,r){const o=t&&n[t]||r;e.classList.add("hljs"),e.classList.add(`language-${o}`)}(e,r,a.language),e.result={language:a.language,re:a.relevance,relevance:a.relevance},a.secondBest&&(e.secondBest={language:a.secondBest.language,relevance:a.secondBest.relevance}),v("after:highlightElement",{el:e,result:a,text:o})}let g=!1;function p(){"loading"!==document.readyState?document.querySelectorAll(s.cssSelector).forEach(h):g=!0}function f(e){return e=(e||"").toLowerCase(),t[e]||t[n[e]]}function m(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{n[e.toLowerCase()]=t}))}function b(e){const t=f(e);return t&&!t.disableAutodetect}function v(e,t){const n=e;r.forEach((function(e){e[n]&&e[n](t)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){g&&p()}),!1),Object.assign(e,{highlight:c,highlightAuto:u,highlightAll:p,highlightElement:h,highlightBlock:function(e){return rn("10.7.0","highlightBlock will be removed entirely in v12.0"),rn("10.7.0","Please use highlightElement now."),h(e)},configure:function(e){s=hn(s,e)},initHighlighting:()=>{p(),rn("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){p(),rn("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(n,r){let i=null;try{i=r(e)}catch(e){if(tn("Language definition for '{}' could not be registered.".replace("{}",n)),!o)throw e;tn(e),i=a}i.name||(i.name=n),t[n]=i,i.rawDefinition=r.bind(null,e),i.aliases&&m(i.aliases,{languageName:n})},unregisterLanguage:function(e){delete t[e];for(const t of Object.keys(n))n[t]===e&&delete n[t]},listLanguages:function(){return Object.keys(t)},getLanguage:f,registerAliases:m,autoDetection:b,inherit:hn,addPlugin:function(e){!function(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),r.push(e)}}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString="11.7.0",e.regex={concat:_t,lookahead:mt,either:yt,optional:vt,anyNumberOfTimes:bt};for(const e in Xt)"object"==typeof Xt[e]&&it.exports(Xt[e]);return Object.assign(e,Xt),e}({}),fn=pn;pn.HighlightJS=pn,pn.default=pn;var mn=fn;class bn{el;_dropArea;_dragArea;_dropSortable;_dragSortable;parentElement;_prevPosition;reusable;randomize;storedSourceBlocks;storedSourceBlockExplanations;blockOrder;hljsLanguage;initialized;constructor(e,t,n){this.el=document.createElement("div"),this.el.classList.add("hparsons-input"),this.parentElement=e,this.el.id="hparsonstool-"+this.parentElement.toolNumber+"-parsons-input";const r=document.createElement("div");r.innerText="Drag or click the blocks below to form your code:",r.classList.add("hparsons-tip"),this.el.append(r),this._dragArea=document.createElement("div"),this.el.appendChild(this._dragArea),this._dragArea.classList.add("drag-area");const o=document.createElement("div");o.innerText="Your code (click on a block to remove it):",o.classList.add("hparsons-tip"),this.el.append(o),this._dropArea=document.createElement("div"),this.el.appendChild(this._dropArea),this._dropArea.classList.add("drop-area"),this._prevPosition=-1,this.storedSourceBlocks=[],this.blockOrder=[],this.storedSourceBlockExplanations=null,this.reusable=t,this.randomize=n,this._dragSortable=null,this._dropSortable=null,this._initSortable(),this.initialized=!1}getText=e=>{let t="";if(this._dropArea.hasChildNodes()){let n=this._dropArea.firstChild;for(t+=this._getTextFromBlock(n);n.nextSibling;)n=n.nextSibling,t+=e?" ":"",t+=this._getTextFromBlock(n);return t}return t};getBlockIndices=()=>{const e=this._dropArea.querySelectorAll(".parsons-block");return Array.from(e).map((e=>parseInt(e.dataset.index||"-1")))};_getTextFromBlock=e=>{if("raw"==this.parentElement.language)return e.innerHTML;if(!e.lastChild||e.lastChild.nodeType!=Node.ELEMENT_NODE)return e.textContent||"";const t=e.lastChild.classList.contains("parsons-tooltip")&&e.lastChild.textContent?.length||0;return t>0?(e.textContent||"").slice(0,-t):e.textContent||""};shuffleArray(e){for(let t=e.length-1;t>0;t--){let n=Math.floor(Math.random()*(t+1)),r=e[t];e[t]=e[n],e[n]=r}}setSourceBlocks=(e,t)=>{this.blockOrder=[];for(let t=0;t<e.length;++t)this.blockOrder.push(t);if(this.randomize){let e=JSON.stringify(this.blockOrder);for(this.shuffleArray(this.blockOrder);JSON.stringify(this.blockOrder)==e;)this.shuffleArray(this.blockOrder)}this.storedSourceBlocks=e,this.storedSourceBlockExplanations=t,this._resetInput()};_resetInput=()=>{for(;this._dragArea.firstChild;)this._dragArea.removeChild(this._dragArea.firstChild);for(;this._dropArea.firstChild;)this._dropArea.removeChild(this._dropArea.firstChild);for(let e=0;e<this.blockOrder.length;++e){const t=document.createElement("div");if(t.dataset.index=this.blockOrder[e].toString(),this._dragArea.appendChild(t)," "===this.storedSourceBlocks[this.blockOrder[e]]?t.innerHTML="&nbsp;":this.parentElement.hljsLanguage?t.innerHTML=mn.highlight(this.storedSourceBlocks[this.blockOrder[e]],{language:this.parentElement.hljsLanguage,ignoreIllegals:!0}).value:"raw"==this.parentElement.language?t.innerHTML=this.storedSourceBlocks[this.blockOrder[e]]:t.innerText=this.storedSourceBlocks[this.blockOrder[e]],t.style.display="inline-block",t.classList.add("parsons-block"),t.onclick=e=>{this._onBlockClicked(t,e)},this.storedSourceBlockExplanations&&this.storedSourceBlockExplanations[this.blockOrder[e]]){const n=document.createElement("div");n.innerText=this.storedSourceBlockExplanations[this.blockOrder[e]],n.classList.add("parsons-tooltip"),t.appendChild(n)}}};_onBlockClicked=(e,t)=>{if(e.parentElement==this._dragArea){let n;if(this.reusable){const t=e.cloneNode(!0);t.onclick=e=>this._onBlockClicked(t,e),this._dropArea.appendChild(t),n=this._getBlockPosition(t)}else this._dropArea.appendChild(e),n=this._getBlockPosition(e);const r={type:"input",action:et.InputAction.ADD,position:[-1,n],answer:this._getTextArray()};t.isTrusted&&this.parentElement.logEvent(r)}else{const t=this._getBlockPosition(e);this.reusable?this._dropArea.removeChild(e):this._dragArea.appendChild(e);const n={type:"input",action:et.InputAction.REMOVE,position:[t,-1],answer:this._getTextArray()};this.parentElement.logEvent(n)}};_initSortable=()=>{this.reusable?(this._dragSortable=new Pe(this._dragArea,{group:{name:"shared",pull:"clone",put:!1},sort:!1,direction:"horizontal",animation:150,draggable:".parsons-block",onClone:e=>{const t=e.clone;t.onclick=e=>this._onBlockClicked(t,e)}}),this._dropSortable=new Pe(this._dropArea,{group:"shared",direction:"horizontal",animation:150,draggable:".parsons-block",onAdd:e=>{const t={type:"input",action:et.InputAction.ADD,position:[-1,this._getBlockPosition(e.item)],answer:this._getTextArray()};this.parentElement.logEvent(t)},onStart:e=>{this._prevPosition=this._getBlockPosition(e.item)},onEnd:e=>{let t,n=et.InputAction.MOVE;const r=this._dropArea.getBoundingClientRect().top,o=this._dropArea.getBoundingClientRect().bottom;if(e.originalEvent.clientY>o||e.originalEvent.clientY<r){const r=e.item;r.parentNode&&r.parentNode.removeChild(r),t=-1,n=et.InputAction.REMOVE}else t=this._getBlockPosition(e.item);const i={type:"input",action:n,position:[this._prevPosition,t],answer:this._getTextArray()};this.parentElement.logEvent(i)}})):(this._dragSortable=new Pe(this._dragArea,{group:{name:"shared"},direction:"horizontal",animation:150,draggable:".parsons-block"}),this._dropSortable=new Pe(this._dropArea,{group:"shared",direction:"horizontal",animation:150,draggable:".parsons-block",onAdd:e=>{const t={type:"input",action:et.InputAction.ADD,position:[-1,this._getBlockPosition(e.item)],answer:this._getTextArray()};this.parentElement.logEvent(t)},onStart:e=>{this._prevPosition=this._getBlockPosition(e.item)},onEnd:e=>{let t=this._getBlockPosition(e.item);const n={type:"input",action:-1==t?et.InputAction.REMOVE:et.InputAction.MOVE,position:[this._prevPosition,t],answer:this._getTextArray()};this.parentElement.logEvent(n)}}))};updateTestStatus=e=>{this._dropArea.classList.contains(e)||(this._dropArea.classList.contains("Pass")?this._dropArea.classList.remove("Pass"):this._dropArea.classList.contains("Fail")?this._dropArea.classList.remove("Fail"):this._dropArea.classList.contains("Error")&&this._dropArea.classList.remove("Error"),this._dropArea.classList.add(e))};_getBlockPosition=e=>{let t=-1;const n=this._dropArea;if(n)for(t=0;t<n.childNodes.length&&n.childNodes[t]!==e;++t);return t};_getTextArray=()=>{let e=[];if(this._dropArea.hasChildNodes()){let t=this._dropArea.firstChild;for(e.push(this._getTextFromBlock(t));t.nextSibling;)t=t.nextSibling,e.push(this._getTextFromBlock(t))}return e};removeFormat=()=>{if(this._dropArea.hasChildNodes()){let e=this._dropArea.firstChild;for(e.style.removeProperty("background-color");e.nextSibling;)e=e.nextSibling,e.style.removeProperty("background-color")}};resetInput=()=>{if(this.reusable)for(;this._dropArea.firstChild;)this._dropArea.removeChild(this._dropArea.firstChild);else this._resetInput()};restoreAnswer(e){this.resetInput();const t=/^\s+$/;for(let n=0;n<e.length;++n){let r=t.test(e[n]);if(this._dragArea.hasChildNodes()){let o=this._dragArea.firstChild;for(;o;){if(r){if(t.test(this._getTextFromBlock(o))&&e[n].length==this._getTextFromBlock(o).length){o.click();break}}else if(this._getTextFromBlock(o)==e[n]){o.click();break}o=o.nextSibling}}}const n={type:"restore",answer:e};this.parentElement.logEvent(n)}restoreAnswerByIndices(e){this.resetInput();for(let t=0;t<e.length;++t){const n=String(e[t]);if(this._dragArea.hasChildNodes()){let e=this._dragArea.firstChild;for(;e;){if(e.dataset.index===n){e.click();break}e=e.nextSibling}}}const t={type:"restore",answer:e.map(String)};this.parentElement.logEvent(t)}}const vn="[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"],yn=["true","false","null","undefined","NaN","Infinity"],En=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],wn=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],xn=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Sn=["arguments","this","super","console","window","document","localStorage","module","global"],An=[].concat(xn,En,wn);var kn="[0-9](_*[0-9])*",Nn=`\\.(${kn})`,On="[0-9a-fA-F](_*[0-9a-fA-F])*",Cn={className:"number",variants:[{begin:`(\\b(${kn})((${Nn})|\\.)?|(${Nn}))[eE][+-]?(${kn})[fFdD]?\\b`},{begin:`\\b(${kn})((${Nn})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Nn})[fFdD]?\\b`},{begin:`\\b(${kn})[fFdD]\\b`},{begin:`\\b0[xX]((${On})\\.?|(${On})?\\.(${On}))[pP][+-]?(${kn})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${On})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function Tn(e,t,n){return-1===n?"":e.replace(t,(r=>Tn(e,t,n-1)))}mn.registerLanguage("javascript",(function(e){const t=e.regex,n=vn,r={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const n=e[0].length+e.index,r=e.input[n];if("<"===r||","===r)return void t.ignoreMatch();let o;">"===r&&(((e,{after:t})=>{const n="</"+e[0].slice(1);return-1!==e.input.indexOf(n,t)})(e,{after:n})||t.ignoreMatch());const i=e.input.substring(n);((o=i.match(/^\s*=/))||(o=i.match(/^\s+extends\s+/))&&0===o.index)&&t.ignoreMatch()}},o={$pattern:vn,keyword:_n,literal:yn,built_in:An,"variable.language":Sn},i="[0-9](_?[0-9])*",a=`\\.(${i})`,s="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",l={className:"number",variants:[{begin:`(\\b(${s})((${a})|\\.)?|(${a}))[eE][+-]?(${i})\\b`},{begin:`\\b(${s})\\b((${a})\\b|\\.)?|(${a})\\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},c={className:"subst",begin:"\\$\\{",end:"\\}",keywords:o,contains:[]},d={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,c],subLanguage:"xml"}},u={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,c],subLanguage:"css"}},h={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,c]},g={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},p=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,u,h,{match:/\$\d+/},l];c.contains=p.concat({begin:/\{/,end:/\}/,keywords:o,contains:["self"].concat(p)});const f=[].concat(g,c.contains),m=f.concat([{begin:/\(/,end:/\)/,keywords:o,contains:["self"].concat(f)}]),b={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:m},v={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,t.concat(n,"(",t.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},_={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...En,...wn]}},y={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[b],illegal:/%/},E={match:t.concat(/\b/,(w=[...xn,"super","import"],t.concat("(?!",w.join("|"),")")),n,t.lookahead(/\(/)),className:"title.function",relevance:0};var w;const x={begin:t.concat(/\./,t.lookahead(t.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},S={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},b]},A="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",k={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(A)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[b]};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:o,exports:{PARAMS_CONTAINS:m,CLASS_REFERENCE:_},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,u,h,g,{match:/\$\d+/},l,_,{className:"attr",begin:n+t.lookahead(":"),relevance:0},k,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[g,e.REGEXP_MODE,{className:"function",begin:A,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:m}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:"<>",end:"</>"},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:r.begin,"on:begin":r.isTrulyOpeningTag,end:r.end}],subLanguage:"xml",contains:[{begin:r.begin,end:r.end,skip:!0,contains:["self"]}]}]},y,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[b,e.inherit(e.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},x,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[b]},E,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},v,S,{match:/\$[(.]/}]}})),mn.registerLanguage("sql",(function(e){const t=e.regex,n=e.COMMENT("--","$"),r=["true","false","unknown"],o=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],i=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],a=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],s=i,l=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year","add","asc","collation","desc","final","first","last","view"].filter((e=>!i.includes(e))),c={begin:t.concat(/\b/,t.either(...s),/\s*\(/),relevance:0,keywords:{built_in:s}};return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:function(e,{exceptions:t,when:n}={}){const r=n;return t=t||[],e.map((e=>e.match(/\|\d+$/)||t.includes(e)?e:r(e)?`${e}|0`:e))}(l,{when:e=>e.length<3}),literal:r,type:o,built_in:["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"]},contains:[{begin:t.either(...a),relevance:0,keywords:{$pattern:/[\w\.]+/,keyword:l.concat(a),literal:r,type:o}},{className:"type",begin:t.either("double precision","large object","with timezone","without timezone")},c,{className:"variable",begin:/@[a-z0-9]+/},{className:"string",variants:[{begin:/'/,end:/'/,contains:[{begin:/''/}]}]},{begin:/"/,end:/"/,contains:[{begin:/""/}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,{className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}})),mn.registerLanguage("java",(function(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+Tn("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),o={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},i={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},a={className:"params",begin:/\(/,end:/\)/,keywords:o,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:o,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,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[a,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:o,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:o,relevance:0,contains:[i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,Cn,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},Cn,i]}})),mn.registerLanguage("xml",(function(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},o={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},i=e.inherit(o,{begin:/\(/,end:/\)/}),a=e.inherit(e.APOS_STRING_MODE,{className:"string"}),s=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:/[\p{L}0-9._:-]+/u,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[r]},{begin:/'/,end:/'/,contains:[r]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[o,s,a,i,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,i,s,a]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},r,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[s]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:l}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}})),mn.registerLanguage("python",(function(e){const t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],o={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},i={className:"meta",begin:/^(>>>|\.\.\.) /},a={className:"subst",begin:/\{/,end:/\}/,keywords:o,illegal:/#/},s={begin:/\{\{/,relevance:0},l={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,i],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,i],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,i,s,a]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,i,s,a]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,s,a]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s,a]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},c="[0-9](_?[0-9])*",d=`(\\b(${c}))?\\.(${c})|\\b(${c})\\.`,u=`\\b|${r.join("|")}`,h={className:"number",relevance:0,variants:[{begin:`(\\b(${c})|(${d}))[eE][+-]?(${c})[jJ]?(?=${u})`},{begin:`(${d})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${u})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${u})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${u})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${u})`},{begin:`\\b(${c})[jJ](?=${u})`}]},g={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:o,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},p={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:["self",i,h,l,e.HASH_COMMENT_MODE]}]};return a.contains=[l,h,i],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:o,illegal:/(<\/|->|\?)|=>/,contains:[i,h,{begin:/\bself\b/},{beginKeywords:"if",relevance:0},l,g,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[p]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[h,p,l]}]}}));class Dn extends HTMLElement{root;_parsonsData;parsonsExplanation;hparsonsInput;inputType;static toolCount=0;toolNumber;temporaryInputEvent;language;hljsLanguage;codeBefore;codeAfter;constructor(){super(),Dn.toolCount+=1,this.toolNumber=Dn.toolCount,this.root=this;const e=!!this.getAttribute("reuse"),t=!!this.getAttribute("randomize");this.hparsonsInput=new bn(this,e,t),this._parsonsData=new Array,this.parsonsExplanation=null,this.inputType="parsons",this.language=this.getAttribute("language")||"none";let n=new Map(Object.entries({html:"xml",python:"python",javascript:"javascript",java:"java",sql:"sql"}));this.hljsLanguage=n.get(this.language),this.initInput(),this.temporaryInputEvent=null,this.codeBefore=null,this.codeAfter=null}set parsonsData(e){this._parsonsData=e,"parsons"==this.inputType&&this.hparsonsInput.setSourceBlocks(e,this.parsonsExplanation)}get parsonsData(){return this._parsonsData}logEvent=e=>{const t=new CustomEvent("micro-parsons",{bubbles:!0,detail:{...e}});this.dispatchEvent(t)};initInput(){this.inputType="parsons",this._parsonsData=new Array,this.parsonsExplanation=null;const e=null!=this.getAttribute("reuse"),t=null!=this.getAttribute("randomize");this.hparsonsInput=new bn(this,e,t),this.root.appendChild(this.hparsonsInput.el)}resetInput(){this.hparsonsInput.resetInput(),this.logEvent({type:"reset"})}restoreAnswer(e){this.hparsonsInput.restoreAnswer(e)}restoreAnswerByIndices(e){this.hparsonsInput.restoreAnswerByIndices(e)}getCurrentInput(e){return this.hparsonsInput.getText(e)}getParsonsTextArray(){return this.hparsonsInput._getTextArray()}getBlockIndices(){return this.hparsonsInput.getBlockIndices()}setCodeContext(e){if(e.before){let t;this.codeBefore=e.before,this.querySelector(".context.before")?t=this.querySelector(".context.before"):(t=document.createElement("pre"),t.className="context before",this.querySelector(".hparsons-input").insertBefore(t,this.querySelector(".drop-area"))),t.innerHTML=this.codeBefore,this.hljsLanguage&&(t.className="context before",t.classList.add(this.hljsLanguage),mn.highlightElement(t))}if(e.after){let t;this.codeAfter=e.after,this.querySelector(".context.after")?t=this.querySelector(".context.after"):(t=document.createElement("pre"),t.className="context after",this.querySelector(".hparsons-input").appendChild(t)),t.innerHTML=this.codeAfter,this.hljsLanguage&&(t.className="context after",t.classList.add(this.hljsLanguage),mn.highlightElement(t))}}}const Mn=e=>{let t;try{t=document.querySelector(e.selector)}catch{throw"micro-parsons: init: selector error"}if(null==t||"DIV"!=t.tagName)throw"micro-parsons: element not a div";const n=-1==["javascript","sql","java","html","python","raw"].indexOf(e.language||"")?"":`language='${e.language}'`,r=e.id?`id='${e.id}'`:"",o=`<micro-parsons ${e.reuse?"reuse":""} ${!1===e.randomize?"":"randomize"} ${n} ${r}></micro-parsons>`;t.innerHTML=o;const i=t.firstChild;i.parsonsExplanation=e.parsonsTooltips,i.parsonsData=e.parsonsBlocks,e.context&&i.setCodeContext(e.context)};customElements.define("micro-parsons",Dn)}}]);
//# sourceMappingURL=207.a2b404e695486dde.js.map