1typeof navigator=="object"&&function(le,Ne){typeof exports=="object"&&typeof module<"u"?module.exports=Ne():typeof define=="function"&&define.amd?define("Plyr",Ne):(le=typeof globalThis<"u"?globalThis:le||self,le.Plyr=Ne())}(this,function(){"use strict";(function(){if(!(typeof window>"u"))try{var e=new window.CustomEvent("test",{cancelable:!0});if(e.preventDefault(),e.defaultPrevented!==!0)throw new Error("Could not prevent default")}catch{var s=function(r,a){var l,h;return a=a||{},a.bubbles=!!a.bubbles,a.cancelable=!!a.cancelable,l=document.createEvent("CustomEvent"),l.initCustomEvent(r,a.bubbles,a.cancelable,a.detail),h=l.preventDefault,l.preventDefault=function(){h.call(this);try{Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})}catch{this.defaultPrevented=!0}},l};s.prototype=window.Event.prototype,window.CustomEvent=s}})();var le=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ne(e,s){return s={exports:{}},e(s,s.exports),s.exports}(function(e){var s=function(){try{return!!Symbol.iterator}catch{return!1}},i=s(),r=function(g){var _={next:function(){var y=g.shift();return{done:y===void 0,value:y}}};return i&&(_[Symbol.iterator]=function(){return _}),_},a=function(g){return encodeURIComponent(g).replace(/%20/g,"+")},l=function(g){return decodeURIComponent(String(g).replace(/\+/g," "))},h=function(){var g=function(y){Object.defineProperty(this,"_entries",{writable:!0,value:{}});var v=typeof y;if(v!=="undefined")if(v==="string")y!==""&&this._fromString(y);else if(y instanceof g){var A=this;y.forEach(function(X,S){A.append(S,X)})}else if(y!==null&&v==="object")if(Object.prototype.toString.call(y)==="[object Array]")for(var I=0;I<y.length;I++){var M=y[I];if(Object.prototype.toString.call(M)==="[object Array]"||M.length!==2)this.append(M[0],M[1]);else throw new TypeError("Expected [string, any] as entry at index "+I+" of URLSearchParams's input")}else for(var Y in y)y.hasOwnProperty(Y)&&this.append(Y,y[Y]);else throw new TypeError("Unsupported input's type for URLSearchParams")},_=g.prototype;
vendor: 3,344 bytes, line 1
1_.append=function(y,v){y in this._entries?this._entries[y].push(String(v)):this._entries[y]=[String(v)]},_.delete=function(y){delete this._entries[y]},_.get=function(y){return y in this._entries?this._entries[y][0]:null},_.getAll=function(y){return y in this._entries?this._entries[y].slice(0):[]},_.has=function(y){return y in this._entries},_.set=function(y,v){this._entries[y]=[String(v)]},_.forEach=function(y,v){var A;for(var I in this._entries)if(this._entries.hasOwnProperty(I)){A=this._entries[I];for(var M=0;M<A.length;M++)y.call(v,A[M],I,this)}},_.keys=function(){var y=[];return this.forEach(function(v,A){y.push(A)}),r(y)},_.values=function(){var y=[];return this.forEach(function(v){y.push(v)}),r(y)},_.entries=function(){var y=[];return this.forEach(function(v,A){y.push([A,v])}),r(y)},i&&(_[Symbol.iterator]=_.entries),_.toString=function(){var y=[];return this.forEach(function(v,A){y.push(a(A)+"="+a(v))}),y.join("&")},e.URLSearchParams=g},d=function(){try{var g=e.URLSearchParams;return new g("?a=1").toString()==="a=1"&&typeof g.prototype.set=="function"&&typeof g.prototype.entries=="function"}catch{return!1}};d()||h();var m=e.URLSearchParams.prototype;typeof m.sort!="function"&&(m.sort=function(){var g=this,_=[];this.forEach(function(v,A){_.push([A,v]),g._entries||g.delete(A)}),_.sort(function(v,A){return v[0]<A[0]?-1:v[0]>A[0]?1:0}),g._entries&&(g._entries={});for(var y=0;y<_.length;y++)this.append(_[y][0],_[y][1])}),typeof m._fromString!="function"&&Object.defineProperty(m,"_fromString",{enumerable:!1,configurable:!1,writable:!1,value:function(g){if(this._entries)this._entries={};else{var _=[];this.forEach(function(I,M){_.push(M)});for(var y=0;y<_.length;y++)this.delete(_[y])}g=g.replace(/^\?/,"");for(var v=g.split("&"),A,y=0;y<v.length;y++)A=v[y].split("="),this.append(l(A[0]),A.length>1?l(A[1]):"")}})})(typeof le<"u"?le:typeof window<"u"?window:typeof self<"u"?self:le),function(e){var s=function(){try{var a=new e.URL("b","http://a");return a.pathname="c d",a.href==="http://a/c%20d"&&a.searchParams}catch{return!1}},i=function(){var a=e.URL,l=function(m,g){typeof m!="string"&&(m=String(m)),g&&typeof g!="string"&&(g=String(g));var _=document,y;if(g&&(e.location===void 0||g!==e.location.href)){g=g.toLowerCase(),_=document.implementation.createHTMLDocument(""),y=_.createElement("base"),y.href=g,_.head.appendChild(y);try{if(y.href.indexOf(g)!==0)throw new Error(y.href)}catch(F){throw new Error("URL unable to set base "+g+" due to "+F)}}var v=_.createElement("a");v.href=m,y&&(_.body.appendChild(v),v.href=v.href);var A=_.createElement("input");if(A.type="url",A.value=m,v.protocol===":"||!/:/.test(v.href)||!A.checkValidity()&&!g)throw new TypeError("Invalid URL");Object.defineProperty(this,"_anchorElement",{value:v});var I=new e.URLSearchParams(this.search),M=!0,Y=!0,X=this;["append","delete","set"].forEach(function(F){var re=I[F];I[F]=function(){re.apply(I,arguments),M&&(Y=!1,X.search=I.toString(),Y=!0)}}),Object.defineProperty(this,"searchParams",{value:I,enumerable:!0});var S=void 0;Object.defineProperty(this,"_updateSearchParams",{enumerable:!1,configurable:!1,writable:!1,value:function(){this.search!==S&&(S=this.search,Y&&(M=!1,this.searchParams._fromString(this.search),M=!0))}})},h=l.prototype,d=function(m){Object.defineProperty(h,m,{get:function(){return this._anchorElement[m]}
1,set:function(g){this._anchorElement[m]=g},enumerable:!0})};["hash","host","hostname","port","protocol"].forEach(function(m){d(m)}),Object.defineProperty(h,"search",{get:function(){return this._anchorElement.search},set:function(m){this._anchorElement.search=m,this._updateSearchParams()},enumerable:!0}),Object.defineProperties(h,{toString:{get:function(){var m=this;return function(){return m.href}}},href:{get:function(){return this._anchorElement.href.replace(/\?$/,"")},set:function(m){this._anchorElement.href=m,this._updateSearchParams()},enumerable:!0},pathname:{get:function(){return this._anchorElement.pathname.replace(/(^\/?)/,"/")},set:function(m){this._anchorElement.pathname=m},enumerable:!0},origin:{get:function(){var m={"http:":80,"https:":443,"ftp:":21}[this._anchorElement.protocol],g=this._anchorElement.port!=m&&this._anchorElement.port!=="";return this._anchorElement.protocol+"//"+this._anchorElement.hostname+(g?":"+this._anchorElement.port:"")},enumerable:!0},password:{get:function(){return""},set:function(m){},enumerable:!0},username:{get:function(){return""},set:function(m){},enumerable:!0}}),l.createObjectURL=function(m){return a.createObjectURL.apply(a,arguments)},l.revokeObjectURL=function(m){return a.revokeObjectURL.apply(a,arguments)},e.URL=l};if(s()||i(),e.location!==void 0&&!("origin"in e.location)){var r=function(){return e.location.protocol+"//"+e.location.hostname+(e.location.port?":"+e.location.port:"")};try{Object.defineProperty(e.location,"origin",{get:r,enumerable:!0})}catch{setInterval(function(){e.location.origin=r()},100)}}}(typeof le<"u"?le:typeof window<"u"?window:typeof self<"u"?self:le);function C(e,s,i){return s=qi(s),s in e?Object.defineProperty(e,s,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[s]=i,e}function Fi(e,s){if(typeof e!="object"||e===null)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var r=i.call(e,s||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(e)}function qi(e){var s=Fi(e,"string");return typeof s=="symbol"?s:String(s)}function We(e,s){if(!(e instanceof s))throw new TypeError("Cannot call a class as a function")}function ze(e,s){for(var i=0;i<s.length;i++){var r=s[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ft(e,s,i){return s&&ze(e.prototype,s),i&&ze(e,i),e}function Ze(e,s,i){return s in e?Object.defineProperty(e,s,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[s]=i,e}function yi(e,s){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);s&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),i.push.apply(i,r)}return i}function Ot(e){for(var s=1;s<arguments.length;s++){var i=arguments[s]!=null?arguments[s]:{};s%2?yi(Object(i),!0).forEach(function(r){Ze(e,r,i[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):yi(Object(i)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(i,r))})}return e}var pt={addCSS:!0,thumbWidth:15,watch:!0};function Bi(e,s){return function(){return Array.from(document.querySelectorAll(s)).includes(this)}.call(e,s)}function vi(e,s){if(e&&s){var i=new Event(s,{bubbles:!0});e.dispatchEvent(i)}}var be=function(e){return e!=null?e.constructor:null},Ae=function(e,s){return!!(e&&s&&e instanceof s)},ke=function(e){return e==null},_i=function(e){return be(e)===Object},wi=function(e){return be(e)===Number&&!Number.isNaN(e)},Ui=function(e){return be(e)===String},ws=function(e){return be(e)===Boolean},Ts=function(e){return be(e)===Function},ei=function(e){return Array.isArray(e)},Ti=function(e){return Ae(e,NodeList)},Vi=function(e){return Ae(e,Element)},ks=function(e){return Ae(e,Event)},Wi=function(e){return ke(e)||(Ui(e)||ei(e)||Ti(e))&&!e.length||_i(e)&&!Object.keys(e).length},ge={nullOrUndefined:ke,object:_i,number:wi,string:Ui,boolean:ws,function:Ts,array:ei,nodeList:Ti,element:Vi,event:ks,empty:Wi};function zi(e){var s="".concat(e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return s?Math.max(0,(s[1]?s[1].length:0)-(s[2]?+s[2]:0)):0}function Ki(e,s){if(1>s){var i=zi(s);return parseFloat(e.toFixed(i))}return Math.round(e/s)*s}var Yi=function(){function e(s,i){We(this,e),ge.element(s)?this.element=s:ge.string(s)&&(this.element=document.querySelector(s)),ge.element(this.element)&&ge.empty(this.element.rangeTouch)&&(this.config=Ot({},pt,{},i),this.init())}return ft(e,[{key:"init",value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect="none",this.element.style.webKitUserSelect="none",this.element.style.touchAction="manipulation"),this.listeners(!0),this.element.rangeTouch=this)}},{key:"destroy",value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect="",this.element.style.webKitUserSelect="",this.element.style.touchAction=""),this.listeners(!1),this.element.rangeTouch=null)}},{key:"listeners",value:function(s){var i=this,r=s?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach(function(a){i.element[r](a,function(l){return i.set(l)},!1)})}},{key:"get",value:function(s){if(!e.enabled||!ge.event(s))return null;var i,r=s.target,a=s.changedTouches[0],l=parseFloat(r.getAttribute("min"))||0,h=parseFloat(r.getAttribute("max"))||100,d=parseFloat(r.getAttribute("step"))||1,m=r.getBoundingClientRect(),g=100/m.width*(this.config.thumbWidth/2)/100;return 0>(i=100/m.width*(a.clientX-m.left))?i=0:100<i&&(i=100),50>i?i-=(100-2*i)*g:50<i&&(i+=2*(i-50)*g),l+Ki(i/100*(h-l),d)}},{key:"set",value:function(s){e.enabled&&ge.event(s)&&!s.target.disabled&&(s.preventDefault(),s.target.value=this.get(s),vi(s.target,s.type==="touchend"?"change":"input"))}}],[{key:"setup",value:function(s){var i=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},r=null;if(ge.empty(s)||ge.string(s)?r=Array.from(document.querySelectorAll(ge.string(s)?s:'input[type="range"]')):ge.element(s)?r=[s]:ge.nodeList(s)?r=Array.from(s):ge.array(s)&&(r=s.filter(ge.element)),ge.empty(r))return null;var a=Ot({},pt,{},i);if(ge.string(s)&&a.watch){var l=new MutationObserver(function(h){Array.from(h).forEac
1h(function(d){Array.from(d.addedNodes).forEach(function(m){ge.element(m)&&Bi(m,s)&&new e(m,a)})})});l.observe(document.body,{childList:!0,subtree:!0})}return r.map(function(h){return new e(h,i)})}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),e}();const ot=e=>e!==null&&typeof e<"u"?e.constructor:null,Ke=(e,s)=>!!(e&&s&&e instanceof s),ti=e=>e===null||typeof e>"u",T=e=>ot(e)===Object,ki=e=>ot(e)===Number&&!Number.isNaN(e),Lt=e=>ot(e)===String,Ei=e=>ot(e)===Boolean,De=e=>typeof e=="function",mt=e=>Array.isArray(e),$e=e=>Ke(e,WeakMap),ii=e=>Ke(e,NodeList),L=e=>ot(e)===Text,si=e=>Ke(e,Event),Xi=e=>Ke(e,KeyboardEvent),Es=e=>Ke(e,window.TextTrackCue)||Ke(e,window.VTTCue),As=e=>Ke(e,TextTrack)||!ti(e)&&Lt(e.kind),Mt=e=>Ke(e,Promise)&&De(e.then),Qi=e=>e!==null&&typeof e=="object"&&e.nodeType===1&&typeof e.style=="object"&&typeof e.ownerDocument=="object",gt=e=>ti(e)||(Lt(e)||mt(e)||ii(e))&&!e.length||T(e)&&!Object.keys(e).length;var u={nullOrUndefined:ti,object:T,number:ki,string:Lt,boolean:Ei,function:De,array:mt,weakMap:$e,nodeList:ii,element:Qi,textNode:L,event:si,keyboardEvent:Xi,cue:Es,track:As,promise:Mt,url:e=>{if(Ke(e,window.URL))return!0;if(!Lt(e))return!1;let s=e;(!e.startsWith("http://")||!e.startsWith("https://"))&&(s=`http://${e}`);try{return!gt(new URL(s).hostname)}catch{return!1}},empty:gt};const Ai=(()=>{const e=document.createElement("span"),s={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},i=Object.keys(s).find(r=>e.style[r]!==void 0);return u.string(i)?s[i]:!1})();function Gi(e,s){setTimeout(()=>{try{e.hidden=!0,e.offsetHeight,e.hidden=!1}catch{}},s)}const Cs=!!window.document.documentMode,Ss=/Edge/g.test(navigator.userAgent),Ps="WebkitAppearance"in document.documentElement.style&&!/Edge/g.test(navigator.userAgent),xs=/iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1,ni=navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,et=/iPad|iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1;var he={isIE:Cs,isEdge:Ss,isWebKit:Ps,isIPhone:xs,isIPadOS:ni,isIos:et};function $t(e){return JSON.parse(JSON.stringify(e))}function at(e,s){return s.split(".").reduce((i,r)=>i&&i[r],e)}function te(e={},...s){if(!s.length)return e;const i=s.shift();
1return u.object(i)?(Object.keys(i).forEach(r=>{u.object(i[r])?(Object.keys(e).includes(r)||Object.assign(e,{[r]:{}}),te(e[r],i[r])):Object.assign(e,{[r]:i[r]})}),te(e,...s)):e}function It(e,s){const i=e.length?e:[e];Array.from(i).reverse().forEach((r,a)=>{const l=a>0?s.cloneNode(!0):s,h=r.parentNode,d=r.nextSibling;l.appendChild(r),d?h.insertBefore(l,d):h.appendChild(l)})}function Ci(e,s){!u.element(e)||u.empty(s)||Object.entries(s).filter(([,i])=>!u.nullOrUndefined(i)).forEach(([i,r])=>e.setAttribute(i,r))}function N(e,s,i){const r=document.createElement(e);return u.object(s)&&Ci(r,s),u.string(i)&&(r.innerText=i),r}function Os(e,s){!u.element(e)||!u.element(s)||s.parentNode.insertBefore(e,s.nextSibling)}function Ji(e,s,i,r){u.element(s)&&s.appendChild(N(e,i,r))}function Ye(e){if(u.nodeList(e)||u.array(e)){Array.from(e).forEach(Ye);return}!u.element(e)||!u.element(e.parentNode)||e.parentNode.removeChild(e)}function ri(e){if(!u.element(e))return;let{length:s}=e.childNodes;for(;s>0;)e.removeChild(e.lastChild),s-=1}function oi(e,s){return!u.element(s)||!u.element(s.parentNode)||!u.element(e)?null:(s.parentNode.replaceChild(e,s),e)}function je(e,s){if(!u.string(e)||u.empty(e))return{};const i={},r=te({},s);return e.split(",").forEach(a=>{const l=a.trim(),h=l.replace(".",""),m=l.replace(/[[\]]/g,"").split("="),[g]=m,_=m.length>1?m[1].replace(/["']/g,""):"";switch(l.charAt(0)){case".":u.string(r.class)?i.class=`${r.class} ${h}`:i.class=h;break;case"#":i.id=l.replace("#","");break;case"[":i[g]=_;break}}),te(r,i)}function tt(e,s){if(!u.element(e))return;let i=s;u.boolean(i)||(i=!e.hidden),e.hidden=i}function W(e,s,i){if(u.nodeList(e))return Array.from(e).map(r=>W(r,s,i));if(u.element(e)){let r="toggle";return typeof i<"u"&&(r=i?"add":"remove"),e.classList[r](s),e.classList.contains(s)}return!1}function Dt(e,s){return u.element(e)&&e.classList.contains(s)}function it(e,s){const{prototype:i}=Element;function r(){return Array.from(document.querySelectorAll(s)).includes(this)}return(i.matches||i.webkitMatchesSelector||i.mozMatchesSelector||i.msMatchesSelector||r).call(e,s)}function Ls(e,s){const{prototype:i}=Element;function r(){let l=this;do{if(it.matches(l,s))return l;l=l.parentElement||l.parentNode}while(l!==null&&l.nodeType===1);return null}return(i.closest||r).call(e,s)}function jt(e){return this.elements.container.querySelectorAll(e)}function de(e){return this.elements.container.querySelector(e)}function Si(e=null,s=!1){u.element(e)&&e.focus({preventScroll:!0,focusVisible:s})}const lt={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},ne={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check(e,s){const i=ne[e]||s!=="html5",r=i&&ne.rangeInput;return{api:i,ui:r}},pip:he.isIPhone?!1:!!(u.function(N("video").webkitSetPresentationMode)||document.pictureInPictureEnabled&&!N("video").disablePictureInPicture),airplay:u.function(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime(e){if(u.empty(e))return!1;const[s]=e.split("/");let i=e;if(!this.isHTML5||s!==this.type)return!1;Object.keys(lt).includes(i)&&(i+=`; codecs="${lt[e]}"`);try{return!!(i&&this.media.canPlayType(i).replace(/no/,""))}catch{return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:(()=>{const e=document.createElement("input");return e.type="range",e.type==="range"})(),touch:"ontouchstart"in document.documentElement,transitions:Ai!==!1,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},Ms=(()=>{let e=!1;try{const s=Object.defineProperty({},"passive",{get(){return e=!0,null}});window.addEventListener("test",null,s),window.removeEventListener("test",null,s)}catch{}return e})();function Rt(e,s,i,r=!1,a=!0,l=!1){if(!e||!("addEventListener"in e)||u.empty(s)||!u.function(i))return;const h=s.split(" ");let d=l;Ms&&(d={passive:a,capture:l}),h.forEach(m=>{this&&this.eventListeners&&r&&this.eventListeners.push({element:e,type:m,callback:i,options:d}),e[r?"addEventListener":"removeEventListener"](m,i,d)})}function z(e,s="",i,r=!0,a=!1){Rt.call(this,e,s,i,!0,r,a)}function ai(e,s="",i,r=!0,a=!1){Rt.call(this,e,s,i,!1,r,a)}function Pi(e,s="",i,r=!0,a=!1){const l=(...h)=>{ai(e,s,l,r,a),i.apply(this,h)};Rt.call(this,e,s,l,!0,r,a)}function $(e,s="",i=!1,r={}){if(!u.element(e)||u.empty(s))return;const a=new CustomEvent(s,{bubbles:i,detail:{...r,plyr:this}});e.dispatchEvent(a)}function bt(){this&&this.eventListeners&&(this.eventListeners.forEac
1h(e=>{const{element:s,type:i,callback:r,options:a}=e;s.removeEventListener(i,r,a)}),this.eventListeners=[])}function li(){return new Promise(e=>this.ready?setTimeout(e,0):z.call(this,this.elements.container,"ready",e)).then(()=>{})}function Re(e){u.promise(e)&&e.then(null,()=>{})}function Ht(e){return u.array(e)?e.filter((s,i)=>e.indexOf(s)===i):e}function Zi(e,s){return!u.array(e)||!e.length?null:e.reduce((i,r)=>Math.abs(r-s)<Math.abs(i-s)?r:i)}function es(e){return!window||!window.CSS?!1:window.CSS.supports(e)}const ct=[[1,1],[4,3],[3,4],[5,4],[4,5],[3,2],[2,3],[16,10],[10,16],[16,9],[9,16],[21,9],[9,21],[32,9],[9,32]].reduce((e,[s,i])=>({...e,[s/i]:[s,i]}),{});function ye(e){return!u.array(e)&&(!u.string(e)||!e.includes(":"))?!1:(u.array(e)?e:e.split(":")).map(Number).every(u.number)}function ve(e){if(!u.array(e)||!e.every(u.number))return null;const[s,i]=e,r=(l,h)=>h===0?l:r(h,l%h),a=r(s,i);return[s/a,i/a]}function Ee(e){const s=r=>ye(r)?r.split(":").map(Number):null;let i=s(e);if(i===null&&(i=s(this.config.ratio)),i===null&&!u.empty(this.embed)&&u.array(this.embed.ratio)&&({ratio:i}=this.embed),i===null&&this.isHTML5){const{videoWidth:r,videoHeight:a}=this.media;i=[r,a]}return ve(i)}function ce(e){if(!this.isVideo)return{};const{wrapper:s}=this.elements,i=Ee.call(this,e);if(!u.array(i))return{};const[r,a]=ve(i),l=es(`aspect-ratio: ${r}/${a}`),h=100/r*a;if(l?s.style.aspectRatio=`${r}/${a}`:s.style.paddingBottom=`${h}%`,this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){const d=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),m=(d-h)/(d/50);this.fullscreen.active?s.style.paddingBottom=null:this.media.style.transform=`translateY(-${m}%)`}else this.isHTML5&&s.classList.add(this.config.classNames.videoFixedRatio);return{padding:h,ratio:i}}function Ft(e,s,i=.05){const r=e/s,a=Zi(Object.keys(ct),r);return Math.abs(a-r)<=i?ct[a]:[e,s]}function yt(){const e=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),s=Math.max(document.documentElement.clientHeight||0,window.innerHeight||0);return[e,s]}const Ce={getSources(){return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter(s=>{const i=s.getAttribute("type");return u.empty(i)?!0:ne.mime.call(this,i)}):[]},getQualityOptions(){return this.config.quality.forced?this.config.quality.options:Ce.getSources.call(this).map(e=>Number(e.getAttribute("size"))).filter(Boolean)},setup(){if(!this.isHTML5)return;const e=this;e.options.speed=e.config.speed.options,u.empty(this.config.ratio)||ce.call(e),Object.defineProperty(e.media,"quality",{get(){const i=Ce.getSources.call(e).find(r=>r.getAttribute("src")===e.source);return i&&Number(i.getAttribute("size"))},set(s){if(e.quality!==s){if(e.config.quality.forced&&u.function(e.config.quality.onChange))e.config.quality.onChange(s);else{const r=Ce.getSources.call(e).find(g=>Number(g.getAttribute("size"))===s);if(!r)return;const{currentTime:a,paused:l,preload:h,readyState:d,playbackRate:m}=e.media;e.media.src=r.getAttribute("src"),(h!=="none"||d)&&(e.once("loadedmetadata",()=>{e.speed=m,e.currentTime=a,l||Re(e.play())}),e.media.load())}$.call(e,e.media,"qualitychange",!1,{quality:s})}}})},cancelRequests(){this.isHTML5&&(Ye(Ce.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function vt(e){return`${e}-${Math.floor(Math.random()*1e4)}`}function ci(e,...s){return u.empty(e)?e:e.toString().replace(/{(\d+)}/g,(i,r)=>s[r].toString())}function xi(e,s){return e===0||s===0||Number.isNaN(e)||Number.isNaN(s)?0:(e/s*100).toFixed(2)}const He=(e="",s="",i="")=>e.replace(new RegExp(s.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),i.toString()),Oi=(e="")=>e.toString().replace(/\w\S*/g,s=>s.charAt(0).toUpperCase()+s.slice(1).toLowerCase());function Li(e=""){let s=e.toString();return s=He(s,"-"," "),s=He(s,"_"," "),s=Oi(s),He(s," ","")}function Mi(e=""){let s=e.toString();return s=Li(s),s.charAt(0).toLowerCase()+s.slice(1)}function ts(e){const s=document.createDocumentFragment(),i=document.createElement("div");return s.appendChild(i),i.innerHTML=e,s.firstChild.innerText}function is(e){const s=document.createElement("div");return s.appendChild(e),s.innerHTML}const Ni={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},fe={get(e="",s={}){if(u.empty(e)||u.empty(s))return"";let i=at(s.i18n,e);if(u.empty(i))return Object.keys(Ni).includes(e)?Ni[e]:"";const r={"{seektime}":s.seekTime,"{title}":s.title};return Object.entries(r).forEach(([a,l])=>{i=He(i,a,l)}),i}};class _t{constructor(s){C(this,"get",i=>{if(!_t.supported||!this.enabled)return null;const r=window.localStorage.getItem(this.key);if(u.empty(r))return null;const a=JSON.parse(r);return u.string(i)&&i.length?a[i]:a}),C(this,"set",i=>{if(!_t.supported||!this.enabled||!u.object(i))return;let r=this.get();u.empty(r)&&(r={}),te(r,i);try{window.localStorage.setItem(this.key,JSON.stringify(r))}catch{}}),this.enabled=s.config.storage.enabled,this.key=s.config.storage.key}static get supported(){try{if(!("localStorage"in window))return!1;const s="___test";return window.localStorage.setItem(s,s),window.localStorage.removeItem(s),!0}catch{return!1}}}function wt(e,s="text"){return new Promise((i,r)=>{try{const a=new XMLHttpRequest;if(!("withCredentials"in a))return;a.addEventListener("load",()=>{if(s==="text")try{i(JSON.parse(a.responseText))}catch{i(a.responseText)}else i(a.response)}),a.addEventListener("error",()=>{throw new Error(a.status)}),a.open("GET",e,!0),a.responseType=s,a.send()}catch(a){r(a)}})}function $i(e,s){if(!u.string(e))return;const i="cache",r=u.string(s);let a=!1;const l=()=>document.getElementById(s)!==null,h=(d,m)=>{d.innerHTML=m,!(r&&l())&&document.body.insertAdjacentElement("afterbegin",d)};if(!r||!l()){const d=_t.supported,m=document.createElement("div");if(m.setAttribute("hidden",""),r&&m.setAttribute("id",s),d){const g=window.localStorage.getItem(`${i}-${s}`);if(a=g!==null,a){const _=JSON.parse(g);h(m,_.content)}}wt(e).then(g=>{if(!u.empty(g)){if(d)try{window.localStorage.setItem(`${i}-${s}`,JSON.stringify({content:g}))}catch{}h(m,g)}}).catch(()=>{})}}const Ii=e=>Math.trunc(e/60/60%60,10),ss=e=>Math.trunc(e/60%60,10),ns=e=>Math.trunc(e%60,10);function Pe(e=0,s=!1,i=!1){if(!u.number(e))return Pe(void 0,s,i);const r=d=>`0${d}`.slice(-2);let a=Ii(e);const l=ss(e),h=ns(e);return s||a>0?a=`${a}:`:a="",`${i&&e>0?"-":""}${a}${r(l)}:${r(h)}`}const k={getIconUrl(){const e=new URL(this.config.iconUrl,window.location),s=window.location.host?window.location.host:window.top.location.host,i=e.host!==s||he.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:i}},findElements(){try{return this.elements.controls=de.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:jt.call(this,this.config.selectors.buttons.play),pause:de.call(this,this.config.selectors.buttons.pause),restart:de.call(this,this.config.selectors.buttons.restart),rewind:de.call(this,this.config.selectors.buttons.rewind),fastForward:de.call(this,this.config.selectors.buttons.fastForward),mute:de.call(this,this.config.selectors.buttons.mute),pip:de.call(this,this.config.selectors.buttons.pip),airplay:de.call(this,this.config.selectors.buttons.airplay),settings:de.call(this,this.config.selectors.buttons.settings),captions:de.call(this,this.config.selectors.buttons.captions),fullscreen:de.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=de.call(this,this.config.selectors.progress),this.elements.inputs={seek:de.call(this,this.config.selectors.inputs.seek),volume:de.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:de.call(this,this.config.selectors.display.buffer),currentTime:de.call(this,this.config.selectors.display.currentTime),duration:de.call(this,this.config.selectors.display.duration)},u.element(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(`.${this.config.classNames.tooltip}`)),!0}catch(e){return this.debug.warn("It looks like there is a problem with your custom controls HTML",e),this.toggleNativeControls(!0),!1}},createIcon(e,s){const i="http://www.w3.org/2000/svg",r=k.getIconUrl.call(this),a=`${r.cors?"":r.url}#${this.config.iconPrefix}`,l=document.createElementNS(i,"svg");Ci(l,te(s,{"aria-hidden":"true",focusable:"false"}));const h=document.createElementNS(i,"use"),d=`${a}-${e}`;return"href"in h&&h.setAttributeNS("http://www.w3.org/1999/xlink","href",d),h.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d),l.appendChild(h),l},createLabel(e,s={}){const i=fe.get(e,this.config),r={...s,class:[s.class,this.config.classNames.hidden].filter(
1Boolean).join(" ")};return N("span",r,i)},createBadge(e){if(u.empty(e))return null;const s=N("span",{class:this.config.classNames.menu.value});return s.appendChild(N("span",{class:this.config.classNames.menu.badge},e)),s},createButton(e,s){const i=te({},s);let r=Mi(e);const a={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach(h=>{Object.keys(i).includes(h)&&(a[h]=i[h],delete i[h])}),a.element==="button"&&!Object.keys(i).includes("type")&&(i.type="button"),Object.keys(i).includes("class")?i.class.split(" ").some(h=>h===this.config.classNames.control)||te(i,{class:`${i.class} ${this.config.classNames.control}`}):i.class=this.config.classNames.control,e){case"play":a.toggle=!0,a.label="play",a.labelPressed="pause",a.icon="play",a.iconPressed="pause";break;case"mute":a.toggle=!0,a.label="mute",a.labelPressed="unmute",a.icon="volume",a.iconPressed="muted";break;case"captions":a.toggle=!0,a.label="enableCaptions",a.labelPressed="disableCaptions",a.icon="captions-off",a.iconPressed="captions-on";break;case"fullscreen":a.toggle=!0,a.label="enterFullscreen",a.labelPressed="exitFullscreen",a.icon="enter-fullscreen",a.iconPressed="exit-fullscreen";break;case"play-large":i.class+=` ${this.config.classNames.control}--overlaid`,r="play",a.label="play",a.icon="play";break;default:u.empty(a.label)&&(a.label=r),u.empty(a.icon)&&(a.icon=e)}const l=N(a.element);return a.toggle?(l.appendChild(k.createIcon.call(this,a.iconPressed,{class:"icon--pressed"})),l.appendChild(k.createIcon.call(this,a.icon,{class:"icon--not-pressed"})),l.appendChild(k.createLabel.call(this,a.labelPressed,{class:"label--pressed"})),l.appendChild(k.createLabel.call(this,a.label,{class:"label--not-pressed"}))):(l.appendChild(k.createIcon.call(this,a.icon)),l.appendChild(k.createLabel.call(this,a.label))),te(i,je(this.config.selectors.buttons[r],i)),Ci(l,i),r==="play"?(u.array(this.elements.buttons[r])||(this.elements.buttons[r]=[]),this.elements.buttons[r].push(l)):this.elements.buttons[r]=l,l},createRange(e,s){const i=N("input",te(je(this.config.selectors.inputs[e]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":fe.get(e,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},s));return this.elements.inputs[e]=i,k.updateRangeFill.call(this,i),Yi.setup(i),i},createProgress(e,s){const i=N("progress",te(je(this.config.selectors.display[e]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},s));if(e!=="volume"){i.appendChild(N("span",null,"0"));const r={played:"played",buffer:"buffered"}[e],a=r?fe.get(r,this.config):"";i.innerText=`% ${a.toLowerCase()}`}return this.elements.display[e]=i,i},createTime(e,s){const i=je(this.config.selectors.display[e],s),r=N("div",te(i,{class:`${i.class?i.class:""} ${this.config.classNames.display.time} `.trim(),"aria-label":fe.get(e,this.config),role:"timer"}),"00:00");return this.elements.display[e]=r,r},bindMenuItemShortcuts(e,s){z.call(this,e,"keydown keyup",i=>{if(![" ","ArrowUp","ArrowDown","ArrowRight"].includes(i.key)||(i.preventDefault(),i.stopPropagation(),i.type==="keydown"))return;const r=it(e,'[role="menuitemradio"]');if(!r&&[" ","ArrowRight"].includes(i.key))k.showMenuPanel.call(this,s,!0);else{let a;i.key!==" "&&(i.key==="ArrowDown"||r&&i.key==="ArrowRight"?(a=e.nextElementSibling,u.element(a)||(a=e.parentNode.firstElementChild)):(a=e.previousElementSibling,u.element(a)||(a=e.parentNode.lastElementChild)),Si.call(this,a,!0))}},!1),z.call(this,e,"keyup",i=>{i.key==="Return"&&k.focusFirstMenuItem.call(this,null,!0)})},createMenuItem({value:e,list:s,type:i,title:r,badge:a=null,checked:l=!1}){const h=je(this.config.selectors.inputs[i]),d=N("button",te(h,{type:"button",role:"menuitemradio",class:`${this.config.classNames.control} ${h.class?h.class:""}`.trim(),"aria-checked":l,value:e})),m=N("span");m.innerHTML=r,u.element(a)&&m.appendChild(a),d.appendChild(m),Object.defineProperty(d,"checked",{enumerable:!0,get(){return d.getAttribute("aria-checked")==="true"},set(g){g&&Array.from(d.parentNode.children).filter(_=>
1it(_,'[role="menuitemradio"]')).forEach(_=>_.setAttribute("aria-checked","false")),d.setAttribute("aria-checked",g?"true":"false")}}),this.listeners.bind(d,"click keyup",g=>{if(!(u.keyboardEvent(g)&&g.key!==" ")){switch(g.preventDefault(),g.stopPropagation(),d.checked=!0,i){case"language":this.currentTrack=Number(e);break;case"quality":this.quality=e;break;case"speed":this.speed=parseFloat(e);break}k.showMenuPanel.call(this,"home",u.keyboardEvent(g))}},i,!1),k.bindMenuItemShortcuts.call(this,d,i),s.appendChild(d)},formatTime(e=0,s=!1){if(!u.number(e))return e;const i=Ii(this.duration)>0;return Pe(e,i,s)},updateTimeDisplay(e=null,s=0,i=!1){!u.element(e)||!u.number(s)||(e.innerText=k.formatTime(s,i))},updateVolume(){this.supported.ui&&(u.element(this.elements.inputs.volume)&&k.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),u.element(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||this.volume===0))},setRange(e,s=0){u.element(e)&&(e.value=s,k.updateRangeFill.call(this,e))},updateProgress(e){if(!this.supported.ui||!u.event(e))return;let s=0;const i=(r,a)=>{const l=u.number(a)?a:0,h=u.element(r)?r:this.elements.display.buffer;if(u.element(h)){h.value=l;const d=h.getElementsByTagName("span")[0];u.element(d)&&(d.childNodes[0].nodeValue=l)}};if(e)switch(e.type){case"timeupdate":case"seeking":case"seeked":s=xi(this.currentTime,this.duration),e.type==="timeupdate"&&k.setRange.call(this,this.elements.inputs.seek,s);break;case"playing":case"progress":i(this.elements.display.buffer,this.buffered*100);break}},updateRangeFill(e){const s=u.event(e)?e.target:e;if(!(!u.element(s)||s.getAttribute("type")!=="range")){if(it(s,this.config.selectors.inputs.seek)){s.setAttribute("aria-valuenow",this.currentTime);const i=k.formatTime(this.currentTime),r=k.formatTime(this.duration),a=fe.get("seekLabel",this.config);s.setAttribute("aria-valuetext",a.replace("{currentTime}",i).replace("{duration}",r))}else if(it(s,this.config.selectors.inputs.volume)){const i=s.value*100;s.setAttribute("aria-valuenow",i),s.setAttribute("aria-valuetext",`${i.toFixed(1)}%`)}else s.setAttribute("aria-valuenow",s.value);!he.isWebKit&&!he.isIPadOS||s.style.setProperty("--value",`${s.value/s.max*100}%`)}},updateSeekTooltip(e){var s,i;if(!this.config.tooltips.seek||!u.element(this.elements.inputs.seek)||!u.element(this.elements.display.seekTooltip)||this.duration===0)return;const r=this.elements.display.seekTooltip,a=`${this.config.classNames.tooltip}--visible`,l=_=>W(r,a,_);if(this.touch){l(!1);return}let h=0;const d=this.elements.progress.getBoundingClientRect();if(u.event(e))h=100/d.width*(e.pageX-d.left);else if(Dt(r,a))h=parseFloat(r.style.left,10);else return;h<0?h=0:h>100&&(h=100);const m=this.duration/100*h;r.innerText=k.formatTime(m);const g=(s=this.config.markers)===null||s===void 0||(i=s.points)===null||i===void 0?void 0:i.find(({time:_})=>_===Math.round(m));g&&r.insertAdjacentHTML("afterbegin",`${g.label}<br>`),r.style.left=`${h}%`,u.event(e)&&["mouseenter","mouseleave"].includes(e.type)&&l(e.type==="mouseenter")},timeUpdate(e){const s=!u.element(this.elements.display.duration)&&this.config.invertTime;k.updateTimeDisplay.call(this,this.elements.display.currentTime,s?this.duration-this.currentTime:this.currentTime,s),!(e&&e.type==="timeupdate"&&this.media.seeking)&&k.updateProgress.call(this,e)},durationUpdate(){if(!this.supported.ui||!this.config.invertTime&&this.currentTime)return;if(this.duration>=2**32){tt(this.elements.display.currentTime,!0),tt(this.elements.progress,!0);return}u.element(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);const e=u.element(this.elements.display.duration);!e&&this.config.displayDuration&&this.paused&&k.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),e&&k.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),this.config.markers.enabled&&k.setMarkers.call(this),k.updateSeekTooltip.call(this)},toggleMenuButton(e,s){tt(this.elements.settings.buttons[e],!s)},updateSetting(e,s,i){const r=this.elements.settings.panels[e];let a=null,l=s;if(e==="captions")a=this.currentTrack;else{if(a=u.empty(i)?this[e]:i,u.empty(a)&&(a=this.config[e].default),!u.empty(this.options[e])&&!this.options[e].includes(a)){this.debug.warn(`Unsupported value of '${a}' for ${e}`);return}if(!this.config[e].options.includes(a)){this.debug.warn(`Disabled value of '${a}' for ${e}`);return}}if(u.element(l)||(l=r&&r.querySelector('[role="menu"]')),!u.element(l))return;const h=this.elements.settings.buttons[e].querySelector(`.${this.config.classNames.menu.value}`);h.innerHTML=k.getLabel.call(this,e,a);const d=l&&l.querySelector(`[value="${a}"]`);u.element(d)&&(d.checked=!0)},getLabel(e,s){switch(e){case"speed":return s===1?fe.get("normal",this.config):`${s}×`;case"quality":if(u.number(s)){const i=fe.get(`qualityLabel.${s}`,this.config);return i.length?i:`${s}p`}return Oi(s);case"captions":return V.getLabel.call(this);default:return null}},setQualityMenu(e){if(!u.element(this.elements.settings.panels.quality))return;const s="quality",i=this.elements.settings.panels.quality.querySelector('[role="menu"]');u.array(e)&&(this.options.quality=Ht(e).filter(l=>this.config.quality.options.includes(l)));const r=!u.empty(this.options.quality)&&this.options.quality.length>1;if(k.toggleMenuButton.call(this,s,r),ri(i),k.checkMenu.call(this),!r)return;const a=l=>{const h=fe.get(`qualityBadge.${l}`,this.config);return h.length?k.createBadge.call(this,h):null};this.options.quality.sort((l,h)=>{const d=this.config.quality.options;return d.indexOf(l)>
1d.indexOf(h)?1:-1}).forEach(l=>{k.createMenuItem.call(this,{value:l,list:i,type:s,title:k.getLabel.call(this,"quality",l),badge:a(l)})}),k.updateSetting.call(this,s,i)},setCaptionsMenu(){if(!u.element(this.elements.settings.panels.captions))return;const e="captions",s=this.elements.settings.panels.captions.querySelector('[role="menu"]'),i=V.getTracks.call(this),r=!!i.length;if(k.toggleMenuButton.call(this,e,r),ri(s),k.checkMenu.call(this),!r)return;const a=i.map((l,h)=>({value:h,checked:this.captions.toggled&&this.currentTrack===h,title:V.getLabel.call(this,l),badge:l.language&&k.createBadge.call(this,l.language.toUpperCase()),list:s,type:"language"}));a.unshift({value:-1,checked:!this.captions.toggled,title:fe.get("disabled",this.config),list:s,type:"language"}),a.forEach(k.createMenuItem.bind(this)),k.updateSetting.call(this,e,s)},setSpeedMenu(){if(!u.element(this.elements.settings.panels.speed))return;const e="speed",s=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter(r=>r>=this.minimumSpeed&&r<=this.maximumSpeed);const i=!u.empty(this.options.speed)&&this.options.speed.length>1;k.toggleMenuButton.call(this,e,i),ri(s),k.checkMenu.call(this),i&&(this.options.speed.forEach(r=>{k.createMenuItem.call(this,{value:r,list:s,type:e,title:k.getLabel.call(this,"speed",r)})}),k.updateSetting.call(this,e,s))},checkMenu(){const{buttons:e}=this.elements.settings,s=!u.empty(e)&&Object.values(e).some(i=>!i.hidden);tt(this.elements.settings.menu,!s)},focusFirstMenuItem(e,s=!1){if(this.elements.settings.popup.hidden)return;let i=e;u.element(i)||(i=Object.values(this.elements.settings.panels).find(a=>!a.hidden));const r=i.querySelector('[role^="menuitem"]');Si.call(this,r,s)},toggleMenu(e){const{popup:s}=this.elements.settings,i=this.elements.buttons.settings;if(!u.element(s)||!u.element(i))return;const{hidden:r}=s;let a=r;if(u.boolean(e))a=e;else if(u.keyboardEvent(e)&&e.key==="Escape")a=!1;else if(u.event(e)){const l=u.function(e.composedPath)?e.composedPath()[0]:e.target,h=s.contains(l);if(h||!h&&e.target!==i&&a)return}i.setAttribute("aria-expanded",a),tt(s,!a),W(this.elements.container,this.config.classNames.menu.open,a),a&&u.keyboardEvent(e)?k.focusFirstMenuItem.call(this,null,!0):!a&&!r&&Si.call(this,i,u.keyboardEvent(e))},getMenuSize(e){const s=e.cloneNode(!0);s.style.position="absolute",s.style.opacity=0,s.removeAttribute("hidden"),e.parentNode.appendChild(s);const i=s.scrollWidth,r=s.scrollHeight;return Ye(s),{width:i,height:r}},showMenuPanel(e="",s=!1){const i=this.elements.container.querySelector(`#plyr-settings-${this.id}-${e}`);if(!u.element(i))return;const r=i.parentNode,a=Array.from(r.children).find(l=>!l.hidden);if(ne.transitions&&!ne.reducedMotion){r.style.width=`${a.scrollWidth}px`,r.style.height=`${a.scrollHeight}px`;const l=k.getMenuSize.call(this,i),h=d=>{d.target!==r||!["width","height"].includes(d.propertyName)||(r.style.width="",r.style.height="",ai.call(this,r,Ai,h))};z.call(this,r,Ai,h),r.style.width=`${l.width}px`,r.style.height=`${l.height}px`}tt(a,!0),tt(i,!1),k.focusFirstMenuItem.call(this,i,s)}
1,setDownloadUrl(){const e=this.elements.buttons.download;u.element(e)&&e.setAttribute("href",this.download)},create(e){const{bindMenuItemShortcuts:s,createButton:i,createProgress:r,createRange:a,createTime:l,setQualityMenu:h,setSpeedMenu:d,showMenuPanel:m}=k;this.elements.controls=null,u.array(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(i.call(this,"play-large"));const g=N("div",je(this.config.selectors.controls.wrapper));this.elements.controls=g;const _={class:"plyr__controls__item"};return Ht(u.array(this.config.controls)?this.config.controls:[]).forEach(y=>{if(y==="restart"&&g.appendChild(i.call(this,"restart",_)),y==="rewind"&&g.appendChild(i.call(this,"rewind",_)),y==="play"&&g.appendChild(i.call(this,"play",_)),y==="fast-forward"&&g.appendChild(i.call(this,"fast-forward",_)),y==="progress"){const v=N("div",{class:`${_.class} plyr__progress__container`}),A=N("div",je(this.config.selectors.progress));if(A.appendChild(a.call(this,"seek",{id:`plyr-seek-${e.id}`})),A.appendChild(r.call(this,"buffer")),this.config.tooltips.seek){const I=N("span",{class:this.config.classNames.tooltip},"00:00");A.appendChild(I),this.elements.display.seekTooltip=I}this.elements.progress=A,v.appendChild(this.elements.progress),g.appendChild(v)}if(y==="current-time"&&g.appendChild(l.call(this,"currentTime",_)),y==="duration"&&g.appendChild(l.call(this,"duration",_)),y==="mute"||y==="volume"){let{volume:v}=this.elements;if((!u.element(v)||!g.contains(v))&&(v=N("div",te({},_,{class:`${_.class} plyr__volume`.trim()})),this.elements.volume=v,g.appendChild(v)),y==="mute"&&v.appendChild(i.call(this,"mute")),y==="volume"&&!he.isIos&&!he.isIPadOS){const A={max:1,step:.05,value:this.config.volume};v.appendChild(a.call(this,"volume",te(A,{id:`plyr-volume-${e.id}`})))}}if(y==="captions"&&g.appendChild(i.call(this,"captions",_)),y==="settings"&&!u.empty(this.config.settings)){const v=N("div",te({},_,{class:`${_.class} plyr__menu`.trim(),hidden:""}));v.appendChild(i.call(this,"settings",{"aria-haspopup":!0,"aria-controls":`plyr-settings-${e.id}`,"aria-expanded":!1}));const A=N("div",{class:"plyr__menu__container",id:`plyr-settings-${e.id}`,hidden:""}),I=N("div"),M=N("div",{id:`plyr-settings-${e.id}-home`}),Y=N("div",{role:"menu"});M.appendChild(Y),I.appendChild(M),this.elements.settings.panels.home=M,this.config.settings.forEach(X=>{const S=N("button",te(je(this.config.selectors.buttons.settings),{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--forward`,role:"menuitem","aria-haspopup":!0,hidden:""}));s.call(this,S,X),z.call(this,S,"click",()=>{m.call(this,X,!1)});const F=N("span",null,fe.get(X,this.config)),re=N("span",{class:this.config.classNames.menu.value});re.innerHTML=e[X],F.appendChild(re),S.appendChild(F),Y.appendChild(S);const we=N("div",{id:`plyr-settings-${e.id}-${X}`,hidden:""}),me=N("button",{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--back`});me.appendChild(N("span",{"aria-hidden":!0},fe.get(X,this.config))),me.appendChild(N("span",{class:this.config.classNames.hidden},fe.get("menuBack",this.config))),z.call(this,we,"keydown",G=>{G.key==="ArrowLeft"&&(G.preventDefault(),G.stopPropagation(),m.call(this,"home",!0))},!1),z.call(this,me,"click",()=>{m.call(this,"home",!1)}),we.appendChild(me),we.appendChild(N("div",{role:"menu"})),I.appendChild(we),this.elements.settings.buttons[X]=S,this.elements.settings.panels[X]=we}),A.appendChild(I),v.appendChild(A),g.appendChild(v),this.elements.settings.popup=A,this.elements.settings.menu=v}if(y==="pip"&&ne.pip&&g.appendChild(i.call(this,"pip",_)),y==="airplay"&&ne.airplay&&g.appendChild(i.call(this,"airplay",_)),y==="download"){const v=te({},_,{element:"a",href:this.download,target:"_blank"});this.isHTML5&&(v.download="");const{download:A}=this.config.urls;!u.url(A)&&this.isEmbed&&te(v,{icon:`logo-${this.provider}`,label:this.provider}),g.appendChild(i.call(this,"download",v))}y==="fullscreen"&&g.appendChild(i.call(this,"fullscreen",_))}),this.isHTML5&&h.call(this,Ce.getQualityOptions.call(this)),d.call(this),g},inject(){if(this.config.loadSprite){const h=k.getIconUrl.call(this);h.cors&&$i(h.url,"sprite-plyr")}this.id=Math.floor(Math.random()*1e4);let e=null;this.elements.controls=null;const s={id:this.id,seektime:this.config.seekTime,title:this.config.title};let i=!0;
1u.function(this.config.controls)&&(this.config.controls=this.config.controls.call(this,s)),this.config.controls||(this.config.controls=[]),u.element(this.config.controls)||u.string(this.config.controls)?e=this.config.controls:(e=k.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:V.getLabel.call(this)}),i=!1);const r=h=>{let d=h;return Object.entries(s).forEach(([m,g])=>{d=He(d,`{${m}}`,g)}),d};i&&u.string(this.config.controls)&&(e=r(e));let a;u.string(this.config.selectors.controls.container)&&(a=document.querySelector(this.config.selectors.controls.container)),u.element(a)||(a=this.elements.container);const l=u.element(e)?"insertAdjacentElement":"insertAdjacentHTML";if(a[l]("afterbegin",e),u.element(this.elements.controls)||k.findElements.call(this),!u.empty(this.elements.buttons)){const h=d=>{const m=this.config.classNames.controlPressed;d.setAttribute("aria-pressed","false"),Object.defineProperty(d,"pressed",{configurable:!0,enumerable:!0,get(){return Dt(d,m)},set(g=!1){W(d,m,g),d.setAttribute("aria-pressed",g?"true":"false")}})};Object.values(this.elements.buttons).filter(Boolean).forEach(d=>{u.array(d)||u.nodeList(d)?Array.from(d).filter(Boolean).forEach(h):h(d)})}if(he.isEdge&&Gi(a),this.config.tooltips.controls){const{classNames:h,selectors:d}=this.config,m=`${d.controls.wrapper} ${d.labels} .${h.hidden}`,g=jt.call(this,m);Array.from(g).forEach(_=>{W(_,this.config.classNames.hidden,!1),W(_,this.config.classNames.tooltip,!0)})}},setMediaMetadata(){try{"mediaSession"in navigator&&(navigator.mediaSession.metadata=new window.MediaMetadata({title:this.config.mediaMetadata.title,artist:this.config.mediaMetadata.artist,album:this.config.mediaMetadata.album,artwork:this.config.mediaMetadata.artwork}))}catch{}},setMarkers(){var e,s;if(!this.duration||this.elements.markers)return;const i=(e=this.config.markers)===null||e===void 0||(s=e.points)===null||s===void 0?void 0:s.filter(({time:m})=>m>0&&m<this.duration);if(!(i!=null&&i.length))return;const r=document.createDocumentFragment(),a=document.createDocumentFragment();let l=null;const h=`${this.config.classNames.tooltip}--visible`,d=m=>W(l,h,m);i.forEach(m=>{const g=N("span",{class:this.config.classNames.marker},""),_=`${m.time/this.duration*100}%`;l&&(g.addEventListener("mouseenter",()=>{m.label||(l.style.left=_,l.innerHTML=m.label,d(!0))}),g.addEventListener("mouseleave",()=>{d(!1)})),g.addEventListener("click",()=>{this.currentTime=m.time}),g.style.left=_,a.appendChild(g)}),r.appendChild(a),this.config.tooltips.seek||(l=N("span",{class:this.config.classNames.tooltip},""),r.appendChild(l)),this.elements.markers={points:a,tip:l},this.elements.progress.appendChild(r)}};function st(e,s=!0){let i=e;if(s){const r=document.createElement("a");r.href=i,i=r.href}try{return new URL(i)}catch{return null}}function xe(e){const s=new URLSearchParams;return u.object(e)&&Object.entries(e).forEach(([i,r])=>{s.set(i,r)}),s}const V={setup(){if(!this.supported.ui)return;if(!this.isVideo||this.isYouTube||this.isHTML5&&!ne.textTracks){u.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&k.setCaptionsMenu.call(this);return}if(u.element(this.elements.captions)||(this.elements.captions=N("div",je(this.config.selectors.captions)),this.elements.captions.setAttribute("dir","auto"),Os(this.elements.captions,this.elements.wrapper)),he.isIE&&window.URL){const a=this.media.querySelectorAll("track");Array.from(a).forEach(l=>{const h=l.getAttribute("src"),d=st(h);d!==null&&d.hostname!==window.location.href.hostname&&["http:","https:"].includes(d.protocol)&&wt(h,"blob").then(m=>{l.setAttribute("src",window.URL.createObjectURL(m))}).catch(()=>{Ye(l)})})}const e=navigator.languages||[navigator.language||navigator.userLanguage||"en"],s=Ht(e.map(a=>a.split("-")[0]));let i=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();i==="auto"&&([i]=s);let r=this.storage.get("captions");if(u.boolean(r)||({active:r}=this.config.captions),Object.assign(this.captions,{toggled:!1,active:r,language:i,languages:s}),this.isHTML5){const a=this.config.captions.update?"addtrack removetrack":"removetrack";z.call(this,this.media.textTracks,a,V.update.bind(this))}setTimeout(V.update.bind(this),0)},update(){const e=V.getTracks.call(this,!0),{active:s,language:i,meta:r,currentTrackNode:a}=this.captions,l=!!e.find(h=>h.language===i);this.isHTML5&&this.isVideo&&e.filter(h=>
1!r.get(h)).forEach(h=>{this.debug.log("Track added",h),r.set(h,{default:h.mode==="showing"}),h.mode==="showing"&&(h.mode="hidden"),z.call(this,h,"cuechange",()=>V.updateCues.call(this))}),(l&&this.language!==i||!e.includes(a))&&(V.setLanguage.call(this,i),V.toggle.call(this,s&&l)),this.elements&&W(this.elements.container,this.config.classNames.captions.enabled,!u.empty(e)),u.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&k.setCaptionsMenu.call(this)},toggle(e,s=!0){if(!this.supported.ui)return;const{toggled:i}=this.captions,r=this.config.classNames.captions.active,a=u.nullOrUndefined(e)?!i:e;if(a!==i){if(s||(this.captions.active=a,this.storage.set({captions:a})),!this.language&&a&&!s){const l=V.getTracks.call(this),h=V.findTrack.call(this,[this.captions.language,...this.captions.languages],!0);this.captions.language=h.language,V.set.call(this,l.indexOf(h));return}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=a),W(this.elements.container,r,a),this.captions.toggled=a,k.updateSetting.call(this,"captions"),$.call(this,this.media,a?"captionsenabled":"captionsdisabled")}setTimeout(()=>{a&&this.captions.toggled&&(this.captions.currentTrackNode.mode="hidden")})},set(e,s=!0){const i=V.getTracks.call(this);if(e===-1){V.toggle.call(this,!1,s);return}if(!u.number(e)){this.debug.warn("Invalid caption argument",e);return}if(!(e in i)){this.debug.warn("Track not found",e);return}if(this.captions.currentTrack!==e){this.captions.currentTrack=e;const r=i[e],{language:a}=r||{};this.captions.currentTrackNode=r,k.updateSetting.call(this,"captions"),s||(this.captions.language=a,this.storage.set({language:a})),this.isVimeo&&this.embed.enableTextTrack(a),$.call(this,this.media,"languagechange")}V.toggle.call(this,!0,s),this.isHTML5&&this.isVideo&&V.updateCues.call(this)},setLanguage(e,s=!0){if(!u.string(e)){this.debug.warn("Invalid language argument",e);return}const i=e.toLowerCase();this.captions.language=i;const r=V.getTracks.call(this),a=V.findTrack.call(this,[i]);V.set.call(this,r.indexOf(a),s)},getTracks(e=!1){return Array.from((this.media||{}).textTracks||[]).filter(i=>!this.isHTML5||e||this.captions.meta.has(i)).filter(i=>["captions","subtitles"].includes(i.kind))},findTrack(e,s=!1){const i=V.getTracks.call(this),r=h=>Number((this.captions.meta.get(h)||{}).default),a=Array.from(i).sort((h,d)=>r(d)-r(h));let l;return e.every(h=>(l=a.find(d=>d.language===h),!l)),l||(s?a[0]:void 0)},getCurrentTrack(){return V.getTracks.call(this)[this.currentTrack]},getLabel(e){let s=e;return!u.track(s)&&ne.textTracks&&this.captions.toggled&&(s=V.getCurrentTrack.call(this)),u.track(s)?u.empty(s.label)?u.empty(s.language)?fe.get("enabled",this.config):e.language.toUpperCase():s.label:fe.get("disabled",this.config)},updateCues(e){if(!this.supported.ui)return;if(!u.element(this.elements.captions)){this.debug.warn("No captions element to render to");return}if(!u.nullOrUndefined(e)&&!Array.isArray(e)){this.debug.warn("updateCues: Invalid input",e);return}let s=e;if(!s){const a=V.getCurrentTrack.call(this);s=Array.from((a||{}).activeCues||[]).map(l=>l.getCueAsHTML()).map(is)}const i=s.map(a=>a.trim()).join(` 2`);if(i!==this.elements.captions.innerHTML){ri(this.elements.captions);const a=N("span",je(this.config.selectors.caption));a.innerHTML=i,this.elements.captions.appendChild(a),$.call(this,this.media,"cuechange")}}},ui={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.7.8/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"S
2D"}},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/oembed.json?url={0}"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}"},googleIMA:{sdk:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",videoFixedRatio:"plyr__video-wrapper--fixed-ratio",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",posterEnabled:"plyr__poster-enabled",ads:"plyr__ads",control:"plyr__control",controlPressed:"plyr__control--pressed",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",cues:"plyr__cues",marker:"plyr__progress__marker",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isTouch:"plyr--is-touch",uiSupported:"plyr--full-ui",noTransition:"plyr--no-transition",display:{time:"plyr__time"},menu:{value:"plyr__menu__value",badge:"plyr__badge",open:"plyr--menu-open"},captions:{enabled:"plyr--captions-enabled",active:"plyr--captions-active"},fullscreen:{enabled:"plyr--fullscreen-enabled",fallback:"plyr--fullscreen-fallback"},pip:{supported:"plyr--pip-supported",active:"plyr--pip-active"},airplay:{supported:"plyr--airplay-supported",active:"plyr--airplay-active"},previewThumbnails:{thumbContainer:"plyr__preview-thumb",thumbContainerShown:"plyr__preview-thumb--is-shown",imageContainer:"plyr__preview-thumb__image-container",timeContainer:"plyr__preview-thumb__time-container",scrubbingContainer:"plyr__preview-scrubbing",scrubbingContainerShown:"plyr__preview-scrubbing--is-shown"}},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id",hash:"data-plyr-embed-hash"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:""},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,referrerPolicy:null,premium:!1},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!1},mediaMetadata:{title:"",artist:"",album:"",artwork:[]},markers:{enabled:!1,points:[]}},Me={active:"picture-in-picture",inactive:"inline"},Se={html5:"html5",youtube:"youtube",vimeo:"vimeo"},Tt={audio:"audio",video:"video"};function kt(e){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(e)?Se.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(e)?Se.vimeo:null}const qt=()=>{};class rs{constructor(s=!1){this.enabled=window.console&&s,this.enabled&&this.log("Debugging enabled")}get log(){return this.enabled?Function.prototype.bind.call(console.log,console):qt}get warn(){return this.enabled?Function.prototype.bind.call(console.warn,console):qt}get error(){return this.enabled?Function.prototype.bind.call(console.error,console):qt}}class _e{constructor(s){C(this,"onChange",()=>{if(!this.supported)return;const i=this.player.elements.buttons.fullscreen;u.element(i)&&(i.pressed=this.active);const r=this.target===this.player.media?this.target:this.player.elements.container;$.call(this.player,r,this.active?"enterfullscreen":"exitfullscreen",!0)}),C(this,"toggleFallback",(i=!1)=>
2{if(i?this.scrollPosition={x:window.scrollX??0,y:window.scrollY??0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=i?"hidden":"",W(this.target,this.player.config.classNames.fullscreen.fallback,i),he.isIos){let r=document.head.querySelector('meta[name="viewport"]');const a="viewport-fit=cover";r||(r=document.createElement("meta"),r.setAttribute("name","viewport"));const l=u.string(r.content)&&r.content.includes(a);i?(this.cleanupViewport=!l,l||(r.content+=`,${a}`)):this.cleanupViewport&&(r.content=r.content.split(",").filter(h=>h.trim()!==a).join(","))}this.onChange()}),C(this,"trapFocus",i=>{if(he.isIos||he.isIPadOS||!this.active||i.key!=="Tab")return;const r=document.activeElement,a=jt.call(this.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),[l]=a,h=a[a.length-1];r===h&&!i.shiftKey?(l.focus(),i.preventDefault()):r===l&&i.shiftKey&&(h.focus(),i.preventDefault())}),C(this,"update",()=>{if(this.supported){let i;this.forceFallback?i="Fallback (forced)":_e.nativeSupported?i="Native":i="Fallback",this.player.debug.log(`${i} fullscreen enabled`)}else this.player.debug.log("Fullscreen not supported and fallback disabled");W(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.supported)}),C(this,"enter",()=>{this.supported&&(he.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!_e.nativeSupported||this.forceFallback?this.toggleFallback(!0):this.prefix?u.empty(this.prefix)||this.target[`${this.prefix}Request${this.property}`]():this.target.requestFullscreen({navigationUI:"hide"}))}),C(this,"exit",()=>{if(this.supported){if(he.isIos&&this.player.config.fullscreen.iosNative)this.player.isVimeo?this.player.embed.exitFullscreen():this.target.webkitEnterFullscreen(),Re(this.player.play());else if(!_e.nativeSupported||this.forceFallback)this.toggleFallback(!1);else if(!this.prefix)(document.cancelFullScreen||document.exitFullscreen).call(document);else if(!u.empty(this.prefix)){const i=this.prefix==="moz"?"Cancel":"Exit";document[`${this.prefix}${i}${this.property}`]()}}}),C(this,"toggle",()=>{this.active?this.exit():this.enter()}),this.player=s,this.prefix=_e.prefix,this.property=_e.property,this.scrollPosition={x:0,y:0},this.forceFallback=s.config.fullscreen.fallback==="force",this.player.elements.fullscreen=s.config.fullscreen.container&&Ls(this.player.elements.container,s.config.fullscreen.container),z.call(this.player,document,this.prefix==="ms"?"MSFullscreenChange":`${this.prefix}fullscreenchange`,()=>{this.onChange()}),z.call(this.player,this.player.elements.container,"dblclick",i=>{u.element(this.player.elements.controls)&&this.player.elements.controls.contains(i.target)||this.player.listeners.proxy(i,this.toggle,"fullscreen")}),z.call(this,this.player.elements.container,"keydown",i=>this.trapFocus(i)),this.update()}static get nativeSupported(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}get useNative(){return _e.nativeSupported&&!this.forceFallback}static get prefix(){if(u.function(document.exitFullscreen))return"";let s="";return["webkit","moz","ms"].some(r=>u.function(document[`${r}ExitFullscreen`])||u.function(document[`${r}CancelFullScreen`])?(s=r,!0):!1),s}static get property(){return this.prefix==="moz"?"FullScreen":"Fullscreen"}get supported(){return[this.player.config.fullscreen.enabled,this.player.isVideo,_e.nativeSupported||this.player.config.fullscreen.fallback,!this.player.isYouTube||_e.nativeSupported||!he.isIos||this.player.config.playsinline&&!this.player.config.fullscreen.iosNative].every(Boolean)}get active(){if(!this.supported)return!1;if(!_e.nativeSupported||this.forceFallback)return Dt(this.target,this.player.config.classNames.fullscreen.fallback);const s=this.prefix?this.target.getRootNode()[`${this.prefix}${this.property}Element`]:this.target.getRootNode().fullscreenElement;return s&&s.shadowRoot?s===this.target.getRootNode().host:s===this.target}get target(){return he.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen??this.player.elements.container}}
vendor: 4,735 bytes, line 2
2function Et(e,s=1){return new Promise((i,r)=>{const a=new Image,l=()=>{delete a.onload,delete a.onerror,(a.naturalWidth>=s?i:r)(a)};Object.assign(a,{onload:l,onerror:l,src:e})})}const Q={addStyleHook(){W(this.elements.container,this.config.selectors.container.replace(".",""),!0),W(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls(e=!1){e&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build(){if(this.listeners.media(),!this.supported.ui){this.debug.warn(`Basic support only for ${this.provider} ${this.type}`),Q.toggleNativeControls.call(this,!0);return}u.element(this.elements.controls)||(k.inject.call(this),this.listeners.controls()),Q.toggleNativeControls.call(this),this.isHTML5&&V.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,k.updateVolume.call(this),k.timeUpdate.call(this),k.durationUpdate.call(this),Q.checkPlaying.call(this),W(this.elements.container,this.config.classNames.pip.supported,ne.pip&&this.isHTML5&&this.isVideo),W(this.elements.container,this.config.classNames.airplay.supported,ne.airplay&&this.isHTML5),W(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout(()=>{$.call(this,this.media,"ready")},0),Q.setTitle.call(this),this.poster&&Q.setPoster.call(this,this.poster,!1).catch(()=>{}),this.config.duration&&k.durationUpdate.call(this),this.config.mediaMetadata&&k.setMediaMetadata.call(this)},setTitle(){let e=fe.get("play",this.config);if(u.string(this.config.title)&&!u.empty(this.config.title)&&(e+=`, ${this.config.title}`),Array.from(this.elements.buttons.play||[]).forEach(s=>{s.setAttribute("aria-label",e)}),this.isEmbed){const s=de.call(this,"iframe");if(!u.element(s))return;const i=u.empty(this.config.title)?"video":this.config.title,r=fe.get("frameTitle",this.config);s.setAttribute("title",r.replace("{title}",i))}},togglePoster(e){W(this.elements.container,this.config.classNames.posterEnabled,e)},setPoster(e,s=!0){return s&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",e),this.elements.poster.removeAttribute("hidden"),li.call(this).then(()=>Et(e)).catch(i=>{throw e===this.poster&&Q.togglePoster.call(this,!1),i}).then(()=>{if(e!==this.poster)throw new Error("setPoster cancelled by later call to setPoster")}).then(()=>(Object.assign(this.elements.poster.style,{backgroundImage:`url('${e}')`,backgroundSize:""}),Q.togglePoster.call(this,!0),e)))},checkPlaying(e){W(this.elements.container,this.config.classNames.playing,this.playing),W(this.elements.container,this.config.classNames.paused,this.paused),W(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach(s=>{Object.assign(s,{pressed:this.playing}),s.setAttribute("aria-label",fe.get(this.playing?"pause":"play",this.config))}),!(u.event(e)&&e.type==="timeupdate")&&Q.toggleControls.call(this)},checkLoading(e){this.loading=["stalled","waiting"].includes(e.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout(()=>{W(this.elements.container,this.config.classNames.loading,this.loading),Q.toggleControls.call(this)},this.loading?250:0)},toggleControls(e){const{controls:s}=this.elements;if(s&&this.config.hideControls){const i=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(!!(e||this.loading||this.paused||s.pressed||s.hover||i))}},migrateStyles(){Object.values({...this.media.style}).filter(e=>!u.empty(e)&&u.string(e)&&e.startsWith("--plyr")).forEach(e=>{this.elements.container.style.setProperty(e,this.media.style.getPropertyValue(e)),this.media.style.removeProperty(e)}),u.empty(this.media.style)&&this.media.removeAttribute("style")}};class Xe{constructor(s){C(this,"firstTouch",()=>{const{player:i}=this,{elements:r}=i;i.touch=!0,W(r.container,i.config.classNames.isTouch,!0)}),C(this,"global",(i=!0)=>{const{player:r}=this;r.config.keyboard.global&&Rt.call(r,window,"keydown keyup",this.handleKey,i,!1),Rt.call(r,document.body,"click",this.toggleMenu,i),Pi.call(r,document.body,"touchstart",this.firstTouch)}),C(this,"container",()=>{const{player:i}=this,{config:r,elements:a,timers:l}=i;!r.keyboard.global&&r.keyboard.focused&&z.call(i,a.container,"keydown keyup",this.handleKey,!1),z.call(i,a.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",m=>{const{controls:g}=a;g&&m.type==="enterfullscreen"&&(g.pressed=!1,g.hover=!1);const _=["touchstart","touchmove","mousemove"].includes(m.type);let y=0;_&&(Q.toggleControls.call(i,!0),y=i.touch?3e3:2e3),clearTimeout(l.controls),l.controls=setTimeout(()=>Q.toggleControls.call(i,!1),y)});const h=()=>
2{if(!i.isVimeo||i.config.vimeo.premium)return;const m=a.wrapper,{active:g}=i.fullscreen,[_,y]=Ee.call(i),v=es(`aspect-ratio: ${_} / ${y}`);if(!g){v?(m.style.width=null,m.style.height=null):(m.style.maxWidth=null,m.style.margin=null);return}const[A,I]=yt(),M=A/I>_/y;v?(m.style.width=M?"auto":"100%",m.style.height=M?"100%":"auto"):(m.style.maxWidth=M?`${I/y*_}px`:null,m.style.margin=M?"0 auto":null)},d=()=>{clearTimeout(l.resized),l.resized=setTimeout(h,50)};z.call(i,a.container,"enterfullscreen exitfullscreen",m=>{const{target:g}=i.fullscreen;if(g!==a.container||!i.isEmbed&&u.empty(i.config.ratio))return;h(),(m.type==="enterfullscreen"?z:ai).call(i,window,"resize",d)})}),C(this,"media",()=>{const{player:i}=this,{elements:r}=i;if(z.call(i,i.media,"timeupdate seeking seeked",l=>k.timeUpdate.call(i,l)),z.call(i,i.media,"durationchange loadeddata loadedmetadata",l=>k.durationUpdate.call(i,l)),z.call(i,i.media,"ended",()=>{i.isHTML5&&i.isVideo&&i.config.resetOnEnd&&(i.restart(),i.pause())}),z.call(i,i.media,"progress playing seeking seeked",l=>k.updateProgress.call(i,l)),z.call(i,i.media,"volumechange",l=>k.updateVolume.call(i,l)),z.call(i,i.media,"playing play pause ended emptied timeupdate",l=>Q.checkPlaying.call(i,l)),z.call(i,i.media,"waiting canplay seeked playing",l=>Q.checkLoading.call(i,l)),i.supported.ui&&i.config.clickToPlay&&!i.isAudio){const l=de.call(i,`.${i.config.classNames.video}`);
2if(!u.element(l))return;z.call(i,r.container,"click",h=>{![r.container,l].includes(h.target)&&!l.contains(h.target)||i.touch&&i.config.hideControls||(i.ended?(this.proxy(h,i.restart,"restart"),this.proxy(h,()=>{Re(i.play())},"play")):this.proxy(h,()=>{Re(i.togglePlay())},"play"))})}i.supported.ui&&i.config.disableContextMenu&&z.call(i,r.wrapper,"contextmenu",l=>{l.preventDefault()},!1),z.call(i,i.media,"volumechange",()=>{i.storage.set({volume:i.volume,muted:i.muted})}),z.call(i,i.media,"ratechange",()=>{k.updateSetting.call(i,"speed"),i.storage.set({speed:i.speed})}),z.call(i,i.media,"qualitychange",l=>{k.updateSetting.call(i,"quality",null,l.detail.quality)}),z.call(i,i.media,"ready qualitychange",()=>{k.setDownloadUrl.call(i)});const a=i.config.events.concat(["keyup","keydown"]).join(" ");z.call(i,i.media,a,l=>{let{detail:h={}}=l;l.type==="error"&&(h=i.media.error),$.call(i,r.container,l.type,!0,h)})}),C(this,"proxy",(i,r,a)=>{const{player:l}=this,h=l.config.listeners[a],d=u.function(h);let m=!0;d&&(m=h.call(l,i)),m!==!1&&u.function(r)&&r.call(l,i)}),C(this,"bind",(i,r,a,l,h=!0)=>{const{player:d}=this,m=d.config.listeners[l],g=u.function(m);z.call(d,i,r,_=>this.proxy(_,a,l),h&&!g)}),C(this,"controls",()=>{const{player:i}=this,{elements:r}=i,a=he.isIE?"change":"input";if(r.buttons.play&&Array.from(r.buttons.play).forEach(l=>{this.bind(l,"click",()=>{Re(i.togglePlay())},"play")}),this.bind(r.buttons.restart,"click",i.restart,"restart"),this.bind(r.buttons.rewind,"click",()=>{i.lastSeekTime=Date.now(),i.rewind()},"rewind"),this.bind(r.buttons.fastForward,"click",()=>{i.lastSeekTime=Date.now(),i.forward()},"fastForward"),this.bind(r.buttons.mute,"click",()=>{i.muted=!i.muted},"mute"),this.bind(r.buttons.captions,"click",()=>i.toggleCaptions()),this.bind(r.buttons.download,"click",()=>{$.call(i,i.media,"download")},"download"),this.bind(r.buttons.fullscreen,"click",()=>{i.fullscreen.toggle()},"fullscreen"),this.bind(r.buttons.pip,"click",()=>{i.pip="toggle"},"pip"),this.bind(r.buttons.airplay,"click",i.airplay,"airplay"),this.bind(r.buttons.settings,"click",l=>{l.stopPropagation(),l.preventDefault(),k.toggleMenu.call(i,l)}
2,null,!1),this.bind(r.buttons.settings,"keyup",l=>{if([" ","Enter"].includes(l.key)){if(l.key==="Enter"){k.focusFirstMenuItem.call(i,null,!0);return}l.preventDefault(),l.stopPropagation(),k.toggleMenu.call(i,l)}},null,!1),this.bind(r.settings.menu,"keydown",l=>{l.key==="Escape"&&k.toggleMenu.call(i,l)}),this.bind(r.inputs.seek,"mousedown mousemove",l=>{const h=r.progress.getBoundingClientRect(),d=100/h.width*(l.pageX-h.left);l.currentTarget.setAttribute("seek-value",d)}),this.bind(r.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",l=>{const h=l.currentTarget,d="play-on-seeked";if(u.keyboardEvent(l)&&!["ArrowLeft","ArrowRight"].includes(l.key))return;i.lastSeekTime=Date.now();const m=h.hasAttribute(d),g=["mouseup","touchend","keyup"].includes(l.type);m&&g?(h.removeAttribute(d),Re(i.play())):!g&&i.playing&&(h.setAttribute(d,""),i.pause())}),he.isIos){const l=jt.call(i,'input[type="range"]');Array.from(l).forEach(h=>this.bind(h,a,d=>Gi(d.target)))}this.bind(r.inputs.seek,a,l=>{const h=l.currentTarget;let d=h.getAttribute("seek-value");u.empty(d)&&(d=h.value),h.removeAttribute("seek-value"),i.currentTime=d/h.max*i.duration},"seek"),this.bind(r.progress,"mouseenter mouseleave mousemove",l=>k.updateSeekTooltip.call(i,l)),this.bind(r.progress,"mousemove touchmove",l=>{const{previewThumbnails:h}=i;h&&h.loaded&&h.startMove(l)}),this.bind(r.progress,"mouseleave touchend click",()=>{const{previewThumbnails:l}=i;l&&l.loaded&&l.endMove(!1,!0)}),this.bind(r.progress,"mousedown touchstart",l=>{const{previewThumbnails:h}=i;h&&h.loaded&&h.startScrubbing(l)}),this.bind(r.progress,"mouseup touchend",l=>{const{previewThumbnails:h}=i;h&&h.loaded&&h.endScrubbing(l)}),he.isWebKit&&Array.from(jt.call(i,'input[type="range"]')).forEach(l=>{this.bind(l,"input",h=>k.updateRangeFill.call(i,h.target))}),i.config.toggleInvert&&!u.element(r.display.duration)&&this.bind(r.display.currentTime,"click",()=>{i.currentTime!==0&&(i.config.invertTime=!i.config.invertTime,k.timeUpdate.call(i))}),this.bind(r.inputs.volume,a,l=>{i.volume=l.target.value},"volume"),this.bind(r.controls,"mouseenter mouseleave",l=>{r.controls.hover=!i.touch&&l.type==="mouseenter"}),r.fullscreen&&Array.from(r.fullscreen.children).filter(l=>
2!l.contains(r.container)).forEach(l=>{this.bind(l,"mouseenter mouseleave",h=>{r.controls&&(r.controls.hover=!i.touch&&h.type==="mouseenter")})}),this.bind(r.controls,"mousedown mouseup touchstart touchend touchcancel",l=>{r.controls.pressed=["mousedown","touchstart"].includes(l.type)}),this.bind(r.controls,"focusin",()=>{const{config:l,timers:h}=i;W(r.controls,l.classNames.noTransition,!0),Q.toggleControls.call(i,!0),setTimeout(()=>{W(r.controls,l.classNames.noTransition,!1)},0);const d=this.touch?3e3:4e3;clearTimeout(h.controls),h.controls=setTimeout(()=>Q.toggleControls.call(i,!1),d)}),this.bind(r.inputs.volume,"wheel",l=>{const h=l.webkitDirectionInvertedFromDevice,[d,m]=[l.deltaX,-l.deltaY].map(y=>h?-y:y),g=Math.sign(Math.abs(d)>Math.abs(m)?d:m);i.increaseVolume(g/50);const{volume:_}=i.media;(g===1&&_<1||g===-1&&_>0)&&l.preventDefault()},"volume",!1)}),this.player=s,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.firstTouch=this.firstTouch.bind(this)}handleKey(s){const{player:i}=this,{elements:r}=i,{key:a,type:l,altKey:h,ctrlKey:d,metaKey:m,shiftKey:g}=s,_=l==="keydown",y=_&&a===this.lastKey;if(h||d||m||g||!a)return;const v=A=>{i.currentTime=i.duration/10*A};if(_){const A=document.activeElement;if(u.element(A)){const{editable:M}=i.config.selectors,{seek:Y}=r.inputs;if(A!==Y&&it(A,M)||s.key===" "&&it(A,'button, [role^="menuitem"]'))return}switch([" ","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","0","1","2","3","4","5","6","7","8","9","c","f","k","l","m"].includes(a)&&(s.preventDefault(),s.stopPropagation()),a){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":y||v(parseInt(a,10));break;case" ":case"k":y||Re(i.togglePlay());break;case"ArrowUp":i.increaseVolume(.1);break;case"ArrowDown":i.decreaseVolume(.1);break;case"m":y||(i.muted=!i.muted);break;case"ArrowRight":i.forward();break;case"ArrowLeft":i.rewind();break;case"f":i.fullscreen.toggle();break;case"c":y||i.toggleCaptions();break;case"l":i.loop=!i.loop;break}a==="Escape"&&!i.fullscreen.usingNative&&i.fullscreen.active&&i.fullscreen.toggle(),this.lastKey=a}else this.lastKey=null}toggleMenu(s){k.toggleMenu.call(this.player,s)}}var Ns=Ne(function(e,s){(function(i,r){e.exports=r()})(le,function(){var i=function(){},r={},a={},l={};function h(v,A){v=v.push?v:[v];var I=[],M=v.length,Y=M,X,S,F,re;for(X=function(we,me){me.length&&I.push(we),Y--,Y||A(I)};M--;){if(S=v[M],F=a[S],F){X(S,F);continue}re=l[S]=l[S]||[],re.push(X)}}function d(v,A){if(v){var I=l[v];if(a[v]=A,!!I)for(;I.length;)I[0](v,A),I.splice(0,1)}}function m(v,A){v.call&&(v={success:v}),A.length?(v.error||i)(A):(v.success||i)(v)}function g(v,A,I,M){var Y=document,X=I.async,S=(I.numRetries||0)+1,F=I.before||i,re=v.replace(/[\?|#].*$/,""),we=v.replace(/^(css|img)!/,""),me,G;M=M||0,/(^css!|\.css$)/.test(re)?(G=Y.createElement("link"),G.rel="stylesheet",G.href=we,me="hideFocus"in G,me&&G.relList&&(me=0,G.rel="preload",G.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(re)?(G=Y.createElement("img"),G.src=we):(G=Y.createElement("script"),G.src=v,G.async=X===void 0?!0:X),G.onload=G.onerror=G.onbeforeload=function(cs){var St=cs.type[0];if(me)try{G.sheet.cssText.length||(St="e")}catch(us){us.code!=18&&(St="e")}if(St=="e"){if(M+=1,M<S)return g(v,A,I,M)}else if(G.rel=="preload"&&G.as=="style")return G.rel="stylesheet";A(v,St,cs.defaultPrevented)},F(v,G)!==!1&&Y.head.appendChild(G)}function _(v,A,I){v=v.push?v:[v];var M=v.length,Y=M,X=[],S,F;for(S=function(re,we,me){if(we=="e"&&X.push(re),we=="b")if(me)X.push(re);else return;M--,M||A(X)},F=0;F<Y;F++)g(v[F],S,I)}function y(v,A,I){var M,Y;if(A&&A.trim&&(M=A),Y=(M?I:A)||{},M){if(M in r)throw"LoadJS";r[M]=!0}function X(S,F){_(v,function(re){m(Y,re),S&&m({success:S,error:F},re),d(M,re)},Y)}if(Y.returnPromise)return new Promise(X);X()}return y.ready=function(A,I){return h(A,function(M){m(I,M)}),y},y.done=function(A){d(A,[])},y.reset=function(){r={},a={},l={}},y.isDefined=function(A){return A in r},y})});function Fe(e){return new Promise((s,i)=>{Ns(e,{success:s,error:i})})}function hi(e){if(u.empty(e))return null;if(u.number(Number(e)))return e;const s=/^.*(vimeo.com\/|video\/)(\d+).*/;return e.match(s)?RegExp.$2:e}function os(e){const s=/^.*(vimeo.com\/|video\/)(\d+)(\?.*&*h=|\/)+([\d,a-f]+)/,i=e.match(s);return i&&i.length===5?i[4]:null}function Qe(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,$.call(this,this.media,e?"play":"pause"))}const Bt={setup(){const e=this;W(e.elements.wrapper,e.config.classNames.embed,!0),e.options.speed=e.config.speed.options,ce.call(e),u.object(window.Vimeo)?Bt.ready.call(e):Fe(e.config.urls.vimeo.sdk).then(()=>{Bt.ready.call(e)}).catch(s=>{e.debug.warn("Vimeo SDK (player.js) failed to load",s)})},ready(){const e=this,s=e.config.vimeo,{premium:i,referrerPolicy:r,...a}=s;let l=e.media.getAttribute("src"),h="";u.empty(l)?(l=e.media.getAttribute(e.config.attributes.embed.id),h=e.media.getAttribute(e.config.attributes.embed.hash)):h=os(l);const d=h?{h}:{};i&&Object.assign(a,{controls:!1,sidedock:!1});const m=xe({loop:e.config.loop.active,autoplay:e.autoplay,muted:e.muted,gesture:"media",playsinline:e.config.playsinline,...d,...a}),g=hi(l),_=N("iframe"),y=ci(e.config.urls.vimeo.iframe,g,m);if(_.setAttribute("src",y),_.setAttribute("allowfullscreen",""),_.setAttribute("allow",["auto
2play","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),u.empty(r)||_.setAttribute("referrerPolicy",r),i||!s.customControls)_.setAttribute("data-poster",e.poster),e.media=oi(_,e.media);else{const S=N("div",{class:e.config.classNames.embedContainer,"data-poster":e.poster});S.appendChild(_),e.media=oi(S,e.media)}s.customControls||wt(ci(e.config.urls.vimeo.api,y)).then(S=>{u.empty(S)||!S.thumbnail_url||Q.setPoster.call(e,S.thumbnail_url).catch(()=>{})}),e.embed=new window.Vimeo.Player(_,{autopause:e.config.autopause,muted:e.muted}),e.media.paused=!0,e.media.currentTime=0,e.supported.ui&&e.embed.disableTextTrack(),e.media.play=()=>(Qe.call(e,!0),e.embed.play()),e.media.pause=()=>(Qe.call(e,!1),e.embed.pause()),e.media.stop=()=>{e.pause(),e.currentTime=0};let{currentTime:v}=e.media;Object.defineProperty(e.media,"currentTime",{get(){return v},set(S){const{embed:F,media:re,paused:we,volume:me}=e,G=we&&!F.hasPlayed;re.seeking=!0,$.call(e,re,"seeking"),Promise.resolve(G&&F.setVolume(0)).then(()=>F.setCurrentTime(S)).then(()=>G&&F.pause()).then(()=>G&&F.setVolume(me)).catch(()=>{})}});let A=e.config.speed.selected;Object.defineProperty(e.media,"playbackRate",{get(){return A},set(S){e.embed.setPlaybackRate(S).then(()=>{A=S,$.call(e,e.media,"ratechange")}).catch(()=>{e.options.speed=[1]})}});let{volume:I}=e.config;Object.defineProperty(e.media,"volume",{get(){return I},set(S){e.embed.setVolume(S).then(()=>{I=S,$.call(e,e.media,"volumechange")})}});let{muted:M}=e.config;Object.defineProperty(e.media,"muted",{get(){return M},set(S){const F=u.boolean(S)?S:!1;e.embed.setMuted(F?!0:e.config.muted).then(()=>{M=F,$.call(e,e.media,"volumechange")})}});let{loop:Y}=e.config;Object.defineProperty(e.media,"loop",{get(){return Y},set(S){const F=u.boolean(S)?S:e.config.loop.active;e.embed.setLoop(F).then(()=>{Y=F})}});let X;e.embed.getVideoUrl().then(S=>{X=S,k.setDownloadUrl.call(e)}).catch(S=>{this.debug.warn(S)}),Object.defineProperty(e.media,"currentSrc",{get(){return X}}),Object.defineProperty(e.media,"ended",{get(){return e.currentTime===e.duration}}),Promise.all([e.embed.getVideoWidth(),e.embed.getVideoHeight()]).then(S=>{const[F,re]=S;e.embed.ratio=Ft(F,re),ce.call(this)}),e.embed.setAutopause(e.config.autopause).then(S=>{e.config.autopause=S}),e.embed.getVideoTitle().then(S=>{e.config.title=S,Q.setTitle.call(this)}),e.embed.getCurrentTime().then(S=>{v=S,$.call(e,e.media,"timeupdate")}),e.embed.getDuration().then(S=>{e.media.duration=S,$.call(e,e.media,"durationchange")}),e.embed.getTextTracks().then(S=>{e.media.textTracks=S,V.setup.call(e)}),e.embed.on("cuechange",({cues:S=[]})=>{const F=S.map(re=>ts(re.text));V.updateCues.call(e,F)}),e.embed.on("loaded",()=>{e.embed.getPaused().then(S=>{Qe.call(e,!S),S||$.call(e,e.media,"playing")}),u.element(e.embed.element)&&e.supported.ui&&e.embed.element.setAttribute("tabindex",-1)}),e.embed.on("bufferstart",()=>{$.call(e,e.media,"waiting")}),e.embed.on("bufferend",()=>{$.call(e,e.media,"playing")}),e.embed.on("play",()=>{Qe.call(e,!0),$.call(e,e.media,"playing")}),e.embed.on("pause",()=>{Qe.call(e,!1)}),e.embed.on("timeupdate",S=>{e.media.seeking=!1,v=S.seconds,$.call(e,e.media,"timeupdate")}),e.embed.on("progress",S=>{e.media.buffered=S.percent,$.call(e,e.media,"progress"),parseInt(S.percent,10)===1&&$.call(e,e.media,"canplaythrough"),e.embed.getDuration().then(F=>{F!==e.media.duration&&(e.media.duration=F,$.call(e,e.media,"durationchange"))})}),e.embed.on("seeked",()=>{e.media.seeking=!1,$.call(e,e.media,"seeked")}),e.embed.on("ended",()=>{e.media.paused=!0,$.call(e,e.media,"ended")}),e.embed.on("error",S=>{e.media.error=S,$.call(e,e.media,"error")}),s.customControls&&setTimeout(()=>Q.build.call(e),0)}};function Ut(e){if(u.empty(e))return null;const s=/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/;return e.match(s)?RegExp.$2:e}function At(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,$.call(this,this.media,e?"play":"pause"))}function as(e){if(e.noCookie)return"https://www.youtube-nocookie.com";if(window.location.protocol==="http:")return"http://www.youtube.com"}const Vt={setup(){if(W(this.elements.wrapper,this.config.classNames.embed,!0),u.object(window.YT)&&u.function(window.YT.Player))Vt.ready.call(this);else{const e=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{u.function(e)&&e(),Vt.ready.call(this)},Fe(this.config.urls.youtube.sdk).catch(s=>{this.debug.warn("YouTube API failed to load",s)})}},getTitle(e){const s=ci(this.config.urls.youtube.api,e);wt(s).then(i=>{if(u.object(i)){const{title:r,height:a,width:l}=i;this.config.title=r,Q.setTitle.call(this),this.embed.ratio=Ft(l,a)}ce.call(this)}).catch(()=>{ce.call(this)})},ready(){const e=this,s=e.config.youtube,i=e.media&&e.media.getAttribute("id");if(!u.empty(i)&&i.startsWith("youtube-"))return;let r=e.media.getAttribute("src");u.empty(r)&&(r=e.media.getAttribute(this.config.attributes.embed.id));const a=Ut(r),l=vt(e.provider),h=N("div",{id:l,"data-poster":s.customControls?e.poster:void 0});if(e.media=oi(h,e.media),s.customControls){const d=m=>`https://i.ytimg.com/vi/${a}/${m}default.jpg`;Et(d("maxres"),121).catch(()=>
2Et(d("sd"),121)).catch(()=>Et(d("hq"))).then(m=>Q.setPoster.call(e,m.src)).then(m=>{m.includes("maxres")||(e.elements.poster.style.backgroundSize="cover")}).catch(()=>{})}e.embed=new window.YT.Player(e.media,{videoId:a,host:as(s),playerVars:te({},{autoplay:e.config.autoplay?1:0,hl:e.config.hl,controls:e.supported.ui&&s.customControls?0:1,disablekb:1,playsinline:e.config.playsinline&&!e.config.fullscreen.iosNative?1:0,cc_load_policy:e.captions.active?1:0,cc_lang_pref:e.config.captions.language,widget_referrer:window?window.location.href:null},s),events:{onError(d){if(!e.media.error){const m=d.data,g={2:"The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.",5:"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.",100:"The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.",101:"The owner of the requested video does not allow it to be played in embedded players.",150:"The owner of the requested video does not allow it to be played in embedded players."}[m]||"An unknown error occurred";e.media.error={code:m,message:g},$.call(e,e.media,"error")}},onPlaybackRateChange(d){const m=d.target;e.media.playbackRate=m.getPlaybackRate(),$.call(e,e.media,"ratechange")},onReady(d){if(u.function(e.media.play))return;const m=d.target;Vt.getTitle.call(e,a),e.media.play=()=>{At.call(e,!0),m.playVideo()},e.media.pause=()=>{At.call(e,!1),m.pauseVideo()},e.media.stop=()=>{m.stopVideo()},e.media.duration=m.getDuration(),e.media.paused=!0,e.media.currentTime=0,Object.defineProperty(e.media,"currentTime",{get(){return Number(m.getCurrentTime())},set(v){e.paused&&!e.embed.hasPlayed&&e.embed.mute(),e.media.seeking=!0,$.call(e,e.media,"seeking"),m.seekTo(v)}}),Object.defineProperty(e.media,"playbackRate",{get(){return m.getPlaybackRate()},set(v){m.setPlaybackRate(v)}});let{volume:g}=e.config;Object.defineProperty(e.media,"volume",{get(){return g},set(v){g=v,m.setVolume(g*100),$.call(e,e.media,"volumechange")}});let{muted:_}=e.config;Object.defineProperty(e.media,"muted",{get(){return _},set(v){const A=u.boolean(v)?v:_;_=A,m[A?"mute":"unMute"](),m.setVolume(g*100),$.call(e,e.media,"volumechange")}}),Object.defineProperty(e.media,"currentSrc",{get(){return m.getVideoUrl()}}),Object.defineProperty(e.media,"ended",{get(){return e.currentTime===e.duration}});const y=m.getAvailablePlaybackRates();e.options.speed=y.filter(v=>e.config.speed.options.includes(v)),e.supported.ui&&s.customControls&&e.media.setAttribute("tabindex",-1),$.call(e,e.media,"timeupdate"),$.call(e,e.media,"durationchange"),clearInterval(e.timers.buffering),e.timers.buffering=setInterval(()=>{e.media.buffered=m.getVideoLoadedFraction(),(e.media.lastBuffered===null||e.media.lastBuffered<e.media.buffered)&&$.call(e,e.media,"progress"),e.media.lastBuffered=e.media.buffered,e.media.buffered===1&&(clearInterval(e.timers.buffering),$.call(e,e.media,"canplaythrough"))},200),s.customControls&&setTimeout(()=>Q.build.call(e),50)},onStateChange(d){const m=d.target;switch(clearInterval(e.timers.playing),e.media.seeking&&[1,2].includes(d.data)&&(e.media.seeking=!1,$.call(e,e.media,"seeked")),d.data){case-1:$.call(e,e.media,"timeupdate"),e.media.buffered=m.getVideoLoadedFraction(),$.call(e,e.media,"progress");break;case 0:At.call(e,!1),e.media.loop?(m.stopVideo(),m.playVideo()):$.call(e,e.media,"ended");break;case 1:s.customControls&&!e.config.autoplay&&e.media.paused&&!e.embed.hasPlayed?e.media.pause():(At.call(e,!0),$.call(e,e.media,"playing"),e.timers.playing=setInterval(()=>{$.call(e,e.media,"timeupdate")},50),e.media.duration!==m.getDuration()&&(e.media.duration=m.getDuration(),$.call(e,e.media,"durationchange")));break;case 2:e.muted||e.embed.unMute(),At.call(e,!1);break;case 3:$.call(e,e.media,"waiting");break}$.call(e,e.elements.container,"statechange",!1,{code:d.data})}}})}},ut={setup(){if(!this.media){this.debug.warn("No media element found!");return}W(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),W(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&W(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=N("div",{class:this.config.classNames.video}),It(this.media,this.elements.wrapper),this.elements.poster=N("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?Ce.setup.call(this):this.isYouTube?Vt.setup.call(this):this.isVimeo&&Bt.setup.call(this)}},$s=e=>{e.manager&&e.manager.destroy(),e.elements.displayContainer&&e.elements.displayContainer.destroy(),e.elements.container.remove()};class ls{constructor(s){C(this,"load",()=>{this.enabled&&(!u.object(window.google)||!u.object(window.google.ima)?Fe(this.player.config.urls.googleIMA.sdk).then(()=>{this.ready()}).catch(()=>{this.trigger("error",new Error("Google IMA SDK failed to load"))}):this.ready())}),C(this,"ready",()=>{this.enabled||$s(this),this.startSafetyTimer(12e3,"ready()"),this.managerPromise.then(()=>{this.clearSafetyTimer("onAdsManagerLoaded()")}),this.listeners(),this.setupIMA()}),C(this,"setupIMA",()=>{this.elements.container=N("div",{class:this.player.config.classNames.ads}),this.player.elements.container.appendChild(this.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(this.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.player.config.playsinline),this.elements.displayContainer=new google.ima.AdDisplayContainer(this.elements.container,this.player.media),this.loader=new google.ima.AdsLoader(this.elements.displayContainer),this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,i=>this.onAdsManagerLoaded(i),!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,i=>this.onAdError(i),!1),this.requestAds()}),C(this,"requestAds",()=>{const{container:i}=this.player.elements;try{const r=new google.ima.AdsRequest;r.adTagUrl=this.tagUrl,r.linearAdSlotWidth=i.offsetWidth,r.linearAdSlotHeight=i.offsetHeight,r.nonLinearAdSlotWidth=i.offsetWidth,r.nonLinearAdSlotHeight=i.offsetHeight,r.forceNonLinearFullSlot=!1,r.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(r)}catch(r){this.onAdError(r)}}),C(this,"pollCountdown",(i=!1)=>
vendor: 5,081 bytes, line 2
2{if(!i){clearInterval(this.countdownTimer),this.elements.container.removeAttribute("data-badge-text");return}const r=()=>{const a=Pe(Math.max(this.manager.getRemainingTime(),0)),l=`${fe.get("advertisement",this.player.config)} - ${a}`;this.elements.container.setAttribute("data-badge-text",l)};this.countdownTimer=setInterval(r,100)}),C(this,"onAdsManagerLoaded",i=>{if(!this.enabled)return;const r=new google.ima.AdsRenderingSettings;r.restoreCustomPlaybackStateOnAdBreakComplete=!0,r.enablePreloading=!0,this.manager=i.getAdsManager(this.player,r),this.cuePoints=this.manager.getCuePoints(),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,a=>this.onAdError(a)),Object.keys(google.ima.AdEvent.Type).forEach(a=>{this.manager.addEventListener(google.ima.AdEvent.Type[a],l=>this.onAdEvent(l))}),this.trigger("loaded")}),C(this,"addCuePoints",()=>{u.empty(this.cuePoints)||this.cuePoints.forEach(i=>{if(i!==0&&i!==-1&&i<this.player.duration){const r=this.player.elements.progress;if(u.element(r)){const a=100/this.player.duration*i,l=N("span",{class:this.player.config.classNames.cues});l.style.left=`${a.toString()}%`,r.appendChild(l)}}})}),C(this,"onAdEvent",i=>{const{container:r}=this.player.elements,a=i.getAd(),l=i.getAdData();switch((d=>{$.call(this.player,this.player.media,`ads${d.replace(/_/g,"").toLowerCase()}`)})(i.type),i.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),this.pollCountdown(!0),a.isLinear()||(a.width=r.offsetWidth,a.height=r.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:this.manager.setVolume(this.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.player.ended?this.loadAds():this.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.pollCountdown(),this.resumeContent();break;case google.ima.AdEvent.Type.LOG:l.adError&&this.player.debug.warn(`Non-fatal ad error: ${l.adError.getMessage()}`);break}}),C(this,"onAdError",i=>{this.cancel(),this.player.debug.warn("Ads error",i)}),C(this,"listeners",()=>{const{container:i}=this.player.elements;let r;this.player.on("canplay",()=>{this.addCuePoints()}),this.player.on("ended",()=>{this.loader.contentComplete()}),this.player.on("timeupdate",()=>{r=this.player.currentTime}),this.player.on("seeked",()=>{const a=this.player.currentTime;u.empty(this.cuePoints)||this.cuePoints.forEach((l,h)=>{r<l&&l<a&&(this.manager.discardAdBreak(),this.cuePoints.splice(h,1))})}),window.addEventListener("resize",()=>{this.manager&&this.manager.resize(i.offsetWidth,i.offsetHeight,google.ima.ViewMode.NORMAL)})}),C(this,"play",()=>{const{container:i}=this.player.elements;this.managerPromise||this.resumeContent(),this.managerPromise.then(()=>{this.manager.setVolume(this.player.volume),this.elements.displayContainer.initialize();try{this.initialized||(this.manager.init(i.offsetWidth,i.offsetHeight,google.ima.ViewMode.NORMAL),this.manager.start()),this.initialized=!0}catch(r){this.onAdError(r)}}).catch(()=>{})}),C(this,"resumeContent",()=>{this.elements.container.style.zIndex="",this.playing=!1,Re(this.player.media.play())}),C(this,"pauseContent",()=>{this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()}),C(this,"cancel",()=>{this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()}),C(this,"loadAds",()=>{this.managerPromise.then(()=>{this.manager&&this.manager.destroy(),this.managerPromise=new Promise(i=>{this.on("loaded",i),this.player.debug.log(this.manager)}),this.initialized=!1,this.requestAds()}).catch(()=>{})}),C(this,"trigger",(i,...r)=>{const a=this.events[i];u.array(a)&&a.forEach(l=>{u.function(l)&&l.apply(this,r)})}),C(this,"on",(i,r)=>(u.array(this.events[i])||(this.events[i]=[]),this.events[i].push(r),this)),C(this,"startSafetyTimer",(i,r)=>{this.player.debug.log(`Safety timer invoked from: ${r}`),this.safetyTimer=setTimeout(()=>{this.cancel(),this.clearSafetyTimer("startSafetyTimer()")},i)}),C(this,"clearSafetyTimer",i=>{u.nullOrUndefined(this.safetyTimer)||(this.player.debug.log(`Safety timer cleared from: ${i}`),clearTimeout(this.safetyTimer),this.safetyTimer=null)}),this.player=s,this.config=s.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise((i,r)=>{this.on("loaded",i),this.on("error",r)}),this.load()}get enabled(){const{config:s}=this;return this.player.isHTML5&&this.player.isVideo&&s.enabled&&(!u.empty(s.publisherId)||u.url(s.tagUrl))}get tagUrl(){const{config:s}=this;if(u.url(s.tagUrl))return s.tagUrl;const i={AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:s.publisherId};return`https://go.aniview.com/api/adserver6/vast/?${xe(i)}`}}function di(e=0,s=0,i=255){return Math.min(Math.max(e,s),i)}const fi=e=>{const s=[];
2return e.split(/\r\n\r\n|\n\n|\r\r/).forEach(r=>{const a={};r.split(/\r\n|\n|\r/).forEach(h=>{if(u.number(a.startTime)){if(!u.empty(h.trim())&&u.empty(a.text)){const d=h.trim().split("#xywh=");[a.text]=d,d[1]&&([a.x,a.y,a.w,a.h]=d[1].split(","))}}else{const d=h.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/);d&&(a.startTime=Number(d[1]||0)*60*60+Number(d[2])*60+Number(d[3])+ +`0.${d[4]}`,a.endTime=Number(d[6]||0)*60*60+Number(d[7])*60+Number(d[8])+ +`0.${d[9]}`)}}),a.text&&s.push(a)}),s},pi=(e,s)=>{const i=s.width/s.height,r={};return e>i?(r.width=s.width,r.height=1/e*s.width):(r.height=s.height,r.width=e*s.height),r};class Di{constructor(s){C(this,"load",()=>{this.player.elements.display.seekTooltip&&(this.player.elements.display.seekTooltip.hidden=this.enabled),this.enabled&&this.getThumbnails().then(()=>{this.enabled&&(this.render(),this.determineContainerAutoSizing(),this.listeners(),this.loaded=!0)})}),C(this,"getThumbnails",()=>new Promise(i=>{const{src:r}=this.player.config.previewThumbnails;if(u.empty(r))throw new Error("Missing previewThumbnails.src config attribute");const a=()=>{this.thumbnails.sort((l,h)=>l.height-h.height),this.player.debug.log("Preview thumbnails",this.thumbnails),i()};if(u.function(r))r(l=>{this.thumbnails=l,a()});else{const h=(u.string(r)?[r]:r).map(d=>this.getThumbnail(d));Promise.all(h).then(a)}})),C(this,"getThumbnail",i=>new Promise(r=>{wt(i).then(a=>{const l={frames:fi(a),height:null,urlPrefix:""};!l.frames[0].text.startsWith("/")&&!l.frames[0].text.startsWith("http://")&&!l.frames[0].text.startsWith("https://")&&(l.urlPrefix=i.substring(0,i.lastIndexOf("/")+1));const h=new Image;h.onload=()=>{l.height=h.naturalHeight,l.width=h.naturalWidth,this.thumbnails.push(l),r()},h.src=l.urlPrefix+l.frames[0].text})})),C(this,"startMove",i=>
2{if(this.loaded&&!(!u.event(i)||!["touchmove","mousemove"].includes(i.type))&&this.player.media.duration){if(i.type==="touchmove")this.seekTime=this.player.media.duration*(this.player.elements.inputs.seek.value/100);else{var r,a;const l=this.player.elements.progress.getBoundingClientRect(),h=100/l.width*(i.pageX-l.left);this.seekTime=this.player.media.duration*(h/100),this.seekTime<0&&(this.seekTime=0),this.seekTime>this.player.media.duration-1&&(this.seekTime=this.player.media.duration-1),this.mousePosX=i.pageX,this.elements.thumb.time.innerText=Pe(this.seekTime);const d=(r=this.player.config.markers)===null||r===void 0||(a=r.points)===null||a===void 0?void 0:a.find(({time:m})=>m===Math.round(this.seekTime));d&&this.elements.thumb.time.insertAdjacentHTML("afterbegin",`${d.label}<br>`)}this.showImageAtCurrentTime()}}),C(this,"endMove",()=>{this.toggleThumbContainer(!1,!0)}),C(this,"startScrubbing",i=>{(u.nullOrUndefined(i.button)||i.button===!1||i.button===0)&&(this.mouseDown=!0,this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))}),C(this,"endScrubbing",()=>{this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):Pi.call(this.player,this.player.media,"timeupdate",()=>{this.mouseDown||this.toggleScrubbingContainer(!1)})}),C(this,"listeners",()=>{this.player.on("play",()=>{this.toggleThumbContainer(!1,!0)}),this.player.on("seeked",()=>{this.toggleThumbContainer(!1)}),this.player.on("timeupdate",()=>{this.lastTime=this.player.media.currentTime})}),C(this,"render",()=>{this.elements.thumb.container=N("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=N("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);const i=N("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=N("span",{},"00:00"),i.appendChild(this.elements.thumb.time),this.elements.thumb.imageContainer.appendChild(i),u.element(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=N("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)}),C(this,"destroy",()=>{this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()}),C(this,"showImageAtCurrentTime",()=>{this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();const i=this.thumbnails[0].frames.findIndex(l=>this.seekTime>=l.startTime&&this.seekTime<=l.endTime),r=i>=0;let a=0;this.mouseDown||this.toggleThumbContainer(r),r&&(this.thumbnails.forEach((l,h)=>{this.loadedImages.includes(l.frames[i].text)&&(a=h)}),i!==this.showingThumb&&(this.showingThumb=i,this.loadImage(a)))}),C(this,"loadImage",(i=0)=>{const r=this.showingThumb,a=this.thumbnails[i],{urlPrefix:l}=a,h=a.frames[r],d=a.frames[r].text,m=l+d;if(!this.currentImageElement||this.currentImageElement.dataset.filename!==d){this.loadingImage&&this.usingSprites&&(this.loadingImage.onload=null);const g=new Image;g.src=m,g.dataset.index=r,g.dataset.filename=d,this.showingThumbFilename=d,this.player.debug.log(`Loading image: ${m}`),g.onload=()=>this.showImage(g,h,i,r,d,!0),this.loadingImage=g,this.removeOldImages(g)}else this.showImage(this.currentImageElement,h,i,r,d,!1),this.currentImageElement.dataset.index=r,this.removeOldImages(this.currentImageElement)}),C(this,"showImage",(i,r,a,l,h,d=!0)=>{this.player.debug.log(`Showing thumb: ${h}. num: ${l}. qual: ${a}. newimg: ${d}`),this.setImageSizeAndOffset(i,r),d&&(this.currentImageContainer.appendChild(i),this.currentImageElement=i,this.loadedImages.includes(h)||this.loadedImages.push(h)),this.preloadNearby(l,!0).then(this.preloadNearby(l,!1)).then(this.getHigherQuality(a,i,r,h))}),C(this,"removeOldImages",i=>
vendor: 4,382 bytes, line 2
2{Array.from(this.currentImageContainer.children).forEach(r=>{if(r.tagName.toLowerCase()!=="img")return;const a=this.usingSprites?500:1e3;if(r.dataset.index!==i.dataset.index&&!r.dataset.deleting){r.dataset.deleting=!0;const{currentImageContainer:l}=this;setTimeout(()=>{l.removeChild(r),this.player.debug.log(`Removing thumb: ${r.dataset.filename}`)},a)}})}),C(this,"preloadNearby",(i,r=!0)=>new Promise(a=>{setTimeout(()=>{const l=this.thumbnails[0].frames[i].text;if(this.showingThumbFilename===l){let h;r?h=this.thumbnails[0].frames.slice(i):h=this.thumbnails[0].frames.slice(0,i).reverse();let d=!1;h.forEach(m=>{const g=m.text;if(g!==l&&!this.loadedImages.includes(g)){d=!0,this.player.debug.log(`Preloading thumb filename: ${g}`);const{urlPrefix:_}=this.thumbnails[0],y=_+g,v=new Image;v.src=y,v.onload=()=>{this.player.debug.log(`Preloaded thumb filename: ${g}`),this.loadedImages.includes(g)||this.loadedImages.push(g),a()}}}),d||a()}},300)})),C(this,"getHigherQuality",(i,r,a,l)=>{if(i<this.thumbnails.length-1){let h=r.naturalHeight;this.usingSprites&&(h=a.h),h<this.thumbContainerHeight&&setTimeout(()=>{this.showingThumbFilename===l&&(this.player.debug.log(`Showing higher quality thumb for: ${l}`),this.loadImage(i+1))},300)}}),C(this,"toggleThumbContainer",(i=!1,r=!1)=>{const a=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(a,i),!i&&r&&(this.showingThumb=null,this.showingThumbFilename=null)}),C(this,"toggleScrubbingContainer",(i=!1)=>{const r=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(r,i),i||(this.showingThumb=null,this.showingThumbFilename=null)}),C(this,"determineContainerAutoSizing",()=>{(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)}),C(this,"setThumbContainerSizeAndPos",()=>{const{imageContainer:i}=this.elements.thumb;if(this.sizeSpecifiedInCSS){if(i.clientHeight>20&&i.clientWidth<20){const r=Math.floor(i.clientHeight*this.thumbAspectRatio);i.style.width=`${r}px`}else if(i.clientHeight<20&&i.clientWidth>20){const r=Math.floor(i.clientWidth/this.thumbAspectRatio);i.style.height=`${r}px`}}else{const r=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);i.style.height=`${this.thumbContainerHeight}px`,i.style.width=`${r}px`}this.setThumbContainerPos()}),C(this,"setThumbContainerPos",()=>{const i=this.player.elements.progress.getBoundingClientRect(),r=this.player.elements.container.getBoundingClientRect(),{container:a}=this.elements.thumb,l=r.left-i.left+10,h=r.right-i.left-a.clientWidth-10,d=this.mousePosX-i.left-a.clientWidth/2,m=di(d,l,h);a.style.left=`${m}px`,a.style.setProperty("--preview-arrow-offset",`${d-m}px`)}),C(this,"setScrubbingContainerSize",()=>{const{width:i,height:r}=pi(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});this.elements.scrubbing.container.style.width=`${i}px`,this.elements.scrubbing.container.style.height=`${r}px`}),C(this,"setImageSizeAndOffset",(i,r)=>{if(!this.usingSprites)return;const a=this.thumbContainerHeight/r.h;i.style.height=`${i.naturalHeight*a}px`,i.style.width=`${i.naturalWidth*a}px`,i.style.left=`-${r.x*a}px`,i.style.top=`-${r.y*a}px`}),this.player=s,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}get enabled(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}get currentImageContainer(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}get usingSprites(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}get thumbAspectRatio(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}get thumbContainerHeight(){if(this.mouseDown){const{height:s}=pi(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});return s}return this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}get currentImageElement(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbn
2ailImageElement}set currentImageElement(s){this.mouseDown?this.currentScrubbingImageElement=s:this.currentThumbnailImageElement=s}}const Ct={insertElements(e,s){u.string(s)?Ji(e,this.media,{src:s}):u.array(s)&&s.forEach(i=>{Ji(e,this.media,i)})},change(e){if(!at(e,"sources.length")){this.debug.warn("Invalid source format");return}Ce.cancelRequests.call(this),this.destroy.call(this,()=>{this.options.quality=[],Ye(this.media),this.media=null,u.element(this.elements.container)&&this.elements.container.removeAttribute("class");const{sources:s,type:i}=e,[{provider:r=Se.html5,src:a}]=s,l=r==="html5"?i:"div",h=r==="html5"?{}:{src:a};Object.assign(this,{provider:r,type:i,supported:ne.check(i,r,this.config.playsinline),media:N(l,h)}),this.elements.container.appendChild(this.media),u.boolean(e.autoplay)&&(this.config.autoplay=e.autoplay),this.isHTML5&&(this.config.crossorigin&&this.media.setAttribute("crossorigin",""),this.config.autoplay&&this.media.setAttribute("autoplay",""),u.empty(e.poster)||(this.poster=e.poster),this.config.loop.active&&this.media.setAttribute("loop",""),this.config.muted&&this.media.setAttribute("muted",""),this.config.playsinline&&this.media.setAttribute("playsinline","")),Q.addStyleHook.call(this),this.isHTML5&&Ct.insertElements.call(this,"source",s),this.config.title=e.title,ut.setup.call(this),this.isHTML5&&Object.keys(e).includes("tracks")&&Ct.insertElements.call(this,"track",e.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Q.build.call(this),this.isHTML5&&this.media.load(),u.empty(e.previewThumbnails)||(Object.assign(this.config.previewThumbnails,e.previewThumbnails),this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new Di(this))),this.fullscreen.update()},!0)}};class Wt{constructor(s,i){if(C(this,"play",()=>u.function(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then(()=>this.ads.play()).catch(()=>Re(this.media.play())),this.media.play()):null),C(this,"pause",()=>!this.playing||!u.function(this.media.pause)?null:this.media.pause()),C(this,"togglePlay",d=>(u.boolean(d)?d:!this.playing)?this.play():this.pause()),C(this,"stop",()=>{this.isHTML5?(this.pause(),this.restart()):u.function(this.media.stop)&&this.media.stop()}),C(this,"restart",()=>{this.currentTime=0}),C(this,"rewind",d=>{this.currentTime-=u.number(d)?d:this.config.seekTime}),C(this,"forward",d=>{this.currentTime+=u.number(d)?d:this.config.seekTime}),C(this,"increaseVolume",d=>{const m=this.media.muted?0:this.volume;this.volume=m+(u.number(d)?d:0)}),C(this,"decreaseVolume",d=>{this.increaseVolume(-d)}),C(this,"airplay",()=>{ne.airplay&&this.media.webkitShowPlaybackTargetPicker()}),C(this,"toggleControls",d=>{if(this.supported.ui&&!this.isAudio){const m=Dt(this.elements.container,this.config.classNames.hideControls),g=typeof d>"u"?void 0:!d,_=W(this.elements.container,this.config.classNames.hideControls,g);if(_&&u.array(this.config.controls)&&this.config.controls.includes("settings")&&!u.empty(this.config.settings)&&k.toggleMenu.call(this,!1),_!==m){const y=_?"controlshidden":"controlsshown";$.call(this,this.media,y)}return!_}return!1}),C(this,"on",(d,m)=>{z.call(this,this.elements.container,d,m)}),C(this,"once",(d,m)=>{Pi.call(this,this.elements.container,d,m)}),C(this,"off",(d,m)=>{ai(this.elements.container,d,m)}),C(this,"destroy",(d,m=!1)=>{if(!this.ready)return;const g=()=>{document.body.style.overflow="",this.embed=null,m?(Object.keys(this.elements).length&&(Ye(this.elements.buttons.play),Ye(this.elements.captions),Ye(this.elements.controls),Ye(this.elements.wrapper),this.elements.buttons.play=null,this.elements.captions=null,this.elements.controls=null,this.elements.wrapper=null),u.function(d)&&d()):(bt.call(this),Ce.cancelRequests.call(this),oi(this.elements.original,this.elements.container),$.call(this,this.elements.original,"destroyed",!0),u.function(d)&&d.call(this.elements.original),this.ready=!1,setTimeout(()=>{this.elements=null,this.media=null},200))};this.stop(),clearTimeout(this.timers.loading),clearTimeout(this.timers.controls),clearTimeout(this.timers.resized),this.isHTML5?(Q.toggleNativeControls.call(this,!0),g()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),this.embed!==null&&u.function(this.embed.destroy)&&this.embed.destroy(),g()):this.isVimeo&&(this.embed!==null&&this.embed.unload().then(g),setTimeout(g,200))}),C(this,"supports",d=>
2ne.mime.call(this,d)),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=ne.touch,this.media=s,u.string(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||u.nodeList(this.media)||u.array(this.media))&&(this.media=this.media[0]),this.config=te({},ui,Wt.defaults,i||{},(()=>{try{return JSON.parse(this.media.getAttribute("data-plyr-config"))}catch{return{}}})()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new rs(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",ne),u.nullOrUndefined(this.media)||!u.element(this.media)){this.debug.error("Setup failed: no suitable element passed");return}if(this.media.plyr){this.debug.warn("Target already setup");return}if(!this.config.enabled){this.debug.error("Setup failed: disabled by config");return}if(!ne.check().api){this.debug.error("Setup failed: no support");return}const r=this.media.cloneNode(!0);r.autoplay=!1,this.elements.original=r;const a=this.media.tagName.toLowerCase();let l=null,h=null;switch(a){case"div":if(l=this.media.querySelector("iframe"),u.element(l)){if(h=st(l.getAttribute("src")),this.provider=kt(h.toString()),this.elements.container=this.media,this.media=l,this.elements.container.className="",h.search.length){const d=["1","true"];d.includes(h.searchParams.get("autoplay"))&&(this.config.autoplay=!0),d.includes(h.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=d.includes(h.searchParams.get("playsinline")),this.config.youtube.hl=h.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(u.empty(this.provider)||!Object.values(Se).includes(this.provider)){this.debug.error("Setup failed: Invalid provider");return}this.type=Tt.video;break;case"video":case"audio":this.type=a,this.provider=Se.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),(this.media.hasAttribute("playsinline")||this.media.hasAttribute("webkit-playsinline"))&&(this.config.playsinline=!0),this.media.hasAttribute("muted")&&(this.config.muted=!0),this.media.hasAttribute("loop")&&(this.config.loop.active=!0);break;default:this.debug.error("Setup failed: unsupported type");return}if(this.supported=ne.check(this.type,this.provider),!this.supported.api){this.debug.error("Setup failed: no support");return}this.eventListeners=[],this.listeners=new Xe(this),this.storage=new _t(this),this.media.plyr=this,u.element(this.elements.container)||(this.elements.container=N("div"),It(this.media,this.elements.container)),Q.migrateStyles.call(this),Q.addStyleHook.call(this),ut.setup.call(this),this.config.debug&&z.call(this,this.elements.container,this.config.events.join(" "),d=>{this.debug.log(`event: ${d.type}`)}),this.fullscreen=new _e(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Q.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new ls(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",()=>Re(this.play())),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new Di(this))}get isHTML5(){return this.provider===Se.html5}get isEmbed(){return this.isYouTube||this.isVimeo}get isYouTube(){return this.provider===Se.youtube}get isVimeo(){return this.provider===Se.vimeo}get isVideo(){return this.type===Tt.video}get isAudio(){return this.type===Tt.audio}get playing(){return!!(this.ready&&!this.paused&&!this.ended)}get paused(){return!!this.media.paused}get stopped(){return!!(this.paused&&this.currentTime===0)}get ended(){return!!this.media.ended}set currentTime(s){if(!this.duration)return;const i=u.number(s)&&s>0;this.media.currentTime=i?Math.min(s,this.duration):0,this.debug.log(`Seeking to ${this.currentTime} seconds`)}get currentTime(){return Number(this.media.currentTime)}get buffered(){const{buffered:s}=this.media;return u.number(s)?s:s&&s.length&&this.duration>0?s.end(0)/this.duration:0}get seeking(){return!!this.media.seeking}get duration(){const s=parseFloat(this.config.duration),i=(this.media||{}).duration,r=!u.number(i)||i===1/0?0:i;return s||r}set volume(s){let i=s;const r=1,a=0;u.string(i)&&(i=Number(i)),u.number(i)||(i=this.storage.get("volume")),u.number(i)||({volume:i}=this.config),i>r&&(i=r),i<a&&(i=a),this.config.volume=i,this.media.volume=i,!u.empty(s)&&this.muted&&i>0&&(this.muted=!1)}get volume(){return Number(this.media.volume)}set muted(s){let i=s;u.boolean(i)||(i=this.storage.get("muted")),u.boolean(i)||(i=this.config.muted),this.config.muted=i,this.media.muted=i}get muted(){return!!this.media.muted}get hasAudio(){return!this.isHTML5||this.isAudio?!0:!!this.media.mozHasAudio||!!this.media.webkitAudioDecodedByteCount||!!(this.media.audioTracks&&this.media.audioTracks.length)}set speed(s){let i=null;u.number(s)&&(i=s),u.number(i)||(i=this.storage.get("speed")),u.number(i)||(i=this.config.speed.selected);const{minimumSpeed:r,maximumSpeed:a}=this;i=di(i,r,a),this.config.speed.selected=i,setTimeout(()=>{this.media&&(this.media.playbackRate=i)},0)}get speed(){return Number(this.media.playbackRate)}get minimumSpeed(){return this.isYouTube?Math.min(...this.options.speed):this.isVimeo?.5:.0625}get maximumSpeed(){return this.isYouTube?Math.max(...this.options.speed):this.isVimeo?2:16}set quality(s){const i=this.config.quality,r=this.options.quality;if(!r.length)return;let a=[!u.empty(s)&&Number(s),this.storage.get("quality"),i.selected,i.default].find(u.number),l=!0;if(!r.includes(a)){const h=Zi(r,a);this.debug.warn(`Unsupported quality option: ${a}, using ${h} instead`),a=h,l=!1}i.selected=a,this.media.quality=a,l&&this.storage.set({quality:a})}get quality(){return this.media.quality}set loop(s){const i=u.boolean(s)?s:this.config.loop.active;this.config.loop.active=i,this.media.loop=i}get loop(){return!!this.media.loop}set source(s){Ct.change.call(this,s)}get source(){return this.media.currentSrc}get download(){const{download:s}=this.config.urls;return u.url(s)?s:this.source}set download(s){u.url(s)&&(this.config.urls.download=s,k.setDownloadUrl.call(this))}set poster(s){if(!this.isVideo){this.debug.warn("Poster can only be set for video");return}Q.setPoster.call(this,s,!1).catch(()=>{})}get poster(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null}get ratio(){if(!this.isVideo)return null;const s=ve(Ee.call(this));return u.array(s)?s.join(":"):s}set ratio(s){if(!this.isVideo){this.debug.warn("Aspect ratio can only be set for video");return}if(!u.string(s)||!ye(s)){this.debug.error(`Invalid aspect ratio specified (${s})`);return}this.config.ratio=ve(s),ce.call(this)}
2set autoplay(s){this.config.autoplay=u.boolean(s)?s:this.config.autoplay}get autoplay(){return!!this.config.autoplay}toggleCaptions(s){V.toggle.call(this,s,!1)}set currentTrack(s){V.set.call(this,s,!1),V.setup.call(this)}get currentTrack(){const{toggled:s,currentTrack:i}=this.captions;return s?i:-1}set language(s){V.setLanguage.call(this,s,!1)}get language(){return(V.getCurrentTrack.call(this)||{}).language}set pip(s){if(!ne.pip)return;const i=u.boolean(s)?s:!this.pip;u.function(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(i?Me.active:Me.inactive),u.function(this.media.requestPictureInPicture)&&(!this.pip&&i?this.media.requestPictureInPicture():this.pip&&!i&&document.exitPictureInPicture())}get pip(){return ne.pip?u.empty(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===Me.active:null}setPreviewThumbnails(s){this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),Object.assign(this.config.previewThumbnails,s),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new Di(this))}static supported(s,i){return ne.check(s,i)}static loadSprite(s,i){return $i(s,i)}static setup(s,i={}){let r=null;return u.string(s)?r=Array.from(document.querySelectorAll(s)):u.nodeList(s)?r=Array.from(s):u.array(s)&&(r=s.filter(u.element)),u.empty(r)?null:r.map(a=>new Wt(a,i))}}return Wt.defaults=$t(ui),Wt});/*! 3 * Bootstrap v5.3.3 (https://getbootstrap.com/) 4 * Copyright 2011-2024 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) 5 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 6 */(function(le,Ne){typeof exports=="object"&&typeof module<"u"?module.exports=Ne():typeof define=="function"&&define.amd?define(Ne):(le=typeof globalThis<"u"?globalThis:le||self).bootstrap=Ne()})(this,function(){"use strict";const le=new Map,Ne={set(o,t,n){le.has(o)||le.set(o,new Map);const c=le.get(o);c.has(t)||c.size===0?c.set(t,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(c.keys())[0]}.`)},get:(o,t)=>le.has(o)&&le.get(o).get(t)||null,remove(o,t){if(!le.has(o))return;const n=le.get(o);n.delete(t),n.size===0&&le.delete(o)}},C="transitionend",Fi=o=>(o&&window.CSS&&window.CSS.escape&&(o=o.replace(/#([^\s"#']+)/g,(t,n)=>`#${CSS.escape(n)}`)),o),qi=o=>{o.dispatchEvent(new Event(C))},We=o=>!(!o||typeof o!="object")&&(o.jquery!==void 0&&(o=o[0]),o.nodeType!==void 0),ze=o=>We(o)?o.jquery?o[0]:o:typeof o=="string"&&o.length>0?document.querySelector(Fi(o)):null,ft=o=>{if(!We(o)||o.getClientRects().length===0)return!1;const t=getComputedStyle(o).getPropertyValue("visibility")==="visible",n=o.closest("details:not([open])");if(!n)return t;if(n!==o){const c=o.closest("summary");if(c&&c.parentNode!==n||c===null)return!1}return t},Ze=o=>!o||o.nodeType!==Node.ELEMENT_NODE||!!o.classList.contains("disabled")||(o.disabled!==void 0?o.disabled:o.hasAttribute("disabled")&&o.getAttribute("disabled")!=="false"),yi=o=>{if(!document.documentElement.attachShadow)return null;if(typeof o.getRootNode=="function"){const t=o.getRootNode();return t instanceof ShadowRoot?t:null}return o instanceof ShadowRoot?o:o.parentNode?yi(o.parentNode):null},Ot=()=>{},pt=o=>{o.offsetHeight},Bi=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,vi=[],be=()=>document.documentElement.dir==="rtl",Ae=o=>{var t;t=()=>{const n=Bi();if(n){const c=o.NAME,f=n.fn[c];n.fn[c]=o.jQueryInterface,n.fn[c].Constructor=o,n.fn[c].noConflict=()=>(n.fn[c]=f,o.jQueryInterface)}},document.readyState==="loading"?(vi.length||document.addEventListener("DOMContentLoaded",()=>{for(const n of vi)n()}),vi.push(t)):t()},ke=(o,t=[],n=o)=>typeof o=="function"?o(...t):n,_i=(o,t,n=!0)=>{if(!n)return void ke(o);const c=(b=>{if(!b)return 0;let{transitionDuration:w,transitionDelay:E}=window.getComputedStyle(b);const x=Number.parseFloat(w),O=Number.parseFloat(E);return x||O?(w=w.split(",")[0],E=E.split(",")[0],1e3*(Number.parseFloat(w)+Number.parseFloat(E))):0})(t)+5;let f=!1;const p=({target:b})=>{b===t&&(f=!0,t.removeEventListener(C,p),ke(o))};t.addEventListener(C,p),setTimeout(()=>{f||qi(t)},c)},wi=(o,t,n,c)=>{const f=o.length;let p=o.indexOf(t);return p===-1?!n&&c?o[f-1]:o[0]:(p+=n?1:-1,c&&(p=(p+f)%f),o[Math.max(0,Math.min(p,f-1))])},Ui=/[^.]*(?=\..*)\.|.*/,ws=/\..*/,Ts=/::\d+$/,ei={};let Ti=1;
6const Vi={mouseenter:"mouseover",mouseleave:"mouseout"},ks=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function Wi(o,t){return t&&`${t}::${Ti++}`||o.uidEvent||Ti++}function ge(o){const t=Wi(o);return o.uidEvent=t,ei[t]=ei[t]||{},ei[t]}function zi(o,t,n=null){return Object.values(o).find(c=>c.callable===t&&c.delegationSelector===n)}function Ki(o,t,n){const c=typeof t=="string",f=c?n:t||n;let p=ti(o);return ks.has(p)||(p=o),[c,f,p]}function Yi(o,t,n,c,f){if(typeof t!="string"||!o)return;let[p,b,w]=Ki(t,n,c);t in Vi&&(b=(R=>function(j){if(!j.relatedTarget||j.relatedTarget!==j.delegateTarget&&!j.delegateTarget.contains(j.relatedTarget))return R.call(this,j)})(b));const E=ge(o),x=E[w]||(E[w]={}),O=zi(x,b,p?n:null);if(O)return void(O.oneOff=O.oneOff&&f);const P=Wi(b,t.replace(Ui,"")),q=p?function(D,R,j){return function H(ie){const ae=D.querySelectorAll(R);for(let{target:U}=ie;U&&U!==this;U=U.parentNode)for(const J of ae)if(J===U)return ki(ie,{delegateTarget:U}),H.oneOff&&T.off(D,ie.type,R,j),j.apply(U,[ie])}}(o,n,b):function(D,R){return function j(H){return ki(H,{delegateTarget:D}),j.oneOff&&T.off(D,H.type,R),R.apply(D,[H])}}(o,b);q.delegationSelector=p?n:null,q.callable=b,q.oneOff=f,q.uidEvent=P,x[P]=q,o.addEventListener(w,q,p)}function ot(o,t,n,c,f){const p=zi(t[n],c,f);p&&(o.removeEventListener(n,p,!!f),delete t[n][p.uidEvent])}function Ke(o,t,n,c){const f=t[n]||{};for(const[p,b]of Object.entries(f))p.includes(c)&&ot(o,t,n,b.callable,b.delegationSelector)}function ti(o){return o=o.replace(ws,""),Vi[o]||o}const T={on(o,t,n,c){Yi(o,t,n,c,!1)},one(o,t,n,c){Yi(o,t,n,c,!0)},off(o,t,n,c){if(typeof t!="string"||!o)return;const[f,p,b]=Ki(t,n,c),w=b!==t,E=ge(o),x=E[b]||{},O=t.startsWith(".");if(p===void 0){if(O)for(const P of Object.keys(E))Ke(o,E,P,t.slice(1));for(const[P,q]of Object.entries(x)){const D=P.replace(Ts,"");w&&!t.includes(D)||ot(o,E,b,q.callable,q.delegationSelector)}}else{if(!Object.keys(x).length)return;ot(o,E,b,p,f?n:null)}},trigger(o,t,n){if(typeof t!="string"||!o)return null;const c=Bi();let f=null,p=!0,b=!0,w=!1;t!==ti(t)&&c&&(f=c.Event(t,n),c(o).trigger(f),p=!f.isPropagationStopped(),b=!f.isImmediatePropagationStopped(),w=f.isDefaultPrevented());const E=ki(new Event(t,{bubbles:p,cancelable:!0}),n);return w&&E.preventDefault(),b&&o.dispatchEvent(E),E.defaultPrevented&&f&&f.preventDefault(),E}};function ki(o,t={}){for(const[n,c]of Object.entries(t))try{o[n]=c}catch{Object.defineProperty(o,n,{configurable:!0,get:()=>c})}return o}function Lt(o){if(o==="true")return!0;if(o==="false")return!1;if(o===Number(o).toString())return Number(o);if(o===""||o==="null")return null;if(typeof o!="string")return o;try{return JSON.parse(decodeURIComponent(o))}catch{return o}}function Ei(o){return o.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}const De={setDataAttribute(o,t,n){o.setAttribute(`data-bs-${Ei(t)}`,n)},removeDataAttribute(o,t){o.removeAttribute(`data-bs-${Ei(t)}`)},getDataAttributes(o){if(!o)return{};const t={},n=Object.keys(o.dataset).filter(c=>c.startsWith("bs")&&!c.startsWith("bsConfig"));for(const c of n){let f=c.replace(/^bs/,"");f=f.charAt(0).toLowerCase()+f.slice(1,f.length),t[f]=Lt(o.dataset[c])}return t},getDataAttribute:(o,t)=>Lt(o.getAttribute(`data-bs-${Ei(t)}`))};class mt{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,n){const c=We(n)?De.getDataAttribute(n,"config"):{};return{...this.constructor.Default,...typeof c=="object"?c:{},...We(n)?De.getDataAttributes(n):{},...typeof t=="object"?t:{}}}_typeCheckConfig(t,n=this.constructor.DefaultType){for(const[f,p]of Object.entries(n)){const b=t[f],w=We(b)?"element":(c=b)==null?`${c}`:Object.prototype.toString.call(c).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(p).test(w))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${f}" provided type "${w}" but expected type "${p}".`)}var c}}class $e extends mt{constructor(t,n){super(),(t=ze(t))&&(this._element=t,this._config=this._getConfig(n),Ne.set(this._element,this.constructor.DATA_KEY,this))}dispose(){Ne.remove(this._element,this.constructor.DATA_KEY),T.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,n,c=!0){_i(t,n,c)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return Ne.get(ze(t),this.DATA_KEY)}static getOrCreateInstance(t,n={}){return this.getInstance(t)||new this(t,typeof n=="object"?n:null)}static get VERSION(){return"5.3.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const ii=o=>
vendor: 5,850 bytes, line 6
6{let t=o.getAttribute("data-bs-target");if(!t||t==="#"){let n=o.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),t=n&&n!=="#"?n.trim():null}return t?t.split(",").map(n=>Fi(n)).join(","):null},L={find:(o,t=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(t,o)),findOne:(o,t=document.documentElement)=>Element.prototype.querySelector.call(t,o),children:(o,t)=>[].concat(...o.children).filter(n=>n.matches(t)),parents(o,t){const n=[];let c=o.parentNode.closest(t);for(;c;)n.push(c),c=c.parentNode.closest(t);return n},prev(o,t){let n=o.previousElementSibling;for(;n;){if(n.matches(t))return[n];n=n.previousElementSibling}return[]},next(o,t){let n=o.nextElementSibling;for(;n;){if(n.matches(t))return[n];n=n.nextElementSibling}return[]},focusableChildren(o){const t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(n=>`${n}:not([tabindex^="-"])`).join(",");return this.find(t,o).filter(n=>!Ze(n)&&ft(n))},getSelectorFromElement(o){const t=ii(o);return t&&L.findOne(t)?t:null},getElementFromSelector(o){const t=ii(o);return t?L.findOne(t):null},getMultipleElementsFromSelector(o){const t=ii(o);return t?L.find(t):[]}},si=(o,t="hide")=>{const n=`click.dismiss${o.EVENT_KEY}`,c=o.NAME;T.on(document,n,`[data-bs-dismiss="${c}"]`,function(f){if(["A","AREA"].includes(this.tagName)&&f.preventDefault(),Ze(this))return;const p=L.getElementFromSelector(this)||this.closest(`.${c}`);o.getOrCreateInstance(p)[t]()})},Xi=".bs.alert",Es=`close${Xi}`,As=`closed${Xi}`;class Mt extends $e{static get NAME(){return"alert"}close(){if(T.trigger(this._element,Es).defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback(()=>this._destroyElement(),this._element,t)}_destroyElement(){this._element.remove(),T.trigger(this._element,As),this.dispose()}static jQueryInterface(t){return this.each(function(){const n=Mt.getOrCreateInstance(this);if(typeof t=="string"){if(n[t]===void 0||t.startsWith("_")||t==="constructor")throw new TypeError(`No method named "${t}"`);n[t](this)}})}}si(Mt,"close"),Ae(Mt);const Qi='[data-bs-toggle="button"]';class gt extends $e{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each(function(){const n=gt.getOrCreateInstance(this);t==="toggle"&&n[t]()})}}T.on(document,"click.bs.button.data-api",Qi,o=>{o.preventDefault();const t=o.target.closest(Qi);gt.getOrCreateInstance(t).toggle()}),Ae(gt);const Nt=".bs.swipe",u=`touchstart${Nt}`,Ai=`touchmove${Nt}`,Gi=`touchend${Nt}`,Cs=`pointerdown${Nt}`,Ss=`pointerup${Nt}`,Ps={endCallback:null,leftCallback:null,rightCallback:null},xs={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class ni extends mt{constructor(t,n){super(),this._element=t,t&&ni.isSupported()&&(this._config=this._getConfig(n),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return Ps}static get DefaultType(){return xs}static get NAME(){return"swipe"}dispose(){T.off(this._element,Nt)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),ke(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=40)return;const n=t/this._deltaX;this._deltaX=0,n&&ke(n>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(T.on(this._element,Cs,t=>this._start(t)),T.on(this._element,Ss,t=>this._end(t)),this._element.classList.add("pointer-event")):(T.on(this._element,u,t=>this._start(t)),T.on(this._element,Ai,t=>this._move(t)),T.on(this._element,Gi,t=>this._end(t)))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&(t.pointerType==="pen"||t.pointerType==="touch")}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const et=".bs.carousel",he=".data-api",$t="next",at="prev",te="left",It="right",Ci=`slide${et}`,N=`slid${et}`,Os=`keydown${et}`,Ji=`mouseenter${et}`,Ye=`mouseleave${et}`,ri=`dragstart${et}`,oi=`load${et}${he}`,je=`click${et}${he}`,tt="carousel",W="active",Dt=".active",it=".carousel-item",Ls=Dt+it,jt={ArrowLeft:It,ArrowRight:te},de={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Si={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class lt extends $e{constructor(t,n){super(t,n),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=L.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===tt&&this.cycle()}static get Default(){return de}static get DefaultType(){return Si}static get NAME(){return"carousel"}next(){this._slide($t)}nextWhenVisible(){!document.hidden&&ft(this._element)&&this.next()}prev(){this._slide(at)}pause(){this._isSliding&&qi(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?T.one(this._element,N,()=>this.cycle()):this.cycle())}to(t){const n=this._getItems();if(t>n.length-1||t<0)return;if(this._isSliding)return void T.one(this._element,N,()=>this.to(t));const c=this._getItemIndex(this._getActive());if(c===t)return;const f=t>c?$t:at;this._slide(f,n[t])}
6dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&T.on(this._element,Os,t=>this._keydown(t)),this._config.pause==="hover"&&(T.on(this._element,Ji,()=>this.pause()),T.on(this._element,Ye,()=>this._maybeEnableCycle())),this._config.touch&&ni.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const n of L.find(".carousel-item img",this._element))T.on(n,ri,c=>c.preventDefault());const t={leftCallback:()=>this._slide(this._directionToOrder(te)),rightCallback:()=>this._slide(this._directionToOrder(It)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),500+this._config.interval))}};this._swipeHelper=new ni(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const n=jt[t.key];n&&(t.preventDefault(),this._slide(this._directionToOrder(n)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const n=L.findOne(Dt,this._indicatorsElement);n.classList.remove(W),n.removeAttribute("aria-current");const c=L.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);c&&(c.classList.add(W),c.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const n=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=n||this._config.defaultInterval}_slide(t,n=null){if(this._isSliding)return;const c=this._getActive(),f=t===$t,p=n||wi(this._getItems(),c,f,this._config.wrap);if(p===c)return;const b=this._getItemIndex(p),w=P=>T.trigger(this._element,P,{relatedTarget:p,direction:this._orderToDirection(t),from:this._getItemIndex(c),to:b});if(w(Ci).defaultPrevented||!c||!p)return;const E=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(b),this._activeElement=p;const x=f?"carousel-item-start":"carousel-item-end",O=f?"carousel-item-next":"carousel-item-prev";p.classList.add(O),pt(p),c.classList.add(x),p.classList.add(x),this._queueCallback(()=>{p.classList.remove(x,O),p.classList.add(W),c.classList.remove(W,O,x),this._isSliding=!1,w(N)},c,this._isAnimated()),E&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return L.findOne(Ls,this._element)}_getItems(){return L.find(it,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return be()?t===te?at:$t:t===te?$t:at}_orderToDirection(t){return be()?t===at?te:It:t===at?It:te}static jQueryInterface(t){return this.each(function(){const n=lt.getOrCreateInstance(this,t);if(typeof t!="number"){if(typeof t=="string"){if(n[t]===void 0||t.startsWith("_")||t==="constructor")throw new TypeError(`No method named "${t}"`);n[t]()}}else n.to(t)})}}T.on(document,je,"[data-bs-slide], [data-bs-slide-to]",function(o){const t=L.getElementFromSelector(this);if(!t||!t.classList.contains(tt))return;o.preventDefault();const n=lt.getOrCreateInstance(t),c=this.getAttribute("data-bs-slide-to");return c?(n.to(c),void n._maybeEnableCycle()):De.getDataAttribute(this,"slide")==="next"?(n.next(),void n._maybeEnableCycle()):(n.prev(),void n._maybeEnableCycle())}),T.on(window,oi,()=>{const o=L.find('[data-bs-ride="carousel"]');for(const t of o)lt.getOrCreateInstance(t)}),Ae(lt);const ne=".bs.collapse",Ms=`show${ne}`,Rt=`shown${ne}`,z=`hide${ne}`,ai=`hidden${ne}`,Pi=`click${ne}.data-api`,$="show",bt="collapse",li="collapsing",Re=`:scope .${bt} .${bt}`,Ht='[data-bs-toggle="collapse"]',Zi={parent:null,toggle:!0},es={parent:"(null|element)",toggle:"boolean"};class ct extends $e{constructor(t,n){super(t,n),this._isTransitioning=!1,this._triggerArray=[];const c=L.find(Ht);for(const f of c){const p=L.getSelectorFromElement(f),b=L.find(p).filter(w=>w===this._element);p!==null&&b.length&&this._triggerArray.push(f)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Zi}static get DefaultType(){return es}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter(f=>f!==this._element).map(f=>ct.getOrCreateInstance(f,{toggle:!1}))),t.length&&t[0]._isTransitioning||T.trigger(this._element,Ms).defaultPrevented)return;for(const f of t)f.hide();const n=this._getDimension();this._element.classList.remove(bt),this._element.classList.add(li),this._element.style[n]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const c=`scroll${n[0].toUpperCase()+n.slice(1)}`;this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(li),this._element.classList.add(bt,$),this._element.style[n]="",T.trigger(this._element,Rt)},this._element,!0),this._element.style[n]=`${this._element[c]}px`}
6hide(){if(this._isTransitioning||!this._isShown()||T.trigger(this._element,z).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,pt(this._element),this._element.classList.add(li),this._element.classList.remove(bt,$);for(const n of this._triggerArray){const c=L.getElementFromSelector(n);c&&!this._isShown(c)&&this._addAriaAndCollapsedClass([n],!1)}this._isTransitioning=!0,this._element.style[t]="",this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(li),this._element.classList.add(bt),T.trigger(this._element,ai)},this._element,!0)}_isShown(t=this._element){return t.classList.contains($)}_configAfterMerge(t){return t.toggle=!!t.toggle,t.parent=ze(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(Ht);for(const n of t){const c=L.getElementFromSelector(n);c&&this._addAriaAndCollapsedClass([n],this._isShown(c))}}_getFirstLevelChildren(t){const n=L.find(Re,this._config.parent);return L.find(t,this._config.parent).filter(c=>!n.includes(c))}_addAriaAndCollapsedClass(t,n){if(t.length)for(const c of t)c.classList.toggle("collapsed",!n),c.setAttribute("aria-expanded",n)}static jQueryInterface(t){const n={};return typeof t=="string"&&/show|hide/.test(t)&&(n.toggle=!1),this.each(function(){const c=ct.getOrCreateInstance(this,n);if(typeof t=="string"){if(c[t]===void 0)throw new TypeError(`No method named "${t}"`);c[t]()}})}}T.on(document,Pi,Ht,function(o){(o.target.tagName==="A"||o.delegateTarget&&o.delegateTarget.tagName==="A")&&o.preventDefault();for(const t of L.getMultipleElementsFromSelector(this))ct.getOrCreateInstance(t,{toggle:!1}).toggle()}),Ae(ct);var ye="top",ve="bottom",Ee="right",ce="left",Ft="auto",yt=[ye,ve,Ee,ce],Ce="start",vt="end",ci="clippingParents",xi="viewport",He="popper",Oi="reference",Li=yt.reduce(function(o,t){return o.concat([t+"-"+Ce,t+"-"+vt])},[]),Mi=[].concat(yt,[Ft]).reduce(function(o,t){return o.concat([t,t+"-"+Ce,t+"-"+vt])},[]),ts="beforeRead",is="read",Ni="afterRead",fe="beforeMain",_t="main",wt="afterMain",$i="beforeWrite",Ii="write",ss="afterWrite",ns=[ts,is,Ni,fe,_t,wt,$i,Ii,ss];function Pe(o){return o?(o.nodeName||"").toLowerCase():null}function k(o){if(o==null)return window;if(o.toString()!=="[object Window]"){var t=o.ownerDocument;return t&&t.defaultView||window}return o}function st(o){return o instanceof k(o).Element||o instanceof Element}function xe(o){return o instanceof k(o).HTMLElement||o instanceof HTMLElement}function V(o){return typeof ShadowRoot<"u"&&(o instanceof k(o).ShadowRoot||o instanceof ShadowRoot)}const ui={name:"applyStyles",enabled:!0,phase:"write",fn:function(o){var t=o.state;Object.keys(t.elements).forEach(function(n){var c=t.styles[n]||{},f=t.attributes[n]||{},p=t.elements[n];xe(p)&&Pe(p)&&(Object.assign(p.style,c),Object.keys(f).forEach(function(b){var w=f[b];w===!1?p.removeAttribute(b):p.setAttribute(b,w===!0?"":w)}))})},effect:function(o){var t=o.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(c){var f=t.elements[c],p=t.attributes[c]||{},b=Object.keys(t.styles.hasOwnProperty(c)?t.styles[c]:n[c]).reduce(function(w,E){return w[E]="",w},{});xe(f)&&Pe(f)&&(Object.assign(f.style,b),Object.keys(p).forEach(function(w){f.removeAttribute(w)}))})}},requires:["computeStyles"]};function Me(o){return o.split("-")[0]}var Se=Math.max,Tt=Math.min,kt=Math.round;function qt(){var o=navigator.userAgentData;return o!=null&&o.brands&&Array.isArray(o.brands)?o.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function rs(){return!/^((?!chrome|android).)*safari/i.test(qt())}function _e(o,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var c=o.getBoundingClientRect(),f=1,p=1;t&&xe(o)&&(f=o.offsetWidth>0&&kt(c.width)/o.offsetWidth||1,p=o.offsetHeight>0&&kt(c.height)/o.offsetHeight||1);
6var b=(st(o)?k(o):window).visualViewport,w=!rs()&&n,E=(c.left+(w&&b?b.offsetLeft:0))/f,x=(c.top+(w&&b?b.offsetTop:0))/p,O=c.width/f,P=c.height/p;return{width:O,height:P,top:x,right:E+O,bottom:x+P,left:E,x:E,y:x}}function Et(o){var t=_e(o),n=o.offsetWidth,c=o.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-c)<=1&&(c=t.height),{x:o.offsetLeft,y:o.offsetTop,width:n,height:c}}function Q(o,t){var n=t.getRootNode&&t.getRootNode();if(o.contains(t))return!0;if(n&&V(n)){var c=t;do{if(c&&o.isSameNode(c))return!0;c=c.parentNode||c.host}while(c)}return!1}function Xe(o){return k(o).getComputedStyle(o)}function Ns(o){return["table","td","th"].indexOf(Pe(o))>=0}function Fe(o){return((st(o)?o.ownerDocument:o.document)||window.document).documentElement}function hi(o){return Pe(o)==="html"?o:o.assignedSlot||o.parentNode||(V(o)?o.host:null)||Fe(o)}function os(o){return xe(o)&&Xe(o).position!=="fixed"?o.offsetParent:null}function Qe(o){for(var t=k(o),n=os(o);n&&Ns(n)&&Xe(n).position==="static";)n=os(n);return n&&(Pe(n)==="html"||Pe(n)==="body"&&Xe(n).position==="static")?t:n||function(c){var f=/firefox/i.test(qt());if(/Trident/i.test(qt())&&xe(c)&&Xe(c).position==="fixed")return null;var p=hi(c);for(V(p)&&(p=p.host);xe(p)&&["html","body"].indexOf(Pe(p))<0;){var b=Xe(p);if(b.transform!=="none"||b.perspective!=="none"||b.contain==="paint"||["transform","perspective"].indexOf(b.willChange)!==-1||f&&b.willChange==="filter"||f&&b.filter&&b.filter!=="none")return p;p=p.parentNode}return null}(o)||t}function Bt(o){return["top","bottom"].indexOf(o)>=0?"x":"y"}function Ut(o,t,n){return Se(o,Tt(t,n))}function At(o){return Object.assign({},{top:0,right:0,bottom:0,left:0},o)}function as(o,t){return t.reduce(function(n,c){return n[c]=o,n},{})}const Vt={name:"arrow",enabled:!0,phase:"main",fn:function(o){var t,n=o.state,c=o.name,f=o.options,p=n.elements.arrow,b=n.modifiersData.popperOffsets,w=Me(n.placement),E=Bt(w),x=[ce,Ee].indexOf(w)>=0?"height":"width";if(p&&b){var O=function(se,ee){return At(typeof(se=typeof se=="function"?se(Object.assign({},ee.rects,{placement:ee.placement})):se)!="number"?se:as(se,yt))}(f.padding,n),P=Et(p),q=E==="y"?ye:ce,D=E==="y"?ve:Ee,R=n.rects.reference[x]+n.rects.reference[E]-b[E]-n.rects.popper[x],j=b[E]-n.rects.reference[E],H=Qe(p),ie=H?E==="y"?H.clientHeight||0:H.clientWidth||0:0,ae=R/2-j/2,U=O[q],J=ie-P[x]-O[D],B=ie/2-P[x]/2+ae,K=Ut(U,B,J),Z=E;n.modifiersData[c]=((t={})[Z]=K,t.centerOffset=K-B,t)}},effect:function(o){var t=o.state,n=o.options.element,c=n===void 0?"[data-popper-arrow]":n;c!=null&&(typeof c!="string"||(c=t.elements.popper.querySelector(c)))&&Q(t.elements.popper,c)&&(t.elements.arrow=c)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ut(o){return o.split("-")[1]}var $s={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ls(o){var t,n=o.popper,c=o.popperRect,f=o.placement,p=o.variation,b=o.offsets,w=o.position,E=o.gpuAcceleration,x=o.adaptive,O=o.roundOffsets,P=o.isFixed,q=b.x,D=q===void 0?0:q,R=b.y,j=R===void 0?0:R,H=typeof O=="function"?O({x:D,y:j}):{x:D,y:j};D=H.x,j=H.y;var ie=b.hasOwnProperty("x"),ae=b.hasOwnProperty("y"),U=ce,J=ye,B=window;if(x){var K=Qe(n),Z="clientHeight",se="clientWidth";K===k(n)&&Xe(K=Fe(n)).position!=="static"&&w==="absolute"&&(Z="scrollHeight",se="scrollWidth"),(f===ye||(f===ce||f===Ee)&&p===vt)&&(J=ve,j-=(P&&K===B&&B.visualViewport?B.visualViewport.height:K[Z])-c.height,j*=E?1:-1),f!==ce&&(f!==ye&&f!==ve||p!==vt)||(U=Ee,D-=(P&&K===B&&B.visualViewport?B.visualViewport.width:K[se])-c.width,D*=E?1:-1)}var ee,pe=Object.assign({position:w},x&&$s),Ie=O===!0?function(Je,Oe){var Be=Je.x,Ue=Je.y,ue=Oe.devicePixelRatio||1;return{x:kt(Be*ue)/ue||0,y:kt(Ue*ue)/ue||0}}({x:D,y:j},k(n)):{x:D,y:j};return D=Ie.x,j=Ie.y,E?Object.assign({},pe,((ee={})[J]=ae?"0":"",ee[U]=ie?"0":"",ee.transform=(B.devicePixelRatio||1)<=1?"translate("+D+"px, "+j+"px)":"translate3d("+D+"px, "+j+"px, 0)",ee)):Object.assign({},pe,((t={})[J]=ae?j+"px":"",t[U]=ie?D+"px":"",t.transform="",t))}const di={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(o){var t=o.state,n=o.options,c=n.gpuAcceleration,f=c===void 0||c,p=n.adaptive,b=p===void 0||p,w=n.roundOffsets,E=w===void 0||w,x={placement:Me(t.placement),variation:ut(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:f,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,ls(Object.assign({},x,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:b,roundOffsets:E})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,ls(Object.assign({},x,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:E})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var fi={passive:!0};const pi={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(o){var t=o.state,n=o.instance,c=o.options,f=c.scroll,p=f===void 0||f,b=c.resize,w=b===void 0||b,E=k(t.elements.popper),x=[].concat(t.scrollParents.reference,t.scrollParents.popper);return p&&x.forEach(function(O){O.addEventListener("scroll",n.update,fi)}),w&&E.addEventListener("resize",n.update,fi),function(){p&&x.forEach(function(O){O.removeEventListener("scroll",n.update,fi)}),w&&E.removeEventListener("resize",n.update,fi)}},data:{}};
6var Di={left:"right",right:"left",bottom:"top",top:"bottom"};function Ct(o){return o.replace(/left|right|bottom|top/g,function(t){return Di[t]})}var Wt={start:"end",end:"start"};function e(o){return o.replace(/start|end/g,function(t){return Wt[t]})}function s(o){var t=k(o);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function i(o){return _e(Fe(o)).left+s(o).scrollLeft}function r(o){var t=Xe(o),n=t.overflow,c=t.overflowX,f=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+f+c)}function a(o){return["html","body","#document"].indexOf(Pe(o))>=0?o.ownerDocument.body:xe(o)&&r(o)?o:a(hi(o))}function l(o,t){var n;t===void 0&&(t=[]);var c=a(o),f=c===((n=o.ownerDocument)==null?void 0:n.body),p=k(c),b=f?[p].concat(p.visualViewport||[],r(c)?c:[]):c,w=t.concat(b);return f?w:w.concat(l(hi(b)))}function h(o){return Object.assign({},o,{left:o.x,top:o.y,right:o.x+o.width,bottom:o.y+o.height})}function d(o,t,n){return t===xi?h(function(c,f){var p=k(c),b=Fe(c),w=p.visualViewport,E=b.clientWidth,x=b.clientHeight,O=0,P=0;if(w){E=w.width,x=w.height;var q=rs();(q||!q&&f==="fixed")&&(O=w.offsetLeft,P=w.offsetTop)}return{width:E,height:x,x:O+i(c),y:P}}(o,n)):st(t)?function(c,f){var p=_e(c,!1,f==="fixed");return p.top=p.top+c.clientTop,p.left=p.left+c.clientLeft,p.bottom=p.top+c.clientHeight,p.right=p.left+c.clientWidth,p.width=c.clientWidth,p.height=c.clientHeight,p.x=p.left,p.y=p.top,p}(t,n):h(function(c){var f,p=Fe(c),b=s(c),w=(f=c.ownerDocument)==null?void 0:f.body,E=Se(p.scrollWidth,p.clientWidth,w?w.scrollWidth:0,w?w.clientWidth:0),x=Se(p.scrollHeight,p.clientHeight,w?w.scrollHeight:0,w?w.clientHeight:0),O=-b.scrollLeft+i(c),P=-b.scrollTop;return Xe(w||p).direction==="rtl"&&(O+=Se(p.clientWidth,w?w.clientWidth:0)-E),{width:E,height:x,x:O,y:P}}(Fe(o)))}function m(o){var t,n=o.reference,c=o.element,f=o.placement,p=f?Me(f):null,b=f?ut(f):null,w=n.x+n.width/2-c.width/2,E=n.y+n.height/2-c.height/2;switch(p){case ye:t={x:w,y:n.y-c.height};break;case ve:t={x:w,y:n.y+n.height};break;case Ee:t={x:n.x+n.width,y:E};break;case ce:t={x:n.x-c.width,y:E};break;default:t={x:n.x,y:n.y}}var x=p?Bt(p):null;if(x!=null){var O=x==="y"?"height":"width";switch(b){case Ce:t[x]=t[x]-(n[O]/2-c[O]/2);break;case vt:t[x]=t[x]+(n[O]/2-c[O]/2)}}return t}function g(o,t){t===void 0&&(t={});var n=t,c=n.placement,f=c===void 0?o.placement:c,p=n.strategy,b=p===void 0?o.strategy:p,w=n.boundary,E=w===void 0?ci:w,x=n.rootBoundary,O=x===void 0?xi:x,P=n.elementContext,q=P===void 0?He:P,D=n.altBoundary,R=D!==void 0&&D,j=n.padding,H=j===void 0?0:j,ie=At(typeof H!="number"?H:as(H,yt)),ae=q===He?Oi:He,U=o.rects.popper,J=o.elements[R?ae:q],B=function(Oe,Be,Ue,ue){var nt=Be==="clippingParents"?function(oe){var Le=l(hi(oe)),Ve=["absolute","fixed"].indexOf(Xe(oe).position)>=0&&xe(oe)?Qe(oe):oe;return st(Ve)?Le.filter(function(xt){return st(xt)&&Q(xt,Ve)&&Pe(xt)!=="body"}):[]}(Oe):[].concat(Be),rt=[].concat(nt,[Ue]),bi=rt[0],Te=rt.reduce(function(oe,Le){var Ve=d(Oe,Le,ue);return oe.top=Se(Ve.top,oe.top),oe.right=Tt(Ve.right,oe.right),oe.bottom=Tt(Ve.bottom,oe.bottom),oe.left=Se(Ve.left,oe.left),oe},d(Oe,bi,ue));return Te.width=Te.right-Te.left,Te.height=Te.bottom-Te.top,Te.x=Te.left,Te.y=Te.top,Te}(st(J)?J:J.contextElement||Fe(o.elements.popper),E,O,b),K=_e(o.elements.reference),Z=m({reference:K,element:U,strategy:"absolute",placement:f}),se=h(Object.assign({},U,Z)),ee=q===He?se:K,pe={top:B.top-ee.top+ie.top,bottom:ee.bottom-B.bottom+ie.bottom,left:B.left-ee.left+ie.left,right:ee.right-B.right+ie.right},Ie=o.modifiersData.offset;if(q===He&&Ie){var Je=Ie[f];Object.keys(pe).forEach(function(Oe){var Be=[Ee,ve].indexOf(Oe)>=0?1:-1,Ue=[ye,ve].indexOf(Oe)>=0?"y":"x";pe[Oe]+=Je[Ue]*Be})}return pe}function _(o,t){t===void 0&&(t={});var n=t,c=n.placement,f=n.boundary,p=n.rootBoundary,b=n.padding,w=n.flipVariations,E=n.allowedAutoPlacements,x=E===void 0?Mi:E,O=ut(c),P=O?w?Li:Li.filter(function(R){return ut(R)===O}):yt,q=P.filter(function(R){return x.indexOf(R)>=0});q.length===0&&(q=P);var D=q.reduce(function(R,j){return R[j]=g(o,{placement:j,boundary:f,rootBoundary:p,padding:b})[Me(j)],R},{});return Object.keys(D).sort(function(R,j){return D[R]-D[j]})}
6const y={name:"flip",enabled:!0,phase:"main",fn:function(o){var t=o.state,n=o.options,c=o.name;if(!t.modifiersData[c]._skip){for(var f=n.mainAxis,p=f===void 0||f,b=n.altAxis,w=b===void 0||b,E=n.fallbackPlacements,x=n.padding,O=n.boundary,P=n.rootBoundary,q=n.altBoundary,D=n.flipVariations,R=D===void 0||D,j=n.allowedAutoPlacements,H=t.options.placement,ie=Me(H),ae=E||(ie!==H&&R?function(oe){if(Me(oe)===Ft)return[];var Le=Ct(oe);return[e(oe),Le,e(Le)]}(H):[Ct(H)]),U=[H].concat(ae).reduce(function(oe,Le){return oe.concat(Me(Le)===Ft?_(t,{placement:Le,boundary:O,rootBoundary:P,padding:x,flipVariations:R,allowedAutoPlacements:j}):Le)},[]),J=t.rects.reference,B=t.rects.popper,K=new Map,Z=!0,se=U[0],ee=0;ee<U.length;ee++){var pe=U[ee],Ie=Me(pe),Je=ut(pe)===Ce,Oe=[ye,ve].indexOf(Ie)>=0,Be=Oe?"width":"height",Ue=g(t,{placement:pe,boundary:O,rootBoundary:P,altBoundary:q,padding:x}),ue=Oe?Je?Ee:ce:Je?ve:ye;J[Be]>B[Be]&&(ue=Ct(ue));var nt=Ct(ue),rt=[];if(p&&rt.push(Ue[Ie]<=0),w&&rt.push(Ue[ue]<=0,Ue[nt]<=0),rt.every(function(oe){return oe})){se=pe,Z=!1;break}K.set(pe,rt)}if(Z)for(var bi=function(oe){var Le=U.find(function(Ve){var xt=K.get(Ve);if(xt)return xt.slice(0,oe).every(function(ys){return ys})});if(Le)return se=Le,"break"},Te=R?3:1;Te>0&&bi(Te)!=="break";Te--);t.placement!==se&&(t.modifiersData[c]._skip=!0,t.placement=se,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function v(o,t,n){return n===void 0&&(n={x:0,y:0}),{top:o.top-t.height-n.y,right:o.right-t.width+n.x,bottom:o.bottom-t.height+n.y,left:o.left-t.width-n.x}}function A(o){return[ye,Ee,ve,ce].some(function(t){return o[t]>=0})}const I={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(o){var t=o.state,n=o.name,c=t.rects.reference,f=t.rects.popper,p=t.modifiersData.preventOverflow,b=g(t,{elementContext:"reference"}),w=g(t,{altBoundary:!0}),E=v(b,c),x=v(w,f,p),O=A(E),P=A(x);t.modifiersData[n]={referenceClippingOffsets:E,popperEscapeOffsets:x,isReferenceHidden:O,hasPopperEscaped:P},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":O,"data-popper-escaped":P})}},M={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(o){var t=o.state,n=o.options,c=o.name,f=n.offset,p=f===void 0?[0,0]:f,b=Mi.reduce(function(O,P){return O[P]=function(q,D,R){var j=Me(q),H=[ce,ye].indexOf(j)>=0?-1:1,ie=typeof R=="function"?R(Object.assign({},D,{placement:q})):R,ae=ie[0],U=ie[1];return ae=ae||0,U=(U||0)*H,[ce,Ee].indexOf(j)>=0?{x:U,y:ae}:{x:ae,y:U}}(P,t.rects,p),O},{}),w=b[t.placement],E=w.x,x=w.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=E,t.modifiersData.popperOffsets.y+=x),t.modifiersData[c]=b}},Y={name:"popperOffsets",enabled:!0,phase:"read",fn:function(o){var t=o.state,n=o.name;t.modifiersData[n]=m({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},X={name:"preventOverflow",enabled:!0,phase:"main",fn:function(o){var t=o.state,n=o.options,c=o.name,f=n.mainAxis,p=f===void 0||f,b=n.altAxis,w=b!==void 0&&b,E=n.boundary,x=n.rootBoundary,O=n.altBoundary,P=n.padding,q=n.tether,D=q===void 0||q,R=n.tetherOffset,j=R===void 0?0:R,H=g(t,{boundary:E,rootBoundary:x,padding:P,altBoundary:O}),ie=Me(t.placement),ae=ut(t.placement),U=!ae,J=Bt(ie),B=J==="x"?"y":"x",K=t.modifiersData.popperOffsets,Z=t.rects.reference,se=t.rects.popper,ee=typeof j=="function"?j(Object.assign({},t.rects,{placement:t.placement})):j,pe=typeof ee=="number"?{mainAxis:ee,altAxis:ee}:Object.assign({mainAxis:0,altAxis:0},ee),Ie=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,Je={x:0,y:0};if(K){if(p){var Oe,Be=J==="y"?ye:ce,Ue=J==="y"?ve:Ee,ue=J==="y"?"height":"width",nt=K[J],rt=nt+H[Be],bi=nt-H[Ue],Te=D?-se[ue]/2:0,oe=ae===Ce?Z[ue]:se[ue],Le=ae===Ce?-se[ue]:-Z[ue],Ve=t.elements.arrow,xt=D&&Ve?Et(Ve):{width:0,height:0},ys=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Mn=ys[Be],Nn=ys[Ue],vs=Ut(0,Z[ue],xt[ue]),mo=U?Z[ue]/2-Te-vs-Mn-pe.mainAxis:oe-vs-Mn-pe.mainAxis,go=U?-Z[ue]/2+Te+vs+Nn+pe.mainAxis:Le+vs+Nn+pe.mainAxis,zs=t.elements.arrow&&Qe(t.elements.arrow),bo=zs?J==="y"?zs.clientTop||0:zs.clientLeft||0:0,$n=(Oe=Ie?.[J])!=null?Oe:0,yo=nt+go-$n,In=Ut(D?Tt(rt,nt+mo-$n-bo):rt,nt,D?Se(bi,yo):bi);
6K[J]=In,Je[J]=In-nt}if(w){var Dn,vo=J==="x"?ye:ce,_o=J==="x"?ve:Ee,Zt=K[B],_s=B==="y"?"height":"width",jn=Zt+H[vo],Rn=Zt-H[_o],Ks=[ye,ce].indexOf(ie)!==-1,Hn=(Dn=Ie?.[B])!=null?Dn:0,Fn=Ks?jn:Zt-Z[_s]-se[_s]-Hn+pe.altAxis,qn=Ks?Zt+Z[_s]+se[_s]-Hn-pe.altAxis:Rn,Bn=D&&Ks?function(wo,To,Ys){var Un=Ut(wo,To,Ys);return Un>Ys?Ys:Un}(Fn,Zt,qn):Ut(D?Fn:jn,Zt,D?qn:Rn);K[B]=Bn,Je[B]=Bn-Zt}t.modifiersData[c]=Je}},requiresIfExists:["offset"]};function S(o,t,n){n===void 0&&(n=!1);var c,f,p=xe(t),b=xe(t)&&function(P){var q=P.getBoundingClientRect(),D=kt(q.width)/P.offsetWidth||1,R=kt(q.height)/P.offsetHeight||1;return D!==1||R!==1}(t),w=Fe(t),E=_e(o,b,n),x={scrollLeft:0,scrollTop:0},O={x:0,y:0};return(p||!p&&!n)&&((Pe(t)!=="body"||r(w))&&(x=(c=t)!==k(c)&&xe(c)?{scrollLeft:(f=c).scrollLeft,scrollTop:f.scrollTop}:s(c)),xe(t)?((O=_e(t,!0)).x+=t.clientLeft,O.y+=t.clientTop):w&&(O.x=i(w))),{x:E.left+x.scrollLeft-O.x,y:E.top+x.scrollTop-O.y,width:E.width,height:E.height}}function F(o){var t=new Map,n=new Set,c=[];function f(p){n.add(p.name),[].concat(p.requires||[],p.requiresIfExists||[]).forEach(function(b){if(!n.has(b)){var w=t.get(b);w&&f(w)}}),c.push(p)}return o.forEach(function(p){t.set(p.name,p)}),o.forEach(function(p){n.has(p.name)||f(p)}),c}var re={placement:"bottom",modifiers:[],strategy:"absolute"};function we(){for(var o=arguments.length,t=new Array(o),n=0;n<o;n++)t[n]=arguments[n];return!t.some(function(c){return!(c&&typeof c.getBoundingClientRect=="function")})}function me(o){o===void 0&&(o={});var t=o,n=t.defaultModifiers,c=n===void 0?[]:n,f=t.defaultOptions,p=f===void 0?re:f;return function(b,w,E){E===void 0&&(E=p);var x,O,P={placement:"bottom",orderedModifiers:[],options:Object.assign({},re,p),modifiersData:{},elements:{reference:b,popper:w},attributes:{},styles:{}},q=[],D=!1,R={state:P,setOptions:function(H){var ie=typeof H=="function"?H(P.options):H;j(),P.options=Object.assign({},p,P.options,ie),P.scrollParents={reference:st(b)?l(b):b.contextElement?l(b.contextElement):[],popper:l(w)};var ae,U,J=function(B){var K=F(B);return ns.reduce(function(Z,se){return Z.concat(K.filter(function(ee){return ee.phase===se}))},[])}((ae=[].concat(c,P.options.modifiers),U=ae.reduce(function(B,K){var Z=B[K.name];return B[K.name]=Z?Object.assign({},Z,K,{options:Object.assign({},Z.options,K.options),data:Object.assign({},Z.data,K.data)}):K,B},{}),Object.keys(U).map(function(B){return U[B]})));return P.orderedModifiers=J.filter(function(B){return B.enabled}),P.orderedModifiers.forEach(function(B){var K=B.name,Z=B.options,se=Z===void 0?{}:Z,ee=B.effect;if(typeof ee=="function"){var pe=ee({state:P,name:K,instance:R,options:se});q.push(pe||function(){})}}),R.update()},forceUpdate:function(){if(!D){var H=P.elements,ie=H.reference,ae=H.popper;if(we(ie,ae)){P.rects={reference:S(ie,Qe(ae),P.options.strategy==="fixed"),popper:Et(ae)},P.reset=!1,P.placement=P.options.placement,P.orderedModifiers.forEach(function(ee){return P.modifiersData[ee.name]=Object.assign({},ee.data)});for(var U=0;U<P.orderedModifiers.length;U++)if(P.reset!==!0){var J=P.orderedModifiers[U],B=J.fn,K=J.options,Z=K===void 0?{}:K,se=J.name;typeof B=="function"&&(P=B({state:P,options:Z,name:se,instance:R})||P)}else P.reset=!1,U=-1}}},update:(x=function(){return new Promise(function(H){R.forceUpdate(),H(P)})},function(){return O||(O=new Promise(function(H){Promise.resolve().then(function(){O=void 0,H(x())})})),O}),destroy:function(){j(),D=!0}};if(!we(b,w))return R;function j(){q.forEach(function(H){return H()}),q=[]}return R.setOptions(E).then(function(H){!D&&E.onFirstUpdate&&E.onFirstUpdate(H)}),R}}var G=me(),cs=me({defaultModifiers:[pi,Y,di,ui]}),St=me({defaultModifiers:[pi,Y,di,ui,M,y,X,Vt,I]});const us=Object.freeze(Object.defineProperty({__proto__:null,afterMain:wt,afterRead:Ni,afterWrite:ss,applyStyles:ui,arrow:Vt,auto:Ft,basePlacements:yt,beforeMain:fe,beforeRead:ts,beforeWrite:$i,bottom:ve,clippingParents:ci,computeStyles:di,createPopper:St,createPopperBase:G,createPopperLite:cs,detectOverflow:g,end:vt,eventListeners:pi,flip:y,hide:I,left:ce,main:_t,modifierPhases:ns,offset:M,placements:Mi,popper:He,popperGenerator:me,popperOffsets:Y,preventOverflow:X,read:is,reference:Oi,right:Ee,start:Ce,top:ye,variationPlacements:Li,viewport:xi,write:Ii},Symbol.toStringTag,{value:"Module"})),Xs="dropdown",zt=".bs.dropdown",Is=".data-api",Vn="ArrowUp",Qs="ArrowDown",Wn=`hide${zt}`,zn=`hidden${zt}`,Kn=`show${zt}`,Yn=`shown${zt}`,Gs=`click${zt}${Is}`,Js=`keydown${zt}${Is}`,Xn=`keyup${zt}${Is}`,mi="show",Kt='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',Qn=`${Kt}.${mi}`,hs=".dropdown-menu",Gn=be()?"top-end":"top-start",Jn=be()?"top-start":"top-end",Zn=be()?"bottom-end":"bottom-start",er=be()?"bottom-start":"bottom-end",tr=be()?"left-start":"right-start",ir=be()?"right-start":"left-start",sr={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},nr={autoClose:"(boolean|string)",boundary:"(string|element)",display:"str
6ing",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Ge extends $e{constructor(t,n){super(t,n),this._popper=null,this._parent=this._element.parentNode,this._menu=L.next(this._element,hs)[0]||L.prev(this._element,hs)[0]||L.findOne(hs,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return sr}static get DefaultType(){return nr}static get NAME(){return Xs}toggle(){return this._isShown()?this.hide():this.show()}show(){if(Ze(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!T.trigger(this._element,Kn,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const n of[].concat(...document.body.children))T.on(n,"mouseover",Ot);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(mi),this._element.classList.add(mi),T.trigger(this._element,Yn,t)}}hide(){if(Ze(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!T.trigger(this._element,Wn,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const n of[].concat(...document.body.children))T.off(n,"mouseover",Ot);this._popper&&this._popper.destroy(),this._menu.classList.remove(mi),this._element.classList.remove(mi),this._element.setAttribute("aria-expanded","false"),De.removeDataAttribute(this._menu,"popper"),T.trigger(this._element,zn,t)}}_getConfig(t){if(typeof(t=super._getConfig(t)).reference=="object"&&!We(t.reference)&&typeof t.reference.getBoundingClientRect!="function")throw new TypeError(`${Xs.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(us===void 0)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;this._config.reference==="parent"?t=this._parent:We(this._config.reference)?t=ze(this._config.reference):typeof this._config.reference=="object"&&(t=this._config.reference);const n=this._getPopperConfig();this._popper=St(t,this._menu,n)}_isShown(){return this._menu.classList.contains(mi)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return tr;if(t.classList.contains("dropstart"))return ir;if(t.classList.contains("dropup-center"))return"top";if(t.classList.contains("dropdown-center"))return"bottom";const n=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return t.classList.contains("dropup")?n?Jn:Gn:n?er:Zn}
6_detectNavbar(){return this._element.closest(".navbar")!==null}_getOffset(){const{offset:t}=this._config;return typeof t=="string"?t.split(",").map(n=>Number.parseInt(n,10)):typeof t=="function"?n=>t(n,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(De.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,...ke(this._config.popperConfig,[t])}}_selectMenuItem({key:t,target:n}){const c=L.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(f=>ft(f));c.length&&wi(c,n,t===Qs,!c.includes(n)).focus()}static jQueryInterface(t){return this.each(function(){const n=Ge.getOrCreateInstance(this,t);if(typeof t=="string"){if(n[t]===void 0)throw new TypeError(`No method named "${t}"`);n[t]()}})}static clearMenus(t){if(t.button===2||t.type==="keyup"&&t.key!=="Tab")return;const n=L.find(Qn);for(const c of n){const f=Ge.getInstance(c);if(!f||f._config.autoClose===!1)continue;const p=t.composedPath(),b=p.includes(f._menu);if(p.includes(f._element)||f._config.autoClose==="inside"&&!b||f._config.autoClose==="outside"&&b||f._menu.contains(t.target)&&(t.type==="keyup"&&t.key==="Tab"||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const w={relatedTarget:f._element};t.type==="click"&&(w.clickEvent=t),f._completeHide(w)}}static dataApiKeydownHandler(t){const n=/input|textarea/i.test(t.target.tagName),c=t.key==="Escape",f=[Vn,Qs].includes(t.key);if(!f&&!c||n&&!c)return;t.preventDefault();const p=this.matches(Kt)?this:L.prev(this,Kt)[0]||L.next(this,Kt)[0]||L.findOne(Kt,t.delegateTarget.parentNode),b=Ge.getOrCreateInstance(p);if(f)return t.stopPropagation(),b.show(),void b._selectMenuItem(t);b._isShown()&&(t.stopPropagation(),b.hide(),p.focus())}}T.on(document,Js,Kt,Ge.dataApiKeydownHandler),T.on(document,Js,hs,Ge.dataApiKeydownHandler),T.on(document,Gs,Ge.clearMenus),T.on(document,Xn,Ge.clearMenus),T.on(document,Gs,Kt,function(o){o.preventDefault(),Ge.getOrCreateInstance(this).toggle()}),Ae(Ge);const Zs="backdrop",en="show",tn=`mousedown.bs.${Zs}`,rr={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},or={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class sn extends mt{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return rr}static get DefaultType(){return or}static get NAME(){return Zs}show(t){if(!this._config.isVisible)return void ke(t);this._append();const n=this._getElement();this._config.isAnimated&&pt(n),n.classList.add(en),this._emulateAnimation(()=>{ke(t)})}hide(t){this._config.isVisible?(this._getElement().classList.remove(en),this._emulateAnimation(()=>{this.dispose(),ke(t)})):ke(t)}dispose(){this._isAppended&&(T.off(this._element,tn),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=ze(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),T.on(t,tn,()=>{ke(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(t){_i(t,this._getElement(),this._config.isAnimated)}}const ds=".bs.focustrap",ar=`focusin${ds}`,lr=`keydown.tab${ds}`,nn="backward",cr={autofocus:!0,trapElement:null},ur={autofocus:"boolean",trapElement:"element"};class rn extends mt{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return cr}static get DefaultType(){return ur}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),T.off(document,ds),T.on(document,ar,t=>this._handleFocusin(t)),T.on(document,lr,t=>this._handleKeydown(t)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,T.off(document,ds))}_handleFocusin(t){const{trapElement:n}=this._config;if(t.target===document||t.target===n||n.contains(t.target))return;const c=L.focusableChildren(n);c.length===0?n.focus():this._lastTabNavDirection===nn?c[c.length-1].focus():c[0].focus()}_handleKeydown(t){t.key==="Tab"&&(this._lastTabNavDirection=t.shiftKey?nn:"forward")}}const on=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",an=".sticky-top",fs="padding-right",ln="margin-right";class Ds{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,fs,n=>n+t),this._setElementAttributes(on,fs,n=>n+t),this._setElementAttributes(an,ln,n=>n-t)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,fs),this._resetElementAttributes(on,fs),this._resetElementAttributes(an,ln)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,n,c){const f=this.getWidth();this._applyManipulationCallback(t,p=>{if(p!==this._element&&window.innerWidth>p.clientWidth+f)return;this._saveInitialAttribute(p,n);const b=window.getComputedStyle(p).getPropertyValue(n);p.style.setProperty(n,`${c(Number.parseFloat(b))}px`)}
6)}_saveInitialAttribute(t,n){const c=t.style.getPropertyValue(n);c&&De.setDataAttribute(t,n,c)}_resetElementAttributes(t,n){this._applyManipulationCallback(t,c=>{const f=De.getDataAttribute(c,n);f!==null?(De.removeDataAttribute(c,n),c.style.setProperty(n,f)):c.style.removeProperty(n)})}_applyManipulationCallback(t,n){if(We(t))n(t);else for(const c of L.find(t,this._element))n(c)}}const qe=".bs.modal",hr=`hide${qe}`,dr=`hidePrevented${qe}`,cn=`hidden${qe}`,un=`show${qe}`,fr=`shown${qe}`,pr=`resize${qe}`,mr=`click.dismiss${qe}`,gr=`mousedown.dismiss${qe}`,br=`keydown.dismiss${qe}`,yr=`click${qe}.data-api`,hn="modal-open",dn="show",js="modal-static",vr={backdrop:!0,focus:!0,keyboard:!0},_r={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Yt extends $e{constructor(t,n){super(t,n),this._dialog=L.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new Ds,this._addEventListeners()}static get Default(){return vr}static get DefaultType(){return _r}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||T.trigger(this._element,un,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(hn),this._adjustDialog(),this._backdrop.show(()=>this._showElement(t)))}hide(){this._isShown&&!this._isTransitioning&&(T.trigger(this._element,hr).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(dn),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated())))}dispose(){T.off(window,qe),T.off(this._dialog,qe),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new sn({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new rn({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const n=L.findOne(".modal-body",this._dialog);n&&(n.scrollTop=0),pt(this._element),this._element.classList.add(dn),this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,T.trigger(this._element,fr,{relatedTarget:t})},this._dialog,this._isAnimated())}_addEventListeners(){T.on(this._element,br,t=>{t.key==="Escape"&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())}),T.on(window,pr,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),T.on(this._element,gr,t=>{T.one(this._element,mr,n=>{this._element===t.target&&this._element===n.target&&(this._config.backdrop!=="static"?this._config.backdrop&&this.hide():this._triggerBackdropTransition())})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(hn),this._resetAdjustments(),this._scrollBar.reset(),T.trigger(this._element,cn)})}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(T.trigger(this._element,dr).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,n=this._element.style.overflowY;n==="hidden"||this._element.classList.contains(js)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(js),this._queueCallback(()=>{this._element.classList.remove(js),this._queueCallback(()=>{this._element.style.overflowY=n},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,n=this._scrollBar.getWidth(),c=n>0;if(c&&!t){const f=be()?"paddingLeft":"paddingRight";this._element.style[f]=`${n}px`}if(!c&&t){const f=be()?"paddingRight":"paddingLeft";this._element.style[f]=`${n}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,n){return this.each(function(){const c=Yt.getOrCreateInstance(this,t);if(typeof t=="string"){if(c[t]===void 0)throw new TypeError(`No method n
6amed "${t}"`);c[t](n)}})}}T.on(document,yr,'[data-bs-toggle="modal"]',function(o){const t=L.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&o.preventDefault(),T.one(t,un,c=>{c.defaultPrevented||T.one(t,cn,()=>{ft(this)&&this.focus()})});const n=L.findOne(".modal.show");n&&Yt.getInstance(n).hide(),Yt.getOrCreateInstance(t).toggle(this)}),si(Yt),Ae(Yt);const ht=".bs.offcanvas",fn=".data-api",wr=`load${ht}${fn}`,pn="show",mn="showing",gn="hiding",bn=".offcanvas.show",Tr=`show${ht}`,kr=`shown${ht}`,Er=`hide${ht}`,yn=`hidePrevented${ht}`,vn=`hidden${ht}`,Ar=`resize${ht}`,Cr=`click${ht}${fn}`,Sr=`keydown.dismiss${ht}`,Pr={backdrop:!0,keyboard:!0,scroll:!1},xr={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class dt extends $e{constructor(t,n){super(t,n),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Pr}static get DefaultType(){return xr}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||T.trigger(this._element,Tr,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||new Ds().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(mn),this._queueCallback(()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(pn),this._element.classList.remove(mn),T.trigger(this._element,kr,{relatedTarget:t})},this._element,!0))}hide(){this._isShown&&(T.trigger(this._element,Er).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(gn),this._backdrop.hide(),this._queueCallback(()=>{this._element.classList.remove(pn,gn),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new Ds().reset(),T.trigger(this._element,vn)},this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=!!this._config.backdrop;return new sn({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{this._config.backdrop!=="static"?this.hide():T.trigger(this._element,yn)}:null})}_initializeFocusTrap(){return new rn({trapElement:this._element})}_addEventListeners(){T.on(this._element,Sr,t=>{t.key==="Escape"&&(this._config.keyboard?this.hide():T.trigger(this._element,yn))})}static jQueryInterface(t){return this.each(function(){const n=dt.getOrCreateInstance(this,t);if(typeof t=="string"){if(n[t]===void 0||t.startsWith("_")||t==="constructor")throw new TypeError(`No method named "${t}"`);n[t](this)}})}}T.on(document,Cr,'[data-bs-toggle="offcanvas"]',function(o){const t=L.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&o.preventDefault(),Ze(this))return;T.one(t,vn,()=>{ft(this)&&this.focus()});const n=L.findOne(bn);n&&n!==t&&dt.getInstance(n).hide(),dt.getOrCreateInstance(t).toggle(this)}),T.on(window,wr,()=>{for(const o of L.find(bn))dt.getOrCreateInstance(o).show()}),T.on(window,Ar,()=>{for(const o of L.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(o).position!=="fixed"&&dt.getOrCreateInstance(o).hide()}),si(dt),Ae(dt);const _n={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Or=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Lr=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,Mr=(o,t)=>{const n=o.nodeName.toLowerCase();return t.includes(n)?!Or.has(n)||!!Lr.test(o.nodeValue):t.filter(c=>c instanceof RegExp).some(c=>c.test(n))},Nr={allowList:_n,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},$r={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Ir={entry:"(string|element|function|null)",selector:"(string|element)"};class Dr extends mt{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return Nr}static get DefaultType(){return $r}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map(t=>
vendor: 4,612 bytes, line 6
6this._resolvePossibleFunction(t)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[f,p]of Object.entries(this._config.content))this._setContent(t,p,f);const n=t.children[0],c=this._resolvePossibleFunction(this._config.extraClass);return c&&n.classList.add(...c.split(" ")),n}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[n,c]of Object.entries(t))super._typeCheckConfig({selector:n,entry:c},Ir)}_setContent(t,n,c){const f=L.findOne(c,t);f&&((n=this._resolvePossibleFunction(n))?We(n)?this._putElementInTemplate(ze(n),f):this._config.html?f.innerHTML=this._maybeSanitize(n):f.textContent=n:f.remove())}_maybeSanitize(t){return this._config.sanitize?function(n,c,f){if(!n.length)return n;if(f&&typeof f=="function")return f(n);const p=new window.DOMParser().parseFromString(n,"text/html"),b=[].concat(...p.body.querySelectorAll("*"));for(const w of b){const E=w.nodeName.toLowerCase();if(!Object.keys(c).includes(E)){w.remove();continue}const x=[].concat(...w.attributes),O=[].concat(c["*"]||[],c[E]||[]);for(const P of x)Mr(P,O)||w.removeAttribute(P.nodeName)}return p.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return ke(t,[this])}_putElementInTemplate(t,n){if(this._config.html)return n.innerHTML="",void n.append(t);n.textContent=t.textContent}}const jr=new Set(["sanitize","allowList","sanitizeFn"]),Rs="fade",ps="show",wn=".modal",Tn="hide.bs.modal",ji="hover",Hs="focus",Rr={AUTO:"auto",TOP:"top",RIGHT:be()?"left":"right",BOTTOM:"bottom",LEFT:be()?"right":"left"},Hr={allowList:_n,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},Fr={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class Xt extends $e{constructor(t,n){if(us===void 0)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t,n),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Hr}static get DefaultType(){return Fr}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),T.off(this._element.closest(wn),Tn,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=T.trigger(this._element,this.constructor.eventName("show")),n=(yi(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!n)return;this._disposePopper();const c=this._getTipElement();this._element.setAttribute("aria-describedby",c.getAttribute("id"));const{container:f}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(f.append(c),T.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(c),c.classList.add(ps),"ontouchstart"in document.documentElement)for(const p of[].concat(...document.body.children))T.on(p,"mouseover",Ot);this._queueCallback(()=>{T.trigger(this._element,this.constructor.eventName("shown")),this._isHovered===!1&&this._leave(),this._isHovered=!1},this.tip,this._isAnimated())}
6hide(){if(this._isShown()&&!T.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(ps),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))T.off(t,"mouseover",Ot);this._activeTrigger.click=!1,this._activeTrigger[Hs]=!1,this._activeTrigger[ji]=!1,this._isHovered=null,this._queueCallback(()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),T.trigger(this._element,this.constructor.eventName("hidden")))},this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const n=this._getTemplateFactory(t).toHtml();if(!n)return null;n.classList.remove(Rs,ps),n.classList.add(`bs-${this.constructor.NAME}-auto`);const c=(f=>{do f+=Math.floor(1e6*Math.random());while(document.getElementById(f));return f})(this.constructor.NAME).toString();return n.setAttribute("id",c),this._isAnimated()&&n.classList.add(Rs),n}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new Dr({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Rs)}_isShown(){return this.tip&&this.tip.classList.contains(ps)}_createPopper(t){const n=ke(this._config.placement,[this,t,this._element]),c=Rr[n.toUpperCase()];return St(this._element,t,this._getPopperConfig(c))}_getOffset(){const{offset:t}=this._config;return typeof t=="string"?t.split(",").map(n=>Number.parseInt(n,10)):typeof t=="function"?n=>t(n,this._element):t}_resolvePossibleFunction(t){return ke(t,[this._element])}_getPopperConfig(t){const n={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:c=>{this._getTipElement().setAttribute("data-popper-placement",c.state.placement)}}]};return{...n,...ke(this._config.popperConfig,[n])}}_setListeners(){const t=this._config.trigger.split(" ");for(const n of t)if(n==="click")T.on(this._element,this.constructor.eventName("click"),this._config.selector,c=>{this._initializeOnDelegatedTarget(c).toggle()});else if(n!=="manual"){const c=n===ji?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),f=n===ji?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");T.on(this._element,c,this._config.selector,p=>{const b=this._initializeOnDelegatedTarget(p);b._activeTrigger[p.type==="focusin"?Hs:ji]=!0,b._enter()}),T.on(this._element,f,this._config.selector,p=>{const b=this._initializeOnDelegatedTarget(p);b._activeTrigger[p.type==="focusout"?Hs:ji]=b._element.contains(p.relatedTarget),b._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},T.on(this._element.closest(wn),Tn,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(t,n){clearTimeout(this._timeout),this._timeout=setTimeout(t,n)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const n=De.getDataAttributes(this._element);for(const c of Object.keys(n))jr.has(c)&&delete n[c];return t={...n,...typeof t=="object"&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=t.container===!1?document.body:ze(t.container),typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),typeof t.title=="number"&&(t.title=t.title.toString()),typeof t.content=="number"&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const[n,c]of Object.entries(this._config))this.constructor.Default[n]!==c&&(t[n]=c);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each(function(){const n=Xt.getOrCreateInstance(this,t);if(typeof t=="string"){if(n[t]===void 0)throw new TypeError(`No method n
6amed "${t}"`);n[t]()}})}}Ae(Xt);const qr={...Xt.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},Br={...Xt.DefaultType,content:"(null|string|element|function)"};class ms extends Xt{static get Default(){return qr}static get DefaultType(){return Br}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{".popover-header":this._getTitle(),".popover-body":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each(function(){const n=ms.getOrCreateInstance(this,t);if(typeof t=="string"){if(n[t]===void 0)throw new TypeError(`No method named "${t}"`);n[t]()}})}}Ae(ms);const Fs=".bs.scrollspy",Ur=`activate${Fs}`,kn=`click${Fs}`,Vr=`load${Fs}.data-api`,gi="active",qs="[href]",En=".nav-link",Wr=`${En}, .nav-item > ${En}, .list-group-item`,zr={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Kr={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Ri extends $e{constructor(t,n){super(t,n),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return zr}static get DefaultType(){return Kr}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=ze(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,typeof t.threshold=="string"&&(t.threshold=t.threshold.split(",").map(n=>Number.parseFloat(n))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(T.off(this._config.target,kn),T.on(this._config.target,kn,qs,t=>{const n=this._observableSections.get(t.target.hash);if(n){t.preventDefault();const c=this._rootElement||window,f=n.offsetTop-this._element.offsetTop;if(c.scrollTo)return void c.scrollTo({top:f,behavior:"smooth"});c.scrollTop=f}}))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(n=>this._observerCallback(n),t)}_observerCallback(t){const n=b=>this._targetLinks.get(`#${b.target.id}`),c=b=>{this._previousScrollData.visibleEntryTop=b.target.offsetTop,this._process(n(b))},f=(this._rootElement||document.documentElement).scrollTop,p=f>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=f;for(const b of t){if(!b.isIntersecting){this._activeTarget=null,this._clearActiveClass(n(b));continue}const w=b.target.offsetTop>=this._previousScrollData.visibleEntryTop;
vendor: 7,416 bytes, line 6
6if(p&&w){if(c(b),!f)return}else p||w||c(b)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=L.find(qs,this._config.target);for(const n of t){if(!n.hash||Ze(n))continue;const c=L.findOne(decodeURI(n.hash),this._element);ft(c)&&(this._targetLinks.set(decodeURI(n.hash),n),this._observableSections.set(n.hash,c))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(gi),this._activateParents(t),T.trigger(this._element,Ur,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))L.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(gi);else for(const n of L.parents(t,".nav, .list-group"))for(const c of L.prev(n,Wr))c.classList.add(gi)}_clearActiveClass(t){t.classList.remove(gi);const n=L.find(`${qs}.${gi}`,t);for(const c of n)c.classList.remove(gi)}static jQueryInterface(t){return this.each(function(){const n=Ri.getOrCreateInstance(this,t);if(typeof t=="string"){if(n[t]===void 0||t.startsWith("_")||t==="constructor")throw new TypeError(`No method named "${t}"`);n[t]()}})}}T.on(window,Vr,()=>{for(const o of L.find('[data-bs-spy="scroll"]'))Ri.getOrCreateInstance(o)}),Ae(Ri);const Qt=".bs.tab",Yr=`hide${Qt}`,Xr=`hidden${Qt}`,Qr=`show${Qt}`,Gr=`shown${Qt}`,Jr=`click${Qt}`,Zr=`keydown${Qt}`,eo=`load${Qt}`,to="ArrowLeft",An="ArrowRight",io="ArrowUp",Cn="ArrowDown",Bs="Home",Sn="End",Gt="active",Pn="fade",Us="show",xn=".dropdown-toggle",Vs=`:not(${xn})`,On='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Ws=`.nav-link${Vs}, .list-group-item${Vs}, [role="tab"]${Vs}, ${On}`,so=`.${Gt}[data-bs-toggle="tab"], .${Gt}[data-bs-toggle="pill"], .${Gt}[data-bs-toggle="list"]`;class Jt extends $e{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),T.on(this._element,Zr,n=>this._keydown(n)))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const n=this._getActiveElem(),c=n?T.trigger(n,Yr,{relatedTarget:t}):null;T.trigger(t,Qr,{relatedTarget:n}).defaultPrevented||c&&c.defaultPrevented||(this._deactivate(n,t),this._activate(t,n))}_activate(t,n){t&&(t.classList.add(Gt),this._activate(L.getElementFromSelector(t)),this._queueCallback(()=>{t.getAttribute("role")==="tab"?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),T.trigger(t,Gr,{relatedTarget:n})):t.classList.add(Us)},t,t.classList.contains(Pn)))}_deactivate(t,n){t&&(t.classList.remove(Gt),t.blur(),this._deactivate(L.getElementFromSelector(t)),this._queueCallback(()=>{t.getAttribute("role")==="tab"?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),T.trigger(t,Xr,{relatedTarget:n})):t.classList.remove(Us)},t,t.classList.contains(Pn)))}_keydown(t){if(![to,An,io,Cn,Bs,Sn].includes(t.key))return;t.stopPropagation(),t.preventDefault();const n=this._getChildren().filter(f=>!Ze(f));let c;if([Bs,Sn].includes(t.key))c=n[t.key===Bs?0:n.length-1];else{const f=[An,Cn].includes(t.key);c=wi(n,t.target,f,!0)}c&&(c.focus({preventScroll:!0}),Jt.getOrCreateInstance(c).show())}_getChildren(){return L.find(Ws,this._parent)}_getActiveElem(){return this._getChildren().find(t=>this._elemIsActive(t))||null}_setInitialAttributes(t,n){this._setAttributeIfNotExists(t,"role","tablist");for(const c of n)this._setInitialAttributesOnChild(c)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const n=this._elemIsActive(t),c=this._getOuterElement(t);t.setAttribute("aria-selected",n),c!==t&&this._setAttributeIfNotExists(c,"role","presentation"),n||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const n=L.getElementFromSelector(t);n&&(this._setAttributeIfNotExists(n,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(n,"aria-labelledby",`${t.id}`))}_toggleDropDown(t,n){const c=this._getOuterElement(t);if(!c.classList.contains("dropdown"))return;const f=(p,b)=>{const w=L.findOne(p,c);w&&w.classList.toggle(b,n)};f(xn,Gt),f(".dropdown-menu",Us),c.setAttribute("aria-expanded",n)}_setAttributeIfNotExists(t,n,c){t.hasAttribute(n)||t.setAttribute(n,c)}_elemIsActive(t){return t.classList.contains(Gt)}_getInnerElement(t){return t.matches(Ws)?t:L.findOne(Ws,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each(function(){const n=Jt.getOrCreateInstance(this);if(typeof t=="string"){if(n[t]===void 0||t.startsWith("_")||t==="constructor")throw new TypeError(`No method named "${t}"`);n[t]()}})}}T.on(document,Jr,On,function(o){["A","AREA"].includes(this.tagName)&&o.preventDefault(),Ze(this)||Jt.getOrCreateInstance(this).show()}),T.on(window,eo,()=>{for(const o of L.find(so))Jt.getOrCreateInstance(o)}),Ae(Jt);const Pt=".bs.toast",no=`mouseover${Pt}`,ro=`mouseout${Pt}`,oo=`focusin${Pt}`,ao=`focusout${Pt}`,lo=`hide${Pt}`,co=`hidden${Pt}`,uo=`show${Pt}`,ho=`shown${Pt}`,Ln="hide",gs="show",bs="showing",fo={animation:"boolean",autohide:"boolean",delay:"number"},po={animation:!0,autohide:!0,delay:5e3};class Hi extends $e{constructor(t,n){super(t,n),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return po}static get DefaultType(){return fo}static get NAME(){return"toast"}show(){T.trigger(this._element,uo).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(Ln),pt(this._element),this._element.classList.add(gs,bs),this._queueCallback(()=>{this._element.classList.remove(bs),T.trigger(this._element,ho),this._maybeScheduleHide()},this._element,this._config.animation))}hide(){this.isShown()&&(T.trigger(this._element,lo).defaultPrevented||(this._element.classList.add(bs),this._queueCallback(()=>{this._element.classList.add(Ln),this._element.classList.remove(bs,gs),T.trigger(this._element,co)},this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(gs),super.dispose()}isShown(){return this._element.classList.contains(gs)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(t,n){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=n;break;case"focusin":case"focusout":this._hasKeyboardInteraction=n}if(n)return void this._clearTimeout();const c=t.relatedTarget;this._element===c||this._element.contains(c)||this._maybeScheduleHide()}_setListeners(){T.on(this._element,no,t=>this._onInteraction(t,!0)),T.on(this._element,ro,t=>this._onInteraction(t,!1)),T.on(this._element,oo,t=>this._onInteraction(t,!0)),T.on(this._element,ao,t=>this._onInteraction(t,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each(function(){const n=Hi.getOrCreateInstance(this,t);if(typeof t=="string"){if(n[t]===void 0)throw new TypeError(`No method named "${t}"`);n[t](this)}})}}return si(Hi),Ae(Hi),{Alert:Mt,Button:gt,Carousel:lt,Collapse:ct,Dropdown:Ge,Modal:Yt,Offcanvas:dt,Popover:ms,ScrollSpy:Ri,Tab:Jt,Toast:Hi,Tooltip:Xt}});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.