(window.webpackJsonp=window.webpackJsonp||[]).push([[49],[function(e,t,r){"use strict";e.exports=r(1324)},,,,function(e,t,r){var n=e.exports=new(r(242)),i={api_v2_host:!0,api_auth_host:!0,secure_host:!0,auth_ui_host:!0,webi_host:!0,two_factor_config_host:!0,env:!0,checkout_host:!0,mastering_host:!0,insights_host:!0,forceCredentials:!0,allowConfigOverride:!0,staging_env_key:!0,no_pub:!0,gql_host:!0,velvetCake_host:!0,drm_license_host:!0};r(1).each({app_id:1e3*String(Date.now()).substr(-8)+Math.floor(1e3*Math.random()),app_version:null,public_api_host:"https://api.soundcloud.com/",api_v2_host:"https://api-v2.soundcloud.com/",api_auth_host:"https://api-auth.soundcloud.com/",auth_ui_host:"https://secure.soundcloud.com/",secure_host:"https://secure.soundcloud.com/",artists_host:"https://artists.soundcloud.com",repost_host:"https://repost.soundcloud.com",web_errors_host:"https://web-errors.soundcloud.com",client_application_id:46941,client_id:"1yti6vQ083VZh29fcJTHSDD56pjuQvI9",env:"production",eventlogger_tracking_url:"https://no9pldds1lmn3.soundcloud.com",checkout_host:"https://checkout.soundcloud.com",mastering_host:"https://mastering.soundcloud.com",webi_host:"https://soundcloud.com",insights_host:"https://insights-ui.soundcloud.com/",mobi_host:"https://m.soundcloud.com",two_factor_config_host:"https://mobi.soundcloud.com","rc-users_host":"https://d2g5n8b622dsn7.cloudfront.net/",staging_env_key:"",gql_host:"https://graph.soundcloud.com/graphql",velvetCake_host:"https://velvetcake.soundcloud.com",drm_license_host:"https://license.media-streaming.soundcloud.cloud",geoip:null,privacy_settings:null,airbrake_project_key:"04b3f291e3db982608ca3611c0e3f6fe",airbrake_project_id:"129825",fb_app_id:"19507961798",google_client_id:"984739005367.apps.googleusercontent.com",apple_id_client_id:"com.soundcloud.services.siwa",playHistoryLength:50,maxComments:200,me:null,mixi_api_key:"1403ed11563185e9cff6cfeedf4f2ecf77fa459e",notifications:null,notificationsUri:"wss://pushers.soundcloud.com/",oauth_token:null,preferFlashAudio:!0,promotedContentServer:"https://promoted.soundcloud.com/promo",promotedContentAccessToken:"web",rubiconPartnerCode:16386,oauthRedirectUri:"https://soundcloud.com/signin/callback",restoreToSound:null,features:null,router:null,songkick_api_key:"ZWsLr2h7FF5sHG54",facebook_api_key:"a7309b9a9a85963579f7e8bcffd36d2a",versionOutOfDate:!1,versionUpdateInterval:r(43).MS_IN_HOUR,visualsQueueHost:"https://visuals-queue.soundcloud.com/visuals",wisHost:"https://wis.sndcdn.com",systemUserId:193,externalRedirectsWithScDomain:["/stories","/getstarted"]},(function(e,t){n.set(t,e,{silent:!0})})),"object"==typeof window.__sc_env&&r(1).each(window.__sc_env,(function(e,t){i[t]&&n.set(t,e,{silent:!0})})),n.finalize()},function(e,t,r){"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r(.+?)<\/\1>|<([A-Z][a-zA-Z0-9]*?)\s?\/>/;function f(e,t){void 0===t&&(t={});for(var r=e.split(d),n=[],o=0;r.length;){if(o%2==0)n=n.concat(r.shift());else{var s=r.splice(0,3),l=s[0],u=s[1],c=s[2],h=l||c,p=t[h],g=void 0;g=p?a.default.createElement(p,{key:o},u?f(u,t):u):u?"<".concat(h,">").concat(u,""):"<".concat(h," />"),n=n.concat(g)}o++}return a.default.createElement.apply(a.default,i([a.default.Fragment,{}],n,!1))}t.processStringToJSXElement=f;var h;function p(e,t){return void 0===t&&(t=h.Default),c().dateTimeHelper.format(new Date(e),t)}function g(e,t){void 0===t&&(t={});var r=c();return(0,u.formatCompact)(r.numberHelper,e,t)}t.Lingua=function(e){var r=a.default.useContext(t.LinguaContext),n=e.t,i=e.values,o=e.context,s=e.comment,l="";if(e.tp){var u=e.tp,c=e.count;l=r.tp(n,u,c,i,{context:o,comment:s})}else l=r.t(n,i,{context:o,comment:s});return f(l,i)},t.LinguaPending=t.Lingua,function(e){e.Relative="relative",e.ISO="iso",e.Readable="readable",e.ReadableTime="readable_time",e.ReadableAbbreviated="readable_abbreviated",e.ReadableAbbreviatedWithoutYear="readable_abbreviated_without_year",e.ReadableWithoutDay="readable_without_day",e.ReadableAbbreviatedWithoutDay="readable_abbreviated_without_day",e.ReadableWithWeekday="readable_with_weekday",e.ReadableAbbreviatedWithWeekday="readable_abbreviated_with_weekday",e.ReadableAbbreviatedTime="readable_abbreviated_time",e.MonthAbbreviated="month_abbreviated",e.DateWithoutYear="date_without_year",e.Month="month",e.Default="default",e.Year="year"}(h=t.DateTimeFormat||(t.DateTimeFormat={})),t.useFormattedDate=p,t.useFormattedNumber=g;t.FormattedDate=function(e){var t=e.date,r=e.format,n=void 0===r?h.Default:r;return a.default.createElement(a.default.Fragment,null,p(t,n))};t.localDateToUtc=function(e){var t=new Date(e);return new Date(t.getTime()+6e4*t.getTimezoneOffset())};t.UTCFormattedDate=function(e){var r=e.date,n=e.format,i=(0,t.localDateToUtc)(r);return a.default.createElement(t.FormattedDate,{date:i,format:n})};function v(e,t){return void 0===t&&(t={}),c().dateTimeHelper.timecode(e,t)}t.FormattedNumber=function(e){var t=e.value,r=n(e,["value"]);return a.default.createElement(a.default.Fragment,null,g(t,r))},t.useTimecode=v;t.Timecode=function(e){var t=e.ms,r=e.inWords,n=e.minimal;return a.default.createElement(a.default.Fragment,null,v(t,{inWords:r,minimal:n}))};t.FallbackLinguaProvider=function(e){var r=e.supportedLocales,n=e.fallback,i=e.children,o=c();if(r.includes(o.getLocale()))return a.default.createElement(a.default.Fragment,null,i);var s=null!=n?n:{locale:l.DEFAULT_LOCALE,phrases:{}},u=s.locale,d=s.phrases;return a.default.createElement(t.LinguaProvider,{locale:u,phrases:d},i)}},,,,,function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r1?t-1:0),i=1;i=.25*this.getMediaDuration()},createPlayer:function(){var e=this;if(!this.player){if(this.isDisabled())return!1;window.clearTimeout(this._unavailableResetTimer),this._temporarilyUnavailable=!1;try{var t=r(1).assign({soundContext:this._soundContext,checkpointInterval:this._checkpointInterval,audioReporter:this.trackAudioEvent.bind(this)},this.isAd()?{type:r(256).PlayerType.AD,url:this.get("url")}:{type:r(256).PlayerType.GENERAL,dataPromise:this.getOrFetch(["secret_token","duration","policy","media"]).then((function(t){var n=t.secret_token,i=t.duration,o=e.get("track_authorization"),a=new(r(325).Signal),s=r(1).debounce((function(){o=e.get("track_authorization"),a.trigger.apply(a,arguments)}),0);return e.on("change:policy change:media",s),{trackUrn:e.getUrn(),trackId:e.id,secretToken:n,duration:i,getPolicy:function(){return e.get("policy")},onPolicyOrMediaChange:a,getMediaPayload:function(){return e.get("media")},getTrackAuthorization:function(){return o}}}))});this.player=r(326).createPlayer(this.id,t)}catch(e){if(e instanceof n)return this.makeTemporarilyUnavailable(),!1;throw e}var o=this.player,s=function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o0&&o.enablePreloading()}return!0},requestPreloading:function(){this._preloadingCounter++||this.createPlayer()&&this.player.enablePreloading()},unrequestPreloading:function(){--this._preloadingCounter||this.player&&this.player.disablePreloading()},disposePlayer:function(){this.player&&(r(1).forEach(this.playerListeners||[],(function(e){e.remove()})),this.playerListeners=null,this.player.kill(),this.player.release(),this.player=null,window.clearTimeout(this._unavailableResetTimer))},toJSON:function(){var e=r(30).prototype.toJSON.apply(this,arguments);return this.playlist&&(e._playlist={},r(1).each(["id","permalink","permalink_url","secret_token","user_id"],(function(t){e._playlist[t]=this.playlist.get(t)}),this)),this.systemPlaylist&&(e._systemPlaylist={},r(1).each(["urn","permalink"],(function(t){e._systemPlaylist[t]=this.systemPlaylist.get(t)}),this)),e},saveUrl:function(){return this.isNew()?this.getEndpointUrl("trackCreate"):this.getEndpointUrl("trackUpdate",{urn:this.getUrn()})},saveFormat:"json",getAttributesToBeSaved:function(){var e=["api_streamable","commentable","description","downloadable","embeddable","feedable","genre","isrc","isrc_generate","label_name","license","monetization","original_filename","permalink","purchase_title","purchase_url","release_date","replacing_uid","replacing_original_filename","reveal_comments","reveal_stats","sharing","shared_to","snippet_presets","tag_list","title","uid","geo_blockings","publisher_metadata","restrictions","rightsholders","caption"].reduce(function(e,t){return null!=this[t]&&(e[t]=this[t]),e}.bind(this.attributes),{});return r(1).assign(e,r(1).pick(this.attributes,["scheduled_public_date","scheduled_timezone","scheduled_public_timezone"])),e},trackAudioEvent:function(e){var t=this._lastActionMetadata,n=t.userInitiated,i=t.pause_reason;e.userInitiated=n,e.pauseReason="pause"===e.type?i:void 0,e.isRepeating="one"===r(20).getQueueState().repeatMode,e.currentMetadata=r(20).getCurrentMetadata(),e.sound=this,this._ad_attributes&&(e.ad_attributes=this._ad_attributes),e.currentMetadata?r(19).trackAudioEvent(e):r(113).notify(new Error("No metadata for sound audio event: "+e.type+", "+JSON.stringify(r(20).getCurrentMetadataEmptyReasons())))}},{states:{READY:"ready",PROCESSING:"processing",FAILED:"failed",FINISHED:"finished"},hashFn:function(e){var t=e.resource_id;if(t){if("object"==typeof t){if("playlist_id"in t)return[t.playlist_id,t.sound_id].join("_");if("system_playlist_id"in t)return[t.system_playlist_id,t.sound_id].join("_");if("ad_target_id"in t)return["ad",t.ad_target_id].join("_")}return t}return e.id||null},resolve:function(e,t,n){return r(30)._resolve(this,[e,t,n],(function(r){var n=r.get("user");return n&&r.get("permalink")===t&&n.permalink===e}))},normalize:function(e){var t=e.waveform_url;return t&&t.indexOf("/w1.")>-1&&(e.waveform_url=t.replace(/\/w1\./,"/wis.")),e},onCleanup:function(e){return e._visuals&&(e._visuals.release(),e._visuals=null),e.disposePlayer(),r(30).onCleanup.apply(this,arguments)}});function f(){this._visuals||(this._visuals=new(r(764))(null,{resource_id:this.id})),this._visuals.reset(this.get("visuals"),{parse:!0}),this._visuals.lastFetchTime=Date.now()}function h(){g.call(this),v.call(this)}function p(){this.computed__displayArtist=this.getDisplayArtist(),this.trigger("change:computed__displayArtist",this)}function g(){var e=this.isInteractive()&&!this.isSnippetized();e!==this._playable&&(this._playable=e,this.trigger("change:playable",e))}function v(){r(11).trigger("soundPolicyChange",this)}},,,,,function(e,t,r){(function(t){function n(){return(n=Object.assign||function(e){for(var t=1;t1?"virtual":null!=(e=window.performance)&&e.navigation&&1===window.performance.navigation.type?"reload":"initial"},unauthenticated:function(){r(19).trackAuthEvent(r(295).initiate,{target:"implicit:navigate"});var e=r(33).parse(window.location.href).relative;this.navigateToRoute("signin",e,{replace:!0,trigger:!0})},detachCurrentLayout:function(){this.currentLayout&&this.currentLayout.$el.detach()}},{getRoute:function(e){var t=o[e];if(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i-1},containsSoundId:function(e){return!!this.findSoundById(e)},getNumSounds:function(){return this.soundsCollection.length||this.get("track_count")||0},play:function(e){var t=this.getCurrentSound();t&&t.play(e)},pause:function(e){var t=this.getCurrentSound();t&&t.pause(e)},hasDataForPlay:function(){return this.attributes.hasOwnProperty("tracks")},isNowPlaying:function(){return this.getSoundIndex(r(20).getCurrentSound())>-1},isBuffering:function(){return this.soundsCollection.some(d("isBuffering"))},isPlaying:function(){return this.soundsCollection.some(d("isPlaying"))},isProcessing:function(){return this.soundsCollection.length>0&&this.soundsCollection.every(d("isProcessing"))},isPlayable:function(){return!this.get("tracks")||this.soundsCollection.some(d("isPlayable"))},isAlbum:function(){return!!this.get("is_album")},parse:function(e,t){var n,i;return t=t||{},null==(n=(e=r(30).prototype.parse.apply(this,arguments)).user)||!n.urn||null!=(i=e.user)&&i.id||(e.user.id=r(32).getAsAttributes(e.user.urn).id),t.isSavingOrder&&(e.tracks||e.track_count)&&(delete e.tracks,delete e.track_count),e.secret_token&&e.tracks&&e.tracks.forEach((function(t){"public"===t.sharing||t.secret_token||(t.secret_token=e.secret_token)})),e},extractSecretToken:function(e){return r(33).parse(e.uri).query.secret_token},duration:function(){return this.get("duration")},removeSound:function(e){if(e=this.findSound(e)){var t=this.getSoundIndex(e),r=this.get("tracks").slice();return e===this._currentSound&&(this._currentSound=this.soundsCollection.at(Math.max(t-1,0))),e.isPlaying()&&e.pause(),this.toggleListeners(e,!1),r.splice(t,1),this.soundsCollection.remove(e),u.call(this),this.set("tracks",r),e.playlist=null,e.release(),!0}return!1},addSound:function(e){if(this.findSound(e))return!1;var t=r(1).defaults({resource_id:{playlist_id:this.id,sound_id:e.id}},e.attributes),n=new(r(29))(t,{soundContext:{playlist_id:this.id,sound_id:e.id}});n.playlist=this,n.originalSound=e,this.addSubmodel(e),this.toggleListeners(n,!0);var i=this.get("tracks");return i||(this.set("tracks",[],{silent:!0}),i=this.get("tracks")),i.push(n.attributes),this.soundsCollection.add(n),u.call(this,{silent:!0}),this.forceChange("tracks"),!0},getCurrentOrder:function(){return this.soundsCollection.pluck("id")},reorder:function(e){this.soundsCollection.sort({silent:!0,comparator:function(t){return e.indexOf(t.id)}}),this.set({tracks:this.soundsCollection.toJSON(),track_count:this.soundsCollection.length})},hasCapacity:function(e){return r(1).union(this.soundsCollection.pluck("id"),e).length<=500},saveOrder:function(e){var t=this,n=this.soundsCollection.pluck("id"),i={playlist:{tracks:n}};return r(44).Model.prototype.save.call(this,{},r(1).assign({url:this.saveUrl(),data:JSON.stringify(i),contentType:"application/json",isSavingOrder:!0},e)).done((function(){r(11).broadcast({excludeThis:!0},"tracklistChange",{id:t.id,trackIds:n})}))},getAttributesToBeSaved:function(){var e=r(30).prototype.getAttributesToBeSaved.call(this);return e.tracks&&(e.tracks=r(1).pluck(e.tracks,"id")),e},resetOrder:function(){var e=this;return this.fetch().done((function(){e.soundsCollection.each((function(e){e.playlist=null,e.release()})),e.soundsCollection.reset([],{silent:!0}),e.prepareSounds()}))},hasDifferentCreators:function(){var e=this.get("user_id"),t=!1,r=!this.soundsCollection.every((function(r){var n=r.get("user_id");return null==n?(t=!0,!0):n===e}));return r||(t?null:r)},hasVisuals:function(){return!1},_onCurrentSoundChanged:function(){var e=r(20).getCurrentSound();this.containsSound(e)?this._currentSound=e:this._currentSound&&this._currentSound.player&&this._currentSound.player.isEnded()&&(this._currentSound=this.soundsCollection.at(this.getSoundIndex(this._currentSound)+1)||null)}},{onCleanup:function(e){e.soundsCollection.each((function(e){e.playlist=null,e.release()})),e.soundsCollection.off(),delete e.soundsCollection,r(30).onCleanup(e)},resolve:function(e,t,n){return r(30)._resolve(this,[e,"sets",t,n],(function(r){var n=r.get("user");return n&&r.get("permalink")===t&&n.permalink===e}))}});function a(e,t){e.originalSound.set(e.attributes,t)}function s(e,t){this.set(e.attributes,t)}function l(){u.call(this)}function u(e){var t=this.soundsCollection.pluck("duration").reduce((function(e,t){return e+(t||0)}),0);this.set("duration",t,e)}function c(e){var t=this,n=e.filter((function(e){return!t.findSoundById(e)}));this.soundsCollection.filter((function(t){var r=t.id;return-1===e.indexOf(r)})).forEach((function(e){return t.removeSound(e)})),n.forEach((function(e){var n=new(r(29))({id:e});t.addSound(n),n.release()})),this.reorder(e)}var d=r(1).memoize((function(e){return function(t){return t[e]()}}))},,,,,,,,function(e,t,r){var n;o();var i=e.exports=r(30).extend({resource_type:"product",setup:function(){n()},fetch:function(e,t){var r=this;return void 0===t&&(t={}),i.fetchProductsByCategory(i.idToCategory(this.id),this.options.ref,t.promoCode).then((function(t){var n=t.body,i=n.plans,o=n.active_subscription;r.lastFetchTime=Date.now(),r.populateFromPlans(i,e),r.populateActiveSubscription(o)}),(function(){r.populateFromPlans([])}))},populateFromPlans:function(e,t){var n=r(1).findWhere(e,{id:i.idToApiId(this.id)});n?this.set(this.parse(n,t),t):this.set("active",!1)},populateActiveSubscription:function(e){this.set("activeSubscription",e)},parse:function(e){return r(1).extend({active:!0},r(1).omit(e,"id"))},isActive:function(){return!!this.get("active")},getActiveSubscription:function(){return this.get("activeSubscription")},isAvailable:function(){return this.isFree()||!!this.get("preselected_term")},isPro:function(){return-1===this.id.indexOf("distro")&&-1===this.id.indexOf("unlimited")&&!this.isFree()},isProUnlimited:function(){return this.id.indexOf("unlimited")>-1},isProDistro:function(){return this.id.indexOf("distro")>-1},isFree:function(){return this.id.indexOf("free")>-1},isTrial:function(){return!!this.get("trial")},getCurrency:function(){return this.getPrice().currency},getTitle:function(){return this.isPro()?r(2).Lingua.t("Pro"):this.isProUnlimited()?r(2).Lingua.t("Pro Unlimited"):this.isProDistro()?r(2).Lingua.t("Repost by SoundCloud"):r(2).Lingua.t("Free")},getPrice:function(e){return this.getTermData(e).price||{currency:"EUR"}},getDisplayPrice:function(e){if(!this.getPrice().hasOwnProperty("amount"))return null;var t=this.getPrice(),n=t.amount,i=t.currency;return r(7).LinguaLib.priceHelper.format(n,i,null!=e&&e.noPrecision?0:void 0)},getTermData:function(e){return e=e||this.getPreselectedTerm(),this.get(e)||{}},getPreselectedTerm:function(){return this.get("preselected_term")},getUrn:function(){var e;return null==(e=this.getTermData().package)?void 0:e.urn},hasPromotion:function(e){var t,r=this.get("promotion");return e?0===(null==r||null==(t=r.urn)?void 0:t.indexOf(e)):!!r},hasDiscount:function(e){var t,r,n,i,o=null==(t=this.get("yearly"))||null==(r=t.discount)?void 0:r.urn,a=null==(n=this.get("monthly"))||null==(i=n.discount)?void 0:i.urn;return e?o===e||a===e:!!o||!!a}},{useCases:{DISABLED:"disabled",REGULAR:"regular",MONEY_BACK:"money_back",RENEWAL:"renewal",DOWNGRADE:"downgrade",UPGRADE:"upgrade"},idToApiId:function(e){switch(e){case r(38).CONSUMER_SUBSCRIPTION_MID_TIER:return"consumer-mid-tier";case r(38).CONSUMER_SUBSCRIPTION_HIGH_TIER:return"consumer-high-tier";case r(38).CONSUMER_SUBSCRIPTION_HIGH_DJ_TIER:return"consumer-high-dj-tier";case r(38).CREATOR_SUBSCRIPTION_FREE:return"free";case r(38).CREATOR_SUBSCRIPTION_PRO:return"pro";case r(38).CREATOR_SUBSCRIPTION_PRO_UNLIMITED:return"pro-unlimited"}},idToCategory:function(e){switch(e){case r(38).CONSUMER_SUBSCRIPTION_MID_TIER:case r(38).CONSUMER_SUBSCRIPTION_HIGH_TIER:case r(38).CONSUMER_SUBSCRIPTION_HIGH_DJ_TIER:return"consumer-subscription";case r(38).CREATOR_SUBSCRIPTION_FREE:case r(38).CREATOR_SUBSCRIPTION_PRO:case r(38).CREATOR_SUBSCRIPTION_PRO_UNLIMITED:return"creator-subscription"}},fetchProductsByCategory:r(1).memoize((function(e,t,n){return r(46).callEndpoint("paymentQuotations",{category:e},{ref:t,promo_code:n}).fail((function(){delete i.fetchProductsByCategory.cache[e+"--"+n]}))}),(function(e,t,r){return e+"--"+r})),resetLoginListener:o,clearRequestCache:function(){i.fetchProductsByCategory.cache={}}});function o(){r(11).off("connect:hasUserData",a),n=r(1).once((function(){r(17).isLoggedIn()||r(11).once("connect:hasUserData",a)}))}function a(){i.clearRequestCache(),i.instances.invoke("fetch")}},,,,,function(e,t,r){!function(t){var r,n,i,o,a,s,l,u,c,d,f,h,p,g,v,m,y,_,b,C={},E=/^[^v]/,A=!0,S=!0,w=!1;function O(){clearTimeout(v),n=i=o=a=s=l=u=d=c=f=h=m=v=_=b=w=t.__sc_events=void 0,y=[],A=!0,S=!0,g=function(){throw new Error("EventGateway must be initialized")}}function k(){return Math.floor(1e6*Math.random())}function T(e,t){var r,n=function(e){var t,r={};for(t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r}(e);for(r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);return n}function L(e){return(e="object"==typeof e?e:{}).context=e.context||{},e.context.scope=e.context.scope||[],e}function P(e){return e.replace(E,"v$&")}function M(e,t,r){var n=e[r];return t[r]="object"==typeof n?Object.keys(G(n)).reduce(M.bind(null,n),{}):""+n,t}function x(e,t){var r=G(t);return"0.0.0"===e?Object.keys(r).reduce(M.bind(null,r),{}):r}function D(e,t,r){var n={events:e};h&&(n.auth_token=h),_("post",c||d+"/me",n,r,(function(r){r&&t&&setTimeout((function(){D(e,!1,!1)}),3e4)}))}function R(){var e=!!(t&&t.navigator&&t.navigator.sendBeacon);function r(e){e.onload=e.onerror=null}function n(e,t){r(e),t()}function i(e,t){r(e),/^4/.test(e.status)||t(e.status)}return function(r,o,a,s,l){var u=JSON.stringify(a);if(s&&e)t.navigator.sendBeacon(o,u);else{var c=new t.XMLHttpRequest;c.onload=n.bind(null,c,l),c.onerror=i.bind(null,c,l),c.open(r,o,!0),c.send(u)}}}function I(e){w&&t.__sc_events.push(e),m||!S?(y=y.concat(e),!v&&S&&(v=setTimeout(N,m))):D(e,!0,!1)}function N(e){clearTimeout(v),v=null,y.length&&(D(y.slice(),!0,!!e),y.length=0)}function j(e,t,n){g();var i=Date.now();K(n).then((function(n){I({event:e,version:P(t),payload:x(t,r.setPayloadAttributes(n,i))})}))}function F(e,t){for(var r=0,n=t.length;r0&&(e.referrer=c),e},impression:function(e,t){j("impression",C.impression||"1.16.0",K(t).then((function(e){return r.normalizeImpressionEvent(e)})))},normalizeImpressionEvent:function(e){var t=z(e=L(e),"impression_name","impression_category","impression_object","event_name","impression_attributes","page_name","page_urn","referrer_properties","ad_urn","monetized_object","monetization_type","promoted_by","external_media","url");return t.page_context=e.context.scope.join(":"),t},click:function(e,t,n,i){j("click",C.click||"0.0.0",K(i).then((function(i){return r.normalizeClickEvent(e,t,n,i)})))},normalizeClickEvent:function(e,t,r,n){var i={ad_urn:(n=L(n)).ad_urn,campaign:n.context.campaign,chapter:r.join("::"),context:n.context.scope.join(":"),external_media:n.external_media,level:t,monetization_type:n.monetization_type,monetized_object:n.monetized_object,promoted_by:n.promoted_by,urn:n.urn,user:B(e,C.click),click_name:n.click_name,click_object:n.click_object,click_target:n.click_target,click_attributes:n.click_attributes,click_category:n.click_category,event_name:n.event_name,page_name:n.page_name,page_urn:n.page_urn,referrer_properties:n.referrer_properties};return V(i,n.context.attribution),T(i,n.params)},audio:function(e){j("audio",C.audio||"1.27.17",K(e).then(function(e){var t=U("tracks",e.id),r=z(e,"user","page_name","page_urn","source","in_playlist","playlist_position","reposted_by","track_length","track_authorization","protocol","player_type","preset","quality","audio_quality_mode","app_state","action","trigger","pause_reason","ad_urn","monetization_type","promoted_by","policy","monetization_model");return V(r,e.attribution),r.track=t,r.track_owner=U("users",e.trackOwnerId),r.playhead_position=e.playheadPosition,r.monetized_object=e.monetized_urn,r}.bind(this)))},audioPerformance:function(e){j("audio_performance",C.audioPerformance||"0.0.0",K(e).then((function(e){if(F(e,["type","latency","protocol","host"])||void 0===e.playertype&&void 0===e.player_type)throw new Error("EventGateway — AudioPerformance : One or multiple mandatory arguments are missing");return{type:e.type,latency:e.latency,protocol:e.protocol,player_type:e.player_type||e.playertype,host:e.host,bitrate:e.bitrate,format:e.format,preloaded:e.preloaded,app_state:e.app_state,track_urn:e.track_urn,player_version:e.player_version,player_build_number:e.player_build_number,preset:e.preset,quality:e.quality,audio_quality_mode:e.audio_quality_mode,entity_type:e.entity_type,player_variant:e.player_variant}})))},audioError:function(e){j("audio_error",C.audioError||"0.0.0",K(e).then((function(e){if(F(e,["error_code","protocol","player_type","host","url"]))throw new Error("EventGateway — AudioError : One or multiple mandatory arguments are missing");return{error_code:e.error_code,protocol:e.protocol,player_type:e.player_type,host:e.host,url:e.url,app_state:e.app_state,track_urn:e.track_urn,player_version:e.player_version,player_build_number:e.player_build_number,log_id:e.log_id,preset:e.preset,quality:e.quality,audio_quality_mode:e.audio_quality_mode,entity_type:e.entity_type,player_variant:e.player_variant}})))},appLoad:function(e,t){j("appload",C.appLoad||"0.0.0",K(t).then((function(t){return r.normalizeAppLoadEvent(e,t)})))},normalizeAppLoadEvent:function(e,t){return{latency:t.latency,user:B(e,C.appLoad),level:t.level,page_name:t.page_name,page_urn:t.page_urn}},statsView:function(e,t){j("stats_view",C.statsView||"0.0.0",K(t).then((function(t){return T({user:B(e,C.statsView)},t)})))},anonymousIdStore:{get:Z((function(){var e=t.document.cookie.split("sc_anonymous_id=");return e.length>1&&e[1].split(";")[0]})),set:Z((function(e){var r,n="."+t.location.hostname.replace(/.*\.(.+\..+)/,"$1"),i=new Date;i.setTime(i.getTime()+31536e7),r="; expires="+i.toGMTString(),t.document.cookie="sc_anonymous_id="+e+r+"; path=/; domain="+n}))},flush:N},e.exports?e.exports=r:(t.SC=t.SC||{},t.SC.EventGateway=r)}("undefined"!=typeof self?self:this)},,,function(e,t,r){"use strict";r.r(t),r.d(t,"CreditResource",(function(){return n}));var n,i=r(11),o=r.n(i),a=r(30),s=r.n(a),l=r(410);!function(e){e.getHeard="promotedTracksFeature",e.fileReplace="fileReplaceFeature"}(n||(n={}));var u="\n fragment FeatureCreditEntry on FeatureCredits {\n feature\n subscriptionCreditLimit\n availableSubscriptionCredits\n availableAdditionalCredits\n availableTotalCredits\n }\n\n query MyFeatureCredits {\n me {\n featureCredits {\n userUrn\n "+n.getHeard+" {\n ...FeatureCreditEntry\n }\n "+n.fileReplace+" {\n ...FeatureCreditEntry\n }\n windowStartTimestamp\n windowEndTimestamp\n }\n }\n }\n",c=s.a.extend(l.a.withOptions({query:u,mapResponseData:function(e){return e.me.featureCredits}}),{initialize:function(){this.listenTo(o.a,"featureCredits:revalidate",(function(){this.fetch()}))},idAttribute:"userUrn"},{hashFn:function(){return 1}});t.default=c},function(e,t,r){"use strict";r(304)},,function(e,t,r){e.exports=r(30).extend(r(243).withOptions({attr:"username"}),r(749),r(428),r(552),{resource_type:"me-user",urnPrefix:"soundcloud:users",saveFormat:"json",saveWithWrapper:!1,_connections:null,setup:function(){var e=this;this.id?o(this):this.once("change:id",(function(){o(e)}))},baseUrl:function(){return this.getEndpointUrl("me")},saveUrl:function(){return this.getEndpointUrl("meUpdate")},onLikesChanged:function(e){"playlist"===e.targetType?n.call(this,"playlist_likes_count",e.state):n.call(this,"likes_count",e.state)},onFollow:function(e){n.call(this,"followings_count",e.state)},onReposted:function(e){n.call(this,"reposts_count",e.state)},onComment:function(e){e.state&&n.call(this,"comments_count",!0)},onDeleteResource:function(e){var t=e.targetModel;switch(t.resource_type){case"sound":this.adjustUploadSeconds(t),this.owns("sound",t)&&i.call(this,t,!1);break;case"comment":this.owns("comment",t)&&n.call(this,"comments_count",!1)}},onPlaylistCreate:function(e){var t="private"===e.object.get("sharing")?"private_playlists_count":"playlist_count";this.set(t,(this.get(t)||0)+1)},owns:function(e,t){switch(void 0===t&&(e=(t=e).resource_type),e){case"comment":case"playlist":case"sound":var r="get"in t?t.get("user_id"):t.user_id;return this.id===r;case"system-playlist":var n="get"in t?t.get("made_for"):t.made_for;return this.id===(null==n?void 0:n.id);case"me-user":case"sound-upload-edit":case"playlist-upload":case"playlist-edit":case"profile-settings":return!0}return!1},canDownload:function(e){return"sound"===e.resource_type&&(this.owns(e)||e.isDownloadable())},getCountry:function(){var e=this.get("country_code");return e?r(74).codeToCountry(e):this.get("country")},getCountryCode:function(){var e=this.get("country");return e?r(74).countryToCode(e):this.get("country_code")},getCreatorPlan:function(){return this.getCreatorSubscription().product.id},getConsumerPlan:function(){return this.getConsumerSubscription().product.id},doesCPPConfigExist:function(){return!!this.get("cpp")},isCPPEnabled:function(){return!0===this.getCPPOption("is_enabled")},canRequestISRCGeneration:function(){return!0===this.getCPPOption("indie",!1)&&!0===this.hasMonetization()},canBulkUploadAsPlaylist:function(){return!this.isCPPEnabled()||a.call(this)},hasOnlyOneRightsholderLink:function(){return a.call(this)},getCPPOption:function(e,t){var r,n=this.get("cpp");return null!=(null==n||null==(r=n.config)?void 0:r[e])?n.config[e]:t},canEditMonetization:function(){return this.getCPPOption("can_edit_monetization",!0)},canEditDownloadable:function(){return this.getCPPOption("can_edit_downloadable",!0)},canEditRssEnabled:function(){return this.getCPPOption("can_edit_rss_enabled",!0)},hasGeoblocking:function(){return this.doesCPPConfigExist()||r(4).get("features").has("geo_blocking_settings")},hasMonetization:function(){return this.getCPPOption("has_monetization_form")},hasCPPRightsholder:function(){var e=this.get("cpp");return!(null==e||!e.rightsholder_links||!e.rightsholder_links.some((function(e){var t=e.rightsholder_urn;return/^soundcloud:rightsholders/.test(t)})))},hasCreatorSub:function(){return this.isPro()||this.isProUnlimited()||this.isProDistro()},isAudioPartner:function(){return this.getCPPOption("is_audio_partner",!1)},isIndiePartner:function(){return this.getCPPOption("indie",!1)},isFree:l(r(38).CREATOR_SUBSCRIPTION_FREE),isPro:l(r(38).CREATOR_SUBSCRIPTION_PRO),isProUnlimited:l(r(38).CREATOR_SUBSCRIPTION_PRO_UNLIMITED),isProDistro:l(r(38).CREATOR_SUBSCRIPTION_PRO_DISTRO),isPremium:l(r(38).CREATOR_SUBSCRIPTION_FREE,!1),getCreatorSubscriptionIdentifier:function(){return this.isProUnlimited()?"pro_unlimited":this.isPro()?"pro":this.isProDistro()?"pro_distro":"basic"},isConfirmed:function(e){var t=(void 0===e?{}:e).viaEmail,n=void 0!==t&&t;return!r(17).isLoggedIn()||(n?!!this.get("primary_email_confirmed"):!!this.get("confirmed"))},hasHighTier:function(){return this.getConsumerPlan()===r(38).CONSUMER_SUBSCRIPTION_HIGH_TIER},hasMidTier:function(){return this.getConsumerPlan()===r(38).CONSUMER_SUBSCRIPTION_MID_TIER},getConsumerSubscription:function(){return this.get("consumer_subscription")||{product:{id:r(38).CONSUMER_SUBSCRIPTION_FREE,name:""}}},getCreatorSubscription:function(){return this.get("creator_subscription")||{product:{id:r(38).CREATOR_SUBSCRIPTION_FREE,name:"Free"}}},getPerk:function(e){return r(1243).get(this.getConsumerPlan(),e)},getPermalink:function(){return(this.get("permalink_url")||"").replace(/^https?:.+?\w\//,"/")},getNumTracks:function(e){var t=this.get("track_count")||0,r=this.get("private_tracks_count")||0,n=this.get("blocked_tracks_count")||0,i=this.get("hidden_tracks_count")||0;switch(e){case"public":return t;case"private":return r;case"hidden":return i;case"blocked":return n;default:return t+r+i+n}},hasUploads:function(){return(this.get("track_count")||0)+(this.get("private_tracks_count")||0)>0},getNumPlaylists:function(e){var t=this.get("playlist_count")||0,r=this.get("private_playlists_count")||0;switch(e){case"public":return t;case"private":return r;default:return t+r}},hasPlaylists:s("playlist_count","private_playlists_count"),hasLikes:s("likes_count","public_favorites_count"),hasPlaylistLikes:s("playlist_likes_count"),hasFollowings:s("followings_count"),hasPublicSounds:s("track_count","playlist_count","reposts_count"),hasTracks:s("track_count","private_tracks_count"),hasOwnSounds:s("track_count","private_tracks_count","playlist_count","private_playlists_count"),hasSounds:s("track_count","private_tracks_count","playlist_count","private_playlists_count","reposts_count"),adjustUploadSeconds:function(e,t){var r=e.get("duration");if(r){var n=Math.round(r/1e3)*(t?-1:1),i=this.getUploadSecondsLeft()+n,o=this.getUploadSecondsUsed()-n;this.setUploadSeconds(i,o)}},setUploadSeconds:function(e,t){var n=r(1).clone(this.get("quota"));n&&(n.upload_seconds_used=t,n.unlimited_upload_quota||(n.upload_seconds_left=e),this.set("quota",n))},getUploadSecondsLeft:function(){var e=this.get("quota");if(e)return e.unlimited_upload_quota?1/0:e.upload_seconds_left},getUploadSecondsUsed:function(){var e=this.get("quota");return e?e.upload_seconds_used:0},getUploadSeconds:function(){var e=this.getUploadSecondsLeft();return e===1/0?e:e+this.getUploadSecondsUsed()},hasUnlimitedUpload:function(){return this.getUploadSecondsLeft()===1/0},getUploadMinutesLeft:function(){var e=this.getUploadSecondsLeft();return(e<0?Math.floor:Math.ceil)(e/60)},getUploadMinutesUsed:function(){return Math.floor(this.getUploadSecondsUsed()/60)},getTracksLeft:function(){var e=this.get("quota");return r(1).has(e,"upload_tracks_left")?e.upload_tracks_left:1/0},getTracksUploaded:function(){var e;return null==(e=this.get("quota"))?void 0:e.upload_tracks_used},hasTrackLimit:function(){var e=this.get("quota");return e&&!e.unlimited_upload_track_quota},isOverQuota:function(){return this.getUploadSecondsLeft()<=0||this.hasTrackLimit()&&this.getTracksLeft()<=0},isUploadingEnabled:function(){return r(17).isLoggedIn()&&this.isConfirmed({viaEmail:!0})&&!this.isOverQuota()},getRSSFeedUrl:function(){return"https://feeds.soundcloud.com/users/"+this.getUrn()+"/sounds.rss"},pollForPlanChange:function(e){void 0===e&&(e=r(1).noop);var t=this,n=t.getCreatorPlan(),i=new(r(264))({tolerance:1,giveUp:15,backoffRate:1.5,maxDelay:15e3,enabled:!1});this.listenTo(i,"enabled",(function(){t.fetch().always((function(){return i.failed()}))})),this.on(["consumer_subscription","creator_subscription"].map((function(e){return"change:"+e})).join(" "),(function(){n!==t.getCreatorPlan()&&(e.call(null),t.stopListening(i))}))},getAge:function(){var e=this.get("date_of_birth");if(!e)return 0;var t=new Date,r=t.getFullYear(),n=t.getMonth()+1,i=r-e.year;return n1)throw new Error("startLevel invalid.");if(i<0||i>1)throw new Error("endLevel invalid.");this._startPos=t,this._endPos=r,this._startLevel=n,this._endLevel=i,this._fromEnd=a}return e.prototype.calculate=function(e,t){var r=this._fromEnd?t-500-this._startPos:this._startPos,n=this._fromEnd?t-500-this._endPos:this._endPos;if(e0?Math.pow(2,s):0},e.prototype.registerSuccess=function(){this._delayFactor=Math.max(0,this._delayFactor-2)},e}();t.DecayingExponentialDelayCalculator=r},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.Limiter=void 0;var n=r(19),i=r(21),o=function(){function e(){this._jobs=[],this._calculator=new n.DecayingExponentialDelayCalculator,this._jobWaiting=!1}return e.prototype.execute=function(e){var t=this,r={job:e};return this._jobs.push(r),this._executeNextJob(),{abort:function(){var e=t._jobs.indexOf(r);e>=0&&t._jobs.splice(e,1)}}},e.prototype._executeNextJob=function(){var e=this;if(!this._jobWaiting){var t=this._jobs.shift();if(t){var r=function(){e._jobWaiting=!1,e._executeNextJob()},n=this._calculator.getDelay();this._jobWaiting=!0,i.helpers.deferException((function(){t.job().then((function(){e._calculator.registerSuccess()}))})),0===n?r():window.setTimeout(r,n)}}},e}();t.Limiter=o},function(t){t.exports=e},function(e,t,r){var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Player=t.setCacheSize=t.getGlobalMuted=t.setGlobalMuted=t.getGlobalVolume=t.setGlobalVolume=void 0;var o=r(21),a=r(2),s=r(23),l=r(24),u=r(28),c=r(19),d=r(29),f=r(30),h=r(93),p=r(94),g=r(95),v=r(96),m=r(97),y=r(98),_=r(99),b=r(100),C=r(5),E=o.eventDispatcher.EventDispatcher,A=o.helpers.Promise,S=o.helpers.deferred.buildDeferred,w=new h.CacheManager(15e7,o.logger.noOpLogger),O=-1,k=[],T=1,L=!1;function P(e,t,r){return Math.min(t,Math.max(e,r))}t.setGlobalVolume=function(e){if("number"!=typeof e)throw new Error("level must be a number.");if(e<0||e>1)throw new Error("Invalid volume level.");T=e,k.forEach((function(t){return t.setVolume(e)}))},t.getGlobalVolume=function(){return T},t.setGlobalMuted=function(e){if("boolean"!=typeof e)throw new Error("muteEnabled must be a boolean.");L=e,k.forEach((function(t){return t.setMuted(e)}))},t.getGlobalMuted=function(){return L},t.setCacheSize=function(e){if("number"!=typeof e||e<0)throw new Error("Invalid size.");w.setCacheSize(e)};var M=function(e){function t(t){var r=e.call(this,t)||this;r._onPreloadingEnabled=new E,r._onPreloadingDisabled=new E,r._retryDelayCalculator=new c.DecayingExponentialDelayCalculator,r._errorEventGenerator=null,r._fadeOutVolumeAutomator=null,r._volumeAutomators=[],r._volumeScale=1,r._userVolume=1,r._volumeAutomationSupported=!1,r._timer=null,r._pauseFadeTimer=null,r._pauseFadeDeferred=null,r._pauseFade=null,r._executionState={state:"IDLE"},r._preloadingListeners=[],r._retrieveAndBuildTimer=null,r._hadAStreamUrl=!1;var n=r._config=(0,m.validatePlayerDependencies)(t);r._preloadingEnabled=n.preloadingEnabled,r._getURLOpts=n.getURLOpts,r._controllers=n.controllers;var i=r._connectionRequiredHelper=new _.ConnectionRequiredHelper(r);r.onPreloadingEnabled=r._onPreloadingEnabled.getHandle(),r.onPreloadingDisabled=r._onPreloadingDisabled.getHandle(),r.onConnectionRequired=i.onConnectionRequired,r.onConnectionRecovered=i.onConnectionRecovered,r.onChange.subscribe((function(e){r.isDead()||((!1===e.playing||e.positionJumped||e.stalled||e.ended)&&r._completePauseFade(),r._pauseFade&&(!1===e.actuallyPlaying||e.ended||!0===e.playing)&&(r._removeVolumeAutomator(r._pauseFade),r._pauseFade=null),(e.positionJumped||void 0!==e.actuallyPlaying||void 0!==e.stalled)&&r._updateVolume(),void 0!==e.playing&&r._updateMaxBufferLength())}));var a="SCAudio-".concat(++O),h=n.streamUrlRetriever.getTrackId();null!==h&&(a+="-".concat(h));var p=new s.LogCollector,g=o.logger.cloneLogger(p,r._logger);r._logger=o.logger.prefixLogger(g,a);var v=(0,y.generateLogId)();r._logger.info("Building player...",{ua:navigator.userAgent,getURLOpts:r._getURLOpts,logId:v}),k.push(r),r.setVolume(T,L),r._updateFadeOut();var b=null,C=null;n.audioPerformanceReporter&&(b=new l.AudioPerformanceEventGenerator(r,(function(){return r._getPlayer()}),n.audioPerformanceReporter,r._logger,(function(){return r._getActivePlayerDetails()}))),n.audioReporter&&new d.AudioEventGenerator(r,n.audioReporter,n.audioCheckpointInterval,r._logger,(function(){return r._getActivePlayerDetails()})),n.errorReporter&&(C=r._errorEventGenerator=new u.ErrorEventGenerator(r,p,v,h,n.errorReporter,r._logger)),r._excludeUnsupportedRenditions();var A=r._controllerManager=new f.ControllerManager({logger:r._logger,seekStrategy:r._config.seekStrategy,controllers:n.controllers,playerId:a,streamUrlsExpire:n.streamUrlsExpire,fetchEnabled:n.fetchEnabled,fadeOnPauseAndPlay:n.fadeOnPauseAndPlay,fadeOnSeek:n.fadeOnSeek,cacheManager:w,providePlayer:function(e,t,n){r._volumeAutomationSupported=n,r._providePlayer(e,t),r._updateMaxBufferLength()},removePlayer:function(){r._getPlayer()&&r._removePlayer()},streamUrlRetriever:r._config.streamUrlRetriever,getURLOpts:r._getURLOpts,errorEventGenerator:C||void 0,audioPerformanceEventGenerator:b||void 0,useIphoneHlsHack:n.useIphoneHlsHack||!1,fairPlayManager:n.fairPlayManager,applicationId:n.applicationId});if(r.onQualityChanged=A.onQualityChanged,void 0!==n.duration&&(r._logger.debug("Setting initial duration.",n.duration),r._setInitialDuration(n.duration)),r._preloadingEnabled)r._logger.debug("Preloading is enabled, so performing retrieve immediately."),r._retrieveAndBuild();else{r._logger.debug("Preloading is disabled, so deferring retrieve until either a play intent or preloading is enabled.");var S=function(){r._removePreloadingListeners(),r._logger.debug("Preloading now enabled or received a play request. Peforming retrieve."),r._retrieveAndBuild()};r._preloadingListeners.push(r.onPreloadingEnabled.subscribe(S),r.onPlayIntent.subscribe(S))}return r}return i(t,e),t.prototype.reload=function(e){void 0===e&&(e={}),this._ensureNotDead(),this._reloadStreamUrls(e)},t.prototype.enablePreloading=function(){this.isDead()||this._preloadingEnabled||(this._preloadingEnabled=!0,this._updateMaxBufferLength(),this._onPreloadingEnabled.dispatch(void 0))},t.prototype.disablePreloading=function(){this.isDead()||this._preloadingEnabled&&(this._preloadingEnabled=!1,this._updateMaxBufferLength(),this._onPreloadingDisabled.dispatch(void 0))},t.prototype.isPreloadingEnabled=function(){return this._preloadingEnabled},t.prototype.pauseAfterFade=function(e){var t=this;if(this._ensureNotDead(),this._pauseFadeDeferred)return this._pauseFadeDeferred.promise;if(!this.isPlaying()||!this.isActuallyPlaying())return A.resolve(this.pause());var r=S();this._pauseFadeDeferred=r;var n=this.getPosition();if(this._pauseFade)throw new Error("Fade should not already be assigned.");return this._pauseFade=new a.Fade({startPos:n,endPos:n+e,startLevel:1,endLevel:0}),this._addVolumeAutomator(this._pauseFade),this._pauseFadeTimer=window.setTimeout((function(){t._pauseFadeDeferred=null,r.resolve(t.pause({fadeDuration:0}))}),e+50),r.promise},t.prototype.isConnectionRequired=function(){return this._connectionRequiredHelper.isConnectionRequired()},t.prototype.getQuality=function(){return this._controllerManager.getQuality()},t.prototype.getVolume=function(){return this._volumeAutomationSupported?this._userVolume:e.prototype.getVolume.call(this)},t.prototype._handleFatalError=function(e){this._logger.warn("Fatal error from current player.",e)},t.prototype._handleVolumeChange=function(t,r){this._userVolume=t,e.prototype._notifyVolumeChange.call(this,t,r),this._calculateAndSetVolume()},t.prototype._notifyVolumeChange=function(){},t.prototype._kill=function(){e.prototype._kill.call(this),this._timer&&window.clearTimeout(this._timer),this._abortPauseFade(),this._removePreloadingListeners(),k.splice(k.indexOf(this),1),"RETRIEVING_URL"===this._executionState.state?this._executionState.retrieveJob.abort():"CONTROLLING_PLAYER"===this._executionState.state&&this._controllerManager.releaseCurrentController({retry:!1}),this._executionState={state:"DEAD"},this._retrieveAndBuildTimer&&window.clearTimeout(this._retrieveAndBuildTimer)},t.prototype._excludeUnsupportedRenditions=function(){var e=this,t={streamUrlExpires:this._config.streamUrlsExpire};C.allRenditions.filter((function(r){return!e._controllers.some((function(n){return n.isRenditionSupported(r,t,{useIphoneHlsHack:e._config.useIphoneHlsHack||!1,fairPlayManager:e._config.fairPlayManager})}))})).forEach((function(t){e._config.streamUrlRetriever.excludeRendition(t)}))},t.prototype._addVolumeAutomator=function(e){this._volumeAutomators.indexOf(e)<0&&(this._volumeAutomators.push(e),this._updateVolume())},t.prototype._removeVolumeAutomator=function(e){var t=this._volumeAutomators.indexOf(e);t>=0&&(this._volumeAutomators.splice(t,1),this._updateVolume())},t.prototype._removePreloadingListeners=function(){this._preloadingListeners.forEach((function(e){return e.remove()}))},t.prototype._getActivePlayerDetails=function(){return"CONTROLLING_PLAYER"!==this._executionState.state?null:this._controllerManager.getPlayerDetails()},t.prototype._updateFadeOut=function(){this._fadeOutVolumeAutomator&&this._removeVolumeAutomator(this._fadeOutVolumeAutomator),this._getURLOpts.snippet&&(this._fadeOutVolumeAutomator=(0,a.buildFadeOut)(3e3),this._addVolumeAutomator(this._fadeOutVolumeAutomator))},t.prototype._handleUnexpectedError=function(e){try{e()}catch(e){this._logger.error("Unexpected error.",e),this._triggerError(new o.errors.PlayerFatalError("An unexpected error occurred.",e))}},t.prototype._retrieveAndBuild=function(){var e=this;this._handleUnexpectedError((function(){if(-1===["IDLE","WAITING_TO_RETRIEVE"].indexOf(e._executionState.state))throw new Error("Invalid state for retrieveAndBuild().");e._logger.debug("Retrieving URL...");var t=(0,p.retrieveUrl)({streamUrlRetriever:e._config.streamUrlRetriever,urlProviderRetryDelayCalculator:e._config.urlProviderRetryDelayCalculator,getURLOpts:e._getURLOpts,logger:e._logger});e._executionState={state:"RETRIEVING_URL",retrieveJob:t},t.onCompletion((function(t){if(e._logger.debug("Retrieved URL.",!!t),t&&t.success){e._hadAStreamUrl=!0;var r=!1,n=function(n){var i=n.excludeRendition,o=n.immediateRetry;e._handleUnexpectedError((function(){if(r)throw new Error("startOver called multiple times.");if(r=!0,i&&e._config.streamUrlRetriever.excludeRendition(t.rendition),e._executionState={state:"WAITING_TO_RETRIEVE"},e.isDead())e._logger.debug("Stopping execution because player is dead.");else if(o)e._logger.debug("Moving on immediately."),e._retrieveAndBuild();else{var n=e._retryDelayCalculator.getDelay();e._logger.debug("Will move on in ".concat(n,"ms.")),n?e._retrieveAndBuildTimer=window.setTimeout((function(){return e._retrieveAndBuild()}),n):e._retrieveAndBuild()}}))};e._handleUnexpectedError((function(){e._executionState={state:"CONTROLLING_PLAYER"},e._logger.debug("Building controller..."),e._controllerManager.buildNextController(t,n),e._logger.debug("Built controller.")}))}else if(t&&t.rendition&&!1===t.success){if(e._logger.warn("Error retrieving URL. Moving on.",t.error),e._errorEventGenerator){var i="SCAUDIO.URL_RETRIEVER_ERROR.".concat(e._config.streamUrlRetriever.name,".").concat(t.error.getCode());e._errorEventGenerator.reportManualEvent(i,{preset:t.preset,quality:t.quality,bitrate:t.bitrate,format:t.rendition.scFormat,protocol:t.rendition.scProtocol})}e._config.streamUrlRetriever.excludeRendition(t.rendition),e._executionState={state:"WAITING_TO_RETRIEVE"},e._retrieveAndBuild()}else t&&t.rendition&&!1===t.success&&e._logger.warn("Error retrieving URL for any rendition.",t.error),e._logger.info("Ran out of streams.",e._hadAStreamUrl),e._triggerError(e._hadAStreamUrl?new g.NotSupportedError:new v.NoStreamsError)})),t.onError((function(t){t!==o.helpers.abortableJob.abortedError&&(t===p.NoMoreAttemptsError?e._logger.error("Ran out of retries to retrieve URL."):e._logger.error("Unexpected error when retrieving a URL.",t),e._triggerError(new b.FailedRetrievingUrlError))}))}))},t.prototype._reloadStreamUrls=function(e){this._getURLOpts=e,this._updateFadeOut(),this._logger.info("Reloading stream URL's...",this._getURLOpts),"RETRIEVING_URL"===this._executionState.state?(this._logger.debug("Aborting current URL retrieve."),this._executionState.retrieveJob.abort(),this._executionState={state:"WAITING_TO_RETRIEVE"},this._retrieveAndBuild()):"CONTROLLING_PLAYER"===this._executionState.state?(this._logger.debug("Releasing controller."),this._controllerManager.releaseCurrentController({retry:!0})):this._logger.debug("Nothing to do."),this._logger.info("Reloaded stream URL's.")},t.prototype._completePauseFade=function(){if(this._pauseFadeDeferred){this._pauseFadeTimer&&window.clearTimeout(this._pauseFadeTimer);var e=this._pauseFadeDeferred;this._pauseFadeDeferred=null,e.resolve(this.pause())}},t.prototype._abortPauseFade=function(){this._pauseFadeTimer&&(window.clearTimeout(this._pauseFadeTimer),this._pauseFadeTimer=null),this._pauseFadeDeferred&&(this._pauseFadeDeferred.reject(new Error("Player was killed.")),this._pauseFadeDeferred=null)},t.prototype._updateVolume=function(){var e=this;if(this._volumeAutomationSupported){this._ensureNotDead(),this._timer&&(window.clearTimeout(this._timer),this._timer=null);var t=this.getDuration();if(null!==t){var r=this._volumeAutomators,n=this.getPosition(),i=1/0,o=1;r.forEach((function(e){var r=e.calculate(n,t),a=r.nextCalculatePosition,s=r.level;o*=P(0,1,s),a"}})))});var t}))},e.prototype.debug=function(e){for(var t=[],r=1;rthis._bufferSize&&this._log.shift()},e}();t.LogCollector=n},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.AudioPerformanceEventGenerator=void 0;var n=r(21),i=r(25),o=r(26),a=r(27),s=function(){function e(e,t,r,i,o){this._logger=n.logger.prefixLogger(i,"AudioPerformanceEventGenerator"),this._proxy=e,this._getPlayer=t,this._eventReporter=r,this._getPlayerDetails=o,this._measureGeneralEvents()}return e.prototype.reportManualEvent=function(e){this._logger.debug("Reporting manual audio performance event.",e),this._eventReporter(e)},e.prototype._measureGeneralEvents=function(){var e=this,t=this._proxy,r=null,n=null,a=null,s=null,l=null,u=null,c=null,d=!0;t.onChange.subscribe((function(f){var h=f.playing,p=f.actuallyPlaying,g=f.seek,v=f.seeking,m=f.stalled,y=f.ended;if(!0!==f.dead&&!1!==h||!s||(s.stop(),s.getTime()>=1e3&&e._reportEvent("rageSkip",s.getTime(),null),s=null),t.isDead())c&&window.clearTimeout(c);else{var _=t.getSeekState();t.isActuallyPlaying()||s||!(!0===h||t.isPlaying()&&!0===m)||(s=new i.Timer).start(),!0===h&&(r||((r=new i.Timer).start(),n=new o.PreloadingCalculator({proxy:t,getPlayer:e._getPlayer}),c=window.setTimeout((function(){e._reportEvent("longInitialBuffering",0,null)}),3e4),0===t.getPosition()&&(d=!1))),!1===h&&(c&&window.clearTimeout(c),r&&!r.isComplete()&&(r=null)),!0===p&&(s=null,r&&!r.isComplete()&&(r.stop(),c&&window.clearTimeout(c),e._reportEvent("play",r.getTime(),n.getPreloaded()))),g&&"IN_PROGRESS"===g.state&&t.isReady()&&((a=new i.Timer).start(),l=new o.PreloadingCalculator({proxy:t,getPlayer:e._getPlayer}),!0===v&&e._reportEvent("seekStart",0,null)),(g&&"COMPLETED"===g.state&&!t.isStalled()||!1===m&&_&&"COMPLETED"===_.state)&&a&&(a.stop(),e._reportEvent("seek",a.getTime(),l.getPreloaded()),a=null),!0!==m||!t.isPlaying()||_&&"IN_PROGRESS"===_.state||r&&r.isComplete()&&((u=new i.Timer).start(),e._reportEvent("rebufferingStart",t.getPosition(),null)),!1===m&&(r&&r.isComplete()&&(s=null),u&&(u.stop(),e._reportEvent("rebufferingEnd",u.getTime(),null),u=null)),!0!==y||d||(e._reportEvent("uninterruptedPlay",0,null),d=!0),(!_||"IN_PROGRESS"!==_.state)&&!0===m&&t.isActuallyPlaying()&&(d=!0)}}))},e.prototype._reportEvent=function(e,t,r){var n=this._getPlayerDetails();if(n){var i={type:e,latency:t,protocol:n.protocol,playerType:n.name,host:n.host,bitrate:n.bitrate,format:n.format,preset:n.preset,quality:n.quality,preloaded:r||void 0,appState:(0,a.getAppState)()};this._logger.debug("Generated audio performance event.",i),this._eventReporter(i)}else this._logger.warn("Cannot report event because there is no player.",e,t)},e}();t.AudioPerformanceEventGenerator=s},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.Timer=void 0;var n=r(21).helpers.time.now,i=function(){function e(){this._start=null,this._end=null}return e.prototype.start=function(){if(this.isComplete())throw new Error("Timer completed.");this._start=n()},e.prototype.isComplete=function(){return null!==this._end},e.prototype.stop=function(){if(null===this._start)throw new Error("Not started.");this._end=n()},e.prototype.getTime=function(){if(null===this._end)throw new Error("Not completed.");return this._end-this._start},e}();t.Timer=i},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.PreloadingCalculator=void 0;var n=r(21),i=n.helpers.find,o=function(){function e(e){var t=e.proxy,r=e.getPlayer;this._getPlayer=r;var o,a,s=t.getPosition(),l=this._initialActualPlayer=r();if(l){var u=(o=s,(a=l.getBufferedTimeRanges())?i(a,(function(e){return e.containsTime(o)}))||new n.TimeRange(o,0):null);this._initialBuffered=u?u.end-s:null}else this._initialBuffered=null}return e.prototype.getPreloaded=function(){var e=this._initialBuffered;return null!==e&&this._initialActualPlayer&&this._getPlayer()===this._initialActualPlayer?0===e?"no":e>=2e3?"yes":"partial":null},e}();t.PreloadingCalculator=o},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAppState=void 0,t.getAppState=function(){switch(window.document.hidden){case!0:return"background";case!1:return"foreground";default:return}}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorEventGenerator=void 0;var n=r(21),i=r(27),o=function(){function e(e,t,r,i,o,a){this._logger=n.logger.prefixLogger(a,"ErrorGenerator"),this._player=e,this._logCollector=t,this._logId=r,this._trackId=i,this._eventReporter=o,this._listenForProxyFatalError()}return e.prototype.reportManualEvent=function(e,t){"NOT_SUPPORTED_ERROR"!==e&&"HLS_MSE_PLAYER.NO_TRANSMUXER_ERROR"!==e&&(this._logger.debug("Reporting manual error event.",e),this._reportEvent(e,t))},e.prototype._listenForProxyFatalError=function(){var e=this;this._player.onError.subscribe((function(t){t instanceof n.errors.PlayerFatalError&&e._reportEvent(t.getCode())}))},e.prototype._reportEvent=function(e,t){var r={errorCode:e,log:this._logCollector.getLog(),logId:this._logId,trackId:this._trackId,protocol:t&&t.protocol?t.protocol:void 0,playerType:t&&t.name?t.name:"MaestroUnknown",host:t&&t.host,bitrate:t&&t.bitrate,format:t&&t.format?t.format:void 0,preset:t&&t.preset,quality:t&&t.quality,url:t&&t.url,appState:(0,i.getAppState)()};this._logger.debug("Generated audio error event.",r),this._eventReporter(r)},e}();t.ErrorEventGenerator=o},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.AudioEventGenerator=void 0;var n=r(21),i=r(27),o=function(){function e(e,t,r,i,o){this._checkpointTimer=null,this._logger=n.logger.prefixLogger(i,"AudioEventGenerator"),this._player=e,this._eventReporter=t,this._checkpointInterval=Math.max(1e3,r),this._getPlayerDetails=o,this._startReporting()}return e.prototype._startReporting=function(){var e=this,t=this._player;t.onChange.subscribe((function(r){var n=r.actuallyPlaying,i=r.ended;!0===n&&!t.isEnded()||!1===i&&t.isActuallyPlaying()?(e._checkpointTimer||(e._checkpointTimer=window.setInterval((function(){e._reportEvent("checkpoint")}),e._checkpointInterval)),e._reportEvent("play")):(!1===n&&!t.isEnded()||!0===i&&t.isActuallyPlaying())&&(e._checkpointTimer&&(window.clearInterval(e._checkpointTimer),e._checkpointTimer=null),e._reportEvent("pause"))}))},e.prototype._reportEvent=function(e){var t=this._getPlayerDetails();if(t){var r=this._player.getDuration();if(null===r)throw new Error("Duration should exist now.");var n={type:e,position:this._player.getPosition(),duration:r,preset:t.preset,quality:t.quality,playerType:t.name,appState:(0,i.getAppState)()};this._logger.debug("Generated audio event.",n),this._eventReporter(n)}else this._logger.warn("Cannot report event because there is no player.",e)},e}();t.AudioEventGenerator=o},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.ControllerManager=void 0;var n=r(31),i=r(21),o=r(4),a=/^[^?#]*/;function s(e){var t=e.split("//",2);return 1===t.length?t[0].split("/",1)[0]:t[1]?t[1].split("/",1)[0]:""}function l(e){var t=a.exec(e);return t&&t[0]||""}function u(e,t,r){return{name:t.name,preset:e.preset,bitrate:e.bitrate,protocol:e.rendition.scProtocol,host:s(r),url:l(r),format:e.rendition.scFormat,quality:e.quality}}var c=function(){function e(e){var t=e.logger,r=e.seekStrategy,o=e.controllers,a=e.playerId,s=e.streamUrlsExpire,l=e.fetchEnabled,u=e.fadeOnPauseAndPlay,c=e.fadeOnSeek,d=e.cacheManager,f=e.providePlayer,h=e.removePlayer,p=e.streamUrlRetriever,g=e.getURLOpts,v=e.errorEventGenerator,m=e.audioPerformanceEventGenerator,y=e.useIphoneHlsHack,_=e.fairPlayManager,b=e.applicationId;this._quality=null,this._onQualityChanged=new i.eventDispatcher.EventDispatcher,this._controllerIndexByRendition=new n,this._controlledPlayerWithRendition=null,this.onQualityChanged=this._onQualityChanged.getHandle(),this._logger=i.logger.prefixLogger(t,"ControllerManager"),this._seekStrategy=r,this._controllers=o,this._playerId=a,this._streamUrlsExpire=s,this._fetchEnabled=l,this._fadeOnPauseAndPlay=u,this._fadeOnSeek=c,this._useIphoneHlsHack=y,this._fairPlayManager=_,this._applicationId=b,this._cacheManager=d,this._providePlayer=f,this._removePlayer=h,this._streamUrlRetriever=p,this._getURLOpts=g,this._errorEventGenerator=v||null,this._audioPerformanceEventGenerator=m||null}return e.prototype.buildNextController=function(e,t){var r=this;if(this._controlledPlayerWithRendition)throw new Error("A player is already being controlled.");this._logger.debug("Building next controller.");var n=this._controllerIndexByRendition.get(e.rendition)||0;if(n>=this._controllers.length)this._logger.debug("No more controllers for this rendition."),t({excludeRendition:!0,immediateRetry:!0});else{var i=!1;this._manageController(e,this._controllers[n],(function(o){if(i)throw new Error("performNextAction() already called");i=!0,"MOVE_ON"!==o&&"MOVE_ON_SAME_RENDITION"!==o||(r._logger.debug("Controller will not be used again."),r._controllerIndexByRendition.set(e.rendition,n+1)),"MOVE_ON_SAME_RENDITION"===o?r.buildNextController(e,t):t({excludeRendition:!1,immediateRetry:"MOVE_ON"===o})}))}},e.prototype.releaseCurrentController=function(e){var t=e.retry;if(!this._controlledPlayerWithRendition)throw new Error("There is no player being controlled.");this._controlledPlayerWithRendition.releaseControl({retry:t})},e.prototype.getQuality=function(){return this._quality},e.prototype.getPlayerDetails=function(){if(!this._controlledPlayerWithRendition)throw new Error("There is no player being controlled.");var e=this._controlledPlayerWithRendition;return u(e.initialUrlAndRendition,e.controller,e.controlledPlayer.getUrl())},e.prototype._manageController=function(e,t,r){var n=this,a=function(){n._removePlayer(),n._controlledPlayerWithRendition=null,s&&s.kill()};if(this._logger.debug("Preparing controller.",t.name),!t.isRenditionSupported(e.rendition,{streamUrlExpires:this._streamUrlsExpire},{useIphoneHlsHack:this._useIphoneHlsHack,fairPlayManager:this._fairPlayManager}))return this._logger.debug("Skipping controller because rendition not supported."),void r("MOVE_ON_SAME_RENDITION");var s,l=!1,c=function(e){var t=e.retry;l||(l=!0,n._logger.debug("Releasing control."),a(),r(t?"RETRY":"MOVE_ON"))};try{this._logger.debug("Building player.");var d=t.buildPlayer({logger:i.logger.prefixLogger(this._logger,"".concat(t.name,"-Controller")),seekStrategy:this._seekStrategy,playerId:this._playerId,urlAndRendition:e,streamUrlExpires:this._streamUrlsExpire,fetchEnabled:this._fetchEnabled,releaseControl:c,fadeOnPauseAndPlay:this._fadeOnPauseAndPlay,fadeOnSeek:this._fadeOnSeek,useIphoneHlsHack:this._useIphoneHlsHack,fairPlayManager:this._fairPlayManager,applicationId:this._applicationId,getNewUrl:function(){return n._getNewUrlWithSameRendition(e.rendition)},reportError:function(r){n._errorEventGenerator&&n._errorEventGenerator.reportManualEvent(r,u(e,t,d?d.getUrl():e.url))},reportPerformance:function(e){!l&&n._audioPerformanceEventGenerator&&n._audioPerformanceEventGenerator.reportManualEvent(e)}});if(s=d.getPlayer(),l)this._logger.warn("Player released during constrution."),s.kill();else if(s.isDead()){var f=s.getFatalError();f instanceof i.errors.NotSupportedError?this._logger.debug("Player not supported (during construction)."):this._logger.error("Error during construction.",f),r("MOVE_ON_SAME_RENDITION")}else{this._logger.debug("Player built."),s.onChange.subscribe((function(e){var t=e.dead,r=e.fatalError;t&&(r&&n._logger.error("Fatal player error occurred.",r),c({retry:!1}))})),this._cacheManager.addPlayer(s),this._controlledPlayerWithRendition={controller:t,controlledPlayer:d,initialUrlAndRendition:e,releaseControl:c},this._providePlayer(d.getPlayer(),t.syncConfig,t.supportsVolumeAutomation),this._logger.debug("Player provided to proxy.");var h=e.quality||null;this._quality!==h&&(this._logger.debug("Quality changed.",h),this._quality=h,this._onQualityChanged.dispatch(h))}}catch(e){e===o.notSupportedError?this._logger.debug("Player not supported. Not constructed."):this._logger.error("Error during construction.",e),a(),r("MOVE_ON_SAME_RENDITION")}},e.prototype._getNewUrlWithSameRendition=function(e){var t=this;return new i.helpers.abortableJob.AbortableJob((function(){var r=t._streamUrlRetriever.getUrl(t._getURLOpts);return{result:r.whenComplete().then((function(t){var r=null;return t&&t.success&&t.rendition===e&&(r=t.url),r})),abort:function(){return r.abort()}}})).run()},e}();t.ControllerManager=c},function(e,t,r){e.exports=r(32)()?Map:r(33)},function(e){e.exports=function(){var e,t;if("function"!=typeof Map)return!1;try{e=new Map([["raz","one"],["dwa","two"],["trzy","three"]])}catch(e){return!1}return"[object Map]"===String(e)&&3===e.size&&"function"==typeof e.clear&&"function"==typeof e.delete&&"function"==typeof e.entries&&"function"==typeof e.forEach&&"function"==typeof e.get&&"function"==typeof e.has&&"function"==typeof e.keys&&"function"==typeof e.set&&"function"==typeof e.values&&!1===(t=e.entries().next()).done&&!!t.value&&"raz"===t.value[0]&&"one"===t.value[1]}},function(e,t,r){var n,i=r(34),o=r(38),a=r(47),s=r(52),l=r(35),u=r(53),c=r(65),d=r(66),f=r(71),h=r(75),p=r(89),g=r(92),v=Function.prototype.call,m=Object.defineProperties,y=Object.getPrototypeOf;e.exports=n=function(){var e,t,r,i=arguments[0];if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");return r=g&&a&&Map!==n?a(new Map,y(this)):this,null!=i&&f(i),m(r,{__mapKeysData__:u("c",e=[]),__mapValuesData__:u("c",t=[])}),i?(h(i,(function(r){var n=l(r)[0];r=r[1],-1===o.call(e,n)&&(e.push(n),t.push(r))}),r),r):r},g&&(a&&a(n,Map),n.prototype=Object.create(Map.prototype,{constructor:u(n)})),c(m(n.prototype,{clear:u((function(){this.__mapKeysData__.length&&(i.call(this.__mapKeysData__),i.call(this.__mapValuesData__),this.emit("_clear"))})),delete:u((function(e){var t=o.call(this.__mapKeysData__,e);return-1!==t&&(this.__mapKeysData__.splice(t,1),this.__mapValuesData__.splice(t,1),this.emit("_delete",t,e),!0)})),entries:u((function(){return new p(this,"key+value")})),forEach:u((function(e){var t,r,n=arguments[1];for(s(e),r=(t=this.entries())._next();void 0!==r;)v.call(e,n,this.__mapValuesData__[r],this.__mapKeysData__[r],this),r=t._next()})),get:u((function(e){var t=o.call(this.__mapKeysData__,e);if(-1!==t)return this.__mapValuesData__[t]})),has:u((function(e){return-1!==o.call(this.__mapKeysData__,e)})),keys:u((function(){return new p(this,"key")})),set:u((function(e,t){var r,n=o.call(this.__mapKeysData__,e);return-1===n&&(n=this.__mapKeysData__.push(e)-1,r=!0),this.__mapValuesData__[n]=t,r&&this.emit("_add",n,e),this})),size:u.gs((function(){return this.__mapKeysData__.length})),values:u((function(){return new p(this,"value")})),toString:u((function(){return"[object Map]"}))})),Object.defineProperty(n.prototype,d.iterator,u((function(){return this.entries()}))),Object.defineProperty(n.prototype,d.toStringTag,u("c","Map"))},function(e,t,r){var n=r(35);e.exports=function(){return n(this).length=0,this}},function(e,t,r){var n=r(36);e.exports=function(e){if(!n(e))throw new TypeError("Cannot use null or undefined");return e}},function(e,t,r){var n=r(37)();e.exports=function(e){return e!==n&&null!==e}},function(e){e.exports=function(){}},function(e,t,r){var n=r(39),i=r(42),o=r(35),a=Array.prototype.indexOf,s=Object.prototype.hasOwnProperty,l=Math.abs,u=Math.floor;e.exports=function(e){var t,r,c,d;if(!n(e))return a.apply(this,arguments);for(r=i(o(this).length),c=arguments[1],t=c=isNaN(c)?0:c>=0?u(c):i(this.length)-u(l(c));t0?1:-1}},function(e,t,r){e.exports=r(48)()?Object.setPrototypeOf:r(49)},function(e){var t=Object.create,r=Object.getPrototypeOf,n={};e.exports=function(){var e=Object.setPrototypeOf,i=arguments[0]||t;return"function"==typeof e&&r(e(i(null),n))===n}},function(e,t,r){var n,i=r(50),o=r(35),a=Object.prototype.isPrototypeOf,s=Object.defineProperty,l={configurable:!0,enumerable:!1,writable:!0,value:void 0};n=function(e,t){if(o(e),null===t||i(t))return e;throw new TypeError("Prototype must be null or an object")},e.exports=function(e){var t,r;return e?(2===e.level?e.set?(r=e.set,t=function(e,t){return r.call(n(e,t),t),e}):t=function(e,t){return n(e,t).__proto__=t,e}:t=function e(t,r){var i;return n(t,r),(i=a.call(e.nullPolyfill,t))&&delete e.nullPolyfill.__proto__,null===r&&(r=e.nullPolyfill),t.__proto__=r,i&&s(e.nullPolyfill,"__proto__",l),t},Object.defineProperty(t,"level",{configurable:!1,enumerable:!1,writable:!1,value:e.level})):null}(function(){var e,t=Object.create(null),r={},n=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(n){try{(e=n.set).call(t,r)}catch(e){}if(Object.getPrototypeOf(t)===r)return{set:e,level:2}}return t.__proto__=r,Object.getPrototypeOf(t)===r?{level:2}:((t={}).__proto__=r,Object.getPrototypeOf(t)===r&&{level:1})}()),r(51)},function(e,t,r){var n=r(36),i={function:!0,object:!0};e.exports=function(e){return n(e)&&i[typeof e]||!1}},function(e,t,r){var n,i,o,a,s=Object.create;r(48)()||(n=r(49)),e.exports=n?1!==n.level?s:(i={},o={},a={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach((function(e){o[e]="__proto__"!==e?a:{configurable:!0,enumerable:!1,writable:!0,value:void 0}})),Object.defineProperties(i,o),Object.defineProperty(n,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:i}),function(e,t){return s(null===e?i:e,t)}):s},function(e){e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,r){var n=r(54),i=r(60),o=r(61),a=r(62);(e.exports=function(e,t){var r,o,s,l,u;return arguments.length<2||"string"!=typeof e?(l=t,t=e,e=null):l=arguments[2],null==e?(r=s=!0,o=!1):(r=a.call(e,"c"),o=a.call(e,"e"),s=a.call(e,"w")),u={value:t,configurable:r,enumerable:o,writable:s},l?n(i(l),u):u}).gs=function(e,t,r){var s,l,u,c;return"string"!=typeof e?(u=r,r=t,t=e,e=null):u=arguments[3],null==t?t=void 0:o(t)?null==r?r=void 0:o(r)||(u=r,r=void 0):(u=t,t=r=void 0),null==e?(s=!0,l=!1):(s=a.call(e,"c"),l=a.call(e,"e")),c={get:t,set:r,configurable:s,enumerable:l},u?n(i(u),c):c}},function(e,t,r){e.exports=r(55)()?Object.assign:r(56)},function(e){e.exports=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},function(e,t,r){var n=r(57),i=r(35),o=Math.max;e.exports=function(e,t){var r,a,s,l=o(arguments.length,2);for(e=Object(i(e)),s=function(n){try{e[n]=t[n]}catch(e){r||(r=e)}},a=1;a-1}},function(e,t,r){var n,i,o,a,s,l,u,c=r(53),d=r(52),f=Function.prototype.apply,h=Function.prototype.call,p=Object.create,g=Object.defineProperty,v=Object.defineProperties,m=Object.prototype.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0};i=function(e,t){var r,i;return d(t),i=this,n.call(this,e,r=function(){o.call(i,e,r),f.call(t,this,arguments)}),r.__eeOnceListener__=t,this},s={on:n=function(e,t){var r;return d(t),m.call(this,"__ee__")?r=this.__ee__:(r=y.value=p(null),g(this,"__ee__",y),y.value=null),r[e]?"object"==typeof r[e]?r[e].push(t):r[e]=[r[e],t]:r[e]=t,this},once:i,off:o=function(e,t){var r,n,i,o;if(d(t),!m.call(this,"__ee__"))return this;if(!(r=this.__ee__)[e])return this;if("object"==typeof(n=r[e]))for(o=0;i=n[o];++o)i!==t&&i.__eeOnceListener__!==t||(2===n.length?r[e]=n[o?0:1]:n.splice(o,1));else n!==t&&n.__eeOnceListener__!==t||delete r[e];return this},emit:a=function(e){var t,r,n,i,o;if(m.call(this,"__ee__")&&(i=this.__ee__[e]))if("object"==typeof i){for(r=arguments.length,o=new Array(r-1),t=1;t=55296&&v<=56319&&(g+=e[++h]),l.call(t,m,g,d),!f);++h);else u.call(e,(function(e){return l.call(t,m,e,d),f}))}},function(e,t,r){var n=r(73),i=r(74),o=r(77),a=r(88),s=r(71),l=r(66).iterator;e.exports=function(e){return"function"==typeof s(e)[l]?e[l]():n(e)?new o(e):i(e)?new a(e):new o(e)}},function(e,t,r){var n,i=r(47),o=r(62),a=r(53),s=r(66),l=r(78),u=Object.defineProperty;n=e.exports=function(e,t){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");l.call(this,e),t=t?o.call(t,"key+value")?"key+value":o.call(t,"key")?"key":"value":"value",u(this,"__kind__",a("",t))},i&&i(n,l),delete n.prototype.constructor,n.prototype=Object.create(l.prototype,{_resolve:a((function(e){return"value"===this.__kind__?this.__list__[e]:"key+value"===this.__kind__?[e,this.__list__[e]]:e}))}),u(n.prototype,s.toStringTag,a("c","Array Iterator"))},function(e,t,r){var n,i=r(34),o=r(54),a=r(52),s=r(35),l=r(53),u=r(79),c=r(66),d=Object.defineProperty,f=Object.defineProperties;e.exports=n=function(e,t){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");f(this,{__list__:l("w",s(e)),__context__:l("w",t),__nextIndex__:l("w",0)}),t&&(a(t.on),t.on("_add",this._onAdd),t.on("_delete",this._onDelete),t.on("_clear",this._onClear))},delete n.prototype.constructor,f(n.prototype,o({_next:l((function(){var e;if(this.__list__)return this.__redo__&&void 0!==(e=this.__redo__.shift())?e:this.__nextIndex__=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach((function(t,r){t>=e&&(this.__redo__[r]=++t)}),this),this.__redo__.push(e)):d(this,"__redo__",l("c",[e])))})),_onDelete:l((function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(t=this.__redo__.indexOf(e))&&this.__redo__.splice(t,1),this.__redo__.forEach((function(t,r){t>e&&(this.__redo__[r]=--t)}),this)))})),_onClear:l((function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0}))}))),d(n.prototype,c.iterator,l((function(){return this})))},function(e,t,r){var n,i=r(80),o=r(60),a=r(52),s=r(85),l=r(52),u=r(35),c=Function.prototype.bind,d=Object.defineProperty,f=Object.prototype.hasOwnProperty;n=function(e,t,r){var n,o=u(t)&&l(t.value);return delete(n=i(t)).writable,delete n.value,n.get=function(){return!r.overwriteDefinition&&f.call(this,e)?o:(t.value=c.call(o,r.resolveContext?r.resolveContext(this):this),d(this,e,t),this[e])},n},e.exports=function(e){var t=o(arguments[1]);return null!=t.resolveContext&&a(t.resolveContext),s(e,(function(e,r){return n(r,e,t)}))}},function(e,t,r){var n=r(81),i=r(54),o=r(35);e.exports=function(e){var t=Object(o(e)),r=arguments[1],a=Object(arguments[2]);if(t!==e&&!r)return t;var s={};return r?n(r,(function(t){(a.ensure||t in e)&&(s[t]=e[t])})):i(s,e),s}},function(e,t,r){e.exports=r(82)()?Array.from:r(83)},function(e){e.exports=function(){var e,t,r=Array.from;return"function"==typeof r&&(t=r(e=["raz","dwa"]),Boolean(t&&t!==e&&"dwa"===t[1]))}},function(e,t,r){var n=r(66).iterator,i=r(73),o=r(84),a=r(42),s=r(52),l=r(35),u=r(36),c=r(74),d=Array.isArray,f=Function.prototype.call,h={configurable:!0,enumerable:!0,writable:!0,value:null},p=Object.defineProperty;e.exports=function(e){var t,r,g,v,m,y,_,b,C,E,A=arguments[1],S=arguments[2];if(e=Object(l(e)),u(A)&&s(A),this&&this!==Array&&o(this))t=this;else{if(!A){if(i(e))return 1!==(m=e.length)?Array.apply(null,e):((v=new Array(1))[0]=e[0],v);if(d(e)){for(v=new Array(m=e.length),r=0;r=55296&&y<=56319&&(E+=e[++r]),E=A?f.call(A,S,E,g):E,t?(h.value=E,p(v,g,h)):v[g]=E,++g;m=g}if(void 0===m)for(m=a(e.length),t&&(v=new t(m)),r=0;r=55296&&t<=56319?r+this.__list__[this.__nextIndex__++]:r}))}),l(n.prototype,a.toStringTag,o("c","String Iterator"))},function(e,t,r){var n,i=r(47),o=r(53),a=r(78),s=r(66).toStringTag,l=r(90),u=Object.defineProperties,c=a.prototype._unBind;n=e.exports=function(e,t){if(!(this instanceof n))return new n(e,t);a.call(this,e.__mapKeysData__,e),t&&l[t]||(t="key+value"),u(this,{__kind__:o("",t),__values__:o("w",e.__mapValuesData__)})},i&&i(n,a),n.prototype=Object.create(a.prototype,{constructor:o(n),_resolve:o((function(e){return"value"===this.__kind__?this.__values__[e]:"key"===this.__kind__?this.__list__[e]:[this.__list__[e],this.__values__[e]]})),_unBind:o((function(){this.__values__=null,c.call(this)})),toString:o((function(){return"[object Map Iterator]"}))}),Object.defineProperty(n.prototype,s,o("c","Map Iterator"))},function(e,t,r){e.exports=r(91)("key","value","key+value")},function(e){var t=Array.prototype.forEach,r=Object.create;e.exports=function(e){var n=r(null);return t.call(arguments,(function(e){n[e]=!0})),n}},function(e){e.exports="undefined"!=typeof Map&&"[object Map]"===Object.prototype.toString.call(new Map)},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.CacheManager=void 0;var n=r(21);function i(e,t){var r=e.getMemoryCacheController();r&&r.setMaxCacheSize(t)}var o=function(){function e(e,t){this._maxCacheSize=e,this._players=[],this._updateTimer=null,this._logger=n.logger.prefixLogger(t,"CacheManager"),this._logger.debug("Initialized with cache size ".concat(e," bytes."))}return e.prototype.setCacheSize=function(e){this._maxCacheSize!==e&&(this._logger.debug("Updating cache size to ".concat(e," bytes.")),this._maxCacheSize=e,this._update())},e.prototype.addPlayer=function(e){var t=this;if(this._logger.debug("Adding player to cache manager."),e.isDead())this._logger.debug("Player was dead.");else{var r=this._players;e.onChange.subscribe((function(n){var i=n.playing;!0===n.dead?(t._logger.debug("Removing player that became dead."),r.splice(r.indexOf(e),1),t._update()):!0===i?(t._logger.debug("Updating because player started playing."),r.splice(r.indexOf(e),1),r.unshift(e),t._update()):!1===i&&(t._logger.debug("Updating because player became paused."),t._update())})),e.isPlaying()?r.unshift(e):r.push(e),this._update()}},e.prototype._update=function(){var e=this;if(this._updateTimer&&(window.clearTimeout(this._updateTimer),this._updateTimer=null),0!==this._players.length){var t=this._players.reduce((function(e,t){return t.isPlaying()?e.playingPlayers.push(t):e.pausedPlayers.push(t),e}),{playingPlayers:[],pausedPlayers:[]}),r=t.playingPlayers,n=t.pausedPlayers,o=r.reduce((function(e,t){return e+(t.getMemoryCacheUsage()||0)}),0),a=n.reduce((function(e,t){return e+(t.getMemoryCacheUsage()||0)}),0);if(o>this._maxCacheSize){this._logger.debug("All playing players are using more than the max cache size. Cleaning...",o,this._maxCacheSize);var s=this._maxCacheSize/r.length;r.forEach((function(e){return i(e,s)})),n.forEach((function(e){return i(e,0)}))}else this._logger.debug("Recalculating cache sizes...",o+a,this._maxCacheSize),r.concat(n).reduce((function(t,r){return i(r,Math.max(0,e._maxCacheSize-t)),t+(r.getMemoryCacheUsage()||0)}),0);this._updateTimer=window.setTimeout((function(){return e._update()}),2e4)}else this._logger.debug("There are no longer any players to manage.")},e}();t.CacheManager=o},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.retrieveUrl=t.NoMoreAttemptsError=void 0;var n=r(21),i=r(5);t.NoMoreAttemptsError=new Error("No more attempts to retrieve URL."),t.retrieveUrl=function(e){var r=e.streamUrlRetriever,o=e.getURLOpts,a=e.logger,s=e.urlProviderRetryDelayCalculator;return new n.helpers.abortableJob.AbortableJob((function(){var e=n.helpers.deferred.buildDeferred(),l=n.helpers.retry.retry(s,(function(t){var s=t.scheduleRetry,l=r.getUrl(o);return a.debug("Retrieving a URL..."),l.onCompletion((function(t){t?t.rendition&&i.allRenditions.indexOf(t.rendition)<0?(a.warn("Unknown rendition. Skipping...",t.rendition),r.excludeRendition(t.rendition),s()):!t.success&&!1===t.success&&t.error.isTransient()?(a.warn("Transient error retrieving url.",t.error),s()):e.resolve(t):(a.debug("No URL provided."),e.resolve(null))})),l.onError((function(t){t!==n.helpers.abortableJob.abortedError&&a.error("Error retrieving URL.",t),e.reject(t)})),{onCancel:function(){return l.abort()}}}),{onNoMoreRetries:function(){return e.reject(t.NoMoreAttemptsError)}}).cancel;return{result:e.promise,abort:function(){return l()}}})).run()}},function(e,t,r){var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.NotSupportedError=void 0;var o=function(e){function t(t){return e.call(this,t||"There was no format available that a player was able to play.")||this}return i(t,e),t.prototype.getCode=function(){return"SCAUDIO.NOT_SUPPORTED_ERROR"},t}(r(21).errors.PlayerFatalError);t.NotSupportedError=o},function(e,t,r){var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.NoStreamsError=void 0;var o=function(e){function t(){return e.call(this,"There were no stream URLs.")||this}return i(t,e),t.prototype.getCode=function(){return"SCAUDIO.NO_STREAMS"},t}(r(95).NotSupportedError);t.NoStreamsError=o},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.validatePlayerDependencies=void 0;var n=r(3),i=r(21);function o(e,t){return void 0!==e?e:t}t.validatePlayerDependencies=function(e){if(!(e.streamUrlRetriever instanceof n.BaseStreamUrlRetriever))throw new Error("StreamUrlRetriever invalid.");if(void 0!==e.duration&&("number"!=typeof e.duration||e.duration<0))throw new Error("duration invalid.");if(void 0!==e.getURLOpts&&"object"!=typeof e.getURLOpts)throw new Error("getURLOpts invalid.");if(void 0!==e.preloadingEnabled&&"boolean"!=typeof e.preloadingEnabled)throw new Error("preloadingEnabled invalid.");if(void 0!==e.fadeOnPauseAndPlay&&"boolean"!=typeof e.fadeOnPauseAndPlay)throw new Error("fadeOnPauseAndPlay invalid.");if(void 0!==e.fadeOnSeek&&"boolean"!=typeof e.fadeOnSeek)throw new Error("fadeOnSeek invalid.");if(void 0!==e.mediaSessionEnabled&&"boolean"!=typeof e.mediaSessionEnabled)throw new Error("mediaSessionEnabled invalid.");if(void 0!==e.pausedMaxBufferLength&&("number"!=typeof e.pausedMaxBufferLength||e.pausedMaxBufferLength<0))throw new Error("pausedMaxBufferLength invalid.");if(void 0!==e.playingMaxBufferLength&&("number"!=typeof e.playingMaxBufferLength||e.playingMaxBufferLength<0))throw new Error("playingMaxBufferLength invalid.");if(void 0!==e.logger&&"function"!=typeof e.logger&&"object"!=typeof e.logger)throw new Error("logger invalid.");if(void 0!==e.audioReporter&&"function"!=typeof e.audioReporter)throw new Error("audioReporter invalid.");if(void 0!==e.audioCheckpointInterval&&("number"!=typeof e.audioCheckpointInterval||e.audioCheckpointInterval<0))throw new Error("audioCheckpointInterval invalid.");if(void 0!==e.audioPerformanceReporter&&"function"!=typeof e.audioPerformanceReporter)throw new Error("audioPerformanceReporter invalid.");if(void 0!==e.errorReporter&&"function"!=typeof e.errorReporter)throw new Error("errorReporter invalid.");if(void 0!==e.urlProviderRetryDelayCalculator&&"function"!=typeof e.urlProviderRetryDelayCalculator)throw new Error("urlProviderRetryDelayCalculator invalid.");return{controllers:e.controllers,streamUrlRetriever:e.streamUrlRetriever,getURLOpts:o(e.getURLOpts,{}),preloadingEnabled:o(e.preloadingEnabled,!1),pausedMaxBufferLength:o(e.pausedMaxBufferLength,2e3),playingMaxBufferLength:o(e.playingMaxBufferLength,9e4),fadeOnPauseAndPlay:o(e.fadeOnPauseAndPlay,!1),fadeOnSeek:o(e.fadeOnSeek,!1),audioCheckpointInterval:o(e.audioCheckpointInterval,3e4),urlProviderRetryDelayCalculator:o(e.urlProviderRetryDelayCalculator,i.helpers.retry.buildExponentialDelayCalculator()),streamUrlsExpire:o(e.streamUrlsExpire,!0),fetchEnabled:o(e.fetchEnabled,!0),duration:e.duration,audioReporter:e.audioReporter,audioPerformanceReporter:e.audioPerformanceReporter,errorReporter:e.errorReporter,seekStrategy:e.seekStrategy,useIphoneHlsHack:o(e.useIphoneHlsHack,!1),fairPlayManager:e.fairPlayManager,applicationId:e.applicationId}}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.generateLogId=void 0,t.generateLogId=function(){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t="",r=0;r<20;r++)t+=e.charAt(Math.floor(Math.random()*e.length));return t}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionRequiredHelper=void 0;var n=r(21),i=function(){function e(e){var t=this;this._player=e,this._onConnectionRequired=new n.eventDispatcher.EventDispatcher,this._onConnectionRecovered=new n.eventDispatcher.EventDispatcher,this._connectionRequired=!1,this._connectionLossTimer=null,this.onConnectionRequired=this._onConnectionRequired.getHandle(),this.onConnectionRecovered=this._onConnectionRecovered.getHandle();var r=function(){return t._calculateIfConnectionRequired()};window.addEventListener("online",r),window.addEventListener("offline",r),this._calculateIfConnectionRequired(),e.onChange.subscribe((function(n){var i=n.loading;n.dead&&null!==t._connectionLossTimer&&(window.clearTimeout(t._connectionLossTimer),window.removeEventListener("online",r),window.removeEventListener("offline",r)),e.isDead()||void 0===i||t._calculateIfConnectionRequired()}))}return e.prototype.isConnectionRequired=function(){return this._connectionRequired},e.prototype._calculateIfConnectionRequired=function(){var e=this;this._player.isLoading()&&"navigator"in window&&!window.navigator.onLine?null===this._connectionLossTimer&&(this._connectionLossTimer=window.setTimeout((function(){e._connectionLossTimer=null,e._connectionRequired=!0,e._onConnectionRequired.dispatch(void 0)}),1500)):this._connectionRequired?(this._connectionRequired=!1,this._onConnectionRecovered.dispatch(void 0)):null!==this._connectionLossTimer&&(window.clearTimeout(this._connectionLossTimer),this._connectionLossTimer=null)},e}();t.ConnectionRequiredHelper=i},function(e,t,r){var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.FailedRetrievingUrlError=void 0;var o=function(e){function t(){return e.call(this,"Failed to retrieve stream url.")||this}return i(t,e),t.prototype.getCode=function(){return"SCAUDIO.FAILED_RETRIEVING_URL"},t}(r(95).NotSupportedError);t.FailedRetrievingUrlError=o},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.FairPlayManager=void 0;var n=r(21),i=r(102),o=n.logger.prefixLogger;function a(e,t,r){var n=function(e){for(var t=new ArrayBuffer(2*e.length),r=new Uint16Array(t),n=0;n=0&&(t._listeners.splice(e,1),!0)},retrieve:function(){return t._dispatchListenerPayloads(r)}}},e.prototype.dispatch=function(e,t){var r=this,i="number"==typeof t?{time:t}:t||{},o=void 0!==i.time?i.time:(0,n.now)(),a=this._listeners;a.forEach((function(t){return t.payloads.push({time:o,payload:e})}));var s=!1;do{s=!a.some((function(e){var t=e.fn,n=e.payloads.shift();return!!n&&(r._callHandler(t,n),!0)}))}while(!s)},e.prototype.getHandle=function(){return{subscribe:this.subscribe.bind(this)}},e.prototype._dispatchListenerPayloads=function(e){for(var t=e.fn,r=e.payloads;;){var n=r.shift();if(!n)break;this._callHandler(t,n)}},e.prototype._callHandler=function(e,t){try{e(t.payload,t.time)}catch(e){window.setTimeout((function(){throw e}),0)}},e}();t.EventDispatcher=i},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.now=void 0;var r=Date.now();t.now=function(){return"performance"in window&&window.performance.now?window.performance.now():Date.now()-r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoaderRequest=t.ResponseState=void 0;var n,i=r(4),o=r(1),a=r(9),s=r(11);!function(e){e[e.PENDING=0]="PENDING",e[e.WAITING=1]="WAITING",e[e.IN_PROGRESS=2]="IN_PROGRESS",e[e.COMPLETED=3]="COMPLETED",e[e.ERRORED=4]="ERRORED"}(n=t.ResponseState||(t.ResponseState={}));var l=function(){function e(){var e=this;this._responseDeferred=(0,i.buildDeferred)(),this._requestStartCallbacks=[],this._parts=[],this._progressEventDispatcher=new o.EventDispatcher,this._cachedCompleteParts=null,this._state=n.PENDING,this._statusAndHeaders=null,this._getProgressSoFar=function(){if(!e._parts.length)return null;if(!e._statusAndHeaders)throw new Error("Headers should be set.");return{initial:!0,statusCode:e._statusAndHeaders.statusCode,headers:e._statusAndHeaders.headers,part:e._getDataSoFar()}};var t=new a.AbortableJob((function(){return{result:e._responseDeferred.promise,progressUpdates:{getProgressSoFar:e._getProgressSoFar,onProgressUpdate:e._progressEventDispatcher}}}),{storeResult:!0});this._jobHandle=t.run()}return e.prototype.onProgress=function(e){this._jobHandle.onProgressUpdate(e)},e.prototype.getResponse=function(){return this._jobHandle.whenComplete()},e.prototype.onRequestStart=function(e){this._state!==n.PENDING?(0,s.deferException)(e):this._requestStartCallbacks.push(e)},e.prototype.onResponseReceived=function(e){this._jobHandle.onCompletion(e)},e.prototype.onError=function(e){this._jobHandle.onError(e)},e.prototype.hasRequestStarted=function(){return this._state!==n.PENDING},e.prototype.hasCompleted=function(){return this._state===n.COMPLETED||this._state===n.ERRORED},e.prototype.getState=function(){return this._state},e.prototype.abort=function(){-1===[n.ERRORED,n.COMPLETED].indexOf(this._state)&&(this._jobHandle.abort(),this._state=n.ERRORED,this._abort())},e.prototype._signalRequestStart=function(){this._enforceState(n.PENDING),this._state=n.WAITING,this._requestStartCallbacks.splice(0).forEach((function(e){return(0,s.deferException)(e)}))},e.prototype._signalTimeout=function(){this._enforceState(n.WAITING,n.IN_PROGRESS),this._state=n.COMPLETED,this._requestStartCallbacks.splice(0),this._responseDeferred.resolve(null)},e.prototype._provideStatusAndHeaders=function(e,t){this._enforceState(n.WAITING),this._statusAndHeaders=e,this._state=n.IN_PROGRESS,this._providePart(t)},e.prototype._providePart=function(e){this._enforceState(n.IN_PROGRESS);var t=!this._parts.length;if(this._parts.push(e),!this._statusAndHeaders)throw new Error("Headers should be set.");this._progressEventDispatcher.dispatch({initial:t,statusCode:this._statusAndHeaders.statusCode,headers:this._statusAndHeaders.headers,part:e})},e.prototype._finalize=function(e){var t=this;if(e)this._enforceState(n.PENDING,n.WAITING,n.IN_PROGRESS),this._state=n.ERRORED,this._requestStartCallbacks.splice(0),this._responseDeferred.reject(e);else{if(this._enforceState(n.IN_PROGRESS),this._state=n.COMPLETED,!this._statusAndHeaders)throw new Error("Headers should be set.");this._responseDeferred.resolve({statusCode:this._statusAndHeaders.statusCode,headers:this._statusAndHeaders.headers,getData:function(){if(!t._parts.length)throw new Error("Unexpected error. No parts.");return t._cachedCompleteParts?t._cachedCompleteParts:t._cachedCompleteParts=t._getDataSoFar()}})}},e.prototype._getDataSoFar=function(){var e=this._parts.length;if(!e)throw new Error("No parts.");return 1===e?this._parts[0]:this._reduceParts(this._parts)},e.prototype._enforceState=function(){for(var e=[],t=0;t1)for(var r=1;r=0||r.indexOf("Trident/")>=0,o=r.indexOf("Edge/")>=0,a=/Chrom(?:e|ium)/.test(r),s=r.toLowerCase().indexOf("firefox")>=0,l=/version\/(\d+)\.(\d+)/i,u=/Chrom(?:e|ium)\/([0-9]+)\.([0-9]+)\.([0-9]+)/,c=/Firefox\/(\d+)\.(\d+)/;function d(e){var t="undefined"!=typeof navigator?navigator.userAgent.match(e):null;if(t&&t.length>=3){var r=parseInt(t[1],10),n=parseInt(t[2],10);if(!isNaN(r)&&!isNaN(n))return{major:r,minor:n}}return null}t.isSafari=function(){return n},t.isFirefox=function(){return s},t.isChrome=function(){return a},t.isIE=function(){return i},t.isEdge=function(){return o},t.getSafariVersion=function(){return d(l)},t.getChromeVersion=function(){return d(u)},t.getFirefoxVersion=function(){return d(c)}},function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ProxyPlayer=void 0;var o=r(1),a=r(12),s=r(15),l=r(28),u=function(e){function t(t){var r=e.call(this,t)||this;return r._onPlayerProvided=new o.EventDispatcher,r._onPlayerRemoved=new o.EventDispatcher,r._shouldPassThroughFatalErrors=!!t.shouldPassThroughFatalErrors,r.onPlayerProvided=r._onPlayerProvided.getHandle(),r.onPlayerRemoved=r._onPlayerRemoved.getHandle(),r._logger=(0,a.prefixLogger)(r._logger,"ProxyPlayer"),r}return i(t,e),t.prototype.providePlayer=function(e,t){void 0===t&&(t={}),this._providePlayer(e,t),this._onPlayerProvided.dispatch(e)},t.prototype.removePlayer=function(){var e=this._getPlayer();if(!e)throw new Error("There is no player to remove.");this._removePlayer(),this._onPlayerRemoved.dispatch(e)},t.prototype.setInitialDuration=function(e){this._setInitialDuration(e)},t.prototype.getPlayer=function(){return this._getPlayer()},t.prototype._handleFatalError=function(e,t){this._shouldPassThroughFatalErrors?this._triggerError(e):this._triggerError(new l.ProxyProvidedPlayerFatalError(e,t))},t}(s.ProxyPlayerBase);t.ProxyPlayer=u},function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;re&&(this._logger.debug("Capping position.",e),this._seek(e,!0),this.isReady()&&(this._lastPlayerPosition=e,this._signalSeekComplete()))},t.prototype._sync=function(e){var t=this,r=this._player;if(!r)throw new Error("Player should have become available by now.");if(this._logger.debug("Syncing...",this.isPlaying(),this.isActuallyPlaying()),r.isDead()){this._logger.debug("Provided player is dead.");var n=r.getFatalError();n&&this._handleFatalError(n,r)}else this._errorHandler=r.onError.subscribe((function(e){e instanceof l.PlayerFatalError?t._onProvidedPlayerError.dispatch(new f.ProxyProvidedPlayerFatalError(e,r)):(t._triggerError(e),t._onProvidedPlayerError.dispatch(new d.ProxyProvidedPlayerError(e,r)))})),this._changeHandler=r.onChange.subscribe((function(e){t._update((function(){if(t._logger.debug("Handling changes.",e),e.dead)return t._logger.debug("Player has gone to DEAD state."),t._unsync(),void(t.isDead()||e.fatalError&&t._handleFatalError(e.fatalError,r));void 0===e.volume&&void 0===e.muted||t._notifyVolumeChange(r.getVolume(),r.getMuted()),void 0!==e.duration&&(t._ensureBelowPosition(e.duration),t._provideDuration(e.duration),t.isReady()||(t._signalReady(),t._handleSkippedSeek(),t._notifyStalled(r.isStalled())));var n=t.getSeekState();e.seekBlockedError&&t._seekingProvidedPlayer&&(t._synced?t._signalSeekBlocked(e.seekBlockedError):n&&"IN_PROGRESS"===n.state?t._notifySeekRejection(e.seekBlockedError):(t._logger.debug("Provided player blocked seek when trying to sync."),t._seek(t._initialProvidedPlayerPosition,!0),t._signalSeekComplete())),e.seek&&(n&&"IN_PROGRESS"===n.state||"IN_PROGRESS"!==e.seek.state?n&&"IN_PROGRESS"===n.state&&("COMPLETED"===e.seek.state&&n.position===e.seek.position?(t._signalSeekComplete(),r.isFadingForSeek()&&t._notifyFadingForSeek(!0)):"COMPLETED"===e.seek.state&&n.position!==e.seek.position?t._notifySeekRejection(new Error("Another seek occurred to a different position.")):"IN_PROGRESS"===e.seek.state&&n.position!==e.seek.position?t._seek(e.seek.position,!0):"ERROR"===e.seek.state&&t._notifySeekRejection(e.seek.error)):t._seek(e.seek.position,!0)),void 0!==e.stalled&&t._notifyStalled(e.stalled),!1===e.playing&&e.playRejection?t.isActuallyPlaying()?(t._triggerError(new s.PlayerError("Paused because a player was provided that refused to play.")),t._notifyPlaying(!1)):t._notifyPlayRejection(e.playRejection):!1===e.playing&&(r.isActuallyPlaying()?t.pause():void 0===e.actuallyPlaying&&t.isReady()&&t._notifyPlaying(!1)),!0===e.playing&&e.pauseRejection?t._notifyPauseRejection(e.pauseRejection):!0===e.playing&&t.play(),void 0!==e.actuallyPlaying&&e.actuallyPlaying!==t.isActuallyPlaying()&&(t._notifyPlaying(e.actuallyPlaying),e.actuallyPlaying&&r.isFading()&&t._notifyFading(!0)),!1===e.fading&&t._notifyFading(!1),!1===e.fadingForSeek&&t._notifyFadingForSeek(!1)}))})),this._update((function(){var n=t._instanceLock;try{if(t._notifyStalled(r.isStalled()),r.isReady()){var i=r.getDuration();t._ensureBelowPosition(i),t._provideDuration(i),t.isReady()||(t._logger.debug("Provided player is already ready. Making proxy player ready."),t._signalReady())}if(e.syncVolume&&(r.setVolume(t.getVolume(),t.getMuted()),t._instanceLock!==n))return;var o=t.getSeekState();if(e.syncPosition){t._logger.debug("Seeking to match position.");var a=t.getPosition(),s=t._initialProvidedPlayerPosition=r.getPosition();if(t._instanceLock!==n)return;if(s!==a){if(t._seekingProvidedPlayer=!0,r.seek(a),t._instanceLock!==n)return;t._seekingProvidedPlayer=!1}else t._logger.debug("Skipping seek because already at same position."),t.isReady()&&o&&"IN_PROGRESS"===o.state&&t._signalSeekComplete()}else{if(o&&"IN_PROGRESS"===o.state&&(t._logger.debug("Seeking to match position because a seek has been queued."),r.seek(t.getPosition(),t._seekConfig),t._instanceLock!==n))return;var u=r.getSeekState();u&&"IN_PROGRESS"===u.state&&(t._logger.debug("Seeking on proxy to match seek that is in progress on provided player."),t._seek(u.position,!0))}if(r.isActuallyPlaying()?(t._logger.debug("Provided player is already playing."),t.isActuallyPlaying()||(t._notifyPlaying(!0),r.isFading()&&t._notifyFading(!0))):r.isPlaying()?(t._logger.debug("Provided player is preparing to play."),t.play()):t.isPlaying()?(t._logger.debug("Calling play() on provided player to match proxy."),t._playAndHandleAbort(r)):t.isReady()&&t.isActuallyPlaying()&&(t._logger.debug("Switching to paused state, as provided player and proxy intended state is paused."),t._notifyPlaying(!1)),t._instanceLock!==n)return;t._synced=!0,t._notifyVolumeChange(r.getVolume(),r.getMuted())}catch(e){t._triggerError(new l.PlayerFatalError("Unexpected error occurred whilst syncing.",e))}}))},t.prototype._playAndHandleAbort=function(e){var t=this._instanceLock;this._logger.debug("Calling play() on provided player."),e.play(this._playConfig),this._instanceLock===t&&!e.isPlaying()&&this.isPlaying()&&(this._logger.debug("Provided player was not playing after play() call completed."),this.isActuallyPlaying()?(this._triggerError(new s.PlayerError("Paused because a player was provided that refused to play.")),this._notifyPlaying(!1)):this.pause())},t.prototype._pauseAndHandleAbort=function(e){var t=this._instanceLock;this._logger.debug("Calling pause() on provided player."),e.pause(this._pauseConfig),this._instanceLock===t&&e.isPlaying()&&!this.isPlaying()&&(this._logger.debug("Provided player was not paused after pause() call completed."),this.play())},t.prototype._unsync=function(){if(this._logger.debug("Unsyncing..."),this._changeHandler&&(this._changeHandler.remove(),this._changeHandler=null),this._errorHandler&&(this._errorHandler.remove(),this._errorHandler=null),this._synced){this._synced=!1,this._unsyncInProgress=!0;var e=this._player;if(e)try{this._lastPlayerPosition=e.getPosition()}catch(e){this._logger.error("Error whilst unsyncing.",e)}this._unsyncInProgress=!1,this._seekingProvidedPlayer=!1,this._logger.debug("Unsynced.",this.isPlaying(),this.isActuallyPlaying())}else this._logger.debug("Unsynced. (Sync never completed)")},t}(a.BasePlayer);t.ProxyPlayerBase=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasePlayer=void 0;var n=r(17),i=r(19),o=r(1),a=r(4),s=r(20),l=r(2),u=r(5),c=r(21),d=r(12),f=r(22),h=r(24),p=r(11),g=r(25),v=r(26),m=function(){function e(e){var t=this;this._stateManager=new f.StateManager({ended:!1,loading:!1,playing:!1,actuallyPlaying:!1,volume:1,muted:!1,isFading:!1,fadeRate:null,isFadingForSeek:!1,playDeferred:null,pauseDeferred:null,ready:!1,seeking:!1,seek:null,seekBlockedError:null,positionJumped:null,stalled:!0,duration:null,dead:!1,state:c.State.PAUSED,fatalError:null,errorOccurred:null,position:0},{afterUpdate:function(e,r){return t._afterUpdate(e,r)},afterDispatches:function(){return t._afterDispatches()},beforeUpdate:function(e){if(!e.dead&&(e.ready||!t._fatalErrorTriggered)){var r=t._getPosition(),n=e.duration;if(r<0)throw t._logger.error("Player provided invalid position.",r,n),t._triggerError(new h.ImplementationError("Player provided a position that was invalid.")),new Error("Player provided invalid position.");e.position=r,t._updateEndedInState(e)}}}),this._onError=new o.EventDispatcher,this._errors=[],this._fatalErrorTriggered=!1,this._loadingDelayTimer=null,this._stalled=!1,this._queuedDuration=null,this._readyDeferred=(0,a.buildDeferred)(),this._queuedSeekDeferreds=[],this._lastPlayError=null,this._lastPauseError=null,this._lastPlayedPosition=null,this._listenTimeBase=0,this._timePlaybackStarted=null,this._positionAfterLastUpdate=0,this._positionWhenStartedFadeOut=null,this._fadeStartAllowed=!1,this._seekFadeStartAllowed=!1,this._implementationIsFading=!1,this._mediaSessionManagerHandle=null,this._activeSeek=null,this._activeSeekPositionJumped=null;var r=e.name;if(this._logger=(0,d.prefixLogger)(e.logger,"BasePlayer"+(r?"-".concat(r):"")),this._mediaSessionEnabled=!!e.mediaSessionEnabled,e.defaultFadeDuration&&e.defaultFadeDuration<0)throw new Error("defaultFadeDuration must be >= 0.");if(e.loadingDelay&&e.loadingDelay<0)throw new Error("loadingDelay must be >= 0.");this._defaultFadeDuration=void 0!==e.defaultFadeDuration?e.defaultFadeDuration:150,this._defaultSeekFadeOutDuration=void 0!==e.defaultSeekFadeOutDuration?e.defaultSeekFadeOutDuration:25,this._defaultSeekFadeInDuration=void 0!==e.defaultSeekFadeInDuration?e.defaultSeekFadeInDuration:35,this._loadingDelay=void 0!==e.loadingDelay?e.loadingDelay:1e3,this._seekStrategy=void 0!==e.seekStrategy?e.seekStrategy:v.AlwaysAllowSeekStrategy,this.onError=this._onError.getHandle(),this.whenReady=this._readyDeferred.promise,this._configureRewindAfterFadeOut(),this._stateManager.subscribe((function(e,r){return t._onChange(e,r)})),this._stateManager.subscribe((function(e){var r=e.actuallyPlaying,n=e.seek;!0===r&&(t._fadeStartAllowed=!1),n&&"IN_PROGRESS"!==n.state&&(t._seekFadeStartAllowed=!1)})),this._stateManager.subscribe((function(e,r){var n=e.isFading;!r.dead&&!1===n&&t._implementationIsFading&&t._triggerError(new h.ImplementationError("Fade was still running when not allowed."))})),this._stateManager.subscribe((function(e,r){var n=e.playing,i=r.dead,o=r.fadeRate;i||void 0===n||t._stateManager.update((function(){try{t._handlePlayPauseChange(n,{fadeRate:o||void 0}),n||(t._fadeStartAllowed=!1)}catch(e){t._triggerError(new h.ImplementationError("Exception occurred whilst handling play/pause change.",e))}}))})),this._stateManager.subscribe((function(e,r){var n=e.seek;!r.dead&&n&&n!==t._activeSeek&&"IN_PROGRESS"===n.state&&t._stateManager.update((function(){try{t._seekFadeStartAllowed=!0,t._handleSeekChange(n.position,{fadeRate:{beforeSeek:n.fadeRate.beforeSeek||void 0,afterSeek:n.fadeRate.afterSeek||void 0}}),t._seekFadeStartAllowed=!1}catch(e){t._triggerError(new h.ImplementationError("Exception occurred whilst handling seek change.",e))}}))})),this._stateManager.subscribe((function(e,r){var n=e.seek,i=e.seekBlockedError,o=e.positionJumped;n&&(t._activeSeek=n),o&&(t._activeSeekPositionJumped=o),t._queuedSeekDeferreds=t._queuedSeekDeferreds.filter((function(e){var n=e.position,o=e.active,a=e.deferred;if(i&&!o)return t._logger.debug("Rejecting seek() because it was blocked.",i),a.reject(i),!1;if(r.seek&&"ERROR"===r.seek.state)return t._logger.debug("Rejecting seek().",r.seek.error),a.reject(r.seek.error),!1;if(r.seek&&"COMPLETED"===r.seek.state)return!!r.stalled||(t._logger.debug("Resolving seek()."),a.resolve(),!1);if(r.seek&&"IN_PROGRESS"===r.seek.state)return n===r.seek.position||(t._logger.debug("Rejecting seek() because another seek was requested.",n),a.reject(new Error("Seek request aborted because another seek was requested to a different position.")),!1);throw t._triggerError(new h.ImplementationError("Unexpected error handling seek deferreds.")),new Error("Unexpected error handling seek deferreds.")})),t._queuedSeekDeferreds.forEach((function(e){return e.active=!0}))})),this.onChange=this._buildEventHandle((function(e,r){var n=r.ready;if(void 0!==n&&!0!==n)throw new Error("Ready state is invalid.");var i=r.duration;if(void 0!==i&&null===i)throw new Error("Duration state is invalid.");var o=r.dead;if(void 0!==o&&!0!==o)throw new Error("Dead state is invalid.");var a={ready:n,ended:r.ended,duration:i,volume:r.volume,muted:r.muted,playing:r.playing,actuallyPlaying:r.actuallyPlaying,stalled:r.stalled,loading:r.loading,fading:r.isFading,fadingForSeek:r.isFadingForSeek,playRejection:!1===r.playing&&t._lastPlayError||void 0,pauseRejection:!0===r.playing&&t._lastPauseError||void 0,seeking:r.seeking,seek:r.seek||void 0,seekBlockedError:r.seekBlockedError||void 0,positionJumped:void 0!==r.positionJumped||void 0,state:r.state,fatalError:r.fatalError||void 0,dead:o};Object.keys(a).some((function(e){return void 0!==a[e]}))&&e(a)}));var n=e.registerListeners;n&&(0,p.deferException)((function(){n({onChange:t.onChange,onError:t.onError})})),this.onDurationChange=this._buildEventHandle((function(e,t){var r=t.duration;null!=r&&e(r)})),this.onReady=this._buildEventHandle((function(e,t){!0===t.ready&&e(void 0)})),this.onStateChange=this._buildEventHandle((function(e,t){var r=t.state;void 0!==r&&e(r)})),this.onVolumeChange=this._buildEventHandle((function(e,t,r){var n=t.volume,i=t.muted,o=r.volume,a=r.muted;void 0===n&&void 0===i||e({volume:o,muted:a})})),this.onPlay=this._buildEventHandle((function(e,t){!0===t.actuallyPlaying&&e(void 0)})),this.onPlayIntent=this._buildEventHandle((function(e,t){!0===t.playing&&e(void 0)})),this.onPlayRejection=this._buildEventHandle((function(e,r){!1===r.playing&&t._lastPlayError&&e(t._lastPlayError)})),this.onPause=this._buildEventHandle((function(e,t){!1===t.actuallyPlaying&&e(void 0)})),this.onPauseIntent=this._buildEventHandle((function(e,t){!1===t.playing&&e(void 0)})),this.onPauseRejection=this._buildEventHandle((function(e,r){!0===r.playing&&t._lastPauseError&&e(t._lastPauseError)})),this.onSeek=this._buildEventHandle((function(e,t){var r=t.seek;r&&"COMPLETED"===r.state&&e(void 0)})),this.onSeekIntent=this._buildEventHandle((function(e,t){!0===t.seeking&&e(void 0)})),this.onSeekRejection=this._buildEventHandle((function(e,t){var r=t.seek;r&&"ERROR"===r.state&&e(r.error)})),this.onPositionJumped=this._buildEventHandle((function(e,t){void 0!==t.positionJumped&&e(void 0)})),this.onEnded=this._buildEventHandle((function(e,t){!0===t.ended&&e(void 0)})),this.onLeftEnded=this._buildEventHandle((function(e,t){!1===t.ended&&e(void 0)})),this.onStallStart=this._buildEventHandle((function(e,t){!0===t.stalled&&e(void 0)})),this.onStallEnd=this._buildEventHandle((function(e,t){!1===t.stalled&&e(void 0)})),this.onLoadStart=this._buildEventHandle((function(e,t){!0===t.loading&&e(void 0)})),this.onLoadEnd=this._buildEventHandle((function(e,t){!1===t.loading&&e(void 0)})),this.onFadeStart=this._buildEventHandle((function(e,t){!0===t.isFading&&e(void 0)})),this.onFadeEnd=this._buildEventHandle((function(e,t){!1===t.isFading&&e(void 0)})),this.onFadeForSeekStart=this._buildEventHandle((function(e,t){!0===t.isFadingForSeek&&e(void 0)})),this.onFadeForSeekEnd=this._buildEventHandle((function(e,t){!1===t.isFadingForSeek&&e(void 0)}))}return e.prototype.isReady=function(){return this._stateManager.getState().ready},e.prototype.getPosition=function(){return this._getPositionOrPositionSeekingTo()},e.prototype.getLastPlayedPosition=function(){var e=this._stateManager.getState(),t=e.actuallyPlaying,r=e.stalled;return t&&!r?this.getPosition():this._lastPlayedPosition},e.prototype.getListenTime=function(){var e=this._stateManager.getState(),t=e.actuallyPlaying,r=e.ended,n=this._listenTimeBase;return t&&!r&&(n+=(0,l.now)()-this._timePlaybackStarted),n},e.prototype.isStalled=function(){return this._stateManager.getState().stalled},e.prototype.isLoading=function(){return this._stateManager.getState().loading},e.prototype.isFading=function(){return this._stateManager.getState().isFading},e.prototype.isFadingForSeek=function(){return this._stateManager.getState().isFadingForSeek},e.prototype.isPlaying=function(){return this._stateManager.getState().playing},e.prototype.isActuallyPlaying=function(){return this._stateManager.getState().actuallyPlaying},e.prototype.isEnded=function(){return this._stateManager.getState().ended},e.prototype.getState=function(){return this._stateManager.getState().state},e.prototype.getBufferController=function(){return null},e.prototype.getMemoryCacheMaxSize=function(){return null},e.prototype.getMemoryCacheUsage=function(){return null},e.prototype.getMemoryCacheController=function(){return null},e.prototype.getFatalError=function(){return this._stateManager.getState().fatalError},e.prototype.isDead=function(){return this._stateManager.getState().dead},e.prototype.getVolume=function(){return this._stateManager.getState().volume},e.prototype.getMuted=function(){return this._stateManager.getState().muted},e.prototype.getDuration=function(){var e=this._stateManager.getState(),t=e.ready,r=e.duration;return t?r:null},e.prototype.setVolume=function(e,t){if(e<0||e>1)throw new Error("Volume must be >= 0 and <= 1.");if(!this._stateManager.getState().dead){var r=this._stateManager.getState().muted;void 0===t&&(t=r);try{this._handleVolumeChange(e,t)}catch(e){throw this._triggerError(new h.ImplementationError("Exception occurred updating volume.",e)),e}}},e.prototype.setMuted=function(e){this.setVolume(this._stateManager.getState().volume,e)},e.prototype.getCurrentBufferedTimeRange=function(){var e=this.getBufferedTimeRanges();if(!e)return null;var t=this.getPosition();return(0,s.find)(e,(function(e){return e.containsTime(t)}))||null},e.prototype.play=function(e){var t=this;this._ensureNotDead(),this._logger.debug("play() called.",e);var r=(0,a.buildDeferred)();try{return this._stateManager.update((function(n){if(n.playing)t._logger.debug("Intent is already to be playing.");else{t._logger.debug("Requesting play."),n.playing=!0;var i=t._extractFadeDuration(e);n.fadeRate=i?1/i:null,t._lastPlayError=null}n.playDeferred&&!n.playDeferred.isSettled()||(n.playDeferred=(0,a.buildDeferred)()),r.resolve(n.playDeferred.promise)})),r.promise}catch(e){return this._triggerError(new n.PlayerFatalError("Unexpected error when attempting to play.",e)),u.Promise.reject(e)}},e.prototype.pause=function(e){var t=this;this._ensureNotDead(),this._logger.debug("pause() called.",e);var r=(0,a.buildDeferred)();try{return this._stateManager.update((function(n){if(n.playing){t._logger.debug("Requesting pause."),t._positionWhenStartedFadeOut=t._getPositionOrPositionSeekingTo(),n.playing=!1;var i=t._extractFadeDuration(e);n.fadeRate=i?1/i*-1:null,t._fadeStartAllowed=!0,t._lastPauseError=null}else t._logger.debug("Intent is already to be paused.");n.pauseDeferred&&!n.pauseDeferred.isSettled()||(n.pauseDeferred=(0,a.buildDeferred)()),r.resolve(n.pauseDeferred.promise)})),r.promise}catch(e){return this._triggerError(new n.PlayerFatalError("Unexpected error when attempting to pause.",e)),u.Promise.reject(e)}},e.prototype.seek=function(e,t){return this._seek(e,!1,t)},e.prototype.getSeekState=function(){return this._stateManager.getState().seek},e.prototype.registerMediaSessionActionHandlers=function(e){var t=this;void 0===e&&(e={play:!0,pause:!0,seekForward:!0,seekBackward:!0}),this.unregisterMediaSessionActionHandlers();var r={},n=function(e){t.isDead()||e()};e.play&&(r.play=function(){return n((function(){return t.play()}))}),e.pause&&(r.pause=function(){return n((function(){return t.pause()}))}),e.seekBackward&&(r.seekBackward=function(){return n((function(){t.seek(Math.max(0,t.getPosition()-5e3))}))}),e.seekForward&&(r.seekForward=function(){return n((function(){t.seek(Math.min(t.getDuration()||0,t.getPosition()+5e3))}))}),this._mediaSessionManagerHandle=g.mediaSessionManager.register(new g.MediaSessionItem(this,r))},e.prototype.unregisterMediaSessionActionHandlers=function(){this._mediaSessionManagerHandle&&(this._mediaSessionManagerHandle.remove(),this._mediaSessionManagerHandle=null)},e.prototype.kill=function(){var e=this;this._stateManager.update((function(t){t.dead||(e._logger.debug("kill() called."),t.dead=!0)}))},e.prototype._seek=function(e,t,r){var n=this;this._ensureNotDead(),this._logger.debug("seek() called.",e);var i=(0,a.buildDeferred)();return this._stateManager.update((function(o){if(e<0)n._logger.warn("Rejecting seek immediately as the position was negative."),o.seekBlockedError=new Error("You were attempting to seek to a negative time.");else if(null!==o.duration&&e>o.duration)n._logger.warn("Rejecting seek immediately as the duration is now known, and the requested positon was past it."),o.seekBlockedError=new Error("You were attempting to seek past the end of the media.");else if(function(){if(t)return!0;try{return n._seekStrategy.isSeekAllowed(e)}catch(e){return n._triggerError(new h.ImplementationError("Seek strategy threw an error.",e)),!1}}())if(o.stalled||!o.actuallyPlaying||o.seek&&"IN_PROGRESS"===o.seek.state||(n._lastPlayedPosition=n._getPositionOrPositionSeekingTo()),o.seek&&"IN_PROGRESS"===o.seek.state&&o.seek.position===e)n._logger.debug("Seek already requested to the same position.",e);else{n._logger.debug("Requesting seek.",e),o.seeking=!0;var s=n._extractSeekFadeDurations(r,e),l=s.fadeOutDuration?1/s.fadeOutDuration*-1:null,u=s.fadeInDuration?1/s.fadeInDuration:null;o.seekBlockedError=null,o.seek={state:"IN_PROGRESS",position:e,fadeRate:{beforeSeek:l,afterSeek:u}},o.positionJumped=Object.create(null)}else n._logger.warn("Rejecting seek immediately as the seek strategy has denied it or threw an error."),o.seekBlockedError=new Error("The provided seeking strategy has blocked the attempt to seek.");var c=(0,a.buildDeferred)();n._queuedSeekDeferreds.push({position:e,deferred:c,active:!1}),i.resolve(c.promise)})),i.promise},e.prototype._update=function(e){this._stateManager.update((function(){return e&&e()}))},e.prototype._ensureNotDead=function(){if(this._stateManager.getState().dead)throw new Error("Player is dead.")},e.prototype._notifyStalled=function(e){this._ensureNotDead(),this._stalled!==e&&(this._logger.debug("notifyStalled() called.",e),this._stalled=e,this._stateManager.update())},e.prototype._getQueuedSeekPosition=function(){var e=this.getSeekState();return e&&"IN_PROGRESS"===e.state?e.position:null},e.prototype._provideDuration=function(e){var t=this;this._ensureNotDead(),this._stateManager.update((function(r){if(r.duration!==e){var n=t._getPositionOrPositionSeekingTo();if(e<0||r.ready&&n>e)throw t._triggerError(new h.ImplementationError("Attempt to update duration to an invalid value.")),new Error("Duration cannot be less than the current position.");t._logger.debug("provideDuration() called.",e),r.ready?r.duration=e:t._queuedDuration=e}}))},e.prototype._notifyVolumeChange=function(e,t){if(e<0||e>1)throw this._triggerError(new h.ImplementationError("Volume was out of range.",e)),new Error("Volume was out of range.");this._stateManager.update((function(r){r.volume=e,r.muted=t}))},e.prototype._notifyPlaying=function(e){var t=this;this._ensureNotDead(),this._stateManager.update((function(r){if(!r.ready)throw t._triggerError(new h.ImplementationError("Attempt to register playback as started before ready.")),new Error("Player must be ready first.");e!==r.actuallyPlaying&&(t._logger.debug("notifyPlaying() called.",e),e||r.seeking||r.stalled||(t._lastPlayedPosition=t._getPositionOrPositionSeekingTo()),r.actuallyPlaying=r.playing=e,e?(t._lastPlayError=null,t._fadeStartAllowed=!0):(r.isFading=!1,t._fadeStartAllowed=!1,t._lastPauseError=null))}))},e.prototype._notifyPlayRejection=function(e){var t=this;this._ensureNotDead(),e=e||new Error("Unknown error."),this._stateManager.update((function(r){if(!r.ready)throw t._triggerError(new h.ImplementationError("Attempt to reject a play request before player ready.")),new Error("Player must be ready first.");if(r.actuallyPlaying||!r.playing)throw t._triggerError(new h.ImplementationError("Attempt to reject a play request when not valid.")),new Error("Playing state is incorrect.");t._logger.debug("notifyPlayRejection() called.",e),r.playing=!1,t._lastPlayError=e}))},e.prototype._notifyPauseRejection=function(e){var t=this;this._ensureNotDead(),e=e||new Error("Unknown error."),this._stateManager.update((function(r){if(!r.ready)throw t._triggerError(new h.ImplementationError("Attempt to reject pause request before player ready.")),new Error("Player must be ready first.");if(!r.actuallyPlaying||r.playing)throw t._triggerError(new h.ImplementationError("Attempt to reject pause request when not valid.")),new Error("Playing state is incorrect.");t._logger.debug("notifyPauseRejection() called.",e),r.playing=!0,r.fadeRate&&(r.fadeRate*=-1),t._lastPauseError=e}))},e.prototype._signalSeekBlocked=function(e){var t=this;void 0===e&&(e=new Error("Seek blocked.")),this._ensureNotDead(),this._stateManager.update((function(r){if(t._activeSeek===r.seek||!r.seek||"IN_PROGRESS"!==r.seek.state)throw t._triggerError(new h.ImplementationError("_signalSeekBlocked called when no seek to block.")),new Error("_signalSeekBlocked called when no seek to block.");if(r.isFadingForSeek)throw t._triggerError(new h.ImplementationError("_signalSeekBlocked called after fade out started.")),new Error("_signalSeekBlocked called after fade out started.");r.seek=t._activeSeek,r.positionJumped=t._activeSeekPositionJumped,r.seeking=!!t._activeSeek&&"IN_PROGRESS"===t._activeSeek.state,r.seekBlockedError=e}))},e.prototype._notifySeekRejection=function(e){var t=this;this._ensureNotDead(),e=e||new Error("Unknown error."),this._stateManager.update((function(r){if(!r.seek||"IN_PROGRESS"!==r.seek.state)throw t._triggerError(new h.ImplementationError("Attempt to reject seek request when none requested.")),new Error("A seek hasn't been requested.");if(null!==r.duration&&r.position>r.duration)throw t._triggerError(new h.ImplementationError("Attempt to reject seek request after duration changed below current position.")),new Error("Attempt to reject seek request after duration changed below current position.");t._logger.debug("notifySeekRejection() called.",e),r.seeking=!1,r.seek={state:"ERROR",error:e},r.positionJumped=Object.create(null)}))},e.prototype._notifyFading=function(e){var t=this;if(this._ensureNotDead(),e&&!this._fadeStartAllowed){var r="Attempt to register fade as starting when not allowed.";throw this._triggerError(new h.ImplementationError(r)),new Error(r)}this._implementationIsFading=e,this._stateManager.update((function(r){r.isFading!==e&&(t._logger.debug("notifyFading() called",e),r.isFading=e)}))},e.prototype._notifyFadingForSeek=function(e){var t=this;if(this._ensureNotDead(),e&&!this._seekFadeStartAllowed){var r="Attempt to register fade as starting for seek when not allowed.";throw this._triggerError(new h.ImplementationError(r)),new Error(r)}this._stateManager.update((function(r){r.isFadingForSeek!==e&&(t._logger.debug("notifyFadingForSeek() called",e),r.isFadingForSeek=e)}))},e.prototype._signalReady=function(){var e=this;this._ensureNotDead(),this._stateManager.update((function(t){if(t.ready)throw e._triggerError(new h.ImplementationError("Attempt to signal ready twice.")),new Error("Ready already signalled.");if(null===e._queuedDuration)throw e._triggerError(new h.ImplementationError("Attempt to signal ready when duration unknown.")),new Error("Duration is still unknown.");e._logger.debug("signalReady() called."),t.ready=!0,t.duration=e._queuedDuration,t.seek&&"IN_PROGRESS"===t.seek.state&&t.seek.position>t.duration&&(t.seeking=!1,t.seek={state:"ERROR",error:new Error("You were attempting to seek past the end of the media.")})}))},e.prototype._signalSeekComplete=function(){var e=this;this._ensureNotDead(),this._stateManager.update((function(t){if(!t.ready)throw e._triggerError(new h.ImplementationError("Attempt to signal seek as complete before player ready.")),new Error("Player must be ready first.");if(!t.seek||"IN_PROGRESS"!==t.seek.state)throw e._triggerError(new h.ImplementationError("Attempt to signal seek as complete when none requested.")),new Error("There shouldn't be a seek in progress.");var r=t.duration;if(t.seek&&"IN_PROGRESS"===t.seek.state&&t.seek.position>r)throw new Error("Seek cannot have completed given it was to a time greater than the duration.");e._logger.debug("signalSeekComplete() called."),e._seekFadeStartAllowed=!0,e._positionWhenStartedFadeOut=null,t.seek={state:"COMPLETED",position:t.seek.position,fadeRate:t.seek.fadeRate},t.seeking=!1,t.position=t.seek.position}))},e.prototype._triggerError=function(e){var t=this;e instanceof n.PlayerFatalError&&(this._fatalErrorTriggered=!0),this._stateManager.update((function(r){var o=!1;if(r.ready&&e instanceof i.NotSupportedError&&(e=new h.ImplementationError("Invalid NotSupportedError."),o=!0),e instanceof n.PlayerFatalError?(e instanceof i.NotSupportedError?t._logger.info("NotSupportedError occurred.",e):t._logger.error("Fatal error occurred.",e),r.fatalError?t._logger.warn("A fatal error already occurred.",r.fatalError):r.fatalError=e,t._errors.push(e),r.errorOccurred=Object.create(null),r.dead=!0):(t._logger.warn("Non-fatal error occurred.",e),t._errors.push(e),r.errorOccurred=Object.create(null)),o)throw new Error("Not supported errors are only valid before the player is ready.")}))},e.prototype._buildEventHandle=function(e){var t=this;return{subscribe:function(r){var n=function(e){return r(e,(0,l.now)())};return t._stateManager.subscribe((function(t,r){e(n,t,r)}))}}},e.prototype._finalizeState=function(e){this._updateEndedInState(e);var t=this._getPositionOrPositionSeekingTo();if(e.dead)this._lastPlayError=new Error("Player was killed."),e.loading=!1,this._clearLoadingDelay(),!e.playing&&e.isFading&&null!==this._positionWhenStartedFadeOut&&(this._logger.debug("Fade out was in progress. Pretending it completed."),e.isFading=!1,e.position=this._positionWhenStartedFadeOut),e.stalled=!0,e.actuallyPlaying=!1,e.isFadingForSeek=!1,e.playing=!1,e.state=c.State.DEAD;else{var r=!e.ended&&(!e.ready||this._stalled||!(!e.seek||"IN_PROGRESS"!==e.seek.state));r&&!e.stalled&&!e.seeking&&e.actuallyPlaying&&(this._lastPlayedPosition=t),e.stalled=r,e.ended||e.isFading||e.isFadingForSeek||!e.playing&&!e.actuallyPlaying||!e.stalled&&e.playing===e.actuallyPlaying?(e.loading=!1,this._clearLoadingDelay()):this._loadingDelay?this._scheduleLoadingDelay():e.loading=!0,this._positionAfterLastUpdate!==t&&(this._positionAfterLastUpdate=t,e.playing||e.actuallyPlaying||(e.positionJumped=Object.create(null))),e.state=this._calculateState(e)}},e.prototype._updateEndedInState=function(e){e.ended=e.ready&&this._getPositionOrPositionSeekingTo()===e.duration},e.prototype._scheduleLoadingDelay=function(){var e=this;this._loadingDelayTimer||(this._loadingDelayTimer=window.setTimeout((function(){e._stateManager.update((function(e){return e.loading=!0}))}),this._loadingDelay))},e.prototype._clearLoadingDelay=function(){this._loadingDelayTimer&&(window.clearTimeout(this._loadingDelayTimer),this._loadingDelayTimer=null)},e.prototype._getPositionOrPositionSeekingTo=function(){this._stateManager.update();var e=this._stateManager.getState();return e.seek&&"IN_PROGRESS"===e.seek.state?e.seek.position:e.isFading&&!e.playing&&null!==this._positionWhenStartedFadeOut?this._positionWhenStartedFadeOut:e.ready&&null!==e.duration?e.position:0},e.prototype._calculateState=function(e){var t=e.dead,r=e.loading,n=e.playing,i=e.ended;return t?c.State.DEAD:r?c.State.LOADING:n&&!i?c.State.PLAYING:c.State.PAUSED},e.prototype._extractFadeDuration=function(e){return void 0===e&&(e={}),void 0===e.fadeDuration?!this._stateManager.getState().playing||this._getPositionOrPositionSeekingTo()>0?this._defaultFadeDuration:0:e.fadeDuration>0?e.fadeDuration:0},e.prototype._extractSeekFadeDurations=function(e,t){return void 0===e&&(e={}),{fadeOutDuration:void 0!==e.fadeOutDuration?e.fadeOutDuration>0?e.fadeOutDuration:0:this._defaultSeekFadeOutDuration,fadeInDuration:void 0!==e.fadeInDuration?e.fadeInDuration>0?e.fadeInDuration:0:t>0?this._defaultSeekFadeInDuration:0}},e.prototype._configureRewindAfterFadeOut=function(){var e=this;this._stateManager.subscribe((function(t,r){var n=t.isFading,i=r.seeking,o=r.playing;r.dead||!1!==n||o||null===e._positionWhenStartedFadeOut||i||e.seek(e._positionWhenStartedFadeOut,{fadeInDuration:0,fadeOutDuration:0}).catch((function(t){e._logger.warn("Seek back to position where fade out started failed.",t)}))}))},e.prototype._afterUpdate=function(e,t){if(t.beforeUpdate||t.update.length>0)this._logger.error("Errors occurred during state update. Killing player.",t),this._triggerError(new n.PlayerFatalError("Errors occurred during state update.",t));else if(!e.dead&&e.ready){var r=e.duration;null!==r&&!e.seeking&&e.position>r&&(this._logger.error("Player provided invalid position.",e.position,r),this._triggerError(new h.ImplementationError("Player provided a position that was invalid.")))}this._finalizeState(e)},e.prototype._afterDispatches=function(){var e=this,t=this._errors;this._errors=[],t.forEach((function(t){return e._onError.dispatch(t)}))},e.prototype._onChange=function(e,t){var r=this,n=e.ready,i=e.dead,o=e.fatalError,a=e.playing,s=e.actuallyPlaying,u=e.ended;if(!0===n&&(this._logger.debug("Resolving ready deferred."),this._readyDeferred.resolve(void 0)),!0===a&&this._mediaSessionEnabled&&!this._mediaSessionManagerHandle&&this.registerMediaSessionActionHandlers({play:!0,pause:!0,seekForward:!0,seekBackward:!0}),t.pauseDeferred&&!t.pauseDeferred.isSettled()&&t.playing){var c=this._lastPauseError||new Error("Pause request aborted.");this._logger.debug("Rejecting pause deferred.",c),t.pauseDeferred.reject(c)}if(!t.playDeferred||t.playDeferred.isSettled()||t.playing||(c=this._lastPlayError||new Error("Play request aborted."),this._logger.debug("Rejecting play deferred.",c),t.playDeferred.reject(c)),t.playDeferred&&!t.playDeferred.isSettled()&&t.actuallyPlaying&&(this._logger.debug("Resolving play deferred."),t.playDeferred.resolve(void 0)),!t.pauseDeferred||t.pauseDeferred.isSettled()||t.actuallyPlaying||(this._logger.debug("Resolving pause deferred."),t.pauseDeferred.resolve(void 0)),!0===s&&!t.ended||!1===u&&t.actuallyPlaying?this._timePlaybackStarted=(0,l.now)():(!1===s&&!t.ended||!0===u&&t.actuallyPlaying)&&(this._listenTimeBase+=(0,l.now)()-this._timePlaybackStarted,this._timePlaybackStarted=null),!0===i){this._logger.debug("Calling _kill() on player.");try{this._kill(),this._logger.info("Player killed.")}catch(e){this._triggerError(new h.ImplementationError("Exception occurred in _kill().",e)),this._logger.error("Exception when implementation was being killed.",e)}this.unregisterMediaSessionActionHandlers(),t.ready||(c=o||new Error("Player was killed."),this._logger.debug("Rejecting whenReady."),this._readyDeferred.reject(c)),this._queuedSeekDeferreds.forEach((function(e){var t=e.position,n=e.deferred,i=o||new Error("Seek aborted as player killed.");r._logger.debug("Rejecting seek().",t),n.reject(i)})),this._queuedSeekDeferreds=[],this._stateManager.kill(),this._logger.debug("Player dead.")}},e}();t.BasePlayer=m},function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerFatalError=void 0;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.getCode=function(){return"PLAYER_FATAL_ERROR"},t}(r(18).PlayerError);t.PlayerFatalError=o},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerError=void 0;var r=function(){function e(e,t){this._msg=e,this._cause=t}return e.prototype.getCode=function(){return"PLAYER_ERROR"},e.prototype.getMsg=function(){return this._msg},e.prototype.getCause=function(){return this._cause},e}();t.PlayerError=r},function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.NotSupportedError=void 0;var o=function(e){function t(t){return e.call(this,t||"The player cannot play the provided descriptor.")||this}return i(t,e),t.prototype.getCode=function(){return"NOT_SUPPORTED_ERROR"},t}(r(17).PlayerFatalError);t.NotSupportedError=o},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.find=void 0,t.find=function(e,t){var r;return e.some((function(e){return!!t(e)&&(r=e,!0)})),r}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.State=void 0,function(e){e[e.LOADING=0]="LOADING",e[e.PLAYING=1]="PLAYING",e[e.PAUSED=2]="PAUSED",e[e.DEAD=3]="DEAD"}(t.State||(t.State={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StateManager=void 0;var n=r(23),i=r(11);function o(e){var t=Object.create(null);return Object.keys(e).forEach((function(r){t[r]=e[r]})),t}var a=function(){},s=function(){function e(e,t){void 0===t&&(t={});var r=this;this._subscribers=[],this._onExit=new n.OnExit((function(){return r._after()}),(function(){return r._onEnter()})),this._beforeUpdateError=void 0,this._inAfterUpdate=!1,this._dead=!1,this._officiallyDead=!1,this._errors=[],this._state=o(e),this._initialState=o(e),this._beforeUpdate=t.beforeUpdate||function(){},this._afterUpdate=t.afterUpdate||a,this._afterDispatches=t.afterDispatches||a}return e.prototype.subscribe=function(e,t){var r=this;if(void 0===t&&(t=!0),this._dead){var n=!1;return{retrieve:function(){},remove:function(){return!n&&(n=!0)}}}var i={callback:e,localState:t?o(this._state):this._initialState};return this._subscribers.push(i),t||this._updateSubscriber(i),{remove:function(){var t=r._subscribers.map((function(e){return e.callback})).indexOf(e);return t>=0&&(r._subscribers.splice(t,1),!0)},retrieve:function(){r._updateSubscriber(i)}}},e.prototype.subscribeIndividual=function(e,t,r){return this.subscribe((function(r){var n=r[e];void 0!==n&&t(n)}),r)},e.prototype.getHandle=function(){return{subscribe:this.subscribe.bind(this)}},e.prototype.getIndividualHandle=function(e){var t=this;return{subscribe:function(r){return t.subscribeIndividual(e,r)}}},e.prototype.update=function(e){var t=this;this._officiallyDead||(this._inAfterUpdate?e&&e(this._state,this._beforeUpdateError):this._onExit.enter((function(r){r.getResult((function(){try{e&&e(t._state,t._beforeUpdateError)}catch(e){t._errors.push(e)}}))})))},e.prototype.getState=function(){return this._state},e.prototype.kill=function(){var e=this;this._dead||(this._dead=!0,window.setTimeout((function(){e._subscribers.splice(0),e._officiallyDead=!0}),0))},e.prototype.isDead=function(){return this._dead},e.prototype._onEnter=function(){this._beforeUpdateError=void 0;try{this._beforeUpdate(this._state)}catch(e){this._beforeUpdateError=e}},e.prototype._after=function(){var e=this,t=this._errors;this._errors=[],(0,i.deferException)((function(){e._inAfterUpdate=!0;try{e._afterUpdate(e._state,{beforeUpdate:e._beforeUpdateError,update:t})}catch(t){throw e._inAfterUpdate=!1,t}e._inAfterUpdate=!1,e._subscribers.slice().forEach((function(t){return e._updateSubscriber(t)})),e._afterDispatches(e._state)}))},e.prototype._updateSubscriber=function(e){var t=this._calculateDiff(e.localState);Object.keys(t).length&&(e.localState=o(this._state),(0,i.deferException)((function(){return e.callback(t,e.localState)})))},e.prototype._calculateDiff=function(e){var t=this,r=Object.create(null);return Object.keys(this._state).forEach((function(n){var i=t._state[n];i!==e[n]&&(r[n]=i)})),r},e}();t.StateManager=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OnExit=void 0;var n=r(11),i=function(){function e(e,t){this._inCallback=!1,this._onExit=e,this._onEnter=t||null}return e.prototype.enter=function(e){var t=this;if(this._inCallback)return e?e(this._onEnterResultRetriever):void 0;this._inCallback=!0;var r=[],i=!1;this._onEnter&&(this._onEnterResultRetriever={getResult:function(e){i?(0,n.deferException)((function(){return e(t._onEnterError,t._onEnterResult)})):r.push(e)}});try{var o=e?e(this._onEnterResultRetriever):void 0;if(this._onEnter){this._onEnterError=void 0,this._onEnterResult=void 0;try{this._onEnterResult=this._onEnter()}catch(e){this._onEnterError=e}i=!0,r.forEach((function(e){return(0,n.deferException)((function(){return e(t._onEnterError,t._onEnterResult)}))}))}return o}finally{this._inCallback=!1,(0,n.deferException)((function(){return t._onExit(t._onEnterError,t._onEnterResult)}))}},e}();t.OnExit=i},function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationError=void 0;var o=function(e){function t(t,r){return e.call(this,t,r)||this}return i(t,e),t.prototype.getCode=function(){return"IMPLEMENTATION_ERROR"},t}(r(17).PlayerFatalError);t.ImplementationError=o},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediaSessionItem=t.mediaSessionManager=t.MediaSessionManager=void 0;var r="undefined"!=typeof navigator&&"mediaSession"in navigator?navigator.mediaSession:null,n=function(){function e(e){this._mediaSession=e,this._stack=[],this._active=null}return e.prototype.register=function(e){var t=this;if(!this._mediaSession)return{remove:function(){}};this._stack.length?this._stack.splice(1,0,e):(this._stack.push(e),this._makeActive(e));var r=e.getPlayer().onChange.subscribe((function(r){void 0!==r.playing&&t._handleUpdate(e)}));this._handleUpdate(e);var n=!1;return{remove:function(){if(!n){n=!0,r.remove();var i=t._stack.indexOf(e);i>=0&&t._stack.splice(i,1),t._stack.length?t._makeActive(t._stack[0]):(t._active=null,t._updateHandlers({}),t._mediaSession.playbackState="none")}}}},e.prototype._handleUpdate=function(e){var t=e.getPlayer().isPlaying();t&&this._makeActive(e),this._isActive(e)&&(this._mediaSession.playbackState=t?"playing":"paused")},e.prototype._isActive=function(e){return this._active===e},e.prototype._makeActive=function(e){if(!this._isActive(e)){var t=this._stack.indexOf(e);t>=0&&this._stack.splice(t,1),this._stack.unshift(e),this._active=e,this._updateHandlers(e.getHandlers())}},e.prototype._updateHandlers=function(e){this._mediaSession.setActionHandler("play",e.play||null),this._mediaSession.setActionHandler("pause",e.pause||null),this._mediaSession.setActionHandler("seekforward",e.seekForward||null),this._mediaSession.setActionHandler("seekbackward",e.seekBackward||null)},e}();t.MediaSessionManager=n,t.mediaSessionManager=new n(r);var i=function(){function e(e,t){void 0===t&&(t={}),this._player=e,this._handlers=t}return e.prototype.getHandlers=function(){return this._handlers},e.prototype.getPlayer=function(){return this._player},e}();t.MediaSessionItem=i},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AlwaysAllowSeekStrategy=void 0,t.AlwaysAllowSeekStrategy={isSeekAllowed:function(){return!0}}},function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ProxyProvidedPlayerError=void 0;var o=function(e){function t(t,r,n){void 0===n&&(n="The player that the proxy was controlling had an error.");var i=e.call(this,n)||this;return i._providedPlayerError=t,i._providedPlayer=r,i}return i(t,e),t.prototype.getCode=function(){return"PROXY_PLAYER_PROVIDED_PLAYER_ERROR"},t.prototype.getProvidedPlayerError=function(){return this._providedPlayerError},t.prototype.getProvidedPlayer=function(){return this._providedPlayer},t}(r(18).PlayerError);t.ProxyProvidedPlayerError=o},function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ProxyProvidedPlayerFatalError=void 0;var o=function(e){function t(t,r,n){return void 0===n&&(n="The player that the proxy was controlling had a fatal error."),e.call(this,t,r,n)||this}return i(t,e),t.prototype.getCode=function(){return"PROXY_PLAYER_PROVIDED_PLAYER_FATAL_ERROR"},t}(r(27).ProxyProvidedPlayerError);t.ProxyProvidedPlayerFatalError=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.errors=void 0;var n=r(19),i=r(30),o=r(24),a=r(28),s=r(18),l=r(17);!function(e){e.PlayerError=s.PlayerError,e.PlayerFatalError=l.PlayerFatalError,e.NotSupportedError=n.NotSupportedError,e.URLUpdateError=i.URLUpdateError,e.ImplementationError=o.ImplementationError,e.ProxyProvidedPlayerFatalError=a.ProxyProvidedPlayerFatalError}(t.errors||(t.errors={}))},function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.URLUpdateError=void 0;var o=function(e){function t(t,r){return e.call(this,t||"The URL update failed for some reason.",r)||this}return i(t,e),t.prototype.getCode=function(){return"URL_UPDATE_ERROR"},t}(r(17).PlayerFatalError);t.URLUpdateError=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loaderErrors=void 0;var n=r(32);!function(e){e.LoaderError=n.LoaderError}(t.loaderErrors||(t.loaderErrors={}))},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoaderError=void 0;var r=function(){function e(e,t){this._msg=e,this._cause=t}return e.prototype.getMsg=function(){return this._msg},e.prototype.getCause=function(){return this._cause},e}();t.LoaderError=r},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.helpers=void 0;var n=r(4),i=r(9),o=r(34),a=r(23),s=r(20),l=r(35),u=r(2),c=r(5),d=r(36),f=r(10),h=r(37),p=r(38),g=r(11),v=r(13),m=r(39),y=r(41);!function(e){var t;e.OnExit=a.OnExit,e.find=s.find,e.Promise=c.Promise,e.promiseWithTimeout=d.promiseWithTimeout,e.always=f.always,e.compact=h.compact,e.deferException=g.deferException,e.SCWeakMap=y.SCWeakMap,function(e){e.buildCache=l.buildCache}(e.cache||(e.cache={})),function(e){e.buildDeferred=n.buildDeferred}(e.deferred||(e.deferred={})),function(e){e.getExtension=m.getExtension,e.buildAbsoluteUrl=m.buildAbsoluteUrl}(e.url||(e.url={})),function(e){e.AbortableJob=i.AbortableJob,e.map=i.map,e.abortedError=i.abortedError}(e.abortableJob||(e.abortableJob={})),(t=e.retry||(e.retry={})).retry=o.retry,t.buildExponentialDelayCalculator=o.buildExponentialDelayCalculator,function(e){e.isSafari=v.isSafari,e.getSafariVersion=v.getSafariVersion,e.isIE=v.isIE,e.isEdge=v.isEdge,e.isFirefox=v.isFirefox,e.isChrome=v.isChrome,e.getChromeVersion=v.getChromeVersion,e.getFirefoxVersion=v.getFirefoxVersion}(e.browser||(e.browser={})),function(e){e.combine=p.combine,e.fill=p.fill,e.forEach=p.forEach,e.numberToUint8Array=p.numberToUint8Array,e.createVintBuffer=p.createVintBuffer}(e.arrayBuffer||(e.arrayBuffer={})),function(e){e.now=u.now}(e.time||(e.time={}))}(t.helpers||(t.helpers={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildExponentialDelayCalculator=t.retry=void 0;var n=r(11);t.retry=function(e,t,r){void 0===r&&(r={});var i=null,o=0,a=!1,s=null;return function l(){var u=!1;s=t({attemptNum:o,scheduleRetry:function(){if(u)throw new Error("scheduleRetry() already called.");if(u=!0,s=null,a)return!1;var t=e(++o);if(null===t){var c=r.onNoMoreRetries;return c&&(0,n.deferException)((function(){return c()})),!1}return i=window.setTimeout(l,t),!0}})||null}(),{cancel:function(){a||(a=!0,i&&(window.clearTimeout(i),i=null),s&&s.onCancel())}}},t.buildExponentialDelayCalculator=function(e){var t=void 0===e?{}:e,r=t.timeBase,n=void 0===r?500:r,i=t.threshold,o=void 0===i?3:i,a=t.delayCap,s=void 0===a?45e3:a,l=t.jitter,u=void 0===l?200:l,c=t.maxAttempts,d=void 0===c?null:c;if(n<=0)throw new Error("Time base must be > 0.");if(o<=0)throw new Error("Threshold must be > 0.");if(null!==s&&s<=0)throw new Error("Delay cap must be null or > 0.");if(null!==d&&d<1)throw new Error("Max attempts must be >= 1.");return function(e){if(null!==d&&e>=d)return null;var t=e>0?Math.pow(2,e/o-1):0;return Math.min(t*n,s||1/0)+Math.round(Math.random()*u)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildCache=void 0;var n=r(20),i="undefined"!=typeof window&&"Map"in window;t.buildCache=function(){return i?new window.Map:new o};var o=function(){function e(){this._store=[]}return e.prototype.set=function(e,t){var r=(0,n.find)(this._store,(function(t){return t.key===e}));r?r.val=t:this._store.push({key:e,val:t})},e.prototype.get=function(e){var t=(0,n.find)(this._store,(function(t){return t.key===e}));if(t)return t.val},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.promiseWithTimeout=void 0;var n=r(5),i=r(10);t.promiseWithTimeout=function(e,t,r){return void 0===r&&(r=new Error("Timed out.")),new n.Promise((function(n,o){var a=window.setTimeout((function(){o(r)}),t);(0,i.always)(e,(function(e){return window.clearTimeout(a),e})).then(n,o)}))}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compact=void 0,t.compact=function(e){return e.filter((function(e){return null!=e}))}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createVintBuffer=t.numberToUint8Array=t.forEach=t.fill=t.combine=void 0,t.combine=function(e){var t=new Uint8Array(e.reduce((function(e,t){return e+t.byteLength}),0)),r=0;return e.forEach((function(e){t.set(e,r),r+=e.byteLength})),t},t.fill=function(e,t){e.fill(t)},t.forEach=function(e,t){e.forEach(t)},t.numberToUint8Array=function(e,t){if(void 0===t&&(t=!1),(e=Math.round(e))<0)throw new Error("Negative numbers not supported.");for(var r=Math.max(1,Math.ceil(Math.log(e+1)/Math.log(2)/8)),n=new Uint8Array(r),i=0;i>>=8;return n},t.createVintBuffer=function(e){if(e<0||e>Math.pow(2,53))throw new Error("Unrepresentable value: "+e);var t;for(t=1;t<=8&&!(e-1}},function(e,t,r){"use strict";var n=r(72),i=r(73),o=r(74),a=r(109),s=r(110),l=r(75).iterator;e.exports=function(e){return"function"==typeof s(e)[l]?e[l]():n(e)?new o(e):i(e)?new a(e):new o(e)}},function(e){"use strict";var t=Object.prototype.toString,r=t.call(function(){return arguments}());e.exports=function(e){return t.call(e)===r}},function(e){"use strict";var t=Object.prototype.toString,r=t.call("");e.exports=function(e){return"string"==typeof e||e&&"object"==typeof e&&(e instanceof String||t.call(e)===r)||!1}},function(e,t,r){"use strict";var n,i=r(45),o=r(68),a=r(55),s=r(75),l=r(86),u=Object.defineProperty;n=e.exports=function(e,t){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");l.call(this,e),t=t?o.call(t,"key+value")?"key+value":o.call(t,"key")?"key":"value":"value",u(this,"__kind__",a("",t))},i&&i(n,l),delete n.prototype.constructor,n.prototype=Object.create(l.prototype,{_resolve:a((function(e){return"value"===this.__kind__?this.__list__[e]:"key+value"===this.__kind__?[e,this.__list__[e]]:e}))}),u(n.prototype,s.toStringTag,a("c","Array Iterator"))},function(e,t,r){"use strict";e.exports=r(76)()?r(77).Symbol:r(80)},function(e,t,r){"use strict";var n=r(77),i={object:!0,symbol:!0};e.exports=function(){var e,t=n.Symbol;if("function"!=typeof t)return!1;e=t("test symbol");try{String(e)}catch(e){return!1}return!!i[typeof t.iterator]&&!!i[typeof t.toPrimitive]&&!!i[typeof t.toStringTag]}},function(e,t,r){"use strict";e.exports=r(78)()?globalThis:r(79)},function(e){"use strict";e.exports=function(){return"object"==typeof globalThis&&!!globalThis&&globalThis.Array===Array}},function(e){var t=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw new Error("Unable to resolve global `this`")};e.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return t()}try{return __global__||t()}finally{delete Object.prototype.__global__}}()},function(e,t,r){"use strict";var n,i,o,a=r(55),s=r(81),l=r(77).Symbol,u=r(83),c=r(84),d=r(85),f=Object.create,h=Object.defineProperties,p=Object.defineProperty;if("function"==typeof l)try{String(l()),o=!0}catch(e){}else l=null;i=function(e){if(this instanceof i)throw new TypeError("Symbol is not a constructor");return n(e)},e.exports=n=function e(t){var r;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return o?l(t):(r=f(i.prototype),t=void 0===t?"":String(t),h(r,{__description__:a("",t),__name__:a("",u(t))}))},c(n),d(n),h(i.prototype,{constructor:a(n),toString:a("",(function(){return this.__name__}))}),h(n.prototype,{toString:a((function(){return"Symbol ("+s(this).__description__+")"})),valueOf:a((function(){return s(this)}))}),p(n.prototype,n.toPrimitive,a("",(function(){var e=s(this);return"symbol"==typeof e?e:e.toString()}))),p(n.prototype,n.toStringTag,a("c","Symbol")),p(i.prototype,n.toStringTag,a("c",n.prototype[n.toStringTag])),p(i.prototype,n.toPrimitive,a("c",n.prototype[n.toPrimitive]))},function(e,t,r){"use strict";var n=r(82);e.exports=function(e){if(!n(e))throw new TypeError(e+" is not a symbol");return e}},function(e){"use strict";e.exports=function(e){return!!e&&("symbol"==typeof e||!!e.constructor&&"Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag])}},function(e,t,r){"use strict";var n=r(55),i=Object.create,o=Object.defineProperty,a=Object.prototype,s=i(null);e.exports=function(e){for(var t,r,i=0;s[e+(i||"")];)++i;return s[e+=i||""]=!0,o(a,t="@@"+e,n.gs(null,(function(e){r||(r=!0,o(this,t,n(e)),r=!1)}))),t}},function(e,t,r){"use strict";var n=r(55),i=r(77).Symbol;e.exports=function(e){return Object.defineProperties(e,{hasInstance:n("",i&&i.hasInstance||e("hasInstance")),isConcatSpreadable:n("",i&&i.isConcatSpreadable||e("isConcatSpreadable")),iterator:n("",i&&i.iterator||e("iterator")),match:n("",i&&i.match||e("match")),replace:n("",i&&i.replace||e("replace")),search:n("",i&&i.search||e("search")),species:n("",i&&i.species||e("species")),split:n("",i&&i.split||e("split")),toPrimitive:n("",i&&i.toPrimitive||e("toPrimitive")),toStringTag:n("",i&&i.toStringTag||e("toStringTag")),unscopables:n("",i&&i.unscopables||e("unscopables"))})}},function(e,t,r){"use strict";var n=r(55),i=r(81),o=Object.create(null);e.exports=function(e){return Object.defineProperties(e,{for:n((function(t){return o[t]?o[t]:o[t]=e(String(t))})),keyFor:n((function(e){var t;for(t in i(e),o)if(o[t]===e)return t}))})}},function(e,t,r){"use strict";var n,i=r(87),o=r(61),a=r(88),s=r(51),l=r(55),u=r(89),c=r(75),d=Object.defineProperty,f=Object.defineProperties;e.exports=n=function(e,t){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");f(this,{__list__:l("w",s(e)),__context__:l("w",t),__nextIndex__:l("w",0)}),t&&(a(t.on),t.on("_add",this._onAdd),t.on("_delete",this._onDelete),t.on("_clear",this._onClear))},delete n.prototype.constructor,f(n.prototype,o({_next:l((function(){var e;if(this.__list__)return this.__redo__&&void 0!==(e=this.__redo__.shift())?e:this.__nextIndex__=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach((function(t,r){t>=e&&(this.__redo__[r]=++t)}),this),this.__redo__.push(e)):d(this,"__redo__",l("c",[e])))})),_onDelete:l((function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(t=this.__redo__.indexOf(e))&&this.__redo__.splice(t,1),this.__redo__.forEach((function(t,r){t>e&&(this.__redo__[r]=--t)}),this)))})),_onClear:l((function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0}))}))),d(n.prototype,c.iterator,l((function(){return this})))},function(e,t,r){"use strict";var n=r(51);e.exports=function(){return n(this).length=0,this}},function(e){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,r){"use strict";var n,i=r(56),o=r(90),a=r(95),s=r(96),l=r(67),u=r(106),c=Function.prototype.bind,d=Object.defineProperty,f=Object.prototype.hasOwnProperty;n=function(e,t,r){var n,i=o(t)&&a(t.value);return delete(n=s(t)).writable,delete n.value,n.get=function(){return!r.overwriteDefinition&&f.call(this,e)?i:(t.value=c.call(i,r.resolveContext?r.resolveContext(this):this),d(this,e,t),this[e])},n},e.exports=function(e){var t=l(arguments[1]);return i(t.resolveContext)&&a(t.resolveContext),u(e,(function(e,r){return n(r,e,t)}))}},function(e,t,r){"use strict";var n=r(91),i=r(56);e.exports=function(e){return i(e)?e:n(e,"Cannot use %v",arguments[1])}},function(e,t,r){"use strict";var n=r(56),i=r(60),o=r(92),a=r(93),s=function(e,t){return e.replace("%v",a(t))};e.exports=function(e,t,r){if(!i(r))throw new TypeError(s(t,e));if(!n(e)){if("default"in r)return r.default;if(r.isOptional)return null}var a=o(r.errorMessage);throw n(a)||(a=t),new TypeError(s(a,e))}},function(e,t,r){"use strict";var n=r(56),i=r(60),o=Object.prototype.toString;e.exports=function(e){if(!n(e))return null;if(i(e)){var t=e.toString;if("function"!=typeof t)return null;if(t===o)return null}try{return""+e}catch(e){return null}}},function(e,t,r){"use strict";var n=r(94),i=/[\n\r\u2028\u2029]/g;e.exports=function(e){var t=n(e);return null===t?"":(t.length>100&&(t=t.slice(0,99)+"…"),t=t.replace(i,(function(e){switch(e){case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}})))}},function(e){"use strict";e.exports=function(e){try{return e.toString()}catch(t){try{return String(e)}catch(e){return null}}}},function(e,t,r){"use strict";var n=r(91),i=r(57);e.exports=function(e){return i(e)?e:n(e,"%v is not a plain function",arguments[1])}},function(e,t,r){"use strict";var n=r(97),i=r(61),o=r(51);e.exports=function(e){var t=Object(o(e)),r=arguments[1],a=Object(arguments[2]);if(t!==e&&!r)return t;var s={};return r?n(r,(function(t){(a.ensure||t in e)&&(s[t]=e[t])})):i(s,e),s}},function(e,t,r){"use strict";e.exports=r(98)()?Array.from:r(99)},function(e){"use strict";e.exports=function(){var e,t,r=Array.from;return"function"==typeof r&&(t=r(e=["raz","dwa"]),Boolean(t&&t!==e&&"dwa"===t[1]))}},function(e,t,r){"use strict";var n=r(75).iterator,i=r(72),o=r(100),a=r(101),s=r(88),l=r(51),u=r(49),c=r(73),d=Array.isArray,f=Function.prototype.call,h={configurable:!0,enumerable:!0,writable:!0,value:null},p=Object.defineProperty;e.exports=function(e){var t,r,g,v,m,y,_,b,C,E,A=arguments[1],S=arguments[2];if(e=Object(l(e)),u(A)&&s(A),this&&this!==Array&&o(this))t=this;else{if(!A){if(i(e))return 1!==(m=e.length)?Array.apply(null,e):((v=new Array(1))[0]=e[0],v);if(d(e)){for(v=new Array(m=e.length),r=0;r=55296&&y<=56319&&(E+=e[++r]),E=A?f.call(A,S,E,g):E,t?(h.value=E,p(v,g,h)):v[g]=E,++g;m=g}if(void 0===m)for(m=a(e.length),t&&(v=new t(m)),r=0;r0?1:-1}},function(e,t,r){"use strict";var n=r(88),i=r(107),o=Function.prototype.call;e.exports=function(e,t){var r={},a=arguments[2];return n(t),i(e,(function(e,n,i,s){r[n]=o.call(t,a,e,n,i,s)})),r}},function(e,t,r){"use strict";e.exports=r(108)("forEach")},function(e,t,r){"use strict";var n=r(88),i=r(51),o=Function.prototype.bind,a=Function.prototype.call,s=Object.keys,l=Object.prototype.propertyIsEnumerable;e.exports=function(e,t){return function(r,u){var c,d=arguments[2],f=arguments[3];return r=Object(i(r)),n(u),c=s(r),f&&c.sort("function"==typeof f?o.call(f,r):void 0),"function"!=typeof e&&(e=c[e]),a.call(e,c,(function(e,n){return l.call(r,e)?a.call(u,d,r[e],e,r,n):t}))}}},function(e,t,r){"use strict";var n,i=r(45),o=r(55),a=r(75),s=r(86),l=Object.defineProperty;n=e.exports=function(e){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");e=String(e),s.call(this,e),l(this,"__length__",o("",e.length))},i&&i(n,s),delete n.prototype.constructor,n.prototype=Object.create(s.prototype,{_next:o((function(){if(this.__list__)return this.__nextIndex__=55296&&t<=56319?r+this.__list__[this.__nextIndex__++]:r}))}),l(n.prototype,a.toStringTag,o("c","String Iterator"))},function(e,t,r){"use strict";var n=r(111);e.exports=function(e){if(!n(e))throw new TypeError(e+" is not iterable");return e}},function(e,t,r){"use strict";var n=r(72),i=r(49),o=r(73),a=r(75).iterator,s=Array.isArray;e.exports=function(e){return!(!i(e)||!s(e)&&!o(e)&&!n(e)&&"function"!=typeof e[a])}},function(e,t,r){"use strict";var n=r(72),i=r(88),o=r(73),a=r(71),s=Array.isArray,l=Function.prototype.call,u=Array.prototype.some;e.exports=function(e,t){var r,c,d,f,h,p,g,v,m=arguments[2];if(s(e)||n(e)?r="array":o(e)?r="string":e=a(e),i(t),d=function(){f=!0},"array"!==r)if("string"!==r)for(c=e.next();!c.done;){if(l.call(t,m,c.value,d),f)return;c=e.next()}else for(p=e.length,h=0;h=55296&&v<=56319&&(g+=e[++h]),l.call(t,m,g,d),!f);++h);else u.call(e,(function(e){return l.call(t,m,e,d),f}))}},function(e){"use strict";e.exports="function"==typeof WeakMap&&"[object WeakMap]"===Object.prototype.toString.call(new WeakMap)},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeRange=void 0;var r=function(){function e(e,t){if(this.start=e,this.duration=t,t<0)throw new RangeError("Duration must be >= 0.");this.end=e+t}return e.normalizeRawTimeRanges=function(e){return e.slice(0).sort((function(e,t){return e.start-t.start})).reduce((function(e,t,r){var n=e.length-1;return r>0&&e[n].end>=t.start?e[n].end=t.end:e.push(t),e}),[])},e.normalize=function(t){return e.normalizeRawTimeRanges(t.map((function(e){return{start:e.start,end:e.end}}))).map((function(t){return new e(t.start,t.end-t.start)}))},e.getCoverage=function(t){if(0===t.length)return new e(0,0);var r=1/0,n=0;return t.forEach((function(e){e.startn&&(n=e.end)})),new e(r,n-r)},e.rangesContainTime=function(e,t){return t.some((function(t){return t.containsTime(e)}))},e.prototype.containsTime=function(e){return this.start<=e&&this.end>e},e}();t.TimeRange=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NeverAllowSeekStrategy=void 0,t.NeverAllowSeekStrategy={isSeekAllowed:function(){return!1}}}],t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}return r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r(0)}()},e.exports=n()},,,,,,,,function(e,t,r){var n=e.exports=r(30).extend({resource_type:"privacy-settings",saveFormat:"json",saveWithWrapper:!1,baseUrl:function(){return this.getEndpointUrl("privacySettings")},saveUrl:function(){return this.getEndpointUrl("privacySettingsUpdate")},isNew:function(){return!1},isFetched:function(){return void 0!==this.isOptedInToAnalytics()},getAttributesToBeSaved:function(){return this.pick(i)},isOptedInToTargetedAdvertising:function(){return this.get(n.TARGETED_ADVERTISING_OPT_IN)},isOptedInToAnalytics:function(){return this.get(n.ANALYTICS_OPT_IN)},isOptedInToCommunications:function(){return this.get(n.COMMUNICATIONS_OPT_IN)},isUnderLegislation:function(e){var t=this.get(n.LEGISLATION);return t&&-1!==t.indexOf(e)}},{neverRelease:!0,hashFn:function(){return 1},LEGISLATION:"legislation",ANALYTICS_OPT_IN:"analytics_opt_in",COMMUNICATIONS_OPT_IN:"communications_opt_in",TARGETED_ADVERTISING_OPT_IN:"targeted_advertising_opt_in"}),i=["allows_messages_from_unfollowed_users",n.ANALYTICS_OPT_IN,n.COMMUNICATIONS_OPT_IN,n.TARGETED_ADVERTISING_OPT_IN]},function(e,t,r){var n=r(44).Collection.extend({model:r(29),hasDataForView:r(1).constant(!0),isFullyPopulated:r(1).constant(!0),_usageCount:r(1).constant(1),hold:r(1).noop,release:r(1).noop}),i=[{emitter:r(51),event:"like",getInstance:function(e,t){var r=e.id,n=t.target,i=t.targetType;return r===n&&"system-playlist"===i},handler:function(e){this.onLike(e)}}];e.exports=r(30).extend(r(554),r(273).withOptions({read:"calculated_artwork_url"}),r(243).withOptions({attr:"title"}),r(228).withOptions({events:i}),{resource_type:"system-playlist",submodelMap:{tracks:r(29),made_for:r(45),user:r(45)},soundsCollection:null,setup:function(){this.soundsCollection=new n(null,{}),this.listenTo(r(20),"change:currentSound",this._onCurrentSoundChanged),this.listenTo(this.soundsCollection,"error",(function(e,t,n){t instanceof r(362)&&this.removeSound(e)}))},baseUrl:function(){return this.getEndpointUrl("systemPlaylist",{urn:this.id})},getUrn:function(){return this.id},createSubmodel:function(e,t){"tracks"===t?this.prepareSounds():r(30).prototype.createSubmodel.apply(this,arguments)},prepareSounds:function(){var e=this;if(this.soundsCollection){var t=this.soundsCollection.models.map((function(e){return e.get("id")})),n=this.get("tracks").map((function(e){return e.id}));r(1).difference(t,n).forEach((function(t){var n=e.findSoundById(t);n&&n.trigger("error",n,new(r(362)))}))}var i=[];this.get("tracks").forEach((function(t){var n=e.findSoundById(t.id);if(n)n.set(t);else{var o=new(r(29))(t);e.addSubmodel(o);var a=r(1).defaults({resource_id:{system_playlist_id:e.id,sound_id:t.id}},t,o.attributes),s=new(r(29))(a,{soundContext:{playlist_id:e.id,sound_id:t.id}});s.systemPlaylist=e,s.originalSound=o,i.push(s),e.toggleListeners(s,!0)}})),0===this.soundsCollection.length?this.soundsCollection.reset(i):this.soundsCollection.add(i,{silent:!0})},getSoundsCollection:function(){return this.soundsCollection},toggleListeners:function(e,t){var r=t?"on":"off",n=t?"listenTo":"stopListening";e[r]("play",this.onSoundPlay,this)[r]("pause",this.onSoundPause,this)[r]("buffering:start buffering:end",this.onSoundBuffering,this)[r]("finish",this.onSoundFinish,this)[r]("time",this.onSoundTime,this)[r]("seeked",this.onSoundSeeked,this),e[r]("change",o)[n](e.originalSound,"change",a)},removeSound:function(e){if(e=this.findSound(e)){var t=this.getSoundIndex(e),n=r(1).findIndex(this.get("tracks"),(function(t){return t.id===e.get("id")})),i=this.get("tracks").slice();return e===this._currentSound&&(this._currentSound=this.soundsCollection.at(Math.max(t-1,0))),e.isPlaying()&&e.pause(),this.toggleListeners(e,!1),-1!==n&&i.splice(n,1),this.soundsCollection.remove(e),this.set("tracks",i),e.systemPlaylist=null,e.release(),!0}return!1},getPersonalizedForUsername:function(){var e;return null==(e=this.get("made_for"))?void 0:e.username},updatePrivacySettings:function(e){var t=this,n=e.isPublic;return this.set("is_public",n),r(46).callEndpoint("systemPlaylistPrivacy",{urn:this.get("urn")},null,null,{is_public:n}).then((function(){r(11).trigger("system-playlist:privacy:saved",t)}),(function(e){t.set("is_public",!n),r(11).trigger("system-playlist:privacy:errored")}))},isStation:function(){return r(1).contains(["TRACK_STATION","ARTIST_STATION"],this.get("playlist_type"))},hasDifferentCreators:function(){return!1},getCurrentSound:function(){return this._currentSound||this.soundsCollection.at(0)},getSounds:function(){return this.soundsCollection.models},getNumSounds:function(){return this.soundsCollection.length||0},containsSound:function(e){return this.getSoundIndex(e)>-1},getSoundIndex:function(e){return this.soundsCollection.indexOf(e)},findSound:function(e){return e&&this.soundsCollection.get(e.id)},play:function(){var e=this.getCurrentSound();e&&e.play()},pause:function(){var e=this.getCurrentSound();e&&e.pause()},isPlaying:function(){return Boolean(this.soundsCollection)&&this.soundsCollection.some((function(e){return e.isPlaying()}))},isProcessing:function(){return Boolean(this.soundsCollection)&&this.soundsCollection.some((function(e){return e.isProcessing()}))},isEditing:function(){return!1},isBuffering:function(){return this.soundsCollection.some((function(e){return e.isBuffering()}))},isPlayable:function(){return this.soundsCollection.some((function(e){return e.isPlayable()}))},extractSecretToken:r(1).noop,isPrivate:function(){return!this.get("is_public")},isNowPlaying:function(){return this.getSoundIndex(r(20).getCurrentSound())>-1},duration:function(){return this.getSounds().reduce((function(e,t){return e+t.duration()||0}),0)},getSourceInfo:function(){return{type:this.get("tracking_feature_name"),queryUrn:this.get("query_urn"),urn:this.get("urn"),resourceId:this.resource_id,resourceType:this.resource_type}},onSoundPlay:function(e){this.trigger("play",e)},onSoundPause:function(e){this.trigger("pause",e)},onSoundBuffering:function(e){this.trigger(e.type,e)},onSoundFinish:function(e){this.trigger("finish",e)},onSoundTime:function(e){this.trigger("time",e)},onSoundSeeked:function(e){this.trigger("seeked",e)},findSoundById:function(e){return this.soundsCollection.get(e)},containsSoundId:function(e){return!!this.findSoundById(e)},hasVisuals:function(){return!1},_onCurrentSoundChanged:function(){var e=r(20).getCurrentSound();if(this.containsSound(e))this._currentSound=e;else if(this._currentSound&&this._currentSound.player&&this._currentSound.player.isEnded()){var t=this.soundsCollection.at(this.getSoundIndex(this._currentSound)+1);this._currentSound=t||null}}},{onCleanup:function(e){e.soundsCollection.each((function(t){e.stopListening(t),t.systemPlaylist=null,t.release()})),e.soundsCollection.off(),delete e.soundsCollection,r(30).onCleanup(e)},resolve:function(e){return r(30)._resolve(this,["discover","sets",e],(function(t){return t.get("permalink")===e}))}});function o(e,t){e.originalSound.set(e.attributes,t)}function a(e,t){this.set(e.attributes,t)}},,,,,,,,,function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DESIGN_TOKENS=void 0;var i=r(189),o=r(771);t.DESIGN_TOKENS={breakpoints:(n={},n[o.ScreenCategory.xs]=480,n[o.ScreenCategory.sm]=768,n[o.ScreenCategory.md]=1152,n[o.ScreenCategory.lg]=1440,n[o.ScreenCategory.xl]=1920,n),baseColors:i.BASE_COLORS,alphaValues:{15:.15,40:.4,60:.6},opacityValues:{0:"0",60:"60%",100:"1"},radiuses:{4:"4px",8:"8px",10:"10px",16:"16px",20:"20px",50:"50px",100:"100px"},borderWidths:{2:"2px"},fontFamilies:{sansSerif:"var(--font-inter, SoundCloud Sans), system-ui, -apple-system, 'Segoe UI', Roboto, 'Lucida Grande', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'",monospace:"'Monaco', 'Courier New', monospace"},fontSizes:{root:"".concat(.875,"em"),xs:"".concat(10/14,"rem"),sm:"".concat(12/14,"rem"),md:"".concat(1,"rem"),lg:"".concat(17/14,"rem"),xl:"".concat(22/14,"rem"),xxl:"".concat(2,"rem"),d3:"".concat(32/14,"rem"),d2:"".concat(40/14,"rem"),d1:"".concat(60/14,"rem")},fontWeights:{normal:"400",medium:"500",semiBold:"600",bold:"700",black:"900"},lineHeights:{normal:"normal",none:"1",xs:"".concat(16/14,"rem"),sm:"".concat(20/14,"rem"),md:"".concat(24/14,"rem"),lg:"".concat(2,"rem"),xl:"".concat(36/14,"rem")},letterSpacings:{tightest:"-0.04em",tighter:"-0.03em",tight:"-0.02em",normal:"0",wide:"".concat(1/14,"rem"),tenPercent:"0.1em"},spacing:{"0.25x":"".concat(2,"px"),"0.5x":"".concat(4,"px"),"0.75x":"".concat(6,"px"),"1x":"".concat(8,"px"),"1.25x":"".concat(10,"px"),"1.5x":"".concat(12,"px"),"1.75x":"".concat(14,"px"),"2x":"".concat(16,"px"),"2.5x":"".concat(20,"px"),"3x":"".concat(24,"px"),"3.5x":"".concat(28,"px"),"4x":"".concat(32,"px"),"5x":"".concat(40,"px"),"6x":"".concat(48,"px"),"7x":"".concat(56,"px"),"8x":"".concat(64,"px")},sizes:{"1x":"".concat(8,"px"),"2x":"".concat(16,"px"),"3x":"".concat(24,"px"),"4x":"".concat(32,"px"),"5x":"".concat(40,"px"),"6x":"".concat(48,"px"),"8x":"".concat(64,"px"),"13x":"".concat(104,"px"),"15x":"".concat(120,"px"),"16x":"".concat(128,"px"),"18x":"".concat(144,"px"),"20x":"".concat(160,"px"),"25x":"".concat(200,"px"),"29x":"".concat(232,"px"),"40x":"".concat(320,"px"),"42x":"".concat(336,"px"),"45x":"".concat(360,"px"),"64x":"".concat(512,"px")}}},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.Storage=t.Log=t.EventLogger=t.Diagnostics=void 0,r(306);var o=r(569);Object.defineProperty(t,"Diagnostics",{enumerable:!0,get:function(){return o.Diagnostics}});var a=r(785);Object.defineProperty(t,"EventLogger",{enumerable:!0,get:function(){return a.EventLogger}});var s=r(147);Object.defineProperty(t,"Log",{enumerable:!0,get:function(){return s.Log}});var l=r(436),u=r(246);Object.defineProperty(t,"Storage",{enumerable:!0,get:function(){return u.Storage}}),i(r(306),t),i(r(434),t),i(r(1330),t),i(r(1331),t),i(r(569),t),i(r(1332),t),i(r(790),t),i(r(1333),t),i(r(1334),t),i(r(307),t),i(r(1335),t),i(r(147),t),i(r(791),t),i(r(435),t),i(r(1336),t),i(r(1339),t),i(r(1340),t),i(r(308),t),i(r(574),t),i(r(575),t),i(r(572),t),i(r(1341),t),i(r(793),t),i(r(1342),t),i(r(786),t),i(r(436),t),i(r(1343),t),i(r(1344),t),i(r(1345),t),i(r(1346),t),i(r(788),t),i(r(246),t),i(r(789),t),i(r(570),t),i(r(787),t),i(r(573),t),i(r(571),t),i(r(1347),t),i(r(792),t),__STATSIG__=Object.assign(Object.assign({},null!==__STATSIG__&&void 0!==__STATSIG__?__STATSIG__:{}),{Log:s.Log,SDK_VERSION:l.SDK_VERSION})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DESIGN_TOKENS=void 0;var n=r(192);t.DESIGN_TOKENS={baseColors:n.BASE_COLORS,alphaValues:{15:.15,40:.4,60:.6},opacityValues:{0:"0",60:"60%",100:"1"},radiuses:{4:"4px",16:"16px",50:"50px",100:"100px"},borderWidths:{2:"2px"},fontFamilies:{sansSerif:"'SoundCloud Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Lucida Grande', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'",monospace:"'Monaco', 'Courier New', monospace"},fontSizes:{root:"".concat(.875,"em"),xs:"".concat(10/14,"rem"),sm:"".concat(12/14,"rem"),md:"".concat(1,"rem"),lg:"".concat(17/14,"rem"),xl:"".concat(22/14,"rem"),xxl:"".concat(2,"rem")},fontWeights:{medium:500,bold:700,black:900},lineHeights:{normal:"normal",none:1,xs:"".concat(16/14,"rem"),sm:"".concat(20/14,"rem"),md:"".concat(24/14,"rem"),lg:"".concat(2,"rem"),xl:"".concat(36/14,"rem")},letterSpacings:{normal:"0",wide:"".concat(.5/14,"rem")},spacing:{"0.25x":"".concat(2,"px"),"0.5x":"".concat(4,"px"),"0.75x":"".concat(6,"px"),"1x":"".concat(8,"px"),"1.5x":"".concat(12,"px"),"2x":"".concat(16,"px"),"3x":"".concat(24,"px"),"4x":"".concat(32,"px"),"5x":"".concat(40,"px"),"6x":"".concat(48,"px"),"7x":"".concat(56,"px"),"8x":"".concat(64,"px")},sizes:{"1x":"".concat(8,"px"),"2x":"".concat(16,"px"),"3x":"".concat(24,"px"),"4x":"".concat(32,"px"),"5x":"".concat(40,"px"),"6x":"".concat(48,"px"),"8x":"".concat(64,"px"),"13x":"".concat(104,"px"),"15x":"".concat(120,"px"),"16x":"".concat(128,"px"),"18x":"".concat(144,"px"),"20x":"".concat(160,"px"),"29x":"".concat(232,"px"),"40x":"".concat(320,"px"),"45x":"".concat(360,"px"),"64x":"".concat(512,"px")}}},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DESIGN_TOKENS=void 0;var i=r(193),o=r(865);t.DESIGN_TOKENS={breakpoints:(n={},n[o.ScreenCategory.xs]=480,n[o.ScreenCategory.sm]=768,n[o.ScreenCategory.md]=1152,n[o.ScreenCategory.lg]=1440,n[o.ScreenCategory.xl]=1920,n),baseColors:i.BASE_COLORS,alphaValues:{15:.15,40:.4,60:.6},opacityValues:{0:"0",60:"60%",100:"1"},radiuses:{4:"4px",16:"16px",50:"50px",100:"100px"},borderWidths:{2:"2px"},fontFamilies:{sansSerif:"var(--font-inter, SoundCloud Sans), system-ui, -apple-system, 'Segoe UI', Roboto, 'Lucida Grande', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'",monospace:"'Monaco', 'Courier New', monospace"},fontSizes:{root:"".concat(.875,"em"),xs:"".concat(11/14,"rem"),sm:"".concat(12/14,"rem"),md:"".concat(1,"rem"),lg:"".concat(16/14,"rem"),xl:"".concat(20/14,"rem"),xxl:"".concat(2,"rem"),d3:"".concat(32/14,"rem"),d2:"".concat(40/14,"rem"),d1:"".concat(60/14,"rem")},fontWeights:{medium:"500",bold:"700",black:"900"},lineHeights:{normal:"normal",none:"1",xs:"".concat(16/14,"rem"),sm:"".concat(20/14,"rem"),md:"".concat(24/14,"rem"),lg:"".concat(32/14,"rem"),xl:"".concat(36/14,"rem")},letterSpacings:{tightest:"-0.04em",tighter:"-0.03em",tight:"-0.02em",normal:"0",wide:"".concat(1/14,"rem"),tenPercent:"0.1em"},spacing:{"0.25x":"".concat(2,"px"),"0.5x":"".concat(4,"px"),"0.75x":"".concat(6,"px"),"1x":"".concat(8,"px"),"1.25x":"".concat(10,"px"),"1.5x":"".concat(12,"px"),"1.75x":"".concat(14,"px"),"2x":"".concat(16,"px"),"2.5x":"".concat(20,"px"),"3x":"".concat(24,"px"),"3.5x":"".concat(28,"px"),"4x":"".concat(32,"px"),"5x":"".concat(40,"px"),"6x":"".concat(48,"px"),"7x":"".concat(56,"px"),"8x":"".concat(64,"px")},sizes:{"1x":"".concat(8,"px"),"2x":"".concat(16,"px"),"3x":"".concat(24,"px"),"4x":"".concat(32,"px"),"5x":"".concat(40,"px"),"6x":"".concat(48,"px"),"8x":"".concat(64,"px"),"13x":"".concat(104,"px"),"15x":"".concat(120,"px"),"16x":"".concat(128,"px"),"18x":"".concat(144,"px"),"20x":"".concat(160,"px"),"29x":"".concat(232,"px"),"40x":"".concat(320,"px"),"45x":"".concat(360,"px"),"64x":"".concat(512,"px")}}},,,,,,,,,,,,,,,,,,,function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.expandColors=t.prepareColors=t.addAlpha=t.removeRgbWrap=t.addRgbWrap=void 0;t.addRgbWrap=function(e){return 3===e.split(",").length?"rgb(".concat(e,")"):"rgba(".concat(e,")")};t.removeRgbWrap=function(e){return e.replace(/rgba|rgb|\(|\)/g,"")};t.addAlpha=function(e,r){var n=(0,t.removeRgbWrap)(e).split(", "),i=n[0],o=n[1],a=n[2];return(0,t.addRgbWrap)("".concat(i,", ").concat(o,", ").concat(a,", ").concat(r))};t.prepareColors=function(e){var r={};for(var i in e)if(Object.hasOwnProperty.call(e,i)){var o=e[i];n(o)?r[i]={color:o,rgb:(0,t.removeRgbWrap)(o)}:r[i]={color:o}}return r};var n=function(e){return!(!e.match(/^rgb\((,?\s*\d{1,3}){3}\)/)&&!e.match(/^rgba\((,?\s*\d{1,3}){3}\,\s*?\d{1}(\.\d{1,3})?\)$/))},i=function(e){return(0,t.removeRgbWrap)(e).split(",").map(Number)};t.expandColors=function(e){return Object.keys(e).reduce((function(r,o){var a=e[o];return r[o]=n(a)?{css:a,rgb:(0,t.removeRgbWrap)(a),raw:i(a)}:{css:a},r}),{})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Log=t.LogLevel=void 0;var n=" DEBUG ",i=" INFO ",o=" WARN ",a=" ERROR ";function s(e){return e.unshift("[Statsig]"),e}t.LogLevel={None:0,Error:1,Warn:2,Info:3,Debug:4};var l=function(){function e(){}return e.info=function(){if(e.level>=t.LogLevel.Info){for(var r,n=arguments.length,o=new Array(n),a=0;a=t.LogLevel.Debug){for(var r,i=arguments.length,o=new Array(i),a=0;a=t.LogLevel.Warn){for(var r,n=arguments.length,i=new Array(n),a=0;a=t.LogLevel.Error){for(var r,n=arguments.length,i=new Array(n),o=0;oa.length){var s=r(1).difference(o,a.models);s.forEach(e.removeSound,e),t=s}e.reorder(a.pluck("id"))}return e.save().then(this.saveAudibleImage.bind(this,e)).then(n.bind(this,{removedSounds:t}),i.bind(this)).done(this.trigger.bind(this,"saved"))},getAudible:function(){return this._playlist},getAttributesFromModel:function(){var e=this.getAudible();return{buyLink:e.get("purchase_url"),buyTitle:e.get("purchase_title"),labelName:e.get("label_name")}},getAttributesToBeSaved:function(){var e=this.get("buyLink"),t=this.get("buyTitle");return{purchase_url:e?r(33).normalize(e):null,purchase_title:t===this.getFieldMetadata("buyTitle").defaultValue?null:t,label_name:this.get("labelName")}},cancel:function(){o.call(this),this.trigger("canceled")},saveCleanup:function(e){this.markFieldsClean()}},{hashFn:function(e,t){return e.resource_id||(null==t?void 0:t.resource_id)||e.id||null}});function n(e){var t=e.removedSounds,n=this.getAudible();r(11).trigger("playlist:saved",n),this.trigger("saved"),t.length>0&&this.trigger("soundsRemoved",{sounds:t})}function i(e){this.set({errorMessage:this.getErrorMessageTemplate("save","playlist",this.extractErrorMessage(e))})}function o(){this.setToModelAttributes(),this.get("trackList").reset(this._playlist.getSounds())}function a(){var e=this.requiredModelAttributes.map((function(e){return"change:"+e})).join(" ");this.listenTo(this._playlist,e,(function(){this.isDirty()||o.call(this)}))}},,function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BASE_COLORS_EXPANDED=t.BASE_COLORS=void 0;var n=r(149);t.BASE_COLORS={special:"rgb(255, 85, 0)",success:"rgb(0, 153, 92)",error:"rgb(214, 19, 72)",white:"rgb(255, 255, 255)",black:"rgb(0, 0, 0)",goPlus:"linear-gradient(135deg, rgb(159, 52, 169) 0%, rgb(255, 70, 0) 100%)",facebook:"rgb(24, 119, 242)",twitter:"rgb(29, 161, 242)",pinterest:"rgb(230, 0, 35)",tumblr:"rgb(54, 70, 93)"},t.BASE_COLORS_EXPANDED=(0,n.expandColors)(t.BASE_COLORS)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BASE_COLORS_EXPANDED=t.BASE_COLORS=void 0;var n=r(150);t.BASE_COLORS={special:"rgb(255, 85, 0)",success:"rgb(0, 153, 92)",error:"rgb(214, 19, 72)",white:"rgb(255, 255, 255)",black:"rgb(0, 0, 0)",goPlus:"linear-gradient(135deg, rgb(159, 52, 169) 0%, rgb(255, 70, 0) 100%)",facebook:"rgb(24, 119, 242)",twitter:"rgb(29, 161, 242)",pinterest:"rgb(230, 0, 35)",tumblr:"rgb(54, 70, 93)",transparent:"transparent","success-surface":"rgb(230,247,238)","warning-surface":"rgb(255,248,225)","error-surface":"rgb(255,235,238)"},t.BASE_COLORS_EXPANDED=(0,n.expandColors)(t.BASE_COLORS)},,,,,function(e,t,r){"use strict";(function(e){var n=r(926),i=r(927),o=setTimeout;function a(e){return Boolean(e&&void 0!==e.length)}function s(){}function l(e){if(!(this instanceof l))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],p(e,this)}function u(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,l._immediateFn((function(){var r=1===e._state?t.onFulfilled:t.onRejected;if(null!==r){var n;try{n=r(e._value)}catch(e){return void d(t.promise,e)}c(t.promise,n)}else(1===e._state?c:d)(t.promise,e._value)}))):e._deferreds.push(t)}function c(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var r=t.then;if(t instanceof l)return e._state=3,e._value=t,void f(e);if("function"==typeof r)return void p((n=r,i=t,function(){n.apply(i,arguments)}),e)}e._state=1,e._value=t,f(e)}catch(t){d(e,t)}var n,i}function d(e,t){e._state=2,e._value=t,f(e)}function f(e){2===e._state&&0===e._deferreds.length&&l._immediateFn((function(){e._handled||l._unhandledRejectionFn(e._value)}));for(var t=0,r=e._deferreds.length;tt&&(this._logger.info("Releasing control because stream URL would expire before reaching end."),this._config.releaseControl({retry:!0}))}},e.prototype._getExpireTime=function(){if(!this._expirationConfig.urlExpires)return null;var e=this._player.getDuration();return null===e?null:this._expirationConfig.timeUrlRetrieved+e+105e3},e.prototype._hasExpired=function(){var e=this._getExpireTime();return null!==e&&e<=a.helpers.time.now()},e}();t.ControlledPlayer=c},function(e){e.exports=r},function(t){t.exports=e},function(e){e.exports=t},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.MediaElementManager=void 0;var n=r(3),i=new(r(4).WebAudioContext),o=function(){function e(e,t){this._type=e,this._playerListeners=new n.helpers.SCWeakMap,this._playerWithElement=null,this._canActivate=!0,this._provideMediaElementErrorRunCheck={},this._element=document.createElement(e),this._logger=n.logger.prefixLogger(t,"MediaElementManager")}return e.prototype.activate=function(){this._canActivate&&(this._logger.debug("Activating media element."),this._element.load()),this._logger.debug("Activating web audio context."),i.activate()},e.prototype.registerPlayer=function(e,t,r){var n=this;if(void 0===r&&(r=!1),this._playerListeners.has(e))throw new Error("Player already registered.");var i=function(){if(e.getMediaElement()!==n._element){n._playerWithElement&&(n._playerWithElement.getMediaElement()===n._element&&(n._logger.debug("Revoking media element from previous player."),n._playerWithElement.isPlaying()&&n._logger.warn("Revoking media element from a playing player."),n._playerWithElement.revokeMediaElement()),n._playerWithElement=null),n._canActivate=!1,r&&(n._logger.debug("Creating new media element."),n._element=document.createElement(n._type));var i=n._provideMediaElementErrorRunCheck={};n._logger.debug("Providing media element to new player."),e.provideMediaElement(n._element).catch((function(r){e.isDead()||n._provideMediaElementErrorRunCheck!==i||(n._logger.error("Error occurred providing media element to new player.",r),t(r))})),n._playerWithElement=e}},o=e.onChange.subscribe((function(e){e.playing&&i()}));this._playerListeners.set(e,o),e.getMediaElement()&&e.revokeMediaElement(),e.isPlaying()&&i()},e.prototype.unregisterPlayer=function(e){var t=this._playerListeners.get(e);t&&(t.remove(),this._playerWithElement===e&&(this._playerWithElement=null,e.getMediaElement()===this._element&&e.revokeMediaElement()),this._playerListeners.delete(e))},e.prototype.getWebAudioContext=function(){return i},e}();t.MediaElementManager=o}],i={};function o(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return n[e].call(r.exports,r,r.exports,o),r.exports}var a={};return function(){var e=a;Object.defineProperty(e,"__esModule",{value:!0}),e.HTML5Player=e.MediaElementManager=e.HTML5PlayerController=e.buildNumber=e.version=void 0,e.version="24.1.1",e.buildNumber=1186;var t=o(1);Object.defineProperty(e,"HTML5PlayerController",{enumerable:!0,get:function(){return t.HTML5PlayerController}});var r=o(5);Object.defineProperty(e,"MediaElementManager",{enumerable:!0,get:function(){return r.MediaElementManager}});var n=o(4);Object.defineProperty(e,"HTML5Player",{enumerable:!0,get:function(){return n.HTML5Player}})}(),a}()},e.exports=n(r(106),r(557),r(94))},,,function(e,t,r){e.exports=r(54).extend(r(289),{defaults:{type:null,userId:null},setup:function(e){e.resource_id&&!e.userId&&(e.userId=e.resource_id)},getSourceInfo:function(){return{type:"user-"+this.options.type,resourceId:this.options.userId,resourceType:"user"}}},{hashFn:function(e,t){return t&&(t.userId||t.resource_id)||null}})},,function(e,t,r){e.exports=r(30).extend(r(505),{resource_type:"comment",urnPrefix:"soundcloud:comments",saveWithWrapper:!1,parse:function(e){return null===e.timestamp&&(e.timestamp=1/0),e},submodelMap:{track:r(29),user:r(45)},baseUrl:function(){return this.getEndpointUrl("comment",{id:this.id})},saveUrl:function(){var e=this.getSound(),t=e.get("secret_token");return this.getEndpointUrl("commentCreate",{track_id:this.getSoundId()},t&&e.isPrivate?{secret_token:t}:{})},destroyUrl:function(){return this.getEndpointUrl("commentDelete",{id:this.id})},getAttributesToBeSaved:function(){return this.pick("body","timestamp")},setReplyTo:function(e){this.set("replyTo",e.id),this.trigger("change:recipient",e.get("user").permalink)},hasDataForView:function(e){return r(30).prototype.hasDataForView.call(this,r(1).without(e,"id"))},getSound:function(){var e=this.getSoundId(),t=r(29).getInstance({id:e,resource_type:"sound"});return!t&&e&&(t=new(r(29))(this.get("track")||{id:e}),this.addSubmodel(t)),t},destroy:function(e){return this.isNew()||r(51).comment(this,!1,{target:this.getSoundId(),targetType:"sound"}),r(30).prototype.destroy.call(this,e)},getSoundId:function(){return this.get("track_id")||(this.get("track")||{}).id},reportAsSpam:function(){var e=this;r(46).callEndpoint("commentReport",null,null,null,{comment_urn:this.getUrn(),should_delete:!0}).then((function(){e.trigger("destroy",e,e.collection)}))}},{EMPTY_TIMESTAMP:1/0})},function(e,t,r){e.exports=r(215).extend({readEndpoint:"myFollowingsIds",createEndpoint:"myFollowingsCreate",deleteEndpoint:"myFollowingsDelete",getCreateEndpointQueryParams:function(e){return{signature:r(1241).sign(r(17).currentUserId(),e,r(4).get("client_id"),r(1242).__FOLLOWS_SIGNATURE_SECRET__)}}})},function(e,t,r){(function(t){var n=r(4).get("systemUserId");e.exports=r(30).extend({resource_type:"conversation",saveWithWrapper:!1,_lastMessageSentAt:null,submodelMap:{users:r(45)},baseUrl:function(){return r(311).baseUrlWithId(this.id)},setup:function(){this.listenTo(this,"change:last_message",i)},parse:function(e){var t=r(1).find(e.users,(function(e){return"system"===e.id}));return t&&(t.id=n),r(30).prototype.parse.apply(this,arguments)},getRecipient:function(){var e=r(4).get("me").id;return r(1).find(this.get("users"),(function(t){return e!==t.id}))||this.get("users")[0]},fetch:function(){var e=this;return r(30).prototype.fetch.apply(this,arguments).fail((function(){e.trigger("error")}))},isFromSoundCloud:function(){return this.getRecipient().id===n},isFromMissingUser:function(){return"missing_user"===this.getRecipient().kind},setRead:function(e){this.set("read",e)},markAsRead:function(){var e=this.toggleReadState(!0);return r(11).trigger("conversation:read",this.id),e},markAsUnread:function(){var e=this.toggleReadState(!1);return r(11).trigger("conversation:unread",this.id),e},toggleReadState:function(e){var t,n=this,i=null!=e?e:!this.get("read");return this.set("read",i),this._saveDeferred||(this._saveDeferred=t=r(10).defer().always((function(){n._saveDeferred=null})).done((function(){n.get("read")!==i&&n.toggleReadState(n.get("read"))})),this.save({read:i},{dataType:"text"}).done((function(){window.setTimeout(t.resolve,1e3)})).fail((function(){window.setTimeout(t.reject,1e3)}))),this._saveDeferred},getUuid:function(){var e=this.get("last_message");return r(686).hashFn(e)},lastMessageSentAt:function(){return this._lastMessageSentAt||i.call(this,null,this.get("last_message")),this._lastMessageSentAt},destroyAndReport:function(e){var n=this;e?t.ajax({url:this.baseUrl()+"/spam",type:"PUT",success:function(){n.trigger("destroy",n)}}):r(51).destroy(this)}});function i(e,t){t&&t.sent_at&&(this._lastMessageSentAt=new Date(t.sent_at),this.set("has_attachment",o.call(this)))}function o(){var e=this.get("last_message");return!!e&&!!e.content.match(r(164).scLinksRegexGlobal)}}).call(this,r(26))},,,,,,,,,,,,,function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Error="ERROR",e.Missing="MISSING",e.Valid="VALID",e.Created="CREATED",e.Deferred="DEFERRED"}(t.Status||(t.Status={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNoopClient=t.NoopEvaluationsClient=void 0;var n=r(125),i={success:!1,error:Error("NoClient"),duration:0,source:"Uninitialized",sourceUrl:null},o=function(){},a=function(){return i},s=function(){return Promise.resolve()},l=function(){return Promise.resolve(i)},u={reason:"Error:NoClient"},c=function(e){return function(){var t="string"==typeof(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:arguments.length<=1?void 0:arguments[1];switch(e){case"gate":return(0,n._makeFeatureGate)(t,u,null);case"config":return(0,n._makeDynamicConfig)(t,u,null);case"layer":return(0,n._makeLayer)(t,u,null);case"param_store":return{name:t}}}},d={attach:o,getDataSync:function(){return null},getDataAsync:function(){return Promise.resolve(null)},setData:o,setDataLegacy:o,prefetchData:s},f={sdkKey:"",options:{},values:null,user:{userID:""},errorBoundary:{},session:{data:{sessionID:"",startTime:0,lastUpdate:0},sdkKey:""},stableID:"",storageProvider:n.Storage},h={isNoop:!0,loadingStatus:"Uninitialized",initializeSync:a,initializeAsync:l,shutdown:s,flush:s,updateRuntimeOptions:o,updateUserSync:a,updateUserAsync:l,getContext:function(){return Object.assign({},f)},checkGate:function(){return!1},getFeatureGate:c("gate"),getDynamicConfig:c("config"),getExperiment:c("config"),getLayer:c("layer"),getParameterStore:c("param_store"),logEvent:o,on:o,off:o,$on:o,$emt:o,dataAdapter:d};t.NoopEvaluationsClient=h,t.isNoopClient=function(e){return"isNoop"in e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._setObjectInStorage=t._getObjectFromStorage=t.Storage=void 0;var n=r(147),i=r(308),o={},a={isReady:function(){return!0},isReadyResolver:function(){return null},getProviderName:function(){return"InMemory"},getItem:function(e){return o[e]?o[e]:null},setItem:function(e,t){o[e]=t},removeItem:function(e){delete o[e]},getAllKeys:function(){return Object.keys(o)}},s=null;try{var l=(0,i._getWindowSafe)();l&&l.localStorage&&"function"==typeof l.localStorage.getItem&&(s={isReady:function(){return!0},isReadyResolver:function(){return null},getProviderName:function(){return"LocalStorage"},getItem:function(e){return l.localStorage.getItem(e)},setItem:function(e,t){return l.localStorage.setItem(e,t)},removeItem:function(e){return l.localStorage.removeItem(e)},getAllKeys:function(){return Object.keys(l.localStorage)}})}catch(e){n.Log.warn("Failed to setup localStorageProvider.")}var u=null!=s?s:a,c=u;t.Storage={isReady:function(){return c.isReady()},isReadyResolver:function(){return c.isReadyResolver()},getProviderName:function(){return c.getProviderName()},getItem:function(e){return function(e){try{return e()}catch(e){if(e instanceof Error&&"SecurityError"===e.name)return t.Storage._setProvider(a),null;throw e}}((function(){return c.getItem(e)}))},setItem:function(e,t){return c.setItem(e,t)},removeItem:function(e){return c.removeItem(e)},getAllKeys:function(){return c.getAllKeys()},_setProvider:function(e){u=e,c=e},_setDisabled:function(e){c=e?a:u}},t._getObjectFromStorage=function(e){var r=t.Storage.getItem(e);return JSON.parse(null!=r?r:"null")},t._setObjectInStorage=function(e,r){t.Storage.setItem(e,JSON.stringify(r))}},,,function(e,t,r){e.exports=r(30).extend({resource_type:"shortcut",url:null,submodelMap:{entity:null},hashCode:null,setup:function(){this.hashCode=this.get("output")+"%%"+this.getEntityType()},createSubmodel:function(){var e=function(e){switch(e){case"user":return r(45);case"track":return r(29);case"playlist":return r(67);case"system-playlist":return r(115);default:return null}}(this.getEntityType());null!==e&&(this.resource=new e(this.get("entity")),this.addSubmodel(this.resource),i.call(this)),n.call(this)},fetch:function(){return this.resource?this.resource.fetch():r(10).resolve({})},getEntityType:function(){switch(this.get("kind")){case"track":case"like":return"track";case"user":case"following":return"user";case"query":return"query";case"playlist":return"playlist";case"system-playlist":return"system-playlist"}},isQuery:function(){return"query"===this.get("kind")},getEquivalencyKey:function(){return this.hashCode}});function n(){if(this.resource){var e=o(this.getEntityType());this.set({artwork_url:this.resource.get(null==e?void 0:e.artwork_url),link:(t=this.resource.get(null==e?void 0:e.link),t?t.replace(/^https?:.+?\w\//,"/"):null)})}var t}function i(){this.listenTo(this.resource,r(1).map(o(this.getEntityType()),(function(e){return"change:"+e})).join(" "),n)}function o(e){switch(e){case"user":return{artwork_url:"avatar_url",link:"permalink_url"};case"track":case"playlist":return{artwork_url:"artwork_url",link:"permalink_url"};case"system-playlist":return{artwork_url:"calculated_artwork_url",link:"permalink_url"}}}},,,function(e,t,r){function n(){return(n=Object.assign||function(e){for(var t=1;t1&&a.Log.warn("Call made to Statsig global instance without an SDK key but there is more than one client instance. If you are using mulitple clients, please specify the SDK key."),r.firstInstance)};var s="undefined"!=typeof window?window:{},l=void 0!==e?e:{},u="undefined"!=typeof globalThis?globalThis:{},c=null!==(o=null!==(i=null!==(n=s.__STATSIG__)&&void 0!==n?n:l.__STATSIG__)&&void 0!==i?i:u.__STATSIG__)&&void 0!==o?o:{instance:t._getInstance};s.__STATSIG__=c,l.__STATSIG__=c,u.__STATSIG__=c}).call(this,r(155))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getSortedObject=t._DJB2Object=t._DJB2=void 0;var n=r(570);t._DJB2=function(e){for(var t=0,r=0;r>>0)};t._DJB2Object=function(e,r){return(0,t._DJB2)(JSON.stringify((0,t._getSortedObject)(e,r)))};t._getSortedObject=function(e,r){if(null==e)return null;var i=Object.keys(e).sort(),o={};return i.forEach((function(i){var a=e[i];0!==r&&"object"===(0,n._typeOf)(a)?o[i]=(0,t._getSortedObject)(a,null!=r?r-1:r):o[i]=a})),o}},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t._getUnloadEvent=t._getCurrentPageUrlSafe=t._addDocumentEventListenerSafe=t._addWindowEventListenerSafe=t._isServerEnv=t._getDocumentSafe=t._getWindowSafe=void 0;t._getWindowSafe=function(){return"undefined"!=typeof window?window:null};t._getDocumentSafe=function(){var e,r=(0,t._getWindowSafe)();return null!==(e=null==r?void 0:r.document)&&void 0!==e?e:null};t._isServerEnv=function(){if(null!==(0,t._getDocumentSafe)())return!1;var r=void 0!==e&&null!=e.versions&&null!=e.versions.node;return"string"==typeof EdgeRuntime||r};t._addWindowEventListenerSafe=function(e,r){var n=(0,t._getWindowSafe)();"function"==typeof(null==n?void 0:n.addEventListener)&&n.addEventListener(e,r)};t._addDocumentEventListenerSafe=function(e,r){var n=(0,t._getDocumentSafe)();"function"==typeof(null==n?void 0:n.addEventListener)&&n.addEventListener(e,r)};t._getCurrentPageUrlSafe=function(){var e;try{return null===(e=(0,t._getWindowSafe)())||void 0===e?void 0:e.location.href.split(/[?#]/)[0]}catch(e){return}};t._getUnloadEvent=function(){var e=(0,t._getWindowSafe)();return e&&"onpagehide"in e?"pagehide":"beforeunload"}}).call(this,r(497))},,,,function(e,t,r){"use strict";r.r(t),r.d(t,"CommentSort",(function(){return n}));var n;r(84),r(102);!function(e){e.newest="newest",e.oldest="oldest",e.trackTimestamp="track-timestamp"}(n||(n={}))},,,,function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DARK_COLORS_EXPANDED=t.DARK_COLORS=void 0;var n=r(149);t.DARK_COLORS={surface:"rgb(0, 0, 0)",primary:"rgb(255, 255, 255)",secondary:"rgb(153, 153, 153)",highlight:"rgb(48, 48, 48)",link:"rgb(105, 159, 255)",overlay:"rgba(255, 255, 255, 0.4)"},t.DARK_COLORS_EXPANDED=(0,n.expandColors)(t.DARK_COLORS)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DARK_COLORS_EXPANDED=t.DARK_COLORS=void 0;var n=r(150);t.DARK_COLORS={surface:"rgb(0, 0, 0)",primary:"rgb(255, 255, 255)",secondary:"rgb(153, 153, 153)",highlight:"rgb(48, 48, 48)",link:"rgb(105, 159, 255)",overlay:"rgba(255, 255, 255, 0.4)",imageBorder:"rgba(255, 255, 255, 0.15)"},t.DARK_COLORS_EXPANDED=(0,n.expandColors)(t.DARK_COLORS)},,,,,,,function(e,t,r){e.exports=r(215).extend({maxResults:1e3,readOnly:!0,readEndpoint:"myFollowersIds"})},,,function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getReadableLocaleName=t.LOCALE_TO_NATIVE_NAME_MAP=t.SUPPORTED_LOCALES=t.DEFAULT_LOCALE=t.LOCALE_COOKIE_NAME=void 0;var i=n(r(558));t.LOCALE_COOKIE_NAME=i.default.prototype.getLocaleCookieName(),t.DEFAULT_LOCALE="en",t.SUPPORTED_LOCALES=["de","en","es","fr","it","nl","pl","pt_BR","sv"],t.LOCALE_TO_NATIVE_NAME_MAP={de:"Deutsch",en:"English (US)",es:"Español",fr:"Français",it:"Italiano",nl:"Nederlands",pl:"Polski",pt_BR:"Português",sv:"Svenska"},t.getReadableLocaleName=function(e){return t.LOCALE_TO_NATIVE_NAME_MAP[e]}},,,,function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.useStatsigUser=t.useStatsigInternalClientFactoryBootstrap=t.useStatsigInternalClientFactoryAsync=t.useStatsigClient=t.useParameterStore=t.useLayer=t.useGateValue=t.useFeatureGate=t.useExperiment=t.useDynamicConfig=t.useClientBootstrapInit=t.useClientAsyncInit=t.StatsigProvider=t.StatsigContext=void 0;var o=r(203);t.StatsigContext=o.default;var a=r(1348);Object.defineProperty(t,"StatsigProvider",{enumerable:!0,get:function(){return a.StatsigProvider}});var s=r(794);Object.defineProperty(t,"useClientAsyncInit",{enumerable:!0,get:function(){return s.useClientAsyncInit}});var l=r(1356);Object.defineProperty(t,"useClientBootstrapInit",{enumerable:!0,get:function(){return l.useClientBootstrapInit}});var u=r(1357);t.useDynamicConfig=u.default;var c=r(1358);t.useExperiment=c.default;var d=r(1359);t.useFeatureGate=d.default;var f=r(1360);t.useGateValue=f.default;var h=r(1361);t.useLayer=h.default;var p=r(1362);t.useParameterStore=p.default;var g=r(798);Object.defineProperty(t,"useStatsigClient",{enumerable:!0,get:function(){return g.useStatsigClient}});var v=r(796);Object.defineProperty(t,"useStatsigInternalClientFactoryAsync",{enumerable:!0,get:function(){return v.useStatsigInternalClientFactoryAsync}});var m=r(797);Object.defineProperty(t,"useStatsigInternalClientFactoryBootstrap",{enumerable:!0,get:function(){return m.useStatsigInternalClientFactoryBootstrap}});var y=r(1363);Object.defineProperty(t,"useStatsigUser",{enumerable:!0,get:function(){return y.useStatsigUser}}),i(r(285),t),__STATSIG__=Object.assign(Object.assign({},null!==__STATSIG__&&void 0!==__STATSIG__?__STATSIG__:{}),{StatsigContext:o.default,StatsigProvider:a.StatsigProvider,useClientAsyncInit:s.useClientAsyncInit,useClientBootstrapInit:l.useClientBootstrapInit,useDynamicConfig:u.default,useExperiment:c.default,useFeatureGate:d.default,useGateValue:f.default,useLayer:h.default,useParameterStore:p.default,useStatsigClient:g.useStatsigClient,useStatsigInternalClientFactoryAsync:v.useStatsigInternalClientFactoryAsync,useStatsigInternalClientFactoryBootstrap:m.useStatsigInternalClientFactoryBootstrap,useStatsigUser:y.useStatsigUser})},,,function(e,t,r){function n(){return(n=Object.assign||function(e){for(var t=1;te){var n=this._submodels[t-1];this.listenTo(n,"destroy",this.onSubmodelDestroy)}},onSubmodelDestroy:function(){this.destroy()},getAudible:function(){var e=this.get("type");return"playlist"===e||"playlist-like"===e?r(67).instances.get(this.get("playlist").id):"system-playlist-like"===e?r(115).instances.get(this.get("system_playlist").id):void 0}},{hashFn:function(e,t){var r=e.type,n=e.user,i=e.playlist,o=e.system_playlist;return"playlist"===r||"playlist-like"===r?[r,n.id,i.id].join("_"):"system-playlist-like"===r?[r,n.id,o.id].join("_"):void 0},getModelData:function(e,t,i,o){var s,l=r(1).find(a,(function(e){var n=e.types;return r(1).contains(n,t)})).meta,u=l.attributeName,c=l.attributes;return(s={type:t,created_at:(new Date).toISOString()})[u]=n({id:i},c(o)),s.user={id:e},s}});e.exports={LibraryPlaylist:s,getPlaylistLibraryFilterFields:function(e){var t=e.type;return o[t]}}},function(e,t,r){(function(t){var n=["amex","discover","mastercard","visa","other","paypal"];e.exports=r(30).extend({resource_type:"active-creator-subscription",baseUrl:function(){return this.getEndpointUrl("paymentsSubscriptionsActive")},parse:function(e){return e.expiry_date&&(e.expiry_date=new Date(e.expiry_date)),e},getPlan:function(){return this.get("package")&&this.get("package").plan},isTrial:function(){return Boolean(this.get("trial"))},getVendor:function(){return this.get("package")&&this.get("package").vendor},getPaymentKind:function(){return this.get("last_payment")&&this.get("last_payment").method.kind},isFree:function(){return"free"===this.getPlan()},isPro:function(){return"pro"===this.getPlan()},isProRecurly:function(){return this.isPro()&&"recurly"===this.getVendor()},isProUnlimited:function(){return"pro-unlimited"===this.getPlan()},isCreatorMidTier:function(){return this.getPlan()===r(28).ProductId.CREATOR_SUBSCRIPTION_4},isProDistro:function(){return"pro-distro"===this.getPlan()},isRecurring:function(){return!!this.get("recurring")},isApplePurchase:function(){return"apple"===this.getPaymentKind()},isGooglePlayPurchase:function(){return"googleplay"===this.getPaymentKind()},isPayPalPurchase:function(){return"paypal"===this.getPaymentKind()},isRefundable:function(){return!!this.get("refundable")},isRenewable:function(){return!this.isFree()&&(this.isRecurring()||this.isRefundable())},hasPaidPaymentKind:function(){return r(1).contains(n,this.getPaymentKind())},getPrettyPrice:function(){var e=this.get("package").price;if(!e||null===e.amount)return null;var t=e.amount,n=e.currency;return r(7).LinguaLib.priceHelper.format(t,n)},getTitle:function(){return r(39).getProductNameInstance().getNameVariants(r(28).mapStringToProductId(this.getPlan(),r(28).ProductCategory.CREATOR_SUBSCRIPTION)).full},getTerm:function(){var e;return null==(e=this.get("package"))?void 0:e.term},isFromMothership:function(){return"mothership"===this.get("package").vendor},cancel:function(){var e=this;return("recurly"===e.getVendor()?r(46).callEndpoint("paymentsOptOutOfActiveCreatorSubscription"):t.ajax({url:e.baseUrl(),type:"DELETE"})).done((function(){e.trigger("cancel:success"),r(11).trigger("subscription-cancel:success",{plan:e.getPlan()})})).fail((function(){e.trigger("cancel:error"),r(11).trigger("subscription-cancel:error",{plan:e.getPlan()})}))},reactivate:function(){var e=this;return"recurly"!==this.getVendor()?this.trigger("subscription-reactivate:error"):r(46).callEndpoint("paymentsOptInActiveCreatorSubscription").done((function(){e.trigger("subscription-reactivate:success"),r(11).trigger("subscription-reactivate:success",{plan:e.getPlan()})})).fail((function(){e.trigger("subscription-reactivate:error"),r(11).trigger("subscription-reactivate:error",{plan:e.getPlan()})}))},hasPaymentFailure:function(){return r(400).isFailed(this.attributes)}})}).call(this,r(26))},,,,,,function(e,t,r){"use strict";r(102),r(84)},,,,,,function(e,t,r){var n=r(1213),i=r(1020),o=i;o.v1=n,o.v4=i,e.exports=o},,,function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){var n=r(667),i=r(1395),o=r(1396),a=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},,,,,,,function(e,t,r){var n;n=function(){var e=!0;function t(t){function r(e){var r=t.match(e);return r&&r.length>1&&r[1]||""}var n,i,o,a=r(/(ipod|iphone|ipad)/i).toLowerCase(),s=!/like android/i.test(t)&&/android/i.test(t),l=/nexus\s*[0-6]\s*/i.test(t),u=!l&&/nexus\s*[0-9]+/i.test(t),c=/CrOS/.test(t),d=/silk/i.test(t),f=/sailfish/i.test(t),h=/tizen/i.test(t),p=/(web|hpw)os/i.test(t),g=/windows phone/i.test(t),v=!g&&/windows/i.test(t),m=!a&&!d&&/macintosh/i.test(t),y=!s&&!f&&!h&&!p&&/linux/i.test(t),_=r(/edge\/(\d+(\.\d+)?)/i),b=r(/version\/(\d+(\.\d+)?)/i),C=/tablet/i.test(t),E=!C&&/[^-]mobi/i.test(t),A=/xbox/i.test(t);/opera|opr|opios/i.test(t)?n={name:"Opera",opera:e,version:b||r(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/coast/i.test(t)?n={name:"Opera Coast",coast:e,version:b||r(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(t)?n={name:"Yandex Browser",yandexbrowser:e,version:b||r(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(t)?n={name:"UC Browser",ucbrowser:e,version:r(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(t)?n={name:"Maxthon",maxthon:e,version:r(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(t)?n={name:"Epiphany",epiphany:e,version:r(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(t)?n={name:"Puffin",puffin:e,version:r(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(t)?n={name:"Sleipnir",sleipnir:e,version:r(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(t)?n={name:"K-Meleon",kMeleon:e,version:r(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:g?(n={name:"Windows Phone",windowsphone:e},_?(n.msedge=e,n.version=_):(n.msie=e,n.version=r(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(t)?n={name:"Internet Explorer",msie:e,version:r(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:c?n={name:"Chrome",chromeos:e,chromeBook:e,chrome:e,version:r(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/chrome.+? edge/i.test(t)?n={name:"Microsoft Edge",msedge:e,version:_}:/vivaldi/i.test(t)?n={name:"Vivaldi",vivaldi:e,version:r(/vivaldi\/(\d+(\.\d+)?)/i)||b}:f?n={name:"Sailfish",sailfish:e,version:r(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(t)?n={name:"SeaMonkey",seamonkey:e,version:r(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(t)?(n={name:"Firefox",firefox:e,version:r(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(t)&&(n.firefoxos=e)):d?n={name:"Amazon Silk",silk:e,version:r(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(t)?n={name:"PhantomJS",phantom:e,version:r(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(t)?n={name:"SlimerJS",slimer:e,version:r(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(t)||/rim\stablet/i.test(t)?n={name:"BlackBerry",blackberry:e,version:b||r(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:p?(n={name:"WebOS",webos:e,version:b||r(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(t)&&(n.touchpad=e)):/bada/i.test(t)?n={name:"Bada",bada:e,version:r(/dolfin\/(\d+(\.\d+)?)/i)}:h?n={name:"Tizen",tizen:e,version:r(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||b}:/qupzilla/i.test(t)?n={name:"QupZilla",qupzilla:e,version:r(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||b}:/chromium/i.test(t)?n={name:"Chromium",chromium:e,version:r(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||b}:/chrome|crios|crmo/i.test(t)?n={name:"Chrome",chrome:e,version:r(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:s?n={name:"Android",version:b}:/safari|applewebkit/i.test(t)?(n={name:"Safari",safari:e},b&&(n.version=b)):a?(n={name:"iphone"==a?"iPhone":"ipad"==a?"iPad":"iPod"},b&&(n.version=b)):n=/googlebot/i.test(t)?{name:"Googlebot",googlebot:e,version:r(/googlebot\/(\d+(\.\d+))/i)||b}:{name:r(/^(.*)\/(.*) /),version:(i=/^(.*)\/(.*) /,o=t.match(i),o&&o.length>1&&o[2]||"")},!n.msedge&&/(apple)?webkit/i.test(t)?(/(apple)?webkit\/537\.36/i.test(t)?(n.name=n.name||"Blink",n.blink=e):(n.name=n.name||"Webkit",n.webkit=e),!n.version&&b&&(n.version=b)):!n.opera&&/gecko\//i.test(t)&&(n.name=n.name||"Gecko",n.gecko=e,n.version=n.version||r(/gecko\/(\d+(\.\d+)?)/i)),n.msedge||!s&&!n.silk?a?(n[a]=e,n.ios=e):m?n.mac=e:A?n.xbox=e:v?n.windows=e:y&&(n.linux=e):n.android=e;var S="";n.windowsphone?S=r(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):a?S=(S=r(/os (\d+([_\s]\d+)*) like mac os x/i)).replace(/[_\s]/g,"."):s?S=r(/android[ \/-](\d+(\.\d+)*)/i):n.webos?S=r(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):n.blackberry?S=r(/rim\stablet\sos\s(\d+(\.\d+)*)/i):n.bada?S=r(/bada\/(\d+(\.\d+)*)/i):n.tizen&&(S=r(/tizen[\/\s](\d+(\.\d+)*)/i)),S&&(n.osversion=S);var w=S.split(".")[0];return C||u||"ipad"==a||s&&(3==w||w>=4&&!E)||n.silk?n.tablet=e:(E||"iphone"==a||"ipod"==a||s||l||n.blackberry||n.webos||n.bada)&&(n.mobile=e),n.msedge||n.msie&&n.version>=10||n.yandexbrowser&&n.version>=15||n.vivaldi&&n.version>=1||n.chrome&&n.version>=20||n.firefox&&n.version>=20||n.safari&&n.version>=6||n.opera&&n.version>=10||n.ios&&n.osversion&&n.osversion.split(".")[0]>=6||n.blackberry&&n.version>=10.1||n.chromium&&n.version>=20?n.a=e:n.msie&&n.version<10||n.chrome&&n.version<20||n.firefox&&n.version<20||n.safari&&n.version<6||n.opera&&n.version<10||n.ios&&n.osversion&&n.osversion.split(".")[0]<6||n.chromium&&n.version<20?n.c=e:n.x=e,n}var r=t("undefined"!=typeof navigator?navigator.userAgent:"");function n(e){return e.split(".").length}function i(e,t){var r,n=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r=0;){if(r[0][t]>r[1][t])return 1;if(r[0][t]!==r[1][t])return-1;if(0===t)return 0}}function a(e,n,i){var a=r;"string"==typeof n&&(i=n,n=void 0),void 0===n&&(n=!1),i&&(a=t(i));var s=""+a.version;for(var l in e)if(e.hasOwnProperty(l)&&a[l])return o([s,e[l]])<0;return n}return r.test=function(e){for(var t=0;t0){var s=o.substring(0,a).trim(),l=o.substring(a+2);t[s]=l}}return t},t}(o.loader.LoaderRequest);t.LoaderRequest=a},function(t){t.exports=e},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.arrayBufferLoader=t.ArrayBufferLoader=void 0;var n=r(6),i=r(7),o=function(){function e(e){var t=(void 0===e?{}:e).fetchEnabled,r=void 0===t||t;this._fetchEnabled=r}return e.prototype.request=function(e){var t=e.url,r=e.headers,o=e.timeout;return this._fetchEnabled&&i.ArrayBufferLoaderRequest.isSupported()?new i.ArrayBufferLoaderRequest(t,r,o):new n.ArrayBufferLoaderRequest(t,r,o)},e}();t.ArrayBufferLoader=o,t.arrayBufferLoader=new o},function(e,t,r){var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayBufferLoaderRequest=void 0;var o=r(4),a=r(3),s=o.helpers.browser.getFirefoxVersion(),l=s&&s.major>=60?["moz-chunked-arraybuffer","arraybuffer"]:["arraybuffer"],u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype._getResponseType=function(){return l},t.prototype._getEmptyData=function(){return new ArrayBuffer(0)},t.prototype._reduceParts=function(e){return o.helpers.arrayBuffer.combine(e.map((function(e){return new Uint8Array(e)}))).buffer},t}(a.LoaderRequest);t.ArrayBufferLoaderRequest=u},function(e,t,r){var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayBufferLoaderRequest=void 0;var o=r(4),a=o.helpers.browser.isFirefox(),s=function(e){function t(r,n,i){void 0===n&&(n={}),void 0===i&&(i=2e4);var a=e.call(this)||this;if(!t.isSupported())throw new Error("Not supported.");var s=a._abortController=new AbortController,l=new Request(r,{headers:n,redirect:"follow",signal:s.signal});a._signalRequestStart();var u=a._abortTimer=window.setTimeout((function(){a._signalTimeout(),a._abort()}),i),c=fetch(l).then((function(e){var t={};if(e.headers.forEach((function(e,r){return t[e]=r})),a._provideStatusAndHeaders({statusCode:e.status,headers:t},new ArrayBuffer(0)),e.body){var r=e.body.getReader();return function e(){return r.read().then((function(t){var r=t.done,n=t.value;if(!r&&!a.hasCompleted())return a._providePart(n.buffer),e()}))}()}return e.arrayBuffer().then((function(e){e&&a._providePart(e)}))})).then((function(){a.hasCompleted()||a._finalize()})).catch((function(e){if(!a.hasCompleted()){var t=e instanceof o.loaderErrors.LoaderError?e:new o.loaderErrors.LoaderError(e);a._finalize(t)}}));return o.helpers.always(c,(function(){return window.clearTimeout(u)})),a}return i(t,e),t.isSupported=function(){return"fetch"in window&&"Request"in window&&"AbortController"in window&&!a},t.prototype._abort=function(){window.clearTimeout(this._abortTimer),this._abortController.abort()},t.prototype._reduceParts=function(e){return o.helpers.arrayBuffer.combine(e.map((function(e){return new Uint8Array(e)}))).buffer},t}(o.loader.LoaderRequest);t.ArrayBufferLoaderRequest=s}],r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var o=r[e]={exports:{}};return t[e].call(o.exports,o,o.exports,n),o.exports}var i={};return function(){var e=i;Object.defineProperty(e,"__esModule",{value:!0}),e.ArrayBufferLoader=e.arrayBufferLoader=e.stringLoader=e.buildNumber=e.version=void 0,e.version="30.2.3",e.buildNumber=2219;var t=n(1);Object.defineProperty(e,"stringLoader",{enumerable:!0,get:function(){return t.stringLoader}});var r=n(5);Object.defineProperty(e,"arrayBufferLoader",{enumerable:!0,get:function(){return r.arrayBufferLoader}}),Object.defineProperty(e,"ArrayBufferLoader",{enumerable:!0,get:function(){return r.ArrayBufferLoader}})}(),i}()},e.exports=n(r(106))},,function(e,t,r){e.exports=r(215).extend({readEndpoint:"soundLikesIds",createEndpoint:"soundLikesCreate",deleteEndpoint:"soundLikesDelete",getReadEndpointQueryParams:function(){return{limit:200}}})},,,,,,,,,,,,,function(e,t,r){"use strict";r(102),r(341)},,,function(e,t,r){e.exports=r(30).extend({resource_type:"sharing_id",sharing_id:null,generateUUID:function(){this.sharing_id=r(347).v4().replace(/-/g,"")},reset:function(){this.sharing_id=null},getCurrentUUID:function(){var e=r(17).isLoggedIn();return null===this.sharing_id&&e&&this.generateUUID(),this.sharing_id}},{neverRelease:!0,hashFn:function(){return 1}})},,,function(e,t,r){e.exports=r(215).extend({readEndpoint:"playlistLikesIds",createEndpoint:"playlistLikesCreate",deleteEndpoint:"playlistLikesDelete"})},function(e,t,r){e.exports=r(215).extend({readEndpoint:"playlistRepostsIds",createEndpoint:"playlistRepostsCreate",deleteEndpoint:"playlistRepostsDelete",getReadEndpointQueryParams:function(){return{limit:200}}})},function(e,t,r){var n=function(e){return{urn:e,userId:r(17).currentUserId()}};e.exports=r(215).extend({readEndpoint:"systemPlaylistLikesUrns",createEndpoint:"systemPlaylistLikesCreate",deleteEndpoint:"systemPlaylistLikesDelete",getCreateEndpointPathParams:n,getDeleteEndpointPathParams:n})},,,,,,,function(e,t,r){e.exports=function(){"use strict";function e(e){for(var t=1;t0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]-1}(e))return this._trackLegacyEvent(e,t);var r=this.getEventVersion(e),n=this.getIntegrationsForEvent(e);this._analytics.track(e,t,{integrations:n,context:{protocols:{event_version:r}}})},e.prototype.page=function(e,t){this._analytics.page(e,null!=t?t:{})},e.prototype.identify=function(e,t){var r=this;return new Promise((function(n,i){e?r._analytics.identify(e,t,n):r.whenReady().then((function(){var e,i,o;(null===(e=r._analytics.user())||void 0===e?void 0:e.id())?(null===(o=null===(i=r._options)||void 0===i?void 0:i.sessionProvider)||void 0===o||o.resetCurrentSessionId(),r._analytics.reset(),r._analytics.identify(void 0,t,n)):n()})).catch(i)}))},e.prototype.getSegmentAnalyticsId=function(){var e=this;return this.whenReady().then((function(){var t;return null===(t=e._analytics.user())||void 0===t?void 0:t.anonymousId()}))},e.prototype.setPartialContext=function(e){if(!this._scContext)throw new Error("Tracking.setPartialContext was invoked without a context being defined.\nInitialize tracking with a `context` option and initial variants to do so.");this._scContext.setPartialProperties(e)},e.prototype._validateEventProperties=function(e,t){var r;if(this._ajv)try{var n=this._ajv.compile((null===(r=this._schemas)||void 0===r?void 0:r[e])||{});n(t)||(console.groupCollapsed("Event ".concat(e," does not match JSON schema")),console.table(n.errors),console.groupEnd())}catch(e){console.error("Non-validation error validating event",e)}},e.prototype._trackLegacyEvent=function(e,t){this._analyticsLegacy&&this._analyticsLegacy.track(e,t)},e.prototype.getIntegrationsForEvent=function(e){var r,n,i,o=null!==(i=null===(n=t[e])||void 0===n?void 0:n.providers)&&void 0!==i?i:[];return Object.keys(g).reduce((function(e,t){var r;return o.includes(g[t])?p(p({},e),((r={})[t]=!0,r)):e}),((r={All:!1})[a.segmentIo]=!0,r))},e.prototype.getEventVersion=function(e){var r,n;return null!==(n=null===(r=t[e])||void 0===r?void 0:r.version)&&void 0!==n?n:1},e}()}var y=function(){};var _={"Account Creation Succeeded":{providers:[],version:3},"Ad Opportunity Presented":{providers:[],version:2},"Ad Presented":{providers:[],version:3},"Ad Received":{providers:[],version:2},"Authentication Error Displayed":{providers:[],version:2},"Authentication Started":{providers:[],version:2},"Capped Feature Alert Viewed":{providers:[],version:2},"Comment Added To Track":{providers:["google-analytics"],version:2},"Comment Deleted From Track":{providers:["google-analytics"]},"Distribution Funnel Started":{providers:["google-analytics"]},"First Fans Initiated":{providers:[],version:2},"Monetization Funnel Canceled":{providers:[],version:2},"Monetization Funnel Completed":{providers:[],version:2},"Monetization Funnel Started":{providers:[],version:2},"Monetization Request Cancelation Completed":{providers:[],version:2},"Monetization Request Cancelation Started":{providers:[],version:2},"Monetization Request Edit Started":{providers:[],version:2},"Monetization Request Submitted":{providers:[],version:2},"Plan Picker Listeners Viewed":{providers:["google-analytics"]},"Play Queue Initiated":{providers:["mo-engage"],version:4},"Play Queue Resumed":{providers:[],version:2},"Playlist Created":{providers:["google-analytics"]},"Playlist Deleted":{providers:["google-analytics"]},"Playlist Edited":{providers:["google-analytics"]},"Playlist Liked":{providers:["mo-engage","google-analytics"]},"Playlist Reposted":{providers:["google-analytics"]},"Playlist Shared":{providers:["mo-engage","google-analytics"],version:2},"Playlist Unliked":{providers:["google-analytics"]},"Playlist Unreposted":{providers:["google-analytics"]},"Product Purchased":{providers:["google-analytics"]},"Product View Triggered":{providers:[],version:2},"Reaction Added To Comment":{providers:["mo-engage","google-analytics"]},"Release Deleted":{providers:[],version:2},"Release Deletion Started":{providers:[],version:2},"Release Edit Started":{providers:[],version:2},"Release Funnel Canceled":{providers:[],version:2},"Release Funnel Completed":{providers:[],version:2},"Release Funnel Component Viewed":{providers:[],version:2},"Release Funnel Saved":{providers:[],version:3},"Release Funnel Started":{providers:[],version:2},"Release Profile Mapping Canceled":{providers:[],version:2},"Release Profile Mapping Completed":{providers:[],version:2},"Release Profile Mapping Started":{providers:[],version:2},"Release Track Deleted":{providers:[],version:2},"Release Track Deletion Started":{providers:[],version:2},"Release Track Edit Canceled":{providers:[],version:2},"Release Track Edit Completed":{providers:[],version:2},"Release Track Edit Started":{providers:[],version:2},"Release Track Split Pay Canceled":{providers:[],version:2},"Release Track Split Pay Completed":{providers:[],version:2},"Release Track Split Pay Started":{providers:[],version:2},"Release Track Upload Canceled":{providers:[],version:2},"Release Track Upload Quality Alert Button Clicked":{providers:[],version:2},"Release Track Upload Quality Alert Viewed":{providers:[],version:2},"Release Track Upload Started":{providers:[],version:2},"Release Track Upload Succeeded":{providers:[],version:2},"Share Sheet Viewed":{providers:[],version:2},"Streaming Quality Changed":{providers:["mo-engage"]},"Subscription Cancelled":{providers:["google-analytics"]},"Track Added To Playlist":{providers:["google-analytics"],version:2},"Track Comments Sorted":{providers:[],version:2},"Track Liked":{providers:["mo-engage","google-analytics"]},"Track Removed From Playlist":{providers:["google-analytics"]},"Track Reposted":{providers:["google-analytics"],version:2},"Track Shared":{providers:["mo-engage","google-analytics"],version:2},"Track Unreposted":{providers:["google-analytics"],version:2},"Tracks Added To Play Queue":{providers:[],version:4},"Two Factor Authentication Initiated":{providers:[],version:2},"Two Factor Authentication Succeeded":{providers:[],version:2},"Upload Canceled":{providers:[],version:2},"Upload Failed":{providers:[],version:2},"Upload Funnel CTA Click":{providers:[],version:2},"Upload Funnel Canceled":{providers:[],version:2},"Upload Funnel Completed":{providers:[],version:4},"Upload Funnel Component Viewed":{providers:[],version:4},"Upload Funnel Started":{providers:["google-analytics"],version:2},"Upload Started":{providers:[],version:3},"Upload Step Completed":{providers:["google-analytics"],version:2},"Upload Step Initiated":{providers:["google-analytics"],version:2},"Upload Succeeded":{providers:["mo-engage","google-analytics"],version:3},"User Followed":{providers:["mo-engage","google-analytics"]},"User Logged In":{providers:[],version:3},"User Profile Header Updated":{providers:["mo-engage"],version:2},"User Profile Image Updated":{providers:["mo-engage"],version:2},"User Profile Metadata Updated":{providers:["mo-engage"],version:2},"User Shared":{providers:[],version:2},"User Unfollowed":{providers:["google-analytics"]},"Voice Recorder Button Clicked":{providers:[],version:2},"Voice Recording Submitted":{providers:[],version:2}},b=m({getSchemas:y,eventMetadata:_,createAnalytics:function(e,t){var n={analytics:new l,analyticsLegacy:new l},i={syncAnalytics:n};return i.fullAnalytics=function(e,t){var n,i,o,s,l,d,f,h;return u(this,void 0,void 0,(function(){var u,p,g,v,m,y,_,b,C,E,A,S,w,O,k,T,L,P,M,x,D,R,I;return c(this,(function(c){switch(c.label){case 0:return[4,Promise.resolve(e)];case 1:return u=c.sent(),p=Boolean(u.segment||(null===(n=u.googleTagManager)||void 0===n?void 0:n.enabled)||(null===(i=u.eventGateway2022)||void 0===i?void 0:i.enabled)||(null===(o=u.moEngage)||void 0===o?void 0:o.apiKey)),g=!1,p?[4,Promise.all([Promise.all([r.e(3),r.e(48),r.e(56)]).then(r.t.bind(null,4591,7)),Promise.all([r.e(3),r.e(48),r.e(57)]).then(r.bind(null,4593)),(null===(s=u.googleTagManager)||void 0===s?void 0:s.enabled)&&Promise.all([r.e(3),r.e(59)]).then(r.bind(null,4592)),(null===(l=u.moEngage)||void 0===l?void 0:l.enabled)&&Promise.all([r.e(3),r.e(58)]).then(r.bind(null,4594)),null==t?void 0:t.whenReady()])]:[2,null];case 2:return v=c.sent(),m=v[0].default,y=v[1].getSegmentIoIntegration,_=v[2],b=v[3],C=y(u),E=function(e,t){return function(r){var n,i=r.payload,o=r.next;e&&(i.obj.context.sc=null!==(n=e.getProperties())&&void 0!==n?n:void 0),t?t.getCurrentSessionId().then((function(e){i.obj.context.sc&&(i.obj.context.sc.session_id=e),o(i)})):o(i)}}(t,null!==(d=u.sessionProvider)&&void 0!==d?d:null),(A=new m).addSourceMiddleware(E),S={},_&&(w=_.GoogleTagManagerIntegration,O=_.GoogleTagManagerMiddleware,k=_.registerAnalyticsIdInGoogleTagManager,A.use(w),A.addDestinationMiddleware(a.googleTagManager,[O]),S[a.googleTagManager]={},t&&k(t)),A.use(C),S[a.segmentIo]=function(e){var t,r={retryQueue:!0,addBundledMetadata:!0};return(null===(t=e.eventGateway2022)||void 0===t?void 0:t.enabled)?(r.apiHost=e.eventGateway2022.url.replace(/^https?:\/\//,""),r.apiEndpointSuffixes={track:"",page:"",identify:""}):e.segment&&(r.apiKey=e.segment.apiKey),r}(u),b&&u.moEngage&&(T=b.MoEngageIntegration,L=b.mapMoEngageAnalyticsToIntegrationOptions,P=b.MoEngageUserIdHashingMiddleware,M=function(){A.use(T),A.addDestinationMiddleware(a.moEngage,[P])},(null===(f=null==t?void 0:t.getProperties())||void 0===f?void 0:f.user_id)?(M(),S[a.moEngage]=L(u.moEngage)):t&&(x=t.addPropertyListener("user_id",(function(e){var t;e&&(x(),M(),A.init(((t={})[a.moEngage]=L(u.moEngage),t)))})))),A.init(S),D={analytics:A},g&&((R=new m).addSourceMiddleware(E),R.use(C),R.init(((I={})[a.segmentIo]={apiKey:null===(h=u.segment)||void 0===h?void 0:h.apiKeyLegacy,retryQueue:!0,addBundledMetadata:!0},I)),D.analyticsLegacy=R),[2,D]}}))}))}(e,t),i.fullAnalytics.then((function(e){e?(n.analytics.runCallsOn(e.analytics),e.analyticsLegacy&&n.analyticsLegacy.runCallsOn(e.analyticsLegacy)):(n.analytics.clear(),n.analyticsLegacy.clear())})),i}});var C,E=m({getSchemas:y,eventMetadata:_,createAnalytics:function(e,t){var r={analytics:new s,analyticsLegacy:new s};return{syncAnalytics:r,fullAnalytics:Promise.resolve(r)}}}),A={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},S=new Uint8Array(16);function w(){if(!C&&!(C="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return C(S)}for(var O=[],k=0;k<256;++k)O.push((k+256).toString(16).slice(1));function T(e,t){return void 0===t&&(t=0),(O[e[t+0]]+O[e[t+1]]+O[e[t+2]]+O[e[t+3]]+"-"+O[e[t+4]]+O[e[t+5]]+"-"+O[e[t+6]]+O[e[t+7]]+"-"+O[e[t+8]]+O[e[t+9]]+"-"+O[e[t+10]]+O[e[t+11]]+O[e[t+12]]+O[e[t+13]]+O[e[t+14]]+O[e[t+15]]).toLowerCase()}var L=function(e,t,r){if(A.randomUUID&&!t&&!e)return A.randomUUID();var n=(e=e||{}).random||(e.rng||w)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var i=0;i<16;++i)t[r+i]=n[i];return t}return T(n)},P=r(391),M=r.n(P),x=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))},D=function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]18e5)},F=function(){function e(){var e=this;this._store=new I,this._activeState=new N(this._handleActiveStateChange.bind(this)),this._whenSessionIdAccessAllowed=new Promise((function(t){e._allowSessionIdAccess=t})),this._createNewSessionIfExpired()}return e.prototype.getCurrentSessionId=function(){return x(this,void 0,void 0,(function(){var e=this;return D(this,(function(t){return[2,this._whenSessionIdAccessAllowed.then((function(){return e.getCurrentSessionIdSync()}))]}))}))},e.prototype.getCurrentSessionIdSync=function(){return this._createNewSessionIfExpired(),this._currentSessionId},e.prototype.resetCurrentSessionId=function(){this._store.clear(),this._currentSessionId=null,this._lastBecameInactive=null},e.prototype.allowSessionIdAccess=function(e){e.enablePersistentStorage&&this.enablePersistentStorage(),this._allowSessionIdAccess&&(this._allowSessionIdAccess(),delete this._allowSessionIdAccess)},e.prototype.setIsPlaying=function(e){this._activeState.setIsPlaying(e)},e.prototype.unlisten=function(){this._activeState.unlisten()},e.prototype.enablePersistentStorage=function(){this._store.enablePersistentStorage();var e=this._store.get();e&&!j(e.lastBecameInactive)?(this._currentSessionId=e.id,this._lastBecameInactive=e.lastBecameInactive):this._store.set({id:this._currentSessionId,lastBecameInactive:this._lastBecameInactive})},e.prototype._handleActiveStateChange=function(e){e?this._createNewSessionIfExpired():(this._lastBecameInactive=new Date,this._store.set({id:this._currentSessionId,lastBecameInactive:this._lastBecameInactive}))},e.prototype._createNewSessionIfExpired=function(){if(!this._currentSessionId||j(this._lastBecameInactive)){var e=this._store.get();!e||j(e.lastBecameInactive)?this._store.set({id:this._currentSessionId=L().toUpperCase(),lastBecameInactive:this._lastBecameInactive=null}):this._store.set({id:this._currentSessionId=e.id,lastBecameInactive:this._lastBecameInactive=e.lastBecameInactive})}},e}(),B=function(){function e(e){this._getExternalSessionId=e,this._externalSession=null,this._pendingResultPromise=null}return e.prototype.getCurrentSessionId=function(){return x(this,void 0,void 0,(function(){var e,t;return D(this,(function(r){switch(r.label){case 0:return this._pendingResultPromise?[2,this._pendingResultPromise]:this._externalSession&&!this._sessionNeedsRefresh(this._externalSession)?[3,2]:(e=this._getExternalSessionId(),this._pendingResultPromise=e,[4,e]);case 1:t=r.sent(),this._pendingResultPromise=null,this._externalSession={id:t,expires:new Date(Date.now()+18e5)},r.label=2;case 2:return[2,this._externalSession.id]}}))}))},e.prototype.resetCurrentSessionId=function(){this._externalSession=null,this._pendingResultPromise=null},e.prototype._sessionNeedsRefresh=function(e){return Date.now()>e.expires.getTime()},e}()},,,,,,,,,,,,,,,function(e,t){var r={"'":/[\u042C\u044C]/gi,"":/[\u042a\u044a]/gi,a:/[\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250\u0410\u0430]/gi,aa:/[\uA733]/gi,ae:/[\u00E6\u01FD\u01E3]/gi,ao:/[\uA735]/gi,au:/[\uA737]/gi,av:/[\uA739\uA73B]/gi,ay:/[\uA73D]/gi,b:/[\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253\u0411\u0431]/gi,c:/[\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/gi,ch:/[\u0427\u0447]/gi,d:/[\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A\u0414\u0434]/gi,dz:/[\u01F3\u01C6]/gi,e:/[\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD\u0415\u042D]/gi,f:/[\u24D5\uFF46\u1E1F\u0192\uA77C\u0424\u0444]/gi,g:/[\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F\u0413\u0433]/gi,h:/[\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/gi,hv:/[\u0195]/gi,i:/[\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131\u0418\u0438]/gi,j:/[\u24D9\uFF4A\u0135\u01F0\u0249]/gi,k:/[\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3\u041A\u043A]/gi,kh:/[\u0425\u0445]/gi,l:/[\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u0142\u019A\u026B\u2C61\uA749\uA781\uA747\u041B\u043B]/gi,lj:/[\u01C9]/gi,m:/[\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F\u041C\u043C]/gi,n:/[\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5\u041D\u043D]/gi,nj:/[\u01CC]/gi,o:/[\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275\u041E\u043E]/gi,oi:/[\u01A3]/gi,ou:/[\u0223]/gi,oo:/[\uA74F]/gi,p:/[\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755\u041F\u043F]/gi,q:/[\u24E0\uFF51\u024B\uA757\uA759]/gi,r:/[\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783\u0420\u0440]/gi,s:/[\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B\u017F\u0421\u0441]/gi,shch:/[\u0429\u0449]/gi,sh:/[\u0428\u0448]/gi,t:/[\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787\u0422\u0442]/gi,ts:/[\u0426\u0446]/gi,tz:/[\uA729]/gi,u:/[\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289\u0423\u0443]/gi,v:/[\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C\u0412\u0432]/gi,vy:/[\uA761]/gi,w:/[\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/gi,x:/[\u24E7\uFF58\u1E8B\u1E8D]/gi,y:/[\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF\u0419\u0439\u042B\u044B]/gi,ya:/[\u042F\u044F]/gi,yo:/[\u0401\u0451]/gi,yu:/[\u042E\u044E]/gi,z:/[\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763\u0417\u0437]/gi,zh:/[\u0416\u0436]/gi},n=/^\[|\]$/g,i=new RegExp("["+Object.keys(r).reduce((function(e,t){return e+r[t].source.replace(n,"")}),"")+"]","i");e.exports=function(e){if(i.test(e))for(var t in r)r[t].lastIndex=0,r[t].test(e)&&(e=e.replace(r[t],t));return e.toLowerCase()}},,,,,,,function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BASE_THEME=void 0;var n=r(124),i=r(189),o=r(1298),a=r(1299),s=r(564),l=r(1301);t.BASE_THEME={background:{light:{color:n.DESIGN_TOKENS.baseColors.white},dark:{color:n.DESIGN_TOKENS.baseColors.black}},font:{"sans-serif":{family:n.DESIGN_TOKENS.fontFamilies.sansSerif},monospace:{family:n.DESIGN_TOKENS.fontFamilies.monospace},light:{color:n.DESIGN_TOKENS.baseColors.white},dark:{color:n.DESIGN_TOKENS.baseColors.black},special:{color:i.BASE_COLORS.special},error:{color:i.BASE_COLORS.error}},button:l.button,typography:a.typography,spacing:s.spacing,artwork:o.artwork,breakpoints:n.DESIGN_TOKENS.breakpoints}},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r?«»“”‘’])/gi,f=/(\b(?:[0-5]?[0-9])(?::[0-5][0-9]){1,2}\b)/g,h=/([a-z0-9._%+&\-]+@[a-z0-9.\-]+\.[a-z]{2,24})/gi,p=/(\s|[^\w/]|^)@([\w\-]+)/g,g=/( |^)(#([\w-]+))/gm,v=/^((?:https?:\/\/)?(?:www\.|m\.)?soundcloud\.com)\/?|^\//i,m=/^((?:https?:\/\/)?([a-z0-9-]+\.)*soundcloud\.com)(?:\/|$)/i,y=/^(?:ht|f)tps?:\/\//i,_=/(?:[ \t]*\r?\n[ \t]*){2,}/,b=/<\/p>/g,C=//g,E=/<\/?[a-z].*?>/gi,A=/\r?\n/g,S=/[ \t]{2,}/g,w=/[\r\n]+/g,O=/]*?href=(['"]([^'"\s]+)['"]|[^'"\s]+)[^>]*?>(.+?)<\/a>/gi,k={paragraphs:!0,links:!0,externalLinks:!0,internalLinks:!0,userLinks:!0,deepLinks:!1,whitelist:[],internalLinksBaseUrl:"/",isOpeningNewWindow:!1,maxLength:null,truncateExternalLinks:!0,maxExternalLinksLength:50,hashtagLinks:!0,splitWordsAtLength:null,redirectorPattern:null,addChecksum:null};function T(e,t){var r=n({},k,t),L=r.links,P=r.userLinks,M=r.internalLinks,x=r.externalLinks,D=r.deepLinks,R=r.escapeExpression,I=r.hashtagLinks,N=r.internalLinksBaseUrl,j=r.isOpeningNewWindow,F=r.maxExternalLinksLength,B=r.maxLength,U=r.paragraphs,V=r.splitWordsAtLength,H=r.whitelist,z=r.redirectorPattern,G=r.addChecksum,K=!1!==R;if("string"!=typeof e)return"";L?P||M||x||(L=!1):P=M=x=!1;var Z=L?l():{},W=Z.flatten,q=Z.addPlaceholder;return d.lastIndex=p.lastIndex=h.lastIndex=0,e=i(e),L&&(e=e.replace(O,(function(e,t,r,n){var i=r||t;return q(i,n!==i?n:null)})).replace(d,(function(e,t){return q(t)})).replace(h,(function(e,t){return q("mailto:"+t)}))),e=e.replace(b,"\n\n").replace(C,"\n").replace(S," "),e=H&&H.length?e.replace(new RegExp("<(?!\\s*\\/?("+H.join("|")+")\\b)[^>]*>","ig"),""):e.replace(E,""),K&&(e=o(e)),L&&(e=W(e=e,(function(e,t){var i={},s="",l=y.test(e)?e:"http://"+e,u=0===e.indexOf("mailto:"),d=M&&v.test(e);if(u)i.href=e,i.text=e.replace("mailto:","");else if(d)i.href=e.replace(v,N),i.text=e.replace(y,"");else if(x){var f=m.test(l);i.href=f?l:a(z,l,m),f||(i.title=l,i.rel="nofollow ugc"),i.text=c(e,F,y),i.target="_blank"}else i.href=e;t&&(K?s=T(t,n({},r,{paragraphs:!1,splitWordsAtLength:0})).trim()+(/[!?:;.]$/.test(t)?" ":": "):i.text=t);var h=o(i.href);return u||d||!x||m.test(l)||!z||"function"!=typeof G||(h=G(h,l)),s+(i.text?'"+(K?o(i.text):i.text)+"":h)})),P&&(e=e.replace(p,'$1@$2")),I&&(e=e.replace(g,'$1$2')),D&&(e=e.replace(f,'$1'))),B&&(e=s(e,B)),V>0&&(e=u(e,V)),e=U?e.split(_).map((function(e){return"

"+e.trim().replace(A,"
")+"

"})).join(""):e.replace(w," ").replace(S," ")}function L(e,t){var r=e;return t&&t.redirectorPattern&&(r=a(t.redirectorPattern,e,m)),t&&t.redirectorPattern&&"function"==typeof t.addChecksum&&r!==e&&(r=t.addChecksum(r,e)),r}T.redirectLink=L,T.withDefaults=function(e){var t=n({},k,e),r=function(e,r){return T(e,r?n({},t,r):t)};return r.redirectLink=function(e,r){return L(e,r?n({},t,r):t)},r}},,,,,,,,,function(e,t,r){e.exports=r(54).extend({model:r(45),setup:function(){r(17).isLoggedIn()||this.setToFullyPopulated()},comparator:function(e){return e.get("username").toLowerCase()},baseUrl:function(){return this.getEndpointUrl("shortcutsFollowings")},parse:function(e){var t=e.collection,n=r(4).get("me");return n.id&&t.unshift(n.toJSON()),t}},{hashFn:function(){return r(4).get("me").get("id")}})},function(e,t,r){var n=new(r(48))("already-seen");e.exports=r(30).extend({resource_type:"announcement",defaults:{key:"",message:"",dismissable:!0},fetch:function(){0},dismiss:function(){this.trigger("destroy",this)},isAlreadySeen:function(){return 1===n.get(this.get("key"))},markAsSeen:function(){n.set(this.get("key"),1)}},{hashFn:function(e){var t=e.id,r=e.key;return t||r||null}})},,,function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFontStyle=t.box=t.container=void 0;var n=r(2002);t.container=(0,n.getStyleString)({width:"100%",height:"100%",position:"relative",transition:"opacity 0.2s ease-in-out"}),t.box=(0,n.getStyleString)({top:0,left:0,width:"100%",height:"100%",position:"absolute"}),t.getFontStyle=function(e){return"".concat(e,'px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Garuda, Verdana, Tahoma, sans-serif')}},,function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BASE_THEME=void 0;var n=r(126),i=r(192),o=r(2017),a=r(2018),s=r(614),l=r(2020);t.BASE_THEME={background:{light:{color:n.DESIGN_TOKENS.baseColors.white},dark:{color:n.DESIGN_TOKENS.baseColors.black}},font:{"sans-serif":{family:n.DESIGN_TOKENS.fontFamilies.sansSerif},monospace:{family:n.DESIGN_TOKENS.fontFamilies.monospace},light:{color:n.DESIGN_TOKENS.baseColors.white},dark:{color:n.DESIGN_TOKENS.baseColors.black},special:{color:i.BASE_COLORS.special},error:{color:i.BASE_COLORS.error}},button:l.button,typography:a.typography,spacing:s.spacing,artwork:o.artwork}},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r1)for(var r=1;r-1},a=i?o("confirmed their address")?"emailnotconfirmed":o("sender must be followed")?"privacy":o("rate limit")?"ratelimit":o("receiver does not exist")?"receiverdoesntexist":403===n?"forbidden":"default":"default";r(11).trigger("new-message:failed",{errorCode:a,recipient:e})}function a(e){var t=this;e.reduce((function(e,r){return t.get(r)||(t.add({id:r},{at:0}),e++),e}),0)&&this.trigger("new-conversations-added")}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,r){var n;"undefined"!=typeof self&&self,n=function(e,t){return function(){var r=[,function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=0?{rendition:s,transcoding:e,quality:u,preset:e.preset}:null})).filter(Boolean);if(!e.length)return{result:s.helpers.Promise.resolve(null)};var n=s.helpers.deferred.buildDeferred(),o=e[0],a=o.transcoding,u=o.rendition,c=o.quality,d=o.preset,f=t._retrieveStreamUrl(a.url);return f.onCompletion((function(e){n.resolve({success:!0,url:e,rendition:u,quality:c,preset:d,timeRetrieved:s.helpers.time.now()})})),f.onError((function(e){e instanceof l.UrlRetrieverError?n.resolve({success:!1,error:e,rendition:u,quality:c,preset:d,timeRetrieved:s.helpers.time.now()}):n.reject(e)})),{result:n.promise,abort:function(){return f.abort()}}})).run()},t.prototype.updateRequestAuthorization=function(e){if(null!==e&&"string"!=typeof e)throw new Error("requestAuthorizaton invalid.");this._requestAuthorization=e},t.prototype.updateMediaPayload=function(e){if(!e||"object"!=typeof e)throw new Error("mediaPayload invalid.");this._mediaPayload=e},t.prototype.updateTrackAuthorization=function(e){if(null!==e&&"string"!=typeof e)throw new Error("trackAuthorization invalid.");this._trackAuthorization=e},t.prototype._lookupRendition=function(e,t){var r=function(e){switch(e){case"encrypted-hls":case"ctr-encrypted-hls":case"cbc-encrypted-hls":case"hls":return e;case"progressive":return"http"}return null}(e);if(!r)return null;var n,i,o=(n=t,(i=u.exec(n))?{mimeType:i[1],audioCodec:i[2]?{id:i[2]}:void 0,videoCodec:i[3]?{id:i[3]}:void 0}:null);return o&&s.helpers.find(d,(function(e){var t,n,i=e.maestroSegmentFormat||e.maestroFormat;return e.scProtocol===r&&(n=o,!((t=i).mimeType!==n.mimeType||!t.audioCodec!=!n.audioCodec||t.audioCodec&&n.audioCodec&&t.audioCodec.id!==n.audioCodec.id||!t.videoCodec!=!n.videoCodec||t.videoCodec&&n.videoCodec&&t.videoCodec.id!==n.videoCodec.id))}))||null},t.prototype._retrieveStreamUrl=function(e){var t=this;return new s.helpers.abortableJob.AbortableJob((function(){var r=s.helpers.deferred.buildDeferred(),n=c.execute((function(){var n=t._requestAuthorization?{Authorization:t._requestAuthorization}:{},i={client_id:t._clientId};t._secretToken&&(i.secret_token=t._secretToken),t._trackAuthorization&&(i.track_authorization=t._trackAuthorization);var s=function(e,t){var r=(0,a.parseURL)(e);if(!r)throw new Error("Unable to parse url.");var n=r.query.slice(1).split("&").filter(Boolean),i=Object.create(null);n.forEach((function(e){var t=e.split("=",2);i[encodeURIComponent(t[0])]=t.length>1?decodeURIComponent(e.slice(e.indexOf("=")+1)):void 0}));var s=o(o({},i),t);return r.query="?"+Object.keys(s).map((function(e){var t=encodeURIComponent(e),r=s[e];return r&&(t+="="+encodeURIComponent(r)),t})).join("&"),(0,a.buildURLFromParts)(r)}(e,i),u=t._loader.request({url:s,headers:n}).getResponse().then((function(e){if(!e)throw new l.UrlRetrieverError("TIMED_OUT",!0);if(200!==e.statusCode)throw new l.UrlRetrieverError("INVALID_STATUS_".concat(e.statusCode),function(e){return 429===e.statusCode}(e));var t=e.getData();if(!t)throw new l.UrlRetrieverError("NO_DATA");var r=JSON.parse(t).url;if("string"!=typeof r||!r)throw new l.UrlRetrieverError("NO_STREAM_URL");return r})).catch((function(e){if(e instanceof l.UrlRetrieverError)throw e;throw new l.UrlRetrieverError("UNEXPECTED_ERROR",!1,e)}));return r.resolve(u),u}));return{result:r.promise,abort:function(){return n.abort()}}})).run()},t}(l.BaseStreamUrlRetriever);t.StreamUrlRetriever=f},function(e){var t,r,n,i,o;t=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,r=/^([^\/?#]*)(.*)$/,n=/(?:\/|^)\.(?=\/)/g,i=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,o={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var i=o.parseURL(e);if(!i)throw new Error("Error trying to parse base URL.");return i.path=o.normalizePath(i.path),o.buildURLFromParts(i)}var a=o.parseURL(t);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return n.alwaysNormalize?(a.path=o.normalizePath(a.path),o.buildURLFromParts(a)):t;var s=o.parseURL(e);if(!s)throw new Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&"/"!==s.path[0]){var l=r.exec(s.path);s.netLoc=l[1],s.path=l[2]}s.netLoc&&!s.path&&(s.path="/");var u={scheme:s.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(u.netLoc=s.netLoc,"/"!==a.path[0]))if(a.path){var c=s.path,d=c.substring(0,c.lastIndexOf("/")+1)+a.path;u.path=o.normalizePath(d)}else u.path=s.path,a.params||(u.params=s.params,a.query||(u.query=s.query));return null===u.path&&(u.path=n.alwaysNormalize?o.normalizePath(a.path):a.path),o.buildURLFromParts(u)},parseURL:function(e){var r=t.exec(e);return r?{scheme:r[1]||"",netLoc:r[2]||"",path:r[3]||"",params:r[4]||"",query:r[5]||"",fragment:r[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(n,"");e.length!==(e=e.replace(i,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=o},function(t){"use strict";t.exports=e},function(e){"use strict";e.exports=t}],n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var o=n[e]={exports:{}};return r[e].call(o.exports,o,o.exports,i),o.exports}var o={};return function(){"use strict";var e=o;Object.defineProperty(e,"__esModule",{value:!0}),e.StreamUrlRetriever=e.buildNumber=e.version=void 0,e.version="24.1.1",e.buildNumber=1186;var t=i(1);Object.defineProperty(e,"StreamUrlRetriever",{enumerable:!0,get:function(){return t.StreamUrlRetriever}})}(),o}()},e.exports=n(r(106),r(94))},,function(e,t,r){"use strict";e.exports=function(){var e=p.apply(void 0,arguments),t=e.enabled,r=void 0===t||t,o=e.buffer,l=void 0!==o&&o,c=e.label,g=void 0===c?"":c,v=e.plainOutput,m=void 0!==v&&v,y=e.bufferSize,_=void 0===y?1e3:y;if(!h())return T(n.reduce((function(e,t){return e[t]=e}),(function(){})));i.CL||(i.CL={_cssCounter:0});var b=!m&&f(),C=null,E=[],A=u(g,b),S=b?["color: green","color: grey","color: blue","color: grey",d(g),""]:[],w=i.CL[g]=T(n.reduce((function(e,t){return e[t]=O.bind(null,t),e}),O.bind(null,"log")));return w;function O(e,t){if(r){for(var n=arguments.length,o=Array(n>2?n-2:0),a=2;a_&&E.shift():i[e].apply(i,s)}}function k(){var e=new Date,t=null===C?0:e-C,r=b?"%c":"";return C=+e,r+a(e)+(r+" (")+r+s("+"+t+"ms"," ",8)+r+")"}function T(e){return e.enable=function(){r=!0},e.disable=function(){r=!1},e.bufferOn=function(){l=!0},e.bufferOff=function(){l=!1,E.length=0},e.flush=h()?function(){E.forEach((function(e){var t=e.level,r=e.logArgs;i[t].apply(i,r)})),E.length=0}:function(){},e}};var n=["log","info","warn","error"],i="undefined"!=typeof console?console:null,o=["color:#fff","border-radius:3px","padding:2px 4px","font-family:sans-serif","text-transform:uppercase","font-size:9px"].join(";")+";";function a(e){return l(e.getHours())+":"+l(e.getMinutes())+":"+l(e.getSeconds())+"."+s(e.getMilliseconds(),"0",3)}function s(e,t,r){return n=t,((i=r-(""+e).length)>0?new Array(i+1).join(n):"")+e;var n,i}function l(e){return s(e,"0",2)}function u(e,t){return(t?"%c":"")+(e||"")}var c,d=(c=["#51613C","#447848","#486E5F","#787444","#6E664E"],function(e){return e?"background:"+c[i.CL._cssCounter++%c.length]+";"+o:""});function f(){if("undefined"==typeof navigator)return!1;var e=navigator.userAgent;return/chrome|firefox|opr/i.test(e)&&!/msie|edge/i.test(e)}function h(){return i&&n.every((function(e){return"function"==typeof i[e]}))}function p(){var e=arguments.length<=0||void 0===arguments[0]||arguments[0],t=arguments.length<=1||void 0===arguments[1]?"":arguments[1];return"object"==typeof e&&e||{enabled:e,label:t}}},,,,,,,,function(e,t,r){var n;"undefined"!=typeof self&&self,n=function(e){return function(){"use strict";var t=[,function(e,t,r){var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.HTML5PlayerBase=void 0;var o=r(2),a=r(3),s=r(4),l=r(5),u=r(6),c=r(7),d=r(8),f=r(9),h=r(11),p=r(12),g=r(10),v=r(13),m=r(15),y=o.helpers.deferred.buildDeferred,_=o.helpers.url.getExtension,b=o.helpers.time.now,C=o.helpers.Promise,E=o.helpers.browser,A=o.logger.prefixLogger,S=o.errors.NotSupportedError,w=o.errors.PlayerFatalError,O=new Error("Media element was revoked."),k=[],T=new o.helpers.SCWeakMap,L=null,P=o.helpers.retry.buildExponentialDelayCalculator({jitter:0,timeBase:50});function M(e){try{return!!document.createElement("audio").canPlayType(e)}catch(e){return!1}}var x=function(e){function t(t){var r=e.call(this,t)||this;r._duration=null,r._stallDetected=!1,r._fadeManagers=null,r._shouldCoverGlitch=!0,r._initialized=!1,r._muted=!1,r._volume=1,r._deferredProvideMediaElementCallback=null,r._playInProgress={inProgress:!1},r._lastStallCheckPos=null,r._stallCheckTimerId=null,r._timeWhenPositionChanged=0,r._endedOverride=!1,r._pauseEventTimer=null,r._positionWhenMediaElementRevoked=0,r._playingWhenMediaElementRevoked=!1,r._provideMediaElementDeferred=null,r._mediaElementAndState=null,r._listeners=[],r._currentSeek=null,r._playDetectionPosition=0,r._playDetectionTimer=null,r._playDetectionTimerNumAttempts=0,r._fadeRate=null,r._seekFadeRate=null,r._lastSeek=null,r._webAudioOrchestration=null,r._fadeEndedHandle=null,r._onSeekFadeOutCompleted=null,r._fadeRateAfterSeek=1/0,r._mediaElPlayShouldBeAborted=new o.helpers.SCWeakMap,r._mediaElPaused=new o.helpers.SCWeakMap,r._mediaElPlayTracker=null,r._logger=A(r._logger,"HTML5PlayerBase"),r._playerDependencies=t,r._webAudioContext=t.webAudioContext||L||(L=new v.WebAudioContext),r._addCachedCurrentTimeListeners();var n=r._webAudioOrchestration=t.fadeSupportEnabled?r._initWebAudio():null;n&&(r._logger.debug("Fading supported."),r._fadeManagers={pausePlay:new s.FadeManager(n.context,n.gainNodes.pausePlay),seek:new s.FadeManager(n.context,n.gainNodes.seek)}),r._handleDurationUpdates();var i=void 0!==t.mediaElement?t.mediaElement:r._createDefaultMediaElement();i&&r.provideMediaElement(i).catch((function(e){e!==O?r._triggerError(new d.InitializeError(e)):r._logger.debug("Initial provideMediaElement() call was aborted.")}));var a=r._fadeManagers;return a&&r.onChange.subscribe((function(e){var t=e.stalled,n=e.seek;if(e.ended&&a.seek.getDirection()===s.FadeDirection.UP&&a.seek.isFading())r._logger.debug("Completing fade in after seek early because reached end."),a.seek.performFade(1/0),r._notifyFadingForSeek(!1);else{var i=r.getSeekState(),o=i&&"COMPLETED"===i.state,l=n&&"COMPLETED"===n.state;(!1===t&&o||l&&!r.isStalled())&&a.seek.getDirection()===s.FadeDirection.DOWN&&(r._logger.debug("Fading in after seek.",r._fadeRateAfterSeek),a.seek.performFade(r._fadeRateAfterSeek,(function(){return r._notifyFadingForSeek(!1)})))}})),r._logger.info("Checking if the player can play the provided descriptor."),r._canPlayTimer=window.setTimeout((function(){r._canPlay().then((function(e){if(!r.isDead())return e instanceof o.errors.NotSupportedError?(r._logger.info("Player not supported.",e),void r._triggerError(e)):e?(r._logger.info("Player supported."),void r._initialize()):(r._logger.info("Player not supported."),void r._triggerError(new S))})).catch((function(e){r._logger.error("Unexpected error during can play check.",e),r._triggerError(new w("An unexpected error occured during initialization.",e))}))}),0),r}return i(t,e),t.isFormatSupported=function(e){var t=(0,m.buildMimeTypeFromFormat)(e);return!!t&&M(t)},t.prototype.getMediaElement=function(){return this._mediaElementAndState&&this._mediaElementAndState.element},t.prototype.provideMediaElement=function(e){var t=this;if(this._ensureNotDead(),this._mediaElementAndState)throw new Error("Already have a media element.");if(k.indexOf(e)>=0)throw new Error("The same media element is currently being used in another player.");if(!this._webAudioOrchestration&&T.has(e))throw new Error("The same media element has been used in another player with fading enabled.");k.push(e);var r=this._provideMediaElementDeferred=y();return this._update((function(){t._logger.debug("provideMediaElement() called.",e),t._initMediaElementLocal(e,!1);var n=t._mediaElementAndState={element:e,state:"INITIALIZING"},i=function(){t._logger.debug("Initializing media element."),t._initMediaElement(e,!0),t._addPausedHandlers(e),t._attachListeners();var i=t._listenToOnce("error",(function(){t._provideMediaElementDeferred=null;var n=e.error,i=n?n.code:"unknown";t._logger.error("Error whilst initializing media element.",i),t.revokeMediaElement(),r.reject(new Error("Error when initializing media element. Error: "+i))}),{earlyAttach:!0}),o=function(){null===t._getQueuedSeekPosition()&&t._positionWhenMediaElementRevoked>0?(t._logger.debug("Seeking to expected position..."),t._performSeek(t._positionWhenMediaElementRevoked,(function(e){if(void 0!==e)return t._provideMediaElementDeferred=null,t._logger.error("An error occurred when trying to seek to the expected position."),t.revokeMediaElement(),void r.reject(new Error("An error occurred when trying to restore the position."));t._logger.debug("Seeked to expected position."),a()}))):a()},a=function(){t.isPlaying()===t.isActuallyPlaying()&&t._playingWhenMediaElementRevoked?(t._logger.debug("Calling play to match previous state..."),t._mediaElementPlay().catch((function(e){t._provideMediaElementDeferred=null,t._logger.error("An error occurred when trying to play.",e),n===t._mediaElementAndState&&t.revokeMediaElement(),r.reject(new Error("Browser refused play() request on media element."))})),t._listenToOnce("play",(function(){t._logger.debug("Play succeeded."),s()}),{earlyAttach:!0})):s()},s=function(){t._mediaElementAndState===n?(t._provideMediaElementDeferred=null,i.remove(),r.resolve(void 0),t._mediaElementAndState.state="STABLE",t._logger.debug("Finished putting element in expected state."),t._shouldCoverGlitch=!0,null!==t._duration&&t._update((function(){t.isReady()||t._signalReady(),t._handleDeferredPauseAndSeek()}))):t._triggerError(new w("Media element switched unexpectedly."))};t._listenToOnce("emptied",(function(){t._logger.debug("Got emptied event from media element."),t._logger.debug("Putting media element in the state that is expected..."),o()}),{earlyAttach:!0})};t._initialized?i():t._deferredProvideMediaElementCallback=i})),r.promise},t.prototype.revokeMediaElement=function(){var e=this;if(!this._mediaElementAndState)throw new Error("There is no media element to revoke.");this._deferredProvideMediaElementCallback=null,this._provideMediaElementDeferred&&(this._provideMediaElementDeferred.reject(O),this._provideMediaElementDeferred=null),this._logger.debug("revokeMediaElement() called."),this._detachListeners();var t=this._mediaElementAndState.element,r=k.indexOf(t);r>=0&&k.splice(r,1),this._onSeekFadeOutCompleted=null,this.isDead()||(this._positionWhenMediaElementRevoked=this.getPosition(),this._playingWhenMediaElementRevoked=this.isPlaying()),this._mediaElementAndState=null,this._initMediaElement(t,!1),this._removePausedHandlers(t),this._completeCurrentFade(),this._completeSeekFadeOutAndIn(),this._update((function(){e.isDead()||(!e.isPlaying()&&e.isActuallyPlaying()&&e._notifyPlaying(!1),e._handleStalled())}))},t.prototype.getBufferedTimeRanges=function(){return this._mediaElementAndState&&"USABLE"===this._mediaElementAndState.state?(0,a.buildTimeRanges)(this._mediaElementAndState.element.buffered):[]},t.prototype.getMaxBufferLength=function(){return null},t.prototype._hasInitialized=function(){return this._initialized},t.prototype._inferFormat=function(e){switch(_(e)){case"mp3":return{mimeType:"audio/mpeg"};case"opus":return{mimeType:"audio/ogg",audioCodec:{id:"opus"}};case"mp4":return{mimeType:"video/mp4"};case"m4a":return{mimeType:"audio/mp4"};case"m3u8":return{mimeType:"application/x-mpegURL"};default:return{}}},t.prototype._canPlayType=function(e){return M(e)},t.prototype._initialize=function(){var e=this;this._initialized=!0,this._listenTo("error",(function(){if("INITIALIZING"!==e._mediaElementAndState.state){var t=e._mediaElementAndState.element.error;switch(t&&t.code){case 2:e._triggerError(new l.NetworkError);break;case 3:e._triggerError(new u.DecodeError);break;default:e._logger.error("Unexpected error from media element.",t&&t.code,t&&t.message),e._triggerError(new c.MediaElementError(t))}}else e._logger.debug("An error occurred, but the media element is initializing, so ignoring...")}),{earlyAttach:!0}),this._listenTo("play",(function(){e._logger.debug("Media element play event."),e._updateCachedCurrentTime(),e.isPlaying()||e.isActuallyPlaying()||!e._mediaElementAndState||e._isMediaElementPaused(e._mediaElementAndState.element)||(e._logger.debug("Calling play() because something external called play() on media element."),e.play())})),this._listenTo("playing",(function(){e._logger.debug("Media element playing event."),e._updateCachedCurrentTime(),e._mediaElementAndState&&!e._isMediaElementPaused(e._mediaElementAndState.element)?e._handlePlayingEvent():e._logger.debug("Ignoring playing event because media element is reporting it is paused.")})),this._listenTo("timeupdate",(function(){e._updateCachedCurrentTime(),e._determineIfPlaying()})),this._listenTo("pause",(function(){e._logger.debug("Media element pause event."),e._updateCachedCurrentTime(),e._mediaElementAndState&&e._isMediaElementPaused(e._mediaElementAndState.element)?e._handlePauseEvent():e._logger.debug("Ignoring pause event because media element is reporting it is not paused.")})),this._listenTo("seeking",(function(){if(null===e._getQueuedSeekPosition()&&(e._logger.debug("Media element seeking event."),e._mediaElementAndState&&"USABLE"===e._mediaElementAndState.state)){var t=1e3*e._mediaElementAndState.element.currentTime,r=e._lastSeek;if(r&&(null===r.unstallTime||r.unstallTime+500>b())&&Math.abs(r.position-t)<=500)return void e._logger.debug("Ignoring seeking event because we seeked recently to somewhere near.");var n=e._mediaElementAndState.cachedMediaElTime.elTime;e._logger.debug("Reverting seek on media element to ".concat(n,".")),e._mediaElementAndState.element.currentTime=n/1e3,e._updateCachedCurrentTime(),e._lastSeek={unstallTime:b(),position:n},e.seek(t,{fadeOutDuration:0}).catch((function(r){e._logger.warn("Error when trying to seek to ".concat(t," whilst handling seeking event"),r)}))}})),this._listenTo("ended",(function(){e._logger.debug("Media element ended event."),e._mediaElementAndState&&e._mediaElementAndState.element.ended?e._handleEndedEvent():e._logger.debug("Ignoring ended event because media element is reporting it is not ended.")})),this._listenTo("stalled",(function(){e._logger.debug("Media element stalled event."),e._checkIfStalled()})),this._listenTo("volumechange",(function(){e._mediaElementAndState&&e._notifyVolumeChangeFromMediaEl(e._mediaElementAndState.element)})),this._stallCheckTimerId=window.setInterval((function(){return e._checkIfStalled()}),400),this._deferredProvideMediaElementCallback&&this._deferredProvideMediaElementCallback()},t.prototype._handleDurationChange=function(){var e=this,t=this._duration;null!==t&&this._update((function(){e._provideDuration(t),e._mediaElementAndState&&"STABLE"===e._mediaElementAndState.state&&(e.isReady()||e._signalReady(),e._handleDeferredPauseAndSeek())}))},t.prototype._createDefaultMediaElement=function(){return document.createElement(this._playerDependencies.mediaElementType||"audio")},t.prototype._handlePauseEvent=function(){var e=this;if(!this._mediaElementAndState)throw new Error("Media element should exist.");var t=this._mediaElementAndState.element;this.isActuallyPlaying()&&this._update((function(){t.ended||(e._notifyNotStalled(),e._completeCurrentFade(),e._completeSeekFadeOutAndIn(),e._notifyPlaying(!1))}))},t.prototype._handlePlayingEvent=function(){var e=this,t=this._duration;if(null===t)throw new Error("Expecting duration to exist.");var r=this._getTruePosition();r>=t?this._logger.warn("Got a media element playing event and the positon was >= the duration.",r,t):this.isEnded()||this._shouldBeEnded()?this._logger.warn("Got a media element playing event when the player is/should be ended."):this._update((function(){e._notifyNotStalled(),e._determineIfPlaying(),e.isActuallyPlaying()||(e._playDetectionTimerNumAttempts=0,e._playDetectionTimer||(e._playDetectionTimer=window.setInterval((function(){return e._determineIfPlaying()}),10)))}))},t.prototype._handleEndedEvent=function(){null===this._getQueuedSeekPosition()?this._update():this._logger.warn("Got a media element ended event but ignoring because a seek is in progress.")},t.prototype._shouldBeEnded=function(){return this._endedOverride||this._mediaElementReportingEnded()},t.prototype._mediaElementReportingEnded=function(){return!!(this._mediaElementAndState&&this._mediaElementAndState.element.ended&&this._mediaElementAndState.element.paused)},t.prototype._handleDurationUpdates=function(){var e=this;this._listenToOnce("loadedmetadata",(function(){return e._updateDurationFromMediaElement()}),{reattach:!0,earlyAttach:!0}),this._listenTo("durationchange",(function(){return e._updateDurationFromMediaElement()}))},t.prototype._updateDurationFromMediaElement=function(){var e=this._mediaElementAndState;e&&(this._duration=1e3*e.element.duration,this._handleDurationChange())},t.prototype._handlePlayPauseChange=function(e,t){var r=this,n=t.fadeRate;this._fadeRate=n||null;var i=function(){r._mediaElementAndState&&"USABLE"===r._mediaElementAndState.state&&r._callMediaElementPause(r._mediaElementAndState.element),r._notifyFading(!1),r._completeSeekFadeOutAndIn(),r._notifyPlaying(!1)};if(this.isEnded())e?this._notifyPlaying(!0):i();else if(this._mediaElementAndState&&"USABLE"===this._mediaElementAndState.state){var o=this._playInProgress.inProgress||!this._isMediaElementPaused(this._mediaElementAndState.element);e&&!o?(this._fadeManagers&&this._fadeManagers.pausePlay.performFade(-1/0),this._playDetectionPosition=this._getTruePosition(),this._play((function(e){return r._notifyPlayRejection(e)}))):!e&&o?this._update((function(){r._fadeManagers&&r._fadeManagers.pausePlay.getDirection()===s.FadeDirection.UP?(r._notifyFading(!0),r._fadeManagers.pausePlay.performFade(n||-1/0,(function(){return i()}))):i()})):e&&o?this._update((function(){r._fadeManagers&&r._fadeManagers.pausePlay.getDirection()===s.FadeDirection.DOWN&&r._fadeManagers.pausePlay.performFade(n||1/0,(function(){return r._notifyFading(!1)})),r._notifyPlaying(!0)})):this._notifyPlaying(e)}},t.prototype._handleVolumeChange=function(e,t){if(this._mediaElementAndState){var r=this._mediaElementAndState.element;r.muted=t,r.volume=e,this._notifyVolumeChangeFromMediaEl(r)}else this._muted=t,this._volume=e,this._notifyVolumeChange(e,t)},t.prototype._handleSeekChange=function(e,t){var r=this,n=t.fadeRate;this._seekFadeRate=n,this._fadeRateAfterSeek=n.afterSeek||1/0;var i=this._mediaElementAndState;if(i&&"USABLE"===i.state){this._onSeekFadeOutCompleted=function(){r._onSeekFadeOutCompleted=null,l&&l.remove(),a&&a.seek.getDirection()===s.FadeDirection.DOWN&&(r._logger.debug("Fade out for seek completed.",e,n),a.seek.performFade(-1/0),r._notifyFadingForSeek(!1));var t=r._mediaElementReportingEnded();r._endedOverride=!1;var i=r._lastSeek={position:e,unstallTime:null};r._performSeek(e,(function(t){void 0===t?(e===r._duration&&(r._endedOverride=!0),r._update((function(){if(r.isActuallyPlaying()&&r._assumeStalled(),r._updateCachedCurrentTime(!0),r._signalSeekComplete(),r.isStalled())var e=r.onChange.subscribe((function(t){var r=t.dead,n=t.stalled;r?e.remove():n||(i.unstallTime=b(),e.remove())}));else i.unstallTime=b();a&&(!r.isActuallyPlaying()||r._fadeRateAfterSeek===1/0||r.isEnded()?a.seek.performFade(1/0):r._notifyFadingForSeek(!0))}))):r._triggerError(new o.errors.PlayerFatalError("An error occurred when trying to seek.",t))})),t&&r.isPlaying()&&r._play((function(e){r._triggerError(new o.errors.PlayerFatalError("Error when trying to play after seek from end.",e))}))},this._fadeEndedHandle&&(this._fadeEndedHandle.remove(),this._fadeEndedHandle=null);var a=this._fadeManagers,l=null,u=function(){r._onSeekFadeOutCompleted&&r._onSeekFadeOutCompleted()};this._update((function(){a&&(n.beforeSeek||n.afterSeek)?(r._logger.debug("Fading out ready for seek.",e,n),(a.seek.getDirection()===s.FadeDirection.UP||a.seek.isFading())&&r.isActuallyPlaying()&&n.beforeSeek&&!r._mediaElementReportingEnded()?(r._notifyFadingForSeek(!0),l=r._fadeEndedHandle=r._listenToOnce("ended",u),a.seek.performFade(n.beforeSeek||-1/0,u)):(a.seek.performFade(-1/0),u())):u()}))}},t.prototype._performSeek=function(e,t){var r=this,n=this._mediaElementAndState;if(!n)throw new Error("Media element does not exist.");var i=this._currentSeek;i&&(this._currentSeek=null,i.abort());var o=n.element,a=0,s=e;!function n(){var i=[];try{o.currentTime=s/1e3}catch(t){r._logger.warn("Error when trying to seek.",t,e,s)}r._playDetectionPosition=1e3*o.currentTime;var l=window.setTimeout((function(){r._logger.warn("Seek attempt failed. Retrying...",e,s,a),u(),s+=.001,n()}),P(++a));i.push(r._listenToOnce("seeked",(function(){var i=1e3*o.currentTime;Math.abs(i-s)<=100?(r._currentSeek&&(r._currentSeek.abort(),r._currentSeek=null),t()):(r._logger.warn("Seek attempt failed. Incorect position. Retrying...",i,e,s),u(),n())}),{earlyAttach:!0}));var u=function(){i.forEach((function(e){return e.remove()})),window.clearTimeout(l)};r._currentSeek={abort:u}}()},t.prototype._getPosition=function(){var e=null!==this._duration?this._duration:1/0;if(!this._mediaElementAndState||"USABLE"!==this._mediaElementAndState.state)return this._positionWhenMediaElementRevoked;this._determineIfPlaying();var t=Math.min(this._getTruePosition(),e);return this._shouldBeEnded()?e:t},t.prototype._getTruePosition=function(){if(!this._mediaElementAndState||"USABLE"!==this._mediaElementAndState.state)throw new Error("Media element does not exist or is in invalid state.");var e=this._mediaElementAndState.cachedMediaElTime,t=e.elTime,r=e.systemTime;return this.isStalled()||!this.isActuallyPlaying()?t:t+(b()-r)},t.prototype._kill=function(){window.clearTimeout(this._canPlayTimer),this._playDetectionTimer&&window.clearInterval(this._playDetectionTimer),this._mediaElementAndState&&this.revokeMediaElement(),this._stallCheckTimerId&&window.clearInterval(this._stallCheckTimerId),this._webAudioOrchestration&&this._webAudioOrchestration.gainNodes.glitchCoverup.disconnect(this._webAudioOrchestration.context.destination),this._listeners=[]},t.prototype._listenToOnce=function(e,t,r){void 0===r&&(r={});var n=r.reattach,i=r.earlyAttach;void 0===n&&(n=!1),void 0===i&&(i=!1);var o=this._listenTo(e,(function(e){o.remove(),t(e)}),{reattach:n,earlyAttach:i});return o},t.prototype._listenTo=function(e,t,r){var n=this;void 0===r&&(r={});var i=r.reattach,o=r.earlyAttach;void 0===i&&(i=!0),void 0===o&&(o=!1);var a=function(r){if(s.attachedToElement)switch(e){case"play":var i=n._mediaElPlayShouldBeAborted.get(s.attachedToElement);if(n._mediaElPlayShouldBeAborted.delete(s.attachedToElement),i){n._logger.warn("Calling pause() on media element because the play request should have been rejected."),s.attachedToElement.pause();break}default:t(r)}else n._logger.warn("Got media element event after handler was removed. Ignoring.",r)},s={attachedToElement:null,handler:a,eventType:e,once:!1,reattach:i,earlyAttach:o};if(this._listeners.push(s),!this._mediaElementAndState||"USABLE"!==this._mediaElementAndState.state&&!o)return{remove:function(){var e=n._listeners.indexOf(s);e>=0&&n._listeners.splice(e,1)}};var l=this._mediaElementAndState.element;return l.addEventListener(e,a,!1),s.attachedToElement=l,{remove:function(){var t=n._listeners.indexOf(s);t>=0&&(n._listeners.splice(t,1),s.attachedToElement=null,l.removeEventListener(e,a,!1))}}},t.prototype._notifyNotStalled=function(){this._stallDetected=!1,this._lastStallCheckPos=null,this._handleStalled()},t.prototype._assumeStalled=function(){this._mediaElementAndState&&"USABLE"===this._mediaElementAndState.state&&(this._lastStallCheckPos=1e3*this._mediaElementAndState.element.currentTime,this._timeWhenPositionChanged=0,this._stallDetected=!0,this._handleStalled())},t.prototype._initMediaElement=function(e,t){this._initMediaElementLocal(e,t)},t.prototype._callMediaElementPlay=function(e){var t=this;E.isEdge()&&this._mediaElPlayShouldBeAborted.set(e,!1);var r=this._mediaElPaused.get(e);r&&(r.paused=!1);var n=this._mediaElPlayTracker={},i=e.play();return r&&i&&i.catch&&i.catch((function(){n===t._mediaElPlayTracker&&(r.paused=!0)})),i},t.prototype._callMediaElementPause=function(e){this._playInProgress.inProgress=!1,E.isEdge()&&this._mediaElPlayShouldBeAborted.has(e)&&this._mediaElPlayShouldBeAborted.set(e,!0);var t=this._mediaElPaused.get(e);t&&(t.paused=!0),e.pause()},t.prototype._isMediaElementPaused=function(e){var t=this._mediaElPaused.get(e);return!t||t.paused},t.prototype._createMediaElementSource=function(e){if(this._webAudioOrchestration&&this._fadeManagers){this._logger.debug("Creating media element source node...");var t=T.get(e);if(t?this._logger.debug("Reusing media element source node."):(t=this._webAudioOrchestration.context.createMediaElementSource(e),T.set(e,t)),this._webAudioOrchestration.mediaElementSource=t,t.connect(this._webAudioOrchestration.gainNodes.pausePlay),this._logger.debug("Created media element source node."),this._shouldCoverGlitch){var r=this._webAudioOrchestration.context.currentTime,n=this._webAudioOrchestration.gainNodes.glitchCoverup;n.gain.setValueAtTime(0,r),n.gain.setValueAtTime(1,r+.1),this._shouldCoverGlitch=!1}}},t.prototype._completeCurrentFade=function(){var e=this._fadeManagers;e&&(e.pausePlay.performFade(this.isPlaying()?1/0:-1/0),this.isDead()||this._notifyFading(!1))},t.prototype._completeSeekFadeOutAndIn=function(){var e=this,t=this._fadeManagers;t&&this._update((function(){t.seek.performFade(1/0),e.isDead()||(e._notifyFadingForSeek(!1),e._onSeekFadeOutCompleted&&e._onSeekFadeOutCompleted())}))},t.prototype._determineIfPlaying=function(){var e=this;this._playDetectionTimer&&(!this.isPlaying()||++this._playDetectionTimerNumAttempts>=200)&&(window.clearInterval(this._playDetectionTimer),this._playDetectionTimer=null),this._update((function(){e._mediaElementAndState&&"USABLE"===e._mediaElementAndState.state&&(e.isDead()||!e.isReady()||!e.isPlaying()||e.isActuallyPlaying()||e._isMediaElementPaused(e._mediaElementAndState.element)||e._getTruePosition()===e._playDetectionPosition||(e._logger.debug("Detected that playback has started."),e._playDetectionTimer&&(window.clearInterval(e._playDetectionTimer),e._playDetectionTimer=null),e._notifyPlaying(!0),e._fadeManagers&&(e._notifyFading(!0),e._fadeManagers.pausePlay.performFade(e._fadeRate||1/0,(function(){return e._notifyFading(!1)})))))}))},t.prototype._updateCachedCurrentTime=function(e){void 0===e&&(e=!1),!this._mediaElementAndState||"USABLE"!==this._mediaElementAndState.state||!e&&this._mediaElementAndState.element.seeking||(this._mediaElementAndState.cachedMediaElTime={elTime:1e3*this._mediaElementAndState.element.currentTime,systemTime:b()})},t.prototype._addCachedCurrentTimeListeners=function(){var e=this;this.onChange.subscribe((function(t){var r=t.actuallyPlaying,n=t.stalled;void 0===r&&void 0===n||e._updateCachedCurrentTime()}))},t.prototype._initMediaElementLocal=function(e,t){if(e.setAttribute("msAudioCategory","BackgroundCapableMedia"),e.mozAudioChannelType="content",e.removeAttribute("src"),function(e){e.load()}(e),this._activateWebAudio(),this._pauseEventTimer&&(this._logger.debug("Clearing pause event timer."),window.clearTimeout(this._pauseEventTimer),this._pauseEventTimer=null),this._webAudioOrchestration&&this._webAudioOrchestration.mediaElementSource&&(this._logger.debug("Disconnecting media element from gain node."),this._webAudioOrchestration.mediaElementSource.disconnect(this._webAudioOrchestration.gainNodes.pausePlay),this._webAudioOrchestration.mediaElementSource=void 0),this._currentSeek&&(this._logger.debug("Aborting seek attempt."),this._currentSeek.abort(),this._currentSeek=null),t){this._webAudioOrchestration&&(this._logger.debug("Adding crossorigin attribute to media element because fading enabled."),e.setAttribute("crossorigin","anonymous"));var r=this._getUrlForMediaElement();this._logger.debug("Setting media element src.",r),e.src=r,e.volume=this._volume,e.muted=this._muted,this._createMediaElementSource(e)}e.playbackRate=1,e.setAttribute("preload","metadata"),this._callMediaElementPause(e),e.load()},t.prototype._addPausedHandlers=function(e){var t={removeListeners:function(){e.removeEventListener("play",r),e.removeEventListener("playing",r),e.removeEventListener("pause",r),e.removeEventListener("ended",r)},paused:!1},r=function(){t.paused=e.paused};r(),e.addEventListener("play",r),e.addEventListener("playing",r),e.addEventListener("pause",r),e.addEventListener("ended",r),this._mediaElPaused.set(e,t)},t.prototype._removePausedHandlers=function(e){var t=this._mediaElPaused.get(e);t&&t.removeListeners(),this._mediaElPaused.delete(e)},t.prototype._checkIfStalled=function(){if(this._mediaElementAndState&&"USABLE"===this._mediaElementAndState.state&&this.isActuallyPlaying()){var e=this._mediaElementAndState.element,t=1e3*e.currentTime,r=o.helpers.time.now();t!==this._lastStallCheckPos&&(this._timeWhenPositionChanged=r),this._stallDetected=e.readyState<=2||this._timeWhenPositionChanged<=r-500,this._lastStallCheckPos=t,this._handleStalled()}},t.prototype._handleStalled=function(){this._shouldBeEnded()&&null===this._getQueuedSeekPosition()?this.isEnded()||(this._logger.debug("Updating because stalled near end."),this._update()):this._notifyStalled(this._stallDetected||!this._mediaElementAndState||"USABLE"!==this._mediaElementAndState.state)},t.prototype._play=function(e){var t=this,r=this._activateWebAudio(),n={inProgress:!0};this._playInProgress=n,this._mediaElementPlay().then((function(){n.inProgress=!1,r.catch((function(e){t._logger.error("Error activating web audio.",e),e===v.WEB_AUDIO_ACTIVATION_TIMEOUT_ERROR?t._triggerError(new f.WebAudioActivationTimeoutError):t._triggerError(new g.WebAudioActivationError)}))})).catch((function(r){t._playInProgress===n?(n.inProgress=!1,e&&e(r)):t._logger.debug("Ignoring play error because paused since.",r)}))},t.prototype._mediaElementPlay=function(){var e=this;if(!this._mediaElementAndState)throw new Error("Media element doesn't exist.");if(this._mediaElementReportingEnded())return this._logger.debug("Not calling play() because we are at the end. It will be called after a seek."),C.resolve();var t=this._mediaElementAndState.element,r=this._callMediaElementPlay(t);return new C((function(t,n){r?(r=r.then((function(){return t()}))).catch&&(r=r.catch((function(r){"AbortError"===r.name?(e._logger.debug("Media element play() promise rejected with AbortError."),t()):n(r)}))):t()}))},t.prototype._notifyVolumeChangeFromMediaEl=function(e){this._volume=e.volume,this._muted=e.muted,this._notifyVolumeChange(e.volume,e.muted)},t.prototype._initWebAudio=function(){try{var e=this._webAudioContext.getAudioContextWithSuspender();if(!e)return this._logger.debug("WebAudio not supported/enabled."),null;this._logger.debug("WebAudio supported.");var t=e.context,r=e.suspender;r.watchPlayer(this);var n=t.createGain(),i=t.createGain(),o=t.createGain();return n.connect(i),i.connect(o),o.connect(t.destination),{context:t,suspender:r,gainNodes:{glitchCoverup:o,pausePlay:n,seek:i}}}catch(e){return e===v.WEB_AUDIO_NO_OUTPUT_CHANNELS_ERROR?this._triggerError(new p.WebAudioInitializeNoChannelsError(e)):this._triggerError(new h.WebAudioInitializeError(e)),this._logger.error("Failed initializing web audio.",e),null}},t.prototype._activateWebAudio=function(){return this._webAudioOrchestration?this._webAudioContext.activate():C.resolve(void 0)},t.prototype._handleDeferredPauseAndSeek=function(){var e=this;if(!this._mediaElementAndState||"STABLE"!==this._mediaElementAndState.state)throw new Error("Media element must be in the STABLE state.");this._logger.debug("Handling deferred pause and seek...");var t=this._mediaElementAndState.element;this._mediaElementAndState={state:"USABLE",element:t,cachedMediaElTime:{systemTime:b(),elTime:1e3*t.currentTime}},this._attachListeners(),this._update((function(){e._handleStalled();var t=e._getQueuedSeekPosition();if(null!==t){var r=e._seekFadeRate?e._seekFadeRate.afterSeek:void 0;e._handleSeekChange(t,{fadeRate:{afterSeek:r}})}e.isPlaying()!==e.isActuallyPlaying()&&e._handlePlayPauseChange(e.isPlaying(),{fadeRate:e._fadeRate||void 0})}))},t.prototype._detachListeners=function(){if(!this._mediaElementAndState)throw new Error("Media element doesn't exist.");var e=this._mediaElementAndState.element;this._listeners.forEach((function(t){t.attachedToElement&&(t.attachedToElement=null,e.removeEventListener(t.eventType,t.handler,!1))})),this._listeners=this._listeners.filter((function(e){return e.reattach}))},t.prototype._attachListeners=function(){if(!this._mediaElementAndState)throw new Error("Media element doesn't exist.");this._logger.debug("Attaching listeners...");var e=this._mediaElementAndState,t=e.element,r=e.state;this._listeners.forEach((function(e){e.attachedToElement||!e.reattach||"USABLE"!==r&&!e.earlyAttach||(t.addEventListener(e.eventType,e.handler,!1),e.attachedToElement=t)})),this._logger.debug("Attached listeners.")},t}(o.BasePlayer);t.HTML5PlayerBase=x},function(t){t.exports=e},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.buildTimeRanges=void 0;var n=r(2);t.buildTimeRanges=function(e){for(var t=[],r=e.length,i=0;i0?1-c:c)*(1/Math.abs(1e3*e)),f=a+d;this._currentFade={startTime:a,rate:e,startValue:c},s.gain.cancelScheduledValues(a),s.gain.setValueAtTime(c,a),s.gain.linearRampToValueAtTime(e>0?1:0,f),this._fadeEndTimer=window.setTimeout((function(){r._fadeEndTimer=null,t&&t()}),1e3*d)}},e}();t.FadeManager=n},function(e,t,r){var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkError=void 0;var o=function(e){function t(){return e.call(this,"An unrecoverable network error occurred.")||this}return i(t,e),t.prototype.getCode=function(){return"HTML5_PLAYER.NETWORK_ERROR"},t}(r(2).errors.PlayerFatalError);t.NetworkError=o},function(e,t,r){var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.DecodeError=void 0;var o=function(e){function t(){return e.call(this,"An unrecoverable error occurred whilst decoding.")||this}return i(t,e),t.prototype.getCode=function(){return"HTML5_PLAYER.DECODE_ERROR"},t}(r(2).errors.PlayerFatalError);t.DecodeError=o},function(e,t,r){var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.MediaElementError=void 0;var o=function(e){function t(t){var r=e.call(this,"Unexpected error from media element.",t)||this;return r._error=t,r}return i(t,e),t.prototype.getCode=function(){return"HTML5_PLAYER.UNEXPECTED_MEDIA_ELEMENT_ERROR_".concat(this._error&&this._error.code||"UNKNWON")},t}(r(2).errors.PlayerFatalError);t.MediaElementError=o},function(e,t,r){var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.InitializeError=void 0;var o=function(e){function t(t){return e.call(this,"An error occurred when initializing the media element.",t)||this}return i(t,e),t.prototype.getCode=function(){return"HTML5_PLAYER.INITIALIZE_ERROR"},t}(r(2).errors.PlayerFatalError);t.InitializeError=o},function(e,t,r){var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.WebAudioActivationTimeoutError=void 0;var o=function(e){function t(t){return e.call(this,"We timed out when trying to activate web audio.",t)||this}return i(t,e),t.prototype.getCode=function(){return"HTML5_PLAYER.WEB_AUDIO_ACTIVATION_TIMEOUT_ERROR"},t}(r(10).WebAudioActivationError);t.WebAudioActivationTimeoutError=o},function(e,t,r){var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.WebAudioActivationError=void 0;var o=function(e){function t(t,r){return void 0===t&&(t="An error occurred when activating web audio."),e.call(this,t,r)||this}return i(t,e),t.prototype.getCode=function(){return"HTML5_PLAYER.WEB_AUDIO_ACTIVATION_ERROR"},t}(r(2).errors.PlayerFatalError);t.WebAudioActivationError=o},function(e,t,r){var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.WebAudioInitializeError=void 0;var o=function(e){function t(t,r){return void 0===t&&(t="An error occurred when initializing web audio."),e.call(this,t,r)||this}return i(t,e),t.prototype.getCode=function(){return"HTML5_PLAYER.WEB_AUDIO_INITIALIZE_ERROR"},t}(r(2).errors.PlayerError);t.WebAudioInitializeError=o},function(e,t,r){var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.WebAudioInitializeNoChannelsError=void 0;var o=function(e){function t(t){return e.call(this,"Web audio found no channels.",t)||this}return i(t,e),t.prototype.getCode=function(){return"HTML5_PLAYER.WEB_AUDIO_INITIALIZE_NO_CHANNELS_ERROR"},t}(r(11).WebAudioInitializeError);t.WebAudioInitializeNoChannelsError=o},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.WebAudioContext=t.WEB_AUDIO_NO_OUTPUT_CHANNELS_ERROR=t.WEB_AUDIO_ACTIVATION_TIMEOUT_ERROR=t.WEB_AUDIO_ACTIVATION_TIMEOUT=void 0;var n=r(2),i=r(14),o=n.helpers.browser.getFirefoxVersion();t.WEB_AUDIO_ACTIVATION_TIMEOUT=5e3,t.WEB_AUDIO_ACTIVATION_TIMEOUT_ERROR=new Error("Web audio activation timed out."),t.WEB_AUDIO_NO_OUTPUT_CHANNELS_ERROR=new Error("Web audio found no output channels.");var a=null;function s(){return"AudioContext"in window&&(n.helpers.browser.isChrome()||o&&o.major>=48||n.helpers.browser.isEdge())}function l(){if(a)return a;if(!s())throw new Error("Web audio is not enabled.");var e=new window.AudioContext;if(!e.destination.maxChannelCount)throw t.WEB_AUDIO_NO_OUTPUT_CHANNELS_ERROR;return a={context:e,suspender:new i.WebAudioContextSuspender(e)}}var u=function(){function e(){}return e.prototype.getAudioContextWithSuspender=function(){return s()?l():null},e.prototype.activate=function(){if(!s())return n.helpers.Promise.resolve(void 0);try{var e=l().context;return(r=e).state&&r.resume&&"running"!==r.state?n.helpers.promiseWithTimeout(r.resume(),t.WEB_AUDIO_ACTIVATION_TIMEOUT,t.WEB_AUDIO_ACTIVATION_TIMEOUT_ERROR):n.helpers.Promise.resolve()}catch(e){return n.helpers.Promise.reject(e)}var r},e}();t.WebAudioContext=u},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.WebAudioContextSuspender=void 0;var r=function(){function e(e,t){void 0===t&&(t=2e4),this._audioContext=e,this._idleTime=t,this._players=[],this._prevPlayingCount=0,this._playingCount=0,this._timerId=null,this._suspendTimerId=null,this._suspendSupported="function"==typeof e.suspend}return e.prototype.watchPlayer=function(e){var t=this;!this._suspendSupported||e.isDead()||this._players.indexOf(e)>=0||(e.onChange.subscribe((function(r){var n=r.dead,i=r.playing;if(void 0!==i&&t._handleCountChange(i),n){var o=t._players.indexOf(e);o>=0&&(t._players.splice(o,1),!t._players.length&&t._suspendTimerId&&(window.clearInterval(t._suspendTimerId),t._suspendTimerId=null))}})),this._players.length||(this._suspendTimerId=window.setInterval((function(){0===t._playingCount&&null===t._timerId&&"suspended"!==t._audioContext.state&&t._scheduleSuspend(5e3)}),5e3)),this._players.push(e),e.isPlaying()&&this._handleCountChange(!0))},e.prototype._handleCountChange=function(e){e?this._playingCount++:this._playingCount--,this._playingCount!==this._prevPlayingCount&&(this._prevPlayingCount=this._playingCount,0===this._playingCount?this._scheduleSuspend(this._idleTime):1===this._playingCount&&this._abortSuspend())},e.prototype._scheduleSuspend=function(e){var t=this;this._timerId=window.setTimeout((function(){t._timerId=null,t._audioContext.suspend()}),e)},e.prototype._abortSuspend=function(){this._timerId&&(window.clearTimeout(this._timerId),this._timerId=null)},e}();t.WebAudioContextSuspender=r},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.buildMimeTypeFromFormat=void 0;var n=r(2);t.buildMimeTypeFromFormat=function(e,t){void 0===t&&(t={});var r=e.mimeType||t.mimeType;if(!r)return null;var i=e.audioCodec||t.audioCodec,o=e.videoCodec||t.videoCodec,a=n.helpers.compact([i,o]);return r+(a.length>0?'; codecs="'.concat(a.map((function(e){return e.id})).join(","),'"'):"")}},function(e,t,r){var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.HTML5Player=void 0;var o=r(2),a=r(1),s=r(15),l=o.helpers.Promise,u=function(e){function t(t,r){var n=e.call(this,r)||this;return n._descriptor=t,n._mimeType=t.format.mimeType||(0,s.buildMimeTypeFromFormat)(t.format,n._inferFormat(t.url)),n}return i(t,e),t.prototype._getUrlForMediaElement=function(){return this._descriptor.url},t.prototype._canPlay=function(){return this._mimeType&&this._canPlayType(this._mimeType)?l.resolve(!0):l.resolve(!1)},t}(a.HTML5PlayerBase);t.HTML5Player=u},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.errors=void 0;var n=r(6),i=r(5),o=r(7),a=r(11),s=r(12),l=r(10),u=r(9);!function(e){e.DecodeError=n.DecodeError,e.NetworkError=i.NetworkError,e.MediaElementError=o.MediaElementError,e.WebAudioInitializeError=a.WebAudioInitializeError,e.WebAudioInitializeNoChannelsError=s.WebAudioInitializeNoChannelsError,e.WebAudioActivationError=l.WebAudioActivationError,e.WebAudioActivationTimeoutError=u.WebAudioActivationTimeoutError}(t.errors||(t.errors={}))},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.helpers=void 0;var n=r(3),i=r(15);!function(e){!function(e){e.buildTimeRanges=n.buildTimeRanges}(e.timeRanges||(e.timeRanges={})),function(e){e.buildMimeTypeFromFormat=i.buildMimeTypeFromFormat}(e.mimeType||(e.mimeType={}))}(t.helpers||(t.helpers={}))}],r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var o=r[e]={exports:{}};return t[e].call(o.exports,o,o.exports,n),o.exports}var i={};return function(){var e=i;Object.defineProperty(e,"__esModule",{value:!0}),e.WebAudioContext=e.helpers=e.errors=e.HTML5Player=e.HTML5PlayerBase=e.buildNumber=e.version=void 0,e.version="30.2.3",e.buildNumber=2219;var t=n(1);Object.defineProperty(e,"HTML5PlayerBase",{enumerable:!0,get:function(){return t.HTML5PlayerBase}});var r=n(16);Object.defineProperty(e,"HTML5Player",{enumerable:!0,get:function(){return r.HTML5Player}});var o=n(17);Object.defineProperty(e,"errors",{enumerable:!0,get:function(){return o.errors}});var a=n(18);Object.defineProperty(e,"helpers",{enumerable:!0,get:function(){return a.helpers}});var s=n(13);Object.defineProperty(e,"WebAudioContext",{enumerable:!0,get:function(){return s.WebAudioContext}})}(),i}()},e.exports=n(r(106))},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(r(1266)),o=n(r(1267)),a=n(r(1268)),s=n(r(1269)),l=n(r(1270)),u=n(r(1271)),c=n(r(1272)),d=n(r(1273)),f=n(r(1274)),h=n(r(1275)),p=n(r(1276)),g=n(r(1277)),v={},m=new RegExp("\\[\\[\\[([a-zA-Z0-9_]+)\\]\\]\\]|\\[\\[([a-zA-Z0-9_]+)\\]\\]|(%d)","g"),y={de:s.default,en:l.default,en_GB:l.default,es:u.default,es_419:u.default,fr:c.default,it:d.default,nl:f.default,pl:h.default,pt_BR:p.default,sv:g.default},_=function(){var e={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},t=/[&<>"'`]/g,r=/[&<>"'`]/;function n(t){var r;return null!==(r=e[t])&&void 0!==r?r:"&"}return function(e){return e||0===e?(e=""+e,r.test(e)?e.replace(t,n):e):""}}(),b=function(){function e(e){this.phrases={},this.setLocale(null!=e?e:"en")}return e.prototype.getLocaleCookieName=function(){return"sclocale"},e.prototype.setLocale=function(e){this.locale=e&&y[e]?e:"en",this.createHelpers()},e.prototype.setPhrases=function(e){this.phrases=null!=e?e:{}},e.prototype.extend=function(e){!function(){for(var e,t,r=[],n=0;n0?(n=(e+n)%16|0,e=Math.floor(e/16)):(n=(t+n)%16|0,t=Math.floor(t/16)),("x"===r?n:7&n|8).toString(16)}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SDKType=void 0;var n,i={};t.SDKType={_get:function(e){var t;return(null!==(t=i[e])&&void 0!==t?t:"js-mono")+(null!=n?n:"")},_setClientType:function(e,t){i[e]=t},_setBindingType:function(e){n&&"-react"!==n||(n="-"+e)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigSession=t.SessionID=void 0;var n=r(434),i=r(147),o=r(246),a=r(573),s={};function l(e,t){return setTimeout((function(){var t=null===__STATSIG__||void 0===__STATSIG__?void 0:__STATSIG__.instance(e);t&&t.$emt({name:"session_expired"})}),t)}function u(e){return"statsig.session_id."+(0,n._getStorageKey)(e)}t.SessionID={get:function(e){return t.StatsigSession.get(e).data.sessionID}},t.StatsigSession={get:function(e){return null==s[e]&&(s[e]=function(e){var t=function(e){var t=u(e);return(0,o._getObjectFromStorage)(t)}(e),r=Date.now();t||(t={sessionID:(0,a.getUUID)(),startTime:r,lastUpdate:r});return{data:t,sdkKey:e}}(e)),function(e){var t=Date.now(),r=e.data;c=r,d=c.lastUpdate,(Date.now()-d>18e5||(n=r,s=n.startTime,Date.now()-s>144e5))&&(r.sessionID=(0,a.getUUID)(),r.startTime=t);var n,s;var c,d;r.lastUpdate=t,function(e,t){var r=u(t);try{(0,o._setObjectInStorage)(r,e)}catch(e){i.Log.warn("Failed to save SessionID")}}(r,e.sdkKey),clearTimeout(e.idleTimeoutID),clearTimeout(e.ageTimeoutID);var f=t-r.startTime,h=e.sdkKey;return e.idleTimeoutID=l(h,18e5),e.ageTimeoutID=l(h,144e5-f),e}(s[e])},overrideInitialSessionID:function(e,t){s[t]=function(e,t){var r=Date.now();return{data:{sessionID:e,startTime:r,lastUpdate:r},sdkKey:t}}(e,t)}}},function(e,t,r){var n;e.exports=r(30).extend(((n={resource_type:"audio_ad",submodelMap:{sound:r(29)}})[r(92).AudioAdVisualPlacements.companion]=null,n[r(92).AudioAdVisualPlacements.leaveBehind]=null,n.setup=function(){this.options.defaultSkipOffset=this.options.defaultSkipOffset||0,this[r(92).AudioAdVisualPlacements.companion]=this.createAdVisual(r(92).AudioAdVisualPlacements.companion),this[r(92).AudioAdVisualPlacements.leaveBehind]=this.createAdVisual(r(92).AudioAdVisualPlacements.leaveBehind)},n.createSubmodel=function(e,t){e===r(29)?this.createSoundSubmodel():r(30).prototype.createSubmodel.apply(this,arguments)},n.createSoundSubmodel=function(){var e=this.get("sound"),t=this.get("monetized_sound_urn");this.sound=new(r(29))(r(1).assign(e,{resource_id:{ad_target_id:this.resource_id}}),{checkpointInterval:3e3,ad_attributes:{audio_ad_urn:e.ad_urn,monetized_sound_urn:t},soundContext:{ad_target_id:this.resource_id}})},n.createAdVisual=function(e){var t=r(92).getPreferredAdVisualAttributes(this,e),n=t.attributes,i=t.format;return n?new(r(1368))(r(1).assign({},n,{ad_visual_format:i,ad_visual_placement:e})):null},n.getUrn=function(){var e;return null==(e=this.get("audio"))?void 0:e.ad_urn},n.getSound=function(){return this.sound},n.getAdvertiser=function(){var e;return null==(e=this.get("audio"))?void 0:e.advertiser},n.getUpcomingSoundUrn=function(){return this.get("monetized_sound_urn")},n.hasCompanion=function(){return!!this[r(92).AudioAdVisualPlacements.companion]},n.hasLeaveBehind=function(){return!!this[r(92).AudioAdVisualPlacements.leaveBehind]},n.getCompanion=function(){return this[r(92).AudioAdVisualPlacements.companion]},n.getLeaveBehind=function(){return this[r(92).AudioAdVisualPlacements.leaveBehind]},n.getRequiredListenPeriod=function(){if(!i.call(this))return 1/0;var e=this.get("audio");return r(1).has(e,"skip_offset")?e.skip_offset*r(43).MS_IN_SECOND:this.options.defaultSkipOffset},n.getTracking=function(){var e;return null==(e=this.get("audio"))?void 0:e.tracking},n.getProgressTrackers=function(){var e;return(null==(e=this.get("audio"))?void 0:e.progress_tracking)||[]},n.getErrorTrackers=function(){var e;return(null==(e=this.get("audio"))?void 0:e.error_trackers)||[]},n.isError=function(){return this.get("is_error")},n.isEmpty=function(){var e=this.get("audio");return this.isError()&&e&&e.isEmpty},n));function i(){var e=this.get("audio");return!!r(1).has(e,"skippable")&&!!e.skippable}},function(e,t){},function(e,t,r){function n(){return(n=Object.assign||function(e){for(var t=1;t=this.size)){var r=e/32|0,n=e%32;this._data[r]^=(!t-1^this._data[r])&1<this.size||e<0)){var r,i,o,a,l;if(this.size%32==0&&n.call(this),er;--l)this._data[l]<<=1,this._data[l-1]&1<<31&&(this._data[l]|=1);a=s(0,i-1,!1),this._data[r]=o<<1&a|o&~a}++this.size,this.set(e,t)}},remove:function(e){if(!(e>=this.size||e<0)){var t,r,n,o,a;if(e>>1&o|n&~o,a=t+1;a>>=1;--this.size%32==0&&i.call(this)}},applyAnd:function(e){for(var t=0;t=0&&Math.abs(o)<=t&&i!==r(229).EMPTY_TIMESTAMP}))||null},onCommentCreated:function(e){e.get("replyTo")||this.add(e,{at:0})}},{hashFn:function(e,t){return(null==t?void 0:t.sound_id)||null}})},,,function(e,t,r){e.exports=r(884).extend({model:r(45),defaults:{limit:2e3,maxModels:null},setup:function(e){var t=e.query,n=r(590).makeFilterGenerator(["username"]);this.makeFilter=function(e){return!e||e.length<1?function(){return!0}:n(e)},r(884).prototype.setup.apply(this,arguments),this.setQuery(t)},setupSource:function(){return new(r(446))}},{prefetch:function(){r(446).prefetch()}})},,,,,,,,function(e,t){var r=/^(?:0|[1-9]\d*)$/;function n(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var i,o,a=Object.prototype,s=a.hasOwnProperty,l=a.toString,u=a.propertyIsEnumerable,c=(i=Object.keys,o=Object,function(e){return i(o(e))}),d=Math.max,f=!u.call({valueOf:1},"valueOf");function h(e,t){var r=y(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&_(e)}(e)&&s.call(e,"callee")&&(!u.call(e,"callee")||"[object Arguments]"==l.call(e))}(e)?function(e,t){for(var r=-1,n=Array(e);++r-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991}(e.length)&&!function(e){var t=b(e)?l.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)}function b(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var C,E=(C=function(e,t){if(f||v(t)||_(t))!function(e,t,r,n){r||(r={});for(var i=-1,o=t.length;++i1?t[n-1]:void 0,o=n>2?t[2]:void 0;for(i=C.length>3&&"function"==typeof i?(n--,i):void 0,o&&function(e,t,r){if(!b(r))return!1;var n=typeof t;return!!("number"==n?_(r)&&g(t,r.length):"string"==n&&t in r)&&m(r[t],e)}(t[0],t[1],o)&&(i=n<3?void 0:i,n=1),e=Object(e);++r-1},isRepost:function(){return/[_-]repost$/.test(this.get("type"))},isLike:function(){return/[_-]like$/.test(this.get("type"))},isRegular:function(){return!this.isRepost()&&!this.isLike()&&!this.isSpotlight()},toggleSpotlight:function(e){this.isRepost()||this.isLike()||(void 0===e&&(e=!this.isSpotlight()),this.set("type",this.get("type").replace(e?/$/:/_spotlight$/,e?"_spotlight":"")))},getModelData:function(){return this.get("track")||this.get("playlist")}},{convert:function(e){var t=e instanceof r(29),i=e.toJSON();return new n({type:i.kind,created_at:i.created_at,track:t?i:null,playlist:t?null:i})}})},,,,,,,function(e,t,r){var n=Math.floor(1e8*Math.random());e.exports=r(54).extend(r(289),{model:r(29),audioSourceVersion:null,queryUrn:null,defaults:{resource_id:null},getSourceInfo:function(){return{type:"recommender",queryUrn:this.queryUrn,version:this.audioSourceVersion,resourceId:this.options.resource_id,resourceType:"sound"}},parse:function(e){var t=e.query_urn,r=e.collection,n=e.variant;return this.audioSourceVersion=n||"no_version",this.queryUrn=t,r},baseUrl:function(){var e=r(4).get("me").id||null;return this.getEndpointUrl("relatedSounds",{track_id:this.options.resource_id},{user_id:e,anon_user_id:e?null:n})}},{hashFn:function(e,t){return t.resource_id}})},,,function(e,t,r){e.exports=r(54).extend({model:r(671),defaults:{type:"web-profiles"},url:function(){return this.getEndpointUrl("userWebProfiles",{urn:r(32).generate("user",this.options.userId)})},parse:function(e){return e.forEach((function(e){var t=e.url,r=e.network,n=e.title;e.id=t+"_"+r+"_"+n})),e},getProfileByName:function(e){return this.find((function(t){return t.get("network")===e}))},getDirectSupportProfile:function(){return this.find(i)},getNonDirectSupportProfiles:function(){return this.models.filter((function(e){return!i(e)}))}},{hashFn:function(e,t){return t.userId}});var n=/^support(?:\:(\w+))?$/;function i(e){return n.test(e.get("network"))}},,,,,,function(e,t,r){"use strict";var n=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i-1&&e%1==0&&e<=9007199254740991}},,function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAAAY1BMVEXy8vLBwcG/v7+8vLy3t7fT09O+vr7Jycnx8fHq6urf39/FxcXm5ua9vb3v7+/n5+fDw8O6urq2tra7u7vU1NTKysrHx8fw8PDr6uvHxcf08vTg4ODZ2dna2trIxsjl4+Xl5eUe1bjWAAAAjElEQVR4Ae3RRw7CMBhE4RmX9F7pcP9TYlksSITzs0NC+Q7wNg+7/1NPbTvVEBVGK6VNAUlDr4EgKempBNsqvlQQ5PRySAZ6AyR3eg+IYjoxZBmdDLKUzuHb4lnMWWXoGGXTrS1j10f0or4bw3Os5httETCXXIhmfHZRXLoGN6/cQk+OK6E/pzX8zu4JANwHFQ6JddwAAAAASUVORK5CYII="},,function(e,t,r){"use strict";r.r(t);var n=r(30),i=r.n(n),o=r(410),a=r(345),s=(r(28),r(11)),l=r.n(s),u=i.a.extend(o.a.withOptions({query:"\n query ActiveCreatorSubscription {\n activeCreatorSubscription {\n planId\n pendingChange {\n planId\n }\n }\n }\n",mapResponseData:function(e){var t,r,n,i;return{planId:null!=(t=null==(r=e.activeCreatorSubscription)?void 0:r.planId)?t:null,pendingChange:null!=(n=null==(i=e.activeCreatorSubscription)?void 0:i.pendingChange)?n:null}}}),{cancel:function(e){var t=this,r=void 0===e?{}:e,n=r.onSuccess,i=r.onError;return a.callGraphQl({operationName:"DeleteWebSubPendingChange",query:"\n mutation DeleteWebSubPendingChange {\n deleteWebSubPendingChange {\n ... on DeleteWebSubPendingChangeSuccess {\n success\n }\n ... on DeleteWebSubPendingChangeError {\n errorCode\n }\n }\n }\n"}).then((function(){null==n||n(),l.a.trigger("subscription-cancel-downgrade:success",{plan:t.attributes.planId}),t.set({pendingChange:null})}),(function(){null==i||i(),l.a.trigger("subscription-cancel-downgrade:error",{plan:t.attributes.planId})}))}},{hashFn:function(){return 1}});t.default=u},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,r){var n,i,o;i=[t,r(1)],void 0===(o="function"==typeof(n=function(e,t){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r 0.");if(i<0)throw new Error("Cache size must be > 0.");this.onSegmentRequestQueued=this._onSegmentRequestQueued.getHandle(),this.onSegmentRequestStart=this._onSegmentRequestStart.getHandle(),this.onSegmentRetrieved=this._onSegmentRetrieved.getHandle(),this.onSegmentRequestFailed=this._onSegmentRequestFailed.getHandle(),this.onSegmentDataRetrieveStarted=this._onSegmentDataRetrieveStarted.getHandle(),this.onSegmentReady=this._onSegmentReady.getHandle(),this.onError=this._onError.getHandle(),this._playlist=t,this._transmuxer=o,this._getPosition=r,this._maxBufferLength=n,this._cacheSize=i,this._scheduleNextUpdate(0)}return e.prototype.updateMaxBufferLength=function(e){if(this._ensureNotDead(),e<0)throw new Error("Max buffer length must be > 0.");this._logger.debug("updateMaxBufferLength() called.",e),this._maxBufferLength=e,this.update()},e.prototype.updateCacheSize=function(e){if(this._ensureNotDead(),e<0)throw new Error("Cache size must be > 0.");this._cacheSize=e,this.update()},e.prototype.getCacheSize=function(){return this._cacheSize},e.prototype.getCacheUsage=function(){return this._segments.reduce((function(e,t){return t.state===n.RETRIEVING_DATA||t.state===n.COMPLETE?e+t.size:e}),0)},e.prototype.switchPlaylist=function(e){if(this._ensureNotDead(),e&&!e.hasInitialUpdateCompleted())throw new Error("Playlist retrieve has not completed.");this._logger.debug("switchPlaylist() called."),this._abortCurrentRetrieve(),this._playlist=e,this._segments=this._segments.filter((function(e){return e.state===n.COMPLETE})),this.update()},e.prototype.getSegmentsWithData=function(){return this._ensureNotDead(),this._segments.filter((function(e){return e.state===n.RETRIEVING_DATA&&e.size||e.state===n.COMPLETE})).map((function(e){return{segment:e.segment,dataRetrieveJob:e.dataRetrieveJob,complete:e.state===n.COMPLETE}}))},e.prototype.update=function(){var e=this;this._ensureNotDead(),this._timerId&&(window.clearTimeout(this._timerId),this._timerId=null);var t=this._getPosition(),r=t,i=0;this._segments.some((function(e){if(e.state!==n.COMPLETE)return!1;var o=e.segment.getTimeRange();return o.containsTime(i)&&(i=o.end),!(o.endr||(r=o.end,!1))}));var o,a=t+this._maxBufferLength;if(!((o=e._playlist)&&o.hasEnded()&&r===o.getDuration()?(r=i,o.getDuration()+i0&&t._onSegmentDataRetrieveStarted.dispatch({segment:e.segment,dataRetrieveJob:r,complete:!1})})),s.onCompletion((function(){if(t._retrievingSegment=null,f.state!==n.RETRIEVING_DATA)throw new Error("Incorrect retrieval state.");t._switchSegment(f,{state:n.COMPLETE,dataRetrieveJob:f.dataRetrieveJob,dataRetrieveJobHandle:f.dataRetrieveJobHandle,segment:e.segment,size:f.size}),t._logger.debug("Segment retrieve completed.",e.segment.getEventRepresentation()),t.update(),t._onSegmentReady.dispatch({segment:e.segment,complete:!0,dataRetrieveJob:f.dataRetrieveJob})})),s.onError((function(r){r!==h&&(t._logger.error("Error retrieving segment data.",r,e.segment.getEventRepresentation()),t._scheduleNextUpdate(),r instanceof o.OggParserError?r=r instanceof o.ChecksumFailedError?new a.OggParserError("CHECKSUM_FAILED"):r instanceof o.NoSegmentsInPageError?new a.OggParserError("NO_SEGMENTS_IN_PAGE"):r instanceof o.PageFromDifferentBitstreamError?new a.OggParserError("PAGE_FROM_DIFFERENT_BITSTREAM"):r instanceof o.PageSequenceNumberDidNotIncrementError?new a.OggParserError("SEQUENCE_NUMBER_DID_NOT_INCREMENT"):r instanceof o.UnexpectedBOSError?new a.OggParserError("UNEXPECTED_BOS"):r instanceof o.UnexpectedEOSError?new a.OggParserError("UNEXPECTED_EOS"):new a.OggParserError("UNKNOWN"):r instanceof u.Mp3TransmuxerError&&(r=r instanceof c.Mp3NoiseError?new l.Mp3TransmuxerRetrievalError("NOISE"):new l.Mp3TransmuxerRetrievalError("UNKNOWN")),t._onError.dispatch(r))}))}},e.prototype._retrieveSegment=function(e){var t=this,r=this._retrievingSegment,i=this._playlist,o=i?i.getSegmentIndexContainingTime(e):null;if(!r||r.state!==n.RETRIEVING_SEGMENT||r.segmentIndex!==o)if(this._abortCurrentRetrieve(),i)if(null===o)this._scheduleNextUpdate();else{var a=i.getSegment(o);this._logger.debug("Retrieving segment.",o),a.onCompletion((function(e){if(t._logger.debug("Retrieved segment.",o),!(0,s.isPartialMatch)(t._transmuxer.getInputFormat(),e.getFormat())){var r=new Error("Segment format is not supported by transmuxer.");return t._logger.error("Segment incorrect format.",r),t._scheduleNextUpdate(),void t._onError.dispatch(r)}e.onSegmentRequestQueued.subscribe(t._onSegmentRequestQueued.dispatch),e.onSegmentRequestStart.subscribe(t._onSegmentRequestStart.dispatch),e.onSegmentRetrieved.subscribe(t._onSegmentRetrieved.dispatch),e.onSegmentRequestFailed.subscribe(t._onSegmentRequestFailed.dispatch),t._segments.splice(t._segments.indexOf(l),1);var i=e.getTimeRange(),a=t._segments.length;t._segments.some((function(e,t){return e.state!==n.RETRIEVING_SEGMENT&&e.segment.getTimeRange().start>i.start&&(a=t,!0)})),t._segments.splice(a,0,{state:n.RETRIEVED_SEGMENT,segment:e}),t._retrievingSegment=null,t.update()})),a.onError((function(e){e!==h&&(t._logger.error("Error retrieving segment.",e),t._scheduleNextUpdate(),t._onError.dispatch(e))}));var l={state:n.RETRIEVING_SEGMENT,segmentIndex:o,segmentRetrieveJob:a};this._segments.push(l),this._retrievingSegment=l}else this._logger.debug("Cannot retrieve segment as there is no playlist."),this._scheduleNextUpdate()},e.prototype._abortCurrentRetrieve=function(){var e=this._retrievingSegment;e&&(e.state===n.RETRIEVING_SEGMENT?(this._logger.debug("Aborting segment retrieve job."),e.segmentRetrieveJob.abort()):e.state===n.RETRIEVING_DATA&&(this._logger.debug("Aborting segment data retrieve job."),e.dataRetrieveJobHandle.abort(),this._switchSegment(e,{state:n.RETRIEVED_SEGMENT,segment:e.segment})),this._retrievingSegment=null)},e.prototype._switchSegment=function(e,t){var r=this._segments.indexOf(e);if(-1===r)throw new Error("Old segment missing.");this._segments.splice(r,1,t)},e.prototype._garbageCollect=function(e){var t=this._segments,r=this._cacheSize,i=this.getCacheUsage();if(!(i<=r)){var o=this._playlist,a=o&&o.getCompleteDuration(),s=null!==a?a:1/0,l=e+this._maxBufferLength;l>s&&(l-=s)>=e||t.filter((function(t){return t.state===n.COMPLETE&&!function(e,t,r){var n=e.getTimeRange();return r!==t&&(r>t?n.end>t&&n.startt||n.startn+r)throw new Error("Invalid range of segments.");for(var i=[],o=e;o=400&&e<500)}:S,O=this;this._onSegmentRequestQueued=new u,this._onSegmentRequestStart=new u,this._onSegmentRetrieved=new u,this._onSegmentRequestFailed=new u,this.onSegmentRequestQueued=this._onSegmentRequestQueued.getHandle(),this.onSegmentRequestStart=this._onSegmentRequestStart.getHandle(),this.onSegmentRetrieved=this._onSegmentRetrieved.getHandle(),this.onSegmentRequestFailed=this._onSegmentRequestFailed.getHandle(),this._sequenceNumber=r,this._playlist=d,this._timeRange=f,this._format=g;var k=this._segmentEventRepresentation=new i.Segment(m,t,r),T=(0,a.getSegmentDownloadJob)({delayCalculator:C,segmentEventRepresentation:k,url:t,loader:v,onSegmentRequestQueued:this._onSegmentRequestQueued,onSegmentRequestStart:this._onSegmentRequestStart,onSegmentRequestFailed:this._onSegmentRequestFailed,onSegmentRetrieved:this._onSegmentRetrieved,isResponseCodeAcceptable:A,isResponseCodeRetryable:w,logger:_}),L=(0,s.getSegmentDownloadAndDecryptJob)({encryptionConfig:h,downloadAbortableJob:T,logger:_});this._retrieveAbortableJob=new l((function(){var e=o.SegmentParserFactory.retrieveSegmentParser(O._format),t=new u,r=n.helpers.deferred.buildDeferred(),i=e.parseSegmentData(n.helpers.abortableJob.map((function(){return L.run()}),{convertProgressUpdate:function(e,t){return t&&p?n.helpers.arrayBuffer.combine([p,e]):e},convertResult:function(e){return e}}).run(),O,O._playlist);return i.onProgressUpdate(t.dispatch,{skipPast:!0}),i.onCompletion((function(){return r.resolve(void 0)})),i.onError(r.reject),{result:r.promise,progressUpdates:{onProgressUpdate:t,getProgressSoFar:i.getProgressSoFar},abort:i.abort}}))}return e.prototype.getFormat=function(){return this._format},e.prototype.getSequenceNumber=function(){return this._sequenceNumber},e.prototype.isFinalSegment=function(){var e=this._playlist;return e.hasEnded()&&e.getFirstSegmentIndex()+e.getSegmentCount()-1===this._sequenceNumber},e.prototype.getTimeRange=function(){return this._timeRange},e.prototype.getEventRepresentation=function(){return this._segmentEventRepresentation},e.prototype.retrieveData=function(){var e=this;return new l((function(){var t,r=n.helpers.deferred.buildDeferred(),i=new u,o=[],a=e._retrieveAbortableJob.run();return a.onProgressUpdate((function(e){var r=e.data,n=e.initData;o.length||(t=n),o.push(r),i.dispatch({data:r,initData:t})})),a.onCompletion((function(){r.resolve(void 0)})),a.onError(r.reject),{result:r.promise,progressUpdates:{onProgressUpdate:i,getProgressSoFar:function(){return o.length?{initData:t,data:n.helpers.arrayBuffer.combine(o)}:null}},abort:function(){return a.abort()}}})).run()},e}();t.Segment=d},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Segment=void 0;var r=function(){function e(e,t,r){this._playlist=e,this._url=t,this._sequenceNumber=r}return e.prototype.getPlaylist=function(){return this._playlist},e.prototype.getUrl=function(){return this._url},e.prototype.getSequenceNumber=function(){return this._sequenceNumber},e}();t.Segment=r},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentParserFactory=void 0;var n=r(2),i=r(6),o=r(14),a=n.helpers.find;t.SegmentParserFactory={retrieveSegmentParser:function(e){var t=a(o.default,(function(t){return(0,i.isPartialMatch)(t.getFormat(),e)}));if(!t)throw new Error("No segment parser found.");return t}}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=r(15),i=r(16),o=[n.OggOpusSegmentParser,i.DefaultSegmentParser];t.default=o},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.OggOpusSegmentParser=void 0;var n=r(2),i=r(3),o=n.helpers.abortableJob.AbortableJob,a=n.helpers.arrayBuffer.combine,s=new n.helpers.SCWeakMap;t.OggOpusSegmentParser={getFormat:function(){return{mimeType:"audio/ogg",audioCodec:{id:"opus"}}},parseSegmentData:function(e,r,l){return new o((function(){var o=n.helpers.deferred.buildDeferred(),u=new n.eventDispatcher.EventDispatcher,c=[],d=null,f=null,h=null,p=function(t){o.reject(t),e.abort()},g=function(e){s.set(l,e),u.dispatch({initData:e,data:a(c)})};return e.onProgressUpdate((function(e){if(d&&"PRESENT"===d.state&&d.initDataEnded)c.push(e),u.dispatch({initData:d.initData,data:e});else if(d&&"NOT_PRESENT"===d.state)c.push(e);else{c.push(e);var o=a(c);if(d=function(e){var t=(0,i.retrievePages)(e).pages;if(t.length){var r=(0,i.retrievePackets)([t[0]])[0];if(r&&r.first){var n=1,o=t.slice(1).some((function(e,t){var r=!!(1&e.header.type[0]);return t>0&&!r||(n=t+2,!1)}));return{state:"PRESENT",initData:a(t.slice(0,n).map((function(e){return e.entirePage}))),initDataEnded:o}}return{state:"NOT_PRESENT"}}return null}(o))if("NOT_PRESENT"===d.state){var v=s.get(l);r.getSequenceNumber()<=l.getFirstSegmentIndex()?p(new Error("Could not find init data.")):v?g((d={state:"PRESENT",initData:v,initDataEnded:!0}).initData):((f=l.getSegment(l.getFirstSegmentIndex())).onCompletion((function(e){var r=h=t.OggOpusSegmentParser.parseSegmentData(n.helpers.abortableJob.map((function(){return e.retrieveData()}),{convertProgressUpdate:function(e){return e.initData?n.helpers.arrayBuffer.combine([e.initData,e.data]):e.data},convertResult:function(e){return e}}).run(),e,l);r.onProgressUpdate((function(e){var t=e.initData;if(r.abort(),!t){var n=new Error("OggOpusSegmentParser should always provide init data.");throw p(n),n}d={state:"PRESENT",initData:t,initDataEnded:!0},g(t)})),r.onError((function(e){e!==n.helpers.abortableJob.abortedError&&p(e)}))})),f.onError(p))}else if("PRESENT"===d.state&&d.initDataEnded){if(c.splice(0),o.byteLength>d.initData.byteLength){var m=new Uint8Array(o.buffer.slice(d.initData.byteLength));c.push(m)}g(d.initData)}}})),e.onCompletion((function(e){d&&"PRESENT"===d.state&&!d.initDataEnded?(g(d.initData),o.resolve(e)):d&&"PRESENT"===d.state?o.resolve(e):o.reject(new Error("Could not find init data."))})),e.onError(p),{result:o.promise,progressUpdates:{onProgressUpdate:u,getProgressSoFar:function(){return d&&"PRESENT"===d.state&&d.initDataEnded?{initData:d.initData,data:a(c)}:null}},abort:function(){e.abort(),f&&f.abort(),h&&h.abort()}}})).run()}}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultSegmentParser=void 0;var n=r(2);t.DefaultSegmentParser={getFormat:function(){return{}},parseSegmentData:function(e){return n.helpers.abortableJob.map((function(){return e}),{convertProgressUpdate:function(e){return{data:e}},convertResult:function(e){return e}}).run()}}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getSegmentDownloadJob=void 0;var n=r(2),i=r(18);t.getSegmentDownloadJob=function(e){var t=e.delayCalculator,r=e.segmentEventRepresentation,o=e.url,a=e.loader,s=e.onSegmentRequestQueued,l=e.onSegmentRequestStart,u=e.onSegmentRequestFailed,c=e.onSegmentRetrieved,d=e.isResponseCodeAcceptable,f=e.isResponseCodeRetryable,h=e.logger;return new n.helpers.abortableJob.AbortableJob((function(){var e=n.helpers.deferred.buildDeferred(),p=new n.eventDispatcher.EventDispatcher,g=[],v=0,m=n.helpers.retry.retry(t,(function(t){var m=t.scheduleRetry,y=!1,_=0;s.dispatch({segment:r}),h.debug("Requesting segment.",o);var b=a.request({url:o});b.onRequestStart((function(){return l.dispatch({segment:r})}));var C=function(e){var t=e.byteLength;if(t)if((_+=t)<=v)h.debug("Already downloaded this part. Skipping...",_,v);else{var r=new Uint8Array(e,t-(_-v));v=_,g.push(r),p.dispatch(r)}};return b.onProgress((function(t){var n=t.initial,a=t.statusCode,s=t.part;if(n)if(d(a))h.debug("Segment response started.",o,a),C(s);else{var l=null;f(a)?h.debug("Segment response code was not acceptable. Will retry.",o,a):(h.debug("Segment response code was not acceptable.",o,a),l=new i.UnacceptableResponseStatusCodeError(a)),b.abort(),u.dispatch({segment:r,statusCode:a}),l?e.reject(l):(y=!0,m())}else h.debug("Got segment response part.",o,a),C(s)})),b.onResponseReceived((function(t){y||(t?(c.dispatch({segment:r,statusCode:t.statusCode}),e.resolve(void 0)):(h.warn("Segment request timed out.",o),u.dispatch({segment:r,statusCode:null}),m()))})),b.onError((function(t){y||t!==n.helpers.abortableJob.abortedError&&(t instanceof n.loaderErrors.LoaderError?(h.warn("Error from loader. Will retry",o,t),m()):(h.error("Unexpected error when requesting segment.",t),e.reject(t)))})),{onCancel:function(){h.debug("Aborting segment request.",o),b.hasCompleted()||b.abort(),u.dispatch({segment:r,aborted:!0})}}}),{onNoMoreRetries:function(){return e.reject(new Error("No more retries for requesting segment."))}}).cancel;return{result:e.promise,progressUpdates:{onProgressUpdate:p,getProgressSoFar:function(){return g.length?n.helpers.arrayBuffer.combine(g):null}},abort:function(){return m()}}}))}},function(e,t,r){var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.UnacceptableResponseStatusCodeError=void 0;var o=function(e){function t(t){var r=e.call(this)||this;return r._statusCode=t,r}return i(t,e),t.prototype.getStatusCode=function(){return this._statusCode},t.prototype.getCode=function(){return"UNACCEPTABLE_RESPONSE_STATUS_CODE"},t}(r(5).RetrievalError);t.UnacceptableResponseStatusCodeError=o},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getSegmentDownloadAndDecryptJob=void 0;var n=r(2),i=r(20),o=r(24);t.getSegmentDownloadAndDecryptJob=function(e){var t=e.encryptionConfig,r=e.downloadAbortableJob,a=e.logger;return new n.helpers.abortableJob.AbortableJob((function(){var e=new n.eventDispatcher.EventDispatcher,s=n.helpers.deferred.buildDeferred(),l=null;if(t&&(a.info("Finding a decryptor..."),!(l=i.DecryptorFactory.retrieveDecryptor(t))))return a.error("Could not find a decryptor."),s.reject(new o.NoDecryptorError),{result:s.promise,progressUpdates:{onProgressUpdate:e,getProgressSoFar:function(){return null}}};var u=r.run(),c=null,d=[];return t&&l?((c=l.decrypt(u,t)).onProgressUpdate((function(t){d.push(t),e.dispatch(t)})),c.onError((function(e){e!==n.helpers.abortableJob.abortedError&&a.error("Error occurred during decryption.",e),s.reject(e),u.abort()}))):u.onProgressUpdate((function(t){d.push(t),e.dispatch(t)})),u.onCompletion((function(){var e=function(){return s.resolve(void 0)};c?c.whenComplete().then((function(){return e()})):e()})),u.onError(s.reject),{result:s.promise,progressUpdates:{onProgressUpdate:e,getProgressSoFar:function(){return d.length?n.helpers.arrayBuffer.combine(d):null}},abort:function(){u.abort(),c&&c.abort()}}}))}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.DecryptorFactory=void 0;var n=r(2),i=r(21),o=n.helpers.find;t.DecryptorFactory={retrieveDecryptor:function(e){return o(i.default,(function(t){return t.canDecrypt(e)}))||null}}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=[r(22).JSCrypto];t.default=n},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.JSCrypto=void 0;var n=r(2),i=r(23),o=null;t.JSCrypto={canDecrypt:function(e){return"AES-CBC"===e.cipher},decrypt:function(e,t){o||(o=new i.AESDecryptor);var r=o;return new n.helpers.abortableJob.AbortableJob((function(){var o,a=new n.eventDispatcher.EventDispatcher,s=n.helpers.deferred.buildDeferred(),l=[],u=null,c=[],d=0,f=new Uint8Array(t.iv),h=!1;return r.expandKey(t.key.buffer),e.onProgressUpdate((function(e){h||(n.helpers.arrayBuffer.forEach(e,(function(e){h||(d||(o=new Uint8Array(16)),o[d++]=e,16===d&&(c.push(o),d=0))})),c.length&&(function(e){var t=u;u=new Uint8Array(r.decrypt(e.buffer,0,f.buffer,!1));var n=e.byteLength-16;if(n<0)throw new Error("lastBlockOffset invalid.");for(var i=0;i<16;i++)f[i]=e[n+i];t&&(l.push(t),a.dispatch(t))}(n.helpers.arrayBuffer.combine(c)),c=[]))})),e.onCompletion((function(e){if(!h)if(d)s.reject(new Error("Reached end part way through block."));else{if(u){var t=new Uint8Array((0,i.removePadding)(u.buffer));l.push(t),a.dispatch(t)}s.resolve(e)}})),e.onError(s.reject),{result:s.promise,abort:function(){h=!0,e.abort()},progressUpdates:{onProgressUpdate:a,getProgressSoFar:function(){return n.helpers.arrayBuffer.combine(l)}}}})).run()}}},function(e,t,r){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var r=0;r>>8^255&v^99,e[h]=v,t[v]=h;var m=f[h],y=f[m],_=f[y],b=257*f[v]^16843008*v;n[h]=b<<24|b>>>8,i[h]=b<<16|b>>>16,o[h]=b<<8|b>>>24,a[h]=b,b=16843009*_^65537*y^257*m^16843008*h,l[v]=b<<24|b>>>8,u[v]=b<<16|b>>>16,c[v]=b<<8|b>>>24,d[v]=b,h?(h=m^f[f[f[_^m]]],p^=f[f[p]]):h=p=1}}},{key:"expandKey",value:function(e){for(var t=this.uint8ArrayToUint32Array_(e),r=!0,n=0;n>8|e>>>24}},{key:"decrypt",value:function(e,t,r,n){for(var i,o,s,l,u,c,d,f,h,p,g,v,m,y,_=this.keySize+6,b=this.invKeySchedule,C=this.invSBox,E=this.invSubMix,A=E[0],S=E[1],w=E[2],O=E[3],k=this.uint8ArrayToUint32Array_(r),T=k[0],L=k[1],P=k[2],M=k[3],x=new Int32Array(e),D=new Int32Array(x.length),R=this.networkToHostOrderSwap;t>>24]^S[c>>16&255]^w[d>>8&255]^O[255&f]^b[m],o=A[c>>>24]^S[d>>16&255]^w[f>>8&255]^O[255&u]^b[m+1],s=A[d>>>24]^S[f>>16&255]^w[u>>8&255]^O[255&c]^b[m+2],l=A[f>>>24]^S[u>>16&255]^w[c>>8&255]^O[255&d]^b[m+3],u=i,c=o,d=s,f=l,m+=4;i=C[u>>>24]<<24^C[c>>16&255]<<16^C[d>>8&255]<<8^C[255&f]^b[m],o=C[c>>>24]<<24^C[d>>16&255]<<16^C[f>>8&255]<<8^C[255&u]^b[m+1],s=C[d>>>24]<<24^C[f>>16&255]<<16^C[u>>8&255]<<8^C[255&c]^b[m+2],l=C[f>>>24]<<24^C[u>>16&255]<<16^C[c>>8&255]<<8^C[255&d]^b[m+3],m+=3,D[t]=R(i^T),D[t+1]=R(l^L),D[t+2]=R(s^P),D[t+3]=R(o^M),T=h,L=p,P=g,M=v,t+=4}return n?a(D.buffer):D.buffer}},{key:"destroy",value:function(){this.key=void 0,this.keySize=void 0,this.ksRows=void 0,this.sBox=void 0,this.invSBox=void 0,this.subMix=void 0,this.invSubMix=void 0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.rcon=void 0}}])}(),l=s},function(e,t,r){var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.NoDecryptorError=void 0;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.getCode=function(){return"NO_DECRYPTOR"},t}(r(5).RetrievalError);t.NoDecryptorError=o},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.TransmuxerFactory=void 0;var n=r(6),i=r(26);t.TransmuxerFactory={retrieveTransmuxers:function(e,t){return i.default.filter((function(r){var i=r.getInputFormat(),o=r.getOutputFormat();return(!e||(0,n.isPartialMatch)(i,e))&&(!t||(0,n.isPartialMatch)(o,t))}))},retrieveTransmuxer:function(e,r){return t.TransmuxerFactory.retrieveTransmuxers(e,r)[0]||null}}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=r(27),i=r(28),o=r(31),a=r(33),s=r(35),l=[i.MP3ToMP3,s.MP4ToMP4,n.PassThrough,o.MP3ToMP4,a.OggOpusToWebm];t.default=l},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.PassThrough=void 0,t.PassThrough={getInputFormat:function(){return{}},getOutputFormat:function(){return{}},transmux:function(e){return e}}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.MP3ToMP3=void 0;var n=r(2),i=r(29),o=r(9),a=r(30);t.MP3ToMP3={getInputFormat:function(){return{mimeType:"audio/mpeg"}},getOutputFormat:function(){return{mimeType:"audio/mpeg"}},transmux:function(e){return new n.helpers.abortableJob.AbortableJob((function(){var t=n.helpers.deferred.buildDeferred(),r=new n.eventDispatcher.EventDispatcher,s=[],l=[],u=!1,c=!1,d=new i.MP3Parser;function f(){d.close()}function h(r){c=!0;try{f()}catch(r){}t.reject(r),e.abort()}return d.onNoise=function(e){c||(0,a.isID3Tag)(e)||h(new o.Mp3NoiseError)},d.onFrame=function(e){if(!c)try{l.push(e)}catch(e){h(e)}},e.onProgressUpdate((function(e){var t=e.data;!u&&e.initData&&(t=n.helpers.arrayBuffer.combine([e.initData,e.data])),u=!0;try{if(d.push(t),l.length){var i=n.helpers.arrayBuffer.combine(l);s.push(i),l.splice(0),r.dispatch({data:i})}}catch(e){h(e)}})),e.onCompletion((function(e){try{f(),t.resolve(e)}catch(e){h(e)}})),e.onError(h),{result:t.promise,progressUpdates:{onProgressUpdate:r,getProgressSoFar:function(){return s.length?{data:n.helpers.arrayBuffer.combine(s)}:null}},abort:function(){c=!0,e.abort(),f()}}})).run()}}},function(e,t,r){r.r(t),r.d(t,{MP3Parser:function(){return o}});var n=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],i=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3];function o(){this.buffer=null,this.bufferSize=0}o.prototype.push=function(e){var t;if(this.bufferSize>0){var r=e.length+this.bufferSize;if(!this.buffer||this.buffer.length0&&n.set(this.buffer.subarray(0,this.bufferSize)),this.buffer=n}this.buffer.set(e,this.bufferSize),this.bufferSize=r,e=this.buffer,t=r}else t=e.length;for(var i,o=0;o0;)o+=i;var a=t-o;a>0&&(!this.buffer||this.buffer.lengthr)return-1;if(255===e[t]||224==(224&e[t+1])){if(t+24>r)return-1;var o=e[t+1]>>3&3,a=e[t+1]>>1&3,s=e[t+2]>>4&15,l=e[t+2]>>2&3,u=!!(2&e[t+2]);if(1!==o&&0!==s&&15!==s&&3!==l){var c=1e3*n[14*(3===o?3-a:3===a?3:4)+s-1],d=i[3*(3===o?0:2===o?1:2)+l],f=u?1:0,h=3===a?(3===o?12:6)*c/d+f<<2:(3===o?144:72)*c/d+f|0;return t+h>r?-1:(this.onFrame&&this.onFrame(new Uint8Array(e.subarray(t,t+h))),h)}}for(var p=t+2;p0&&this.onNoise&&this.onNoise(new Uint8Array(this.buffer.subarray(0,this.bufferSize))),this.buffer=null,this.bufferSize=0,this.onClose&&this.onClose()}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isID3Tag=void 0,t.isID3Tag=function(e){return e.byteLength>=3&&73===e[0]&&68===e[1]&&51===e[2]}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.MP3ToMP4=void 0;var n=r(2),i=r(29),o=r(32),a=r(9),s=r(30),l=44100,u=3,c=l;t.MP3ToMP4={getInputFormat:function(){return{mimeType:"audio/mpeg"}},getOutputFormat:function(){return{mimeType:"audio/mp4",audioCodec:{id:"mp3"}}},transmux:function(e){return new n.helpers.abortableJob.AbortableJob((function(){var t=n.helpers.deferred.buildDeferred(),r=new n.eventDispatcher.EventDispatcher,d=[],f=!1,h=null,p=!1,g=new i.MP3Parser,v=new o.MP4Mux({audioTrackId:0,videoTrackId:-1,tracks:[{codecId:2,channels:2,samplerate:l,samplesize:16,timescale:c}]});function m(){g.close(),v.flush()}function y(r){p=!0;try{m()}catch(r){}t.reject(r),e.abort()}return v.ondata=function(e){p||(h?(d.push(e),r.dispatch({initData:h,data:e})):h=e)},g.onNoise=function(e){p||(0,s.isID3Tag)(e)||y(new a.Mp3NoiseError)},g.onFrame=function(e){if(!p)try{var t=new Uint8Array(e.length+1),r=32;r|=u<<2,r|=2,r|=1,t[0]=r,t.set(e,1),v.pushPacket(8,t,0)}catch(e){y(e)}},e.onProgressUpdate((function(e){var t=e.data;!f&&e.initData&&(t=n.helpers.arrayBuffer.combine([e.initData,e.data])),f=!0;try{g.push(t)}catch(e){y(e)}})),e.onCompletion((function(e){try{m(),t.resolve(e)}catch(e){y(e)}})),e.onError(y),{result:t.promise,progressUpdates:{onProgressUpdate:r,getProgressSoFar:function(){return d.length?{initData:h,data:n.helpers.arrayBuffer.combine(d)}:null}},abort:function(){p=!0,e.abort(),m()}}})).run()}}},function(e,t,r){r.r(t),r.d(t,{MP4Mux:function(){return a}});var n,i,o=function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);function n(){this.constructor=e}e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)};!function(e){!function(e){e.utf8decode=function(e){for(var t=new Uint8Array(4*e.length),r=0,n=0,i=e.length;n>>24&3,t[r++]=128|o>>>18&63,t[r++]=128|o>>>12&63,t[r++]=128|o>>>6&63,t[r++]=128|63&o):0!=(4294901760&o)?(t[r++]=240|o>>>18&7,t[r++]=128|o>>>12&63,t[r++]=128|o>>>6&63,t[r++]=128|63&o):0!=(4294965248&o)?(t[r++]=224|o>>>12&15,t[r++]=128|o>>>6&63,t[r++]=128|63&o):(t[r++]=192|o>>>6&31,t[r++]=128|63&o)}}return t.subarray(0,r)},e.utf8encode=function(e){for(var t=0,r="";t>1|128))===i)break;i=i>>1|128,--o}while(o>=0);if(o<=0)throw new Error("Invalid UTF8 character");for(var a=n&(1<=o;--s){var l=e[t++];if(128!=(192&l))throw new Error("Invalid UTF8 character sequence");a=a<<6|63&l}r+=a>=65536?String.fromCharCode(a-65536>>10&1023|55296,1023&a|56320):String.fromCharCode(a)}}return r}}(e.StringUtilities||(e.StringUtilities={}))}(i||(i={})),function(e){!function(e){function t(e){for(var t=e.length>>1,r=new Uint8Array(t),n=0;n>4,u=s>>2&3,c=2&s?16:8,d=1&s?2:1;switch(o++,l){case 10:a=e[o++],t=1024;break;case 2:var f=e[o+1]>>3&3,h=e[o+1]>>1&3;t=1===h?3===f?1152:576:3===h?384:1152}return{codecDescription:i[l],codecId:l,data:e.subarray(o),rate:n[u],size:c,channels:d,samples:t,packetType:a}}(t);if(!u||u.trackInfo.codecId!==c.codecId)throw new Error("Unexpected audio packet codec: "+c.codecDescription);switch(c.codecId){default:throw new Error("Unsupported audio codec: "+c.codecDescription);case 2:break;case 10:if(c.packetType===r.HEADER)return void u.initializationData.push(c.data)}this.cachedPackets.push({packet:c,timestamp:o,trackId:u.trackId});break;case 9:var d=this.videoTrackState,f=function(e){var t=0,r=e[t]>>4,n=15&e[t];t++;var i={frameType:r,codecId:n,codecDescription:l[n]};switch(n){case 7:var o=e[t++];i.packetType=o,i.compositionTime=(e[t]<<24|e[t+1]<<16|e[t+2]<<8)>>8,t+=3;break;case 4:i.packetType=a.NALU,i.horizontalOffset=e[t]>>4&15,i.verticalOffset=15&e[t],i.compositionTime=0,t++}return i.data=e.subarray(t),i}(t);if(!d||d.trackInfo.codecId!==f.codecId)throw new Error("Unexpected video packet codec: "+f.codecDescription);switch(f.codecId){default:throw new Error("unsupported video codec: "+f.codecDescription);case 4:break;case 7:if(f.packetType===a.HEADER)return void d.initializationData.push(f.data)}this.cachedPackets.push({packet:f,timestamp:o,trackId:d.trackId});break;default:throw new Error("unknown packet type: "+e)}this.state===s.NEED_HEADER_DATA&&this._tryGenerateHeader(),this.cachedPackets.length>=50&&this.state===s.MAIN_PACKETS&&this._chunk()},u.prototype.flush=function(){this.cachedPackets.length>0&&this._chunk()},u.prototype._checkIfNeedHeaderData=function(){this.trackStates.some((function(e){return 10===e.trackInfo.codecId||7===e.trackInfo.codecId}))?this.state=s.NEED_HEADER_DATA:this.state=s.CAN_GENERATE_HEADER},u.prototype._tryGenerateHeader=function(){if(this.trackStates.every((function(e){switch(e.trackInfo.codecId){case 10:case 7:return e.initializationData.length>0;default:return!0}}))){for(var r=["isom"],n=[],i=0;i>3;l.mimeTypeCodec="mp4a.40."+f;break;case 2:o=new e.Iso.AudioSampleEntry(".mp3",1,u.channels,u.samplesize,u.samplerate),l.mimeTypeCodec="mp3";break;case 7:var h=l.initializationData[0];(o=new e.Iso.VideoSampleEntry("avc1",1,u.width,u.height)).otherBoxes=[new e.Iso.RawTag("avcC",h)];var p=h[1]<<16|h[2]<<8|h[3];l.mimeTypeCodec="avc1."+(16777216|p).toString(16).substr(1),r.push("iso2","avc1","mp41");break;case 4:(o=new e.Iso.VideoSampleEntry("VP6F",1,u.width,u.height)).otherBoxes=[new e.Iso.RawTag("glbl",t("00"))],l.mimeTypeCodec="avc1.42001E";break;default:throw new Error("not supported track type")}var g=e.Iso.TrackHeaderFlags.TRACK_ENABLED|e.Iso.TrackHeaderFlags.TRACK_IN_MOVIE;l===this.audioTrackState?a=new e.Iso.TrackBox(new e.Iso.TrackHeaderBox(g,l.trackId,-1,0,0,1,i),new e.Iso.MediaBox(new e.Iso.MediaHeaderBox(u.timescale,-1,u.language),new e.Iso.HandlerBox("soun","SoundHandler"),new e.Iso.MediaInformationBox(new e.Iso.SoundMediaHeaderBox,new e.Iso.DataInformationBox(new e.Iso.DataReferenceBox([new e.Iso.DataEntryUrlBox(e.Iso.SELF_CONTAINED_DATA_REFERENCE_FLAG)])),new e.Iso.SampleTableBox(new e.Iso.SampleDescriptionBox([o]),new e.Iso.RawTag("stts",t("0000000000000000")),new e.Iso.RawTag("stsc",t("0000000000000000")),new e.Iso.RawTag("stsz",t("000000000000000000000000")),new e.Iso.RawTag("stco",t("0000000000000000")))))):l===this.videoTrackState&&(a=new e.Iso.TrackBox(new e.Iso.TrackHeaderBox(g,l.trackId,-1,u.width,u.height,0,i),new e.Iso.MediaBox(new e.Iso.MediaHeaderBox(u.timescale,-1,u.language),new e.Iso.HandlerBox("vide","VideoHandler"),new e.Iso.MediaInformationBox(new e.Iso.VideoMediaHeaderBox,new e.Iso.DataInformationBox(new e.Iso.DataReferenceBox([new e.Iso.DataEntryUrlBox(e.Iso.SELF_CONTAINED_DATA_REFERENCE_FLAG)])),new e.Iso.SampleTableBox(new e.Iso.SampleDescriptionBox([o]),new e.Iso.RawTag("stts",t("0000000000000000")),new e.Iso.RawTag("stsc",t("0000000000000000")),new e.Iso.RawTag("stsz",t("000000000000000000000000")),new e.Iso.RawTag("stco",t("0000000000000000"))))))),n.push(a)}var v=new e.Iso.MovieExtendsBox(null,[new e.Iso.TrackExtendsBox(1,1,0,0,0),new e.Iso.TrackExtendsBox(2,1,0,0,0)],null),m=new e.Iso.BoxContainerBox("udat",[new e.Iso.MetaBox(new e.Iso.RawTag("hdlr",t("00000000000000006D6469726170706C000000000000000000")),[new e.Iso.RawTag("ilst",t("00000025A9746F6F0000001D6461746100000001000000004C61766635342E36332E313034"))])]),y=new e.Iso.MovieHeaderBox(1e3,0,this.trackStates.length+1),_=new e.Iso.MovieBox(y,n,v,m),b=new e.Iso.FileTypeBox("isom",512,r),C=b.layout(0),E=_.layout(C),A=new Uint8Array(C+E);b.write(A),_.write(A),this.oncodecinfo(this.trackStates.map((function(e){return e.mimeTypeCodec}))),this.ondata(A),this.filePos+=A.length,this.state=s.MAIN_PACKETS}},u.prototype._chunk=function(){var t=this.cachedPackets;if(this.videoTrackState){for(var r=t.length-1,n=this.videoTrackState.trackId;r>0&&(t[r].trackId!==n||t[r].packet.frameType!==o.KEY);)r--;r>0&&(t=t.slice(0,r))}if(0!==t.length){for(var i=[],a=0,s=[],l=[],u=0;u=0&&t.push({tracks:[e.tracks[e.audioTrackId]],duration:e.duration,audioTrackId:0,videoTrackId:-1}),e.videoTrackId>=0&&t.push({tracks:[e.tracks[e.videoTrackId]],duration:e.duration,audioTrackId:-1,videoTrackId:0}),t}}(e.MP4||(e.MP4={}))}(n||(n={})),function(e){!function(e){!function(e){var t=i.StringUtilities.utf8decode,r=-20828448e5,n=[1,0,0,0,1,0,0,0,1],a=[0,0,0];function s(e){for(var t=[],r=1;r>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r}function u(e){return e.charCodeAt(0)<<24|e.charCodeAt(1)<<16|e.charCodeAt(2)<<8|e.charCodeAt(3)}function c(e){return(e-r)/1e3|0}function d(e){return 65536*e|0}function f(e){return 1073741824*e|0}function h(e){return 256*e|0}var p=function(){function e(e,t){this.boxtype=e,"uuid"===e&&(this.userType=t)}return e.prototype.layout=function(e){this.offset=e;var t=8;return this.userType&&(t+=16),this.size=t,t},e.prototype.write=function(e){return l(e,this.offset,this.size),l(e,this.offset+4,u(this.boxtype)),this.userType?(e.set(this.userType,this.offset+8),24):8},e.prototype.toUint8Array=function(){var e=this.layout(0),t=new Uint8Array(e);return this.write(t),t},e}();e.Box=p;var g=function(e){function t(t,r,n){void 0===r&&(r=0),void 0===n&&(n=0);var i=e.call(this,t)||this;return i.version=r,i.flags=n,i}return o(t,e),t.prototype.layout=function(t){return this.size=e.prototype.layout.call(this,t)+4,this.size},t.prototype.write=function(t){var r=e.prototype.write.call(this,t);return l(t,this.offset+r,this.version<<24|this.flags),r+4},t}(p);e.FullBox=g;var v=function(e){function t(t,r,n){var i=e.call(this,"ftype")||this;return i.majorBrand=t,i.minorVersion=r,i.compatibleBrands=n,i}return o(t,e),t.prototype.layout=function(t){return this.size=e.prototype.layout.call(this,t)+4*(2+this.compatibleBrands.length),this.size},t.prototype.write=function(t){var r=this,n=e.prototype.write.call(this,t);return l(t,this.offset+n,u(this.majorBrand)),l(t,this.offset+n+4,this.minorVersion),n+=8,this.compatibleBrands.forEach((function(e){l(t,r.offset+n,u(e)),n+=4}),this),n},t}(p);e.FileTypeBox=v;var m=function(e){function t(t,r){var n=e.call(this,t)||this;return n.children=r,n}return o(t,e),t.prototype.layout=function(t){var r=e.prototype.layout.call(this,t);return this.children.forEach((function(e){e&&(r+=e.layout(t+r))})),this.size=r},t.prototype.write=function(t){var r=e.prototype.write.call(this,t);return this.children.forEach((function(e){e&&(r+=e.write(t))})),r},t}(p);e.BoxContainerBox=m;var y=function(e){function t(t,r,n,i){var o=e.call(this,"moov",s([t],r,[n,i]))||this;return o.header=t,o.tracks=r,o.extendsBox=n,o.userData=i,o}return o(t,e),t}(m);e.MovieBox=y;var _=function(e){function t(t,i,o,a,s,l,u,c){void 0===a&&(a=1),void 0===s&&(s=1),void 0===l&&(l=n),void 0===u&&(u=r),void 0===c&&(c=r);var d=e.call(this,"mvhd",0,0)||this;return d.timescale=t,d.duration=i,d.nextTrackId=o,d.rate=a,d.volume=s,d.matrix=l,d.creationTime=u,d.modificationTime=c,d}return o(t,e),t.prototype.layout=function(t){return this.size=e.prototype.layout.call(this,t)+16+4+2+2+8+36+24+4,this.size},t.prototype.write=function(t){var r=e.prototype.write.call(this,t);return l(t,this.offset+r,c(this.creationTime)),l(t,this.offset+r+4,c(this.modificationTime)),l(t,this.offset+r+8,this.timescale),l(t,this.offset+r+12,this.duration),r+=16,l(t,this.offset+r,d(this.rate)),l(t,this.offset+r+4,h(this.volume)<<16),l(t,this.offset+r+8,0),l(t,this.offset+r+12,0),r+=16,l(t,this.offset+r,d(this.matrix[0])),l(t,this.offset+r+4,d(this.matrix[1])),l(t,this.offset+r+8,d(this.matrix[2])),l(t,this.offset+r+12,d(this.matrix[3])),l(t,this.offset+r+16,d(this.matrix[4])),l(t,this.offset+r+20,d(this.matrix[5])),l(t,this.offset+r+24,f(this.matrix[6])),l(t,this.offset+r+28,f(this.matrix[7])),l(t,this.offset+r+32,f(this.matrix[8])),r+=36,l(t,this.offset+r,0),l(t,this.offset+r+4,0),l(t,this.offset+r+8,0),l(t,this.offset+r+12,0),l(t,this.offset+r+16,0),l(t,this.offset+r+20,0),r+=24,l(t,this.offset+r,this.nextTrackId),r+=4},t}(g);e.MovieHeaderBox=_,function(e){e[e.TRACK_ENABLED=1]="TRACK_ENABLED",e[e.TRACK_IN_MOVIE=2]="TRACK_IN_MOVIE",e[e.TRACK_IN_PREVIEW=4]="TRACK_IN_PREVIEW"}(e.TrackHeaderFlags||(e.TrackHeaderFlags={}));var b=function(e){function t(t,i,o,a,s,l,u,c,d,f,h){void 0===u&&(u=0),void 0===c&&(c=0),void 0===d&&(d=n),void 0===f&&(f=r),void 0===h&&(h=r);var p=e.call(this,"tkhd",0,t)||this;return p.trackId=i,p.duration=o,p.width=a,p.height=s,p.volume=l,p.alternateGroup=u,p.layer=c,p.matrix=d,p.creationTime=f,p.modificationTime=h,p}return o(t,e),t.prototype.layout=function(t){return this.size=e.prototype.layout.call(this,t)+20+8+6+2+36+8,this.size},t.prototype.write=function(t){var r=e.prototype.write.call(this,t);return l(t,this.offset+r,c(this.creationTime)),l(t,this.offset+r+4,c(this.modificationTime)),l(t,this.offset+r+8,this.trackId),l(t,this.offset+r+12,0),l(t,this.offset+r+16,this.duration),r+=20,l(t,this.offset+r,0),l(t,this.offset+r+4,0),l(t,this.offset+r+8,this.layer<<16|this.alternateGroup),l(t,this.offset+r+12,h(this.volume)<<16),r+=16,l(t,this.offset+r,d(this.matrix[0])),l(t,this.offset+r+4,d(this.matrix[1])),l(t,this.offset+r+8,d(this.matrix[2])),l(t,this.offset+r+12,d(this.matrix[3])),l(t,this.offset+r+16,d(this.matrix[4])),l(t,this.offset+r+20,d(this.matrix[5])),l(t,this.offset+r+24,f(this.matrix[6])),l(t,this.offset+r+28,f(this.matrix[7])),l(t,this.offset+r+32,f(this.matrix[8])),r+=36,l(t,this.offset+r,d(this.width)),l(t,this.offset+r+4,d(this.height)),r+=8},t}(g);e.TrackHeaderBox=b;var C=function(e){function t(t,n,i,o,a){void 0===i&&(i="unk"),void 0===o&&(o=r),void 0===a&&(a=r);var s=e.call(this,"mdhd",0,0)||this;return s.timescale=t,s.duration=n,s.language=i,s.creationTime=o,s.modificationTime=a,s}return o(t,e),t.prototype.layout=function(t){return this.size=e.prototype.layout.call(this,t)+16+4,this.size},t.prototype.write=function(t){var r,n=e.prototype.write.call(this,t);return l(t,this.offset+n,c(this.creationTime)),l(t,this.offset+n+4,c(this.modificationTime)),l(t,this.offset+n+8,this.timescale),l(t,this.offset+n+12,this.duration),l(t,this.offset+n+16,((31&(r=this.language).charCodeAt(0))<<10|(31&r.charCodeAt(1))<<5|31&r.charCodeAt(2))<<16),n+20},t}(g);e.MediaHeaderBox=C;var E=function(e){function r(r,n){var i=e.call(this,"hdlr",0,0)||this;return i.handlerType=r,i.name=n,i._encodedName=t(i.name),i}return o(r,e),r.prototype.layout=function(t){return this.size=e.prototype.layout.call(this,t)+8+12+(this._encodedName.length+1),this.size},r.prototype.write=function(t){var r=e.prototype.write.call(this,t);return l(t,this.offset+r,0),l(t,this.offset+r+4,u(this.handlerType)),l(t,this.offset+r+8,0),l(t,this.offset+r+12,0),l(t,this.offset+r+16,0),r+=20,t.set(this._encodedName,this.offset+r),t[this.offset+r+this._encodedName.length]=0,r+=this._encodedName.length+1},r}(g);e.HandlerBox=E;var A=function(e){function t(t){void 0===t&&(t=0);var r=e.call(this,"smhd",0,0)||this;return r.balance=t,r}return o(t,e),t.prototype.layout=function(t){return this.size=e.prototype.layout.call(this,t)+4,this.size},t.prototype.write=function(t){var r=e.prototype.write.call(this,t);return l(t,this.offset+r,h(this.balance)<<16),r+4},t}(g);e.SoundMediaHeaderBox=A;var S=function(e){function t(t,r){void 0===t&&(t=0),void 0===r&&(r=a);var n=e.call(this,"vmhd",0,0)||this;return n.graphicsMode=t,n.opColor=r,n}return o(t,e),t.prototype.layout=function(t){return this.size=e.prototype.layout.call(this,t)+8,this.size},t.prototype.write=function(t){var r=e.prototype.write.call(this,t);return l(t,this.offset+r,this.graphicsMode<<16|this.opColor[0]),l(t,this.offset+r+4,this.opColor[1]<<16|this.opColor[2]),r+8},t}(g);e.VideoMediaHeaderBox=S,e.SELF_CONTAINED_DATA_REFERENCE_FLAG=1;var w=function(r){function n(n,i){void 0===i&&(i=null);var o=r.call(this,"url ",0,n)||this;return o.location=i,n&e.SELF_CONTAINED_DATA_REFERENCE_FLAG||(o._encodedLocation=t(i)),o}return o(n,r),n.prototype.layout=function(e){var t=r.prototype.layout.call(this,e);return this._encodedLocation&&(t+=this._encodedLocation.length+1),this.size=t},n.prototype.write=function(e){var t=r.prototype.write.call(this,e);return this._encodedLocation&&(e.set(this._encodedLocation,this.offset+t),e[this.offset+t+this._encodedLocation.length]=0,t+=this._encodedLocation.length),t},n}(g);e.DataEntryUrlBox=w;var O=function(e){function t(t){var r=e.call(this,"dref",0,0)||this;return r.entries=t,r}return o(t,e),t.prototype.layout=function(t){var r=e.prototype.layout.call(this,t)+4;return this.entries.forEach((function(e){r+=e.layout(t+r)})),this.size=r},t.prototype.write=function(t){var r=e.prototype.write.call(this,t);return l(t,this.offset+r,this.entries.length),this.entries.forEach((function(e){r+=e.write(t)})),r},t}(g);e.DataReferenceBox=O;var k=function(e){function t(t){var r=e.call(this,"dinf",[t])||this;return r.dataReference=t,r}return o(t,e),t}(m);e.DataInformationBox=k;var T=function(e){function t(t){var r=e.call(this,"stsd",0,0)||this;return r.entries=t,r}return o(t,e),t.prototype.layout=function(t){var r=e.prototype.layout.call(this,t);return r+=4,this.entries.forEach((function(e){r+=e.layout(t+r)})),this.size=r},t.prototype.write=function(t){var r=e.prototype.write.call(this,t);return l(t,this.offset+r,this.entries.length),r+=4,this.entries.forEach((function(e){r+=e.write(t)})),r},t}(g);e.SampleDescriptionBox=T;var L=function(e){function t(t,r,n,i,o){var a=e.call(this,"stbl",[t,r,n,i,o])||this;return a.sampleDescriptions=t,a.timeToSample=r,a.sampleToChunk=n,a.sampleSizes=i,a.chunkOffset=o,a}return o(t,e),t}(m);e.SampleTableBox=L;var P=function(e){function t(t,r,n){var i=e.call(this,"minf",[t,r,n])||this;return i.header=t,i.info=r,i.sampleTable=n,i}return o(t,e),t}(m);e.MediaInformationBox=P;var M=function(e){function t(t,r,n){var i=e.call(this,"mdia",[t,r,n])||this;return i.header=t,i.handler=r,i.info=n,i}return o(t,e),t}(m);e.MediaBox=M;var x=function(e){function t(t,r){var n=e.call(this,"trak",[t,r])||this;return n.header=t,n.media=r,n}return o(t,e),t}(m);e.TrackBox=x;var D=function(e){function t(t,r,n,i,o){var a=e.call(this,"trex",0,0)||this;return a.trackId=t,a.defaultSampleDescriptionIndex=r,a.defaultSampleDuration=n,a.defaultSampleSize=i,a.defaultSampleFlags=o,a}return o(t,e),t.prototype.layout=function(t){return this.size=e.prototype.layout.call(this,t)+20,this.size},t.prototype.write=function(t){var r=e.prototype.write.call(this,t);return l(t,this.offset+r,this.trackId),l(t,this.offset+r+4,this.defaultSampleDescriptionIndex),l(t,this.offset+r+8,this.defaultSampleDuration),l(t,this.offset+r+12,this.defaultSampleSize),l(t,this.offset+r+16,this.defaultSampleFlags),r+20},t}(g);e.TrackExtendsBox=D;var R=function(e){function t(t,r,n){var i=e.call(this,"mvex",s([t],r,[n]))||this;return i.header=t,i.tracDefaults=r,i.levels=n,i}return o(t,e),t}(m);e.MovieExtendsBox=R;var I=function(e){function t(t,r){var n=e.call(this,"meta",0,0)||this;return n.handler=t,n.otherBoxes=r,n}return o(t,e),t.prototype.layout=function(t){var r=e.prototype.layout.call(this,t);return r+=this.handler.layout(t+r),this.otherBoxes.forEach((function(e){r+=e.layout(t+r)})),this.size=r},t.prototype.write=function(t){var r=e.prototype.write.call(this,t);return r+=this.handler.write(t),this.otherBoxes.forEach((function(e){r+=e.write(t)})),r},t}(g);e.MetaBox=I;var N,j=function(e){function t(t){var r=e.call(this,"mfhd",0,0)||this;return r.sequenceNumber=t,r}return o(t,e),t.prototype.layout=function(t){return this.size=e.prototype.layout.call(this,t)+4,this.size},t.prototype.write=function(t){var r=e.prototype.write.call(this,t);return l(t,this.offset+r,this.sequenceNumber),r+4},t}(g);e.MovieFragmentHeaderBox=j,function(e){e[e.BASE_DATA_OFFSET_PRESENT=1]="BASE_DATA_OFFSET_PRESENT",e[e.SAMPLE_DESCRIPTION_INDEX_PRESENT=2]="SAMPLE_DESCRIPTION_INDEX_PRESENT",e[e.DEFAULT_SAMPLE_DURATION_PRESENT=8]="DEFAULT_SAMPLE_DURATION_PRESENT",e[e.DEFAULT_SAMPLE_SIZE_PRESENT=16]="DEFAULT_SAMPLE_SIZE_PRESENT",e[e.DEFAULT_SAMPLE_FLAGS_PRESENT=32]="DEFAULT_SAMPLE_FLAGS_PRESENT"}(N=e.TrackFragmentFlags||(e.TrackFragmentFlags={}));var F=function(e){function t(t,r,n,i,o,a,s){var l=e.call(this,"tfhd",0,t)||this;return l.trackId=r,l.baseDataOffset=n,l.sampleDescriptionIndex=i,l.defaultSampleDuration=o,l.defaultSampleSize=a,l.defaultSampleFlags=s,l}return o(t,e),t.prototype.layout=function(t){var r=e.prototype.layout.call(this,t)+4,n=this.flags;return n&N.BASE_DATA_OFFSET_PRESENT&&(r+=8),n&N.SAMPLE_DESCRIPTION_INDEX_PRESENT&&(r+=4),n&N.DEFAULT_SAMPLE_DURATION_PRESENT&&(r+=4),n&N.DEFAULT_SAMPLE_SIZE_PRESENT&&(r+=4),n&N.DEFAULT_SAMPLE_FLAGS_PRESENT&&(r+=4),this.size=r},t.prototype.write=function(t){var r=e.prototype.write.call(this,t),n=this.flags;return l(t,this.offset+r,this.trackId),r+=4,n&N.BASE_DATA_OFFSET_PRESENT&&(l(t,this.offset+r,0),l(t,this.offset+r+4,this.baseDataOffset),r+=8),n&N.SAMPLE_DESCRIPTION_INDEX_PRESENT&&(l(t,this.offset+r,this.sampleDescriptionIndex),r+=4),n&N.DEFAULT_SAMPLE_DURATION_PRESENT&&(l(t,this.offset+r,this.defaultSampleDuration),r+=4),n&N.DEFAULT_SAMPLE_SIZE_PRESENT&&(l(t,this.offset+r,this.defaultSampleSize),r+=4),n&N.DEFAULT_SAMPLE_FLAGS_PRESENT&&(l(t,this.offset+r,this.defaultSampleFlags),r+=4),r},t}(g);e.TrackFragmentHeaderBox=F;var B=function(e){function t(t){var r=e.call(this,"tfdt",0,0)||this;return r.baseMediaDecodeTime=t,r}return o(t,e),t.prototype.layout=function(t){return this.size=e.prototype.layout.call(this,t)+4,this.size},t.prototype.write=function(t){var r=e.prototype.write.call(this,t);return l(t,this.offset+r,this.baseMediaDecodeTime),r+4},t}(g);e.TrackFragmentBaseMediaDecodeTimeBox=B;var U,V=function(e){function t(t,r,n){var i=e.call(this,"traf",[t,r,n])||this;return i.header=t,i.decodeTime=r,i.run=n,i}return o(t,e),t}(m);e.TrackFragmentBox=V,function(e){e[e.IS_LEADING_MASK=201326592]="IS_LEADING_MASK",e[e.SAMPLE_DEPENDS_ON_MASK=50331648]="SAMPLE_DEPENDS_ON_MASK",e[e.SAMPLE_DEPENDS_ON_OTHER=16777216]="SAMPLE_DEPENDS_ON_OTHER",e[e.SAMPLE_DEPENDS_ON_NO_OTHERS=33554432]="SAMPLE_DEPENDS_ON_NO_OTHERS",e[e.SAMPLE_IS_DEPENDED_ON_MASK=12582912]="SAMPLE_IS_DEPENDED_ON_MASK",e[e.SAMPLE_HAS_REDUNDANCY_MASK=3145728]="SAMPLE_HAS_REDUNDANCY_MASK",e[e.SAMPLE_PADDING_VALUE_MASK=917504]="SAMPLE_PADDING_VALUE_MASK",e[e.SAMPLE_IS_NOT_SYNC=65536]="SAMPLE_IS_NOT_SYNC",e[e.SAMPLE_DEGRADATION_PRIORITY_MASK=65535]="SAMPLE_DEGRADATION_PRIORITY_MASK"}(e.SampleFlags||(e.SampleFlags={})),function(e){e[e.DATA_OFFSET_PRESENT=1]="DATA_OFFSET_PRESENT",e[e.FIRST_SAMPLE_FLAGS_PRESENT=4]="FIRST_SAMPLE_FLAGS_PRESENT",e[e.SAMPLE_DURATION_PRESENT=256]="SAMPLE_DURATION_PRESENT",e[e.SAMPLE_SIZE_PRESENT=512]="SAMPLE_SIZE_PRESENT",e[e.SAMPLE_FLAGS_PRESENT=1024]="SAMPLE_FLAGS_PRESENT",e[e.SAMPLE_COMPOSITION_TIME_OFFSET=2048]="SAMPLE_COMPOSITION_TIME_OFFSET"}(U=e.TrackRunFlags||(e.TrackRunFlags={}));var H=function(e){function t(t,r,n,i){var o=e.call(this,"trun",1,t)||this;return o.samples=r,o.dataOffset=n,o.firstSampleFlags=i,o}return o(t,e),t.prototype.layout=function(t){var r=e.prototype.layout.call(this,t)+4,n=this.samples.length,i=this.flags;return i&U.DATA_OFFSET_PRESENT&&(r+=4),i&U.FIRST_SAMPLE_FLAGS_PRESENT&&(r+=4),i&U.SAMPLE_DURATION_PRESENT&&(r+=4*n),i&U.SAMPLE_SIZE_PRESENT&&(r+=4*n),i&U.SAMPLE_FLAGS_PRESENT&&(r+=4*n),i&U.SAMPLE_COMPOSITION_TIME_OFFSET&&(r+=4*n),this.size=r},t.prototype.write=function(t){var r=e.prototype.write.call(this,t),n=this.samples.length,i=this.flags;l(t,this.offset+r,n),r+=4,i&U.DATA_OFFSET_PRESENT&&(l(t,this.offset+r,this.dataOffset),r+=4),i&U.FIRST_SAMPLE_FLAGS_PRESENT&&(l(t,this.offset+r,this.firstSampleFlags),r+=4);for(var o=0;o31)throw new Error("invalid compressor name");return f}return o(r,t),r.prototype.layout=function(e){var r=t.prototype.layout.call(this,e)+16+12+4+2+32+2+2;return this.otherBoxes&&this.otherBoxes.forEach((function(t){r+=t.layout(e+r)})),this.size=r},r.prototype.write=function(e){var r=t.prototype.write.call(this,e);l(e,this.offset+r,0),l(e,this.offset+r+4,0),l(e,this.offset+r+8,0),l(e,this.offset+r+12,0),r+=16,l(e,this.offset+r,this.width<<16|this.height),l(e,this.offset+r+4,d(this.horizResolution)),l(e,this.offset+r+8,d(this.vertResolution)),r+=12,l(e,this.offset+r,0),l(e,this.offset+r+4,this.frameCount<<16),r+=6,e[this.offset+r]=this.compressorName.length;for(var n=0;n<31;n++)e[this.offset+r+n+1]=n-2&&(0,a.setOutputGain)(m[0],-2),l=[m[0],m[1]],m=m.slice(2)}if(m.length&&l){s.push.apply(s,m);var y=(0,a.buildWebm)(n(n([],l,!0),m,!0));d||(d=y.initData),r.dispatch({initData:d,data:y.data})}}catch(e){h(e)}}})),e.onCompletion((function(e){u.byteLength?t.reject(new Error("Still data left in buffer.")):t.resolve(e)})),e.onError(h),{result:t.promise,progressUpdates:{onProgressUpdate:r,getProgressSoFar:function(){if(s.length&&l){var e=(0,a.buildWebm)(n(n([],l,!0),s,!0)).data;return{initData:d,data:e}}return null}},abort:function(){f=!0,e.abort()}}})).run()}}},function(e){e.exports=r},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.MP4ToMP4=void 0;var n=r(2);t.MP4ToMP4={getInputFormat:function(){return{mimeType:"audio/mp4"}},getOutputFormat:function(){return{mimeType:"audio/mp4"}},transmux:function(e){return new n.helpers.abortableJob.AbortableJob((function(){var t=n.helpers.deferred.buildDeferred(),r=new n.eventDispatcher.EventDispatcher,i=[],o=[],a=new Uint8Array(0),s=null,l=!1;function u(r){t.reject(r),e.abort()}return e.onProgressUpdate((function(e){var t=e.data;!l&&e.initData&&(t=n.helpers.arrayBuffer.combine([e.initData,e.data])),l=!0;try{if(function e(t){if(t.byteLength<4)a=t;else{if(null===s){var r=new DataView(t.buffer).getUint32(0);if(1===r)throw new Error("Large atom size not supported.");s=r}if(0!==s&&t.byteLength>=s){var n=new Uint8Array(t.buffer.slice(0,s));o.push(n),a=new Uint8Array(t.buffer.slice(s)),s=null,e(a)}else a=t}}(n.helpers.arrayBuffer.combine([a,t])),o.length){var c=n.helpers.arrayBuffer.combine(o);o.splice(0),i.push(c),r.dispatch({data:c})}}catch(e){u(e)}})),e.onCompletion((function(e){try{if(0===s)i.push(a),r.dispatch({data:a});else if(a.byteLength)throw new Error("Part way through an atom.");t.resolve(e)}catch(e){u(e)}})),e.onError(u),{result:t.promise,progressUpdates:{onProgressUpdate:r,getProgressSoFar:function(){return i.length?{data:n.helpers.arrayBuffer.combine(i)}:null}},abort:function(){e.abort()}}})).run()}}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.retrievalErrors=void 0;var n=r(24),i=r(37),o=r(4),a=r(5),s=r(7),l=r(18),u=r(38);!function(e){e.NoDecryptorError=n.NoDecryptorError,e.PlaylistParseError=i.PlaylistParseError,e.OggParserError=o.OggParserError,e.Mp3TransmuxerRetrievalError=s.Mp3TransmuxerRetrievalError,e.RetrievalError=a.RetrievalError,e.UnacceptableResponseStatusCodeError=l.UnacceptableResponseStatusCodeError,e.UnsupportedEncryptionError=u.UnsupportedEncryptionError}(t.retrievalErrors||(t.retrievalErrors={}))},function(e,t,r){var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.PlaylistParseError=void 0;var o=function(e){function t(t){var r=e.call(this)||this;return r._details=t,r}return i(t,e),t.prototype.getDetails=function(){return this._details},t.prototype.getCode=function(){return"PLAYLIST_PARSE"},t}(r(5).RetrievalError);t.PlaylistParseError=o},function(e,t,r){var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.UnsupportedEncryptionError=void 0;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.getCode=function(){return"UNSUPPORTED_ENCRYPTION_ERROR"},t}(r(5).RetrievalError);t.UnsupportedEncryptionError=o},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.events=void 0;var n=r(40),i=r(41),o=r(42),a=r(12);!function(e){e.InitData=n.InitData,e.Key=i.Key,e.Playlist=o.Playlist,e.Segment=a.Segment}(t.events||(t.events={}))},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.InitData=void 0;var r=function(){function e(e,t){this._playlist=e,this._url=t}return e.prototype.getPlaylist=function(){return this._playlist},e.prototype.getUrl=function(){return this._url},e}();t.InitData=r},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Key=void 0;var r=function(){function e(e,t){this._playlist=e,this._url=t}return e.prototype.getPlaylist=function(){return this._playlist},e.prototype.getUrl=function(){return this._url},e}();t.Key=r},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Playlist=void 0;var r=function(){function e(e){this._url=e}return e.prototype.getUrl=function(){return this._url},e}();t.Playlist=r}],i={};function o(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return n[e].call(r.exports,r,r.exports,o),r.exports}o.d=function(e,t){for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return function(){var e=a;Object.defineProperty(e,"__esModule",{value:!0}),e.events=e.retrievalErrors=e.PassThroughTransmuxer=e.MP3ToMP4Transmuxer=e.TransmuxerFactory=e.Segment=e.PlaylistType=e.Playlist=e.PlaylistSegmentRetriever=e.buildNumber=e.version=void 0,e.version="30.2.3",e.buildNumber=2219;var t=o(1);Object.defineProperty(e,"PlaylistSegmentRetriever",{enumerable:!0,get:function(){return t.PlaylistSegmentRetriever}});var r=o(10);Object.defineProperty(e,"Playlist",{enumerable:!0,get:function(){return r.Playlist}}),Object.defineProperty(e,"PlaylistType",{enumerable:!0,get:function(){return r.PlaylistType}});var n=o(11);Object.defineProperty(e,"Segment",{enumerable:!0,get:function(){return n.Segment}});var i=o(25);Object.defineProperty(e,"TransmuxerFactory",{enumerable:!0,get:function(){return i.TransmuxerFactory}});var s=o(31);Object.defineProperty(e,"MP3ToMP4Transmuxer",{enumerable:!0,get:function(){return s.MP3ToMP4}});var l=o(27);Object.defineProperty(e,"PassThroughTransmuxer",{enumerable:!0,get:function(){return l.PassThrough}});var u=o(36);Object.defineProperty(e,"retrievalErrors",{enumerable:!0,get:function(){return u.retrievalErrors}});var c=o(39);Object.defineProperty(e,"events",{enumerable:!0,get:function(){return c.events}})}(),a}()},e.exports=n(r(106),r(1253),r(1254))},function(e,t,r){var n;"undefined"!=typeof self&&self,n=function(e,t){return function(){"use strict";var r=[,function(e,t,r){var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ControlledPlayer=t.ChromecastPlayerController=void 0;var o=r(2),a=r(3),s=function(e){function t(t){var r=t.castContext,n=e.call(this)||this;return n.name="MaestroChromecast",n.syncConfig={syncPosition:!1,syncVolume:!1},n._castContext=r,n}return i(t,e),t.prototype.isRenditionSupported=function(e){return"maestro.chromecast"===e.scProtocol},t.prototype.buildPlayer=function(e){return new l(e,this._castContext)},t}(o.BaseController);t.ChromecastPlayerController=s;var l=function(){function e(e,t){this._config=e,this._castContext=t;var r=e.logger,n=e.playerId,i=e.urlAndRendition,o=e.reportError,s=e.seekStrategy;this._player=new a.ChromecastPlayer({contentId:i.url},{name:n,castContext:this._castContext,logger:r,seekStrategy:s,registerListeners:function(e){e.onError.subscribe((function(e){return o(e.getCode())}))}})}return e.prototype.getPlayer=function(){return this._player},e.prototype.getUrl=function(){return this._config.urlAndRendition.url},e}();t.ControlledPlayer=l},function(e){e.exports=t},function(t){t.exports=e}],n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var o=n[e]={exports:{}};return r[e].call(o.exports,o,o.exports,i),o.exports}var o={};return function(){var e=o;Object.defineProperty(e,"__esModule",{value:!0}),e.ChromecastPlayer=e.ChromecastPlayerController=e.buildNumber=e.version=void 0,e.version="24.1.1",e.buildNumber=1186;var t=i(1);Object.defineProperty(e,"ChromecastPlayerController",{enumerable:!0,get:function(){return t.ChromecastPlayerController}});var r=i(3);Object.defineProperty(e,"ChromecastPlayer",{enumerable:!0,get:function(){return r.ChromecastPlayer}})}(),o}()},e.exports=n(r(1256),r(94))},function(e,t,r){var n;"undefined"!=typeof self&&self,n=function(e,t,r,n){return function(){"use strict";var i=[,function(e,t,r){var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i=200&&r.status<300?t.pushEntity(a.valid(e,n,o)):t.pushEntity(a.missing(e,o))})),r})).catch((function(r){var n={fetchTime:t._getNow(),status:0,message:r.toString()};t.pushEntity(a.missing(e,n))})),s.deferred(e))},t.prototype.pushEntity=function(e){this.push(e)},t.prototype.handlePush=function(e){},t}(o.BaseStore);t.NetworkStore=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(244);t.loadStrategyWrapperStore=function(e){var t=e.Store,r=e.strategies;return function(){function e(e){var r=this.wrappedStore=new t(e);this._nextStore=e.nextStore||null,this._nextStore&&this._nextStore.onPush(r.handlePush.bind(r))}return e.prototype.get=function(e){var t=this,n=r[""+e.loadStrategy];if(!n)throw new Error("No handler for strategy "+e.loadStrategy);return n({get:function(){return t.wrappedStore.getEntry(e)},next:function(){return t._nextStore&&t._nextStore.get(e)||t._missing(e)},create:function(){return t._create(e)}})},e.prototype.updateEntry=function(e){this.wrappedStore.handlePush(e),this._nextStore&&this._nextStore.updateEntry(e)},e.prototype.onPush=function(e){this.wrappedStore.onPush(e)},e.prototype._create=function(e){var t=this.wrappedStore.createEntry(e);return this.wrappedStore.handleCreate(t),t},e.prototype._missing=function(e){return{status:n.Status.Missing,entityDesc:e.desc,context:e.context,metaData:{fetchTime:null,status:null}}},e}()}},function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;rthis._maxQueueSize&&e._safeFlushAndForget(this._sdkKey))},t.incrementNonExposureCount=function(e){var t,r=null!==(t=this._nonExposedChecks[e])&&void 0!==t?t:0;this._nonExposedChecks[e]=r+1},t.reset=function(){this._lastExposureTimeMap={}},t.start=function(){var t=this;(0,l._isServerEnv)()||(h[this._sdkKey]=this,(0,f._subscribeToVisiblityChanged)((function(r){"background"===r?e._safeFlushAndForget(t._sdkKey):"foreground"===r&&e._safeRetryFailedLogs(t._sdkKey)})),this._retryFailedLogs(p),this._startBackgroundFlushInterval())},t.stop=function(){return n(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._flushIntervalId&&(clearInterval(this._flushIntervalId),this._flushIntervalId=null),delete h[this._sdkKey],e.next=4,this.flush();case 4:case"end":return e.stop()}}),e,this)})))},t.flush=function(){return n(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._appendAndResetNonExposedChecks(),0!==this._queue.length){e.next=3;break}return e.abrupt("return");case 3:return t=this._queue,this._queue=[],e.next=7,this._sendEvents(t);case 7:case"end":return e.stop()}}),e,this)})))},t._quickFlushIfNeeded=function(){var t=this;this._hasRunQuickFlush||(this._hasRunQuickFlush=!0,Date.now()-this._creationTime>200||setTimeout((function(){return e._safeFlushAndForget(t._sdkKey)}),200))},t._shouldLogEvent=function(e){if((0,l._isServerEnv)())return!1;if(!(0,u._isExposureEvent)(e))return!0;var t=e.user?e.user:{statsigEnvironment:void 0},r=(0,i._getUserStorageKey)(this._sdkKey,t),n=e.metadata?e.metadata:{},o=[e.eventName,r,n.gate,n.config,n.ruleID,n.allocatedExperiment,n.parameterName,String(n.isExplicitParameter),n.reason].join("|"),a=this._lastExposureTimeMap[o],s=Date.now();return!(a&&s-a<6e5)&&(Object.keys(this._lastExposureTimeMap).length>1e3&&(this._lastExposureTimeMap={}),this._lastExposureTimeMap[o]=s,!0)},t._sendEvents=function(e){var t,r;return n(this,void 0,void 0,regeneratorRuntime.mark((function n(){var i,o;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this._isLoggingDisabled){n.next=3;break}return this._saveFailedLogsToStorage(e),n.abrupt("return",!1);case 3:if(n.prev=3,i=(0,f._isUnloading)(),o=i&&this._network.isBeaconSupported()&&null==(null===(r=null===(t=this._options)||void 0===t?void 0:t.networkConfig)||void 0===r?void 0:r.networkOverrideFunc),this._emitter({name:"pre_logs_flushed",events:e}),!o){n.next=13;break}return n.next=10,this._sendEventsViaBeacon(e);case 10:n.t0=n.sent,n.next=16;break;case 13:return n.next=15,this._sendEventsViaPost(e);case 15:n.t0=n.sent;case 16:if(!n.t0.success){n.next=22;break}return this._emitter({name:"logs_flushed",events:e}),n.abrupt("return",!0);case 22:return a.Log.warn("Failed to flush events."),this._saveFailedLogsToStorage(e),n.abrupt("return",!1);case 25:n.next=31;break;case 27:return n.prev=27,n.t1=n.catch(3),a.Log.warn("Failed to flush events."),n.abrupt("return",!1);case 31:case"end":return n.stop()}}),n,this,[[3,27]])})))},t._sendEventsViaPost=function(e){var t;return n(this,void 0,void 0,regeneratorRuntime.mark((function r(){var n,i;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this._network.post(this._getRequestData(e));case 2:return n=r.sent,i=null!==(t=null==n?void 0:n.code)&&void 0!==t?t:-1,r.abrupt("return",{success:i>=200&&i<300});case 5:case"end":return r.stop()}}),r,this)})))},t._sendEventsViaBeacon=function(e){return n(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._network.beacon(this._getRequestData(e));case 2:return t.t0=t.sent,t.abrupt("return",{success:t.t0});case 4:case"end":return t.stop()}}),t,this)})))},t._getRequestData=function(e){var t;return{sdkKey:this._sdkKey,data:{events:e},urlConfig:this._logEventUrlConfig,retries:3,isCompressable:!0,params:(t={},t[s.NetworkParam.EventCount]=String(e.length),t)}},t._saveFailedLogsToStorage=function(e){for(;e.length>500;)e.shift();var t=this._getStorageKey();try{(0,c._setObjectInStorage)(t,e)}catch(e){a.Log.warn("Unable to save failed logs to storage")}},t._retryFailedLogs=function(e){var t=this,r=this._getStorageKey();n(t,void 0,void 0,regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(c.Storage.isReady()){t.next=3;break}return t.next=3,c.Storage.isReadyResolver();case 3:if(n=(0,c._getObjectFromStorage)(r)){t.next=6;break}return t.abrupt("return");case 6:return e===p&&c.Storage.removeItem(r),t.next=9,this._sendEvents(n);case 9:t.sent&&e===g&&c.Storage.removeItem(r);case 11:case"end":return t.stop()}}),t,this)}))).catch((function(){a.Log.warn("Failed to flush stored logs")}))},t._getStorageKey=function(){return"statsig.failed_logs."+(0,o._DJB2)(this._sdkKey)},t._normalizeAndAppendEvent=function(e){e.user&&(e.user=Object.assign({},e.user),delete e.user.privateAttributes);var t={},r=this._getCurrentPageUrl();r&&(t.statsigMetadata={currentPage:r});var n=Object.assign(Object.assign({},e),t);a.Log.debug("Enqueued Event:",n),this._queue.push(n)},t._appendAndResetNonExposedChecks=function(){0!==Object.keys(this._nonExposedChecks).length&&(this._normalizeAndAppendEvent({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:Object.assign({},this._nonExposedChecks)}}),this._nonExposedChecks={})},t._getCurrentPageUrl=function(){var e;if(!1!==(null===(e=this._options)||void 0===e?void 0:e.includeCurrentPageUrlWithEvents))return(0,l._getCurrentPageUrlSafe)()},t._startBackgroundFlushInterval=function(){var t,r,n=this,i=null!==(r=null===(t=this._options)||void 0===t?void 0:t.loggingIntervalMs)&&void 0!==r?r:1e4,o=setInterval((function(){var t=h[n._sdkKey];t&&t._flushIntervalId===o?e._safeFlushAndForget(n._sdkKey):clearInterval(o)}),i);this._flushIntervalId=o},e}();t.EventLogger=v},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._createLayerParameterExposure=t._createConfigExposure=t._mapExposures=t._createGateExposure=t._isExposureEvent=void 0;var n=function(e,t,r,n,i){return r.bootstrapMetadata&&(n.bootstrapMetadata=r.bootstrapMetadata),{eventName:e,user:t,value:null,metadata:o(r,n),secondaryExposures:i,time:Date.now()}};t._isExposureEvent=function(e){var t=e.eventName;return"statsig::gate_exposure"===t||"statsig::config_exposure"===t||"statsig::layer_exposure"===t};function i(e,t){return e.map((function(e){return"string"==typeof e?(null!=t?t:{})[e]:e})).filter((function(e){return null!=e}))}t._createGateExposure=function(e,t,r){var o,a,s,l={gate:t.name,gateValue:String(t.value),ruleID:t.ruleID};return null!=(null===(o=t.__evaluation)||void 0===o?void 0:o.version)&&(l.configVersion=t.__evaluation.version),n("statsig::gate_exposure",e,t.details,l,i(null!==(s=null===(a=t.__evaluation)||void 0===a?void 0:a.secondary_exposures)&&void 0!==s?s:[],r))},t._mapExposures=i;t._createConfigExposure=function(e,t,r){var o,a,s,l,u={config:t.name,ruleID:t.ruleID};return null!=(null===(o=t.__evaluation)||void 0===o?void 0:o.version)&&(u.configVersion=t.__evaluation.version),null!=(null===(a=t.__evaluation)||void 0===a?void 0:a.passed)&&(u.rulePassed=String(t.__evaluation.passed)),n("statsig::config_exposure",e,t.details,u,i(null!==(l=null===(s=t.__evaluation)||void 0===s?void 0:s.secondary_exposures)&&void 0!==l?l:[],r))};t._createLayerParameterExposure=function(e,t,r,o){var a,s,l,u,c=t.__evaluation,d=!0===(null===(a=null==c?void 0:c.explicit_parameters)||void 0===a?void 0:a.includes(r)),f="",h=null!==(s=null==c?void 0:c.undelegated_secondary_exposures)&&void 0!==s?s:[];d&&(f=null!==(l=c.allocated_experiment_name)&&void 0!==l?l:"",h=c.secondary_exposures);var p={config:t.name,parameterName:r,ruleID:t.ruleID,allocatedExperiment:f,isExplicitParameter:String(d)};return null!=(null===(u=t.__evaluation)||void 0===u?void 0:u.version)&&(p.configVersion=t.__evaluation.version),n("statsig::layer_exposure",e,t.details,p,i(h,o))};var o=function(e,t){return t.reason=e.reason,e.lcut&&(t.lcut=String(e.lcut)),e.receivedAt&&(t.receivedAt=String(e.receivedAt)),t}},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.UrlConfiguration=void 0;var i=r(307),o=r(435),a=((n={})[o.Endpoint._initialize]="i",n[o.Endpoint._rgstr]="e",n[o.Endpoint._download_config_specs]="d",n),s=function(){function e(e,t,r,n){this.customUrl=null,this.fallbackUrls=null,this.endpoint=e,this.endpointDnsKey=a[e],t&&(this.customUrl=t),!t&&r&&(this.customUrl=r.endsWith("/")?""+r+e:r+"/"+e),n&&(this.fallbackUrls=n);var i=o.NetworkDefault[e];this.defaultUrl=i+"/"+e}var t=e.prototype;return t.getUrl=function(){var e;return null!==(e=this.customUrl)&&void 0!==e?e:this.defaultUrl},t.getChecksum=function(){var e,t=(null!==(e=this.fallbackUrls)&&void 0!==e?e:[]).sort().join(",");return(0,i._DJB2)(this.customUrl+t)},e}();t.UrlConfiguration=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getFullUserHash=t._normalizeUser=void 0;var n=r(307),i=r(147);t._normalizeUser=function(e,t,r){try{var n=JSON.parse(JSON.stringify(e));return null!=t&&null!=t.environment?n.statsigEnvironment=t.environment:null!=r&&(n.statsigEnvironment={tier:r}),n}catch(e){return i.Log.error("Failed to JSON.stringify user"),{statsigEnvironment:void 0}}},t._getFullUserHash=function(e){return e?(0,n._DJB2Object)(e):null}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._typedJsonParse=void 0;var n=r(147);t._typedJsonParse=function(e,t,r){try{var i=JSON.parse(e);if(i&&"object"==typeof i&&t in i)return i}catch(e){}return n.Log.error("Failed to parse "+r),null}},function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorBoundary=t.EXCEPTION_ENDPOINT=void 0;var i=r(147),o=r(574),a=r(436);t.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception";var s=function(){function e(e,t,r,n){this._sdkKey=e,this._options=t,this._emitter=r,this._lastSeenError=n,this._seen=new Set}var r=e.prototype;return r.wrap=function(e){var t=this;try{var r=e;(function(e){var t=new Set,r=Object.getPrototypeOf(e);for(;r&&r!==Object.prototype;)Object.getOwnPropertyNames(r).filter((function(e){return"function"==typeof(null==r?void 0:r[e])})).forEach((function(e){return t.add(e)})),r=Object.getPrototypeOf(r);return Array.from(t)})(r).forEach((function(n){var i=r[n];"$EB"in i||(r[n]=function(){for(var r=arguments.length,o=new Array(r),a=0;a":">",'"':""","'":"'","`":"`","&":"&"},d=/[<>"'`&]/g;function f(e){return c[e]}function h(e){return null==e||!1===e?e:e.replace(d,f)}t={html5:{allowed_params:["url","auto_play","color","show_artwork","show_comments","show_user","show_reposts","hide_related","show_teaser"],supported_types:["track","playlist","group","user"],root_url:"https://w.soundcloud.com/player/",template:'',height:{single:166,multi:450}},visual:{allowed_params:["url","auto_play","visual","show_comments","show_user","show_reposts","hide_related","color","show_teaser"],supported_types:["track","playlist","group","user"],root_url:"https://w.soundcloud.com/player/",template:'',height:{single:450,multi:450}},html5_mini:{allowed_params:["url","auto_play","color","inverse","show_user"],supported_types:["track"],root_url:"https://w.soundcloud.com/player/",template:'',height:{single:20,multi:20}}},s={track:'{resource_title} by {user_name}',playlist:'{resource_title} by {user_name}',user:'Latest sounds by {resource_title}',group:'{resource_title}'},r=function(e){return[].slice.call(arguments,1).forEach((function(t){if(t)for(var r in t)e[r]=t[r]})),e},a={render:function(e,t){return t.replace(/\{([^\{\}]*)\}/g,(function(t,r){var n=e[r];return"string"==typeof n||"number"==typeof n?n:t}))},html:function(e,r){var n=t[r.type].template,i=r.text&&s[e.resource_type]||'
'+("user"===e.resource_type?"":'{user_name} · ")+'{resource_title}
';return this.render(e,n)+this.render(e,i)}},i=function(e,i){var s,u,c=n(e);return(i=r({type:"html5",text:!1},i)).params=r({},i.params),-1!==(u=t[i.type]).supported_types.indexOf(e.kind)&&("visual"===i.type&&(i.params.visual=!0),s={user_name:e.user?h(e.user.username):null,user_url:e.user?h(e.user.permalink_url.replace(/^http:/,"https:")):null,resource_title:h(e.title||e.name||e.username),resource_url:h(e.permalink_url.replace(/^http:/,"https:")),resource_type:e.kind,api_url:c,height:o(e,i,u),params:i.params,src:[u.root_url,"?",l(r({url:c},i.params),i.type)].join("")},a.html(s,i))},n=function(e){var t=e.secret_uri||e.uri;return"public"===e.sharing&&(t=t.replace(/\?secret_token=([^&]*)/,"")),t.replace(/^http:/,"https:")},l=function(e,r){var n,i,o,a,s=[];if(e)for(n in e)if(e.hasOwnProperty(n)&&-1!==t[r].allowed_params.indexOf(n)&&null!=(a=e[n]))if("object"==typeof a)for(o=a.length,i=0;i-1&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var r=t.replace(/^\s+/,"").replace(/\(eval code/g,"("),n=r.match(/ (\((.+):(\d+):(\d+)\)$)/),i=(r=n?r.replace(n[0],""):r).split(/\s+/).slice(1),o=this.extractLocation(n?n[1]:i.pop()),a=i.join(" ")||void 0,s=["eval",""].indexOf(o[0])>-1?void 0:o[0];return new e({functionName:a,fileName:s,lineNumber:o[1],columnNumber:o[2],source:t})}),this)},parseFFOrSafari:function(t){return t.stack.split("\n").filter((function(e){return!e.match(n)}),this).map((function(t){if(t.indexOf(" > eval")>-1&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===t.indexOf("@")&&-1===t.indexOf(":"))return new e({functionName:t});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=t.match(r),i=n&&n[1]?n[1]:void 0,o=this.extractLocation(t.replace(r,""));return new e({functionName:i,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:t})}),this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(t){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=t.message.split("\n"),i=[],o=2,a=n.length;o/,"$2").replace(/\([^)]*\)/g,"")||void 0;o.match(/\(([^)]*)\)/)&&(r=o.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var s=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new e({functionName:a,args:s,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:t})}),this)}}})?n.apply(t,i):n)||(e.exports=o)}()},function(e,t){var r="undefined"!=typeof self?self:this,n=function(){function e(){this.fetch=!1,this.DOMException=r.DOMException}return e.prototype=r,new e}();!function(e){!function(t){var r="URLSearchParams"in e,n="Symbol"in e&&"iterator"in Symbol,i="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in e,a="ArrayBuffer"in e;if(a)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function c(e){return"string"!=typeof e&&(e=String(e)),e}function d(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function f(e){this.map={},e instanceof f?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function g(e){var t=new FileReader,r=p(t);return t.readAsArrayBuffer(e),r}function v(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():a&&i&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=v(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(e)||l(e))?this._bodyArrayBuffer=v(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(g)}),this.text=function(){var e,t,r,n=h(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,r=p(t),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function b(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function C(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new f(t.headers),this.url=t.url||"",this._initBody(e)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},m.call(_.prototype),m.call(C.prototype),C.prototype.clone=function(){return new C(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},C.error=function(){var e=new C(null,{status:0,statusText:""});return e.type="error",e};var E=[301,302,303,307,308];C.redirect=function(e,t){if(-1===E.indexOf(t))throw new RangeError("Invalid status code");return new C(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function A(e,r){return new Promise((function(n,o){var a=new _(e,r);if(a.signal&&a.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function l(){s.abort()}s.onload=function(){var e,t,r={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new f,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}})),t)};r.url="responseURL"in s?s.responseURL:r.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;n(new C(i,r))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.onabort=function(){o(new t.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),a.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),a.signal&&(a.signal.addEventListener("abort",l),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",l)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}A.polyfill=!0,e.fetch||(e.fetch=A,e.Headers=f,e.Request=_,e.Response=C),t.Headers=f,t.Request=_,t.Response=C,t.fetch=A,Object.defineProperty(t,"__esModule",{value:!0})}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;(t=i.fetch).default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t},,function(e,t,r){"use strict";e.exports=r(1329)},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+Q2xvc2U8L3RpdGxlPjxwYXRoIGQ9Ik0xMCA4LjU0NUwzLjQ1NSAyIDIgMy40NTUgOC41NDUgMTAgMiAxNi41NDUgMy40NTUgMTggMTAgMTEuNDU1IDE2LjU0NSAxOCAxOCAxNi41NDUgMTEuNDU1IDEwIDE4IDMuNDU1IDE2LjU0NSAyIDEwIDguNTQ1eiIgZmlsbD0iI0U1RTVFNSIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+Cg=="},function(e,t,r){(function(e,n){var i; /** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */(function(){var o="Expected a function",a="__lodash_placeholder__",s=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],l="[object Arguments]",u="[object Array]",c="[object Boolean]",d="[object Date]",f="[object Error]",h="[object Function]",p="[object GeneratorFunction]",g="[object Map]",v="[object Number]",m="[object Object]",y="[object RegExp]",_="[object Set]",b="[object String]",C="[object Symbol]",E="[object WeakMap]",A="[object ArrayBuffer]",S="[object DataView]",w="[object Float32Array]",O="[object Float64Array]",k="[object Int8Array]",T="[object Int16Array]",L="[object Int32Array]",P="[object Uint8Array]",M="[object Uint16Array]",x="[object Uint32Array]",D=/\b__p \+= '';/g,R=/\b(__p \+=) '' \+/g,I=/(__e\(.*?\)|\b__t\)) \+\n'';/g,N=/&(?:amp|lt|gt|quot|#39);/g,j=/[&<>"']/g,F=RegExp(N.source),B=RegExp(j.source),U=/<%-([\s\S]+?)%>/g,V=/<%([\s\S]+?)%>/g,H=/<%=([\s\S]+?)%>/g,z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,G=/^\w*$/,K=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Z=/[\\^$.*+?()[\]{}|]/g,W=RegExp(Z.source),q=/^\s+/,Y=/\s/,Q=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,J=/\{\n\/\* \[wrapped with (.+)\] \*/,X=/,? & /,$=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ee=/[()=,{}\[\]\/\s]/,te=/\\(\\)?/g,re=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ne=/\w*$/,ie=/^[-+]0x[0-9a-f]+$/i,oe=/^0b[01]+$/i,ae=/^\[object .+?Constructor\]$/,se=/^0o[0-7]+$/i,le=/^(?:0|[1-9]\d*)$/,ue=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ce=/($^)/,de=/['\n\r\u2028\u2029\\]/g,fe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",he="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",pe="[\\ud800-\\udfff]",ge="["+he+"]",ve="["+fe+"]",me="\\d+",ye="[\\u2700-\\u27bf]",_e="[a-z\\xdf-\\xf6\\xf8-\\xff]",be="[^\\ud800-\\udfff"+he+me+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",Ce="\\ud83c[\\udffb-\\udfff]",Ee="[^\\ud800-\\udfff]",Ae="(?:\\ud83c[\\udde6-\\uddff]){2}",Se="[\\ud800-\\udbff][\\udc00-\\udfff]",we="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Oe="(?:"+_e+"|"+be+")",ke="(?:"+we+"|"+be+")",Te="(?:"+ve+"|"+Ce+")"+"?",Le="[\\ufe0e\\ufe0f]?"+Te+("(?:\\u200d(?:"+[Ee,Ae,Se].join("|")+")[\\ufe0e\\ufe0f]?"+Te+")*"),Pe="(?:"+[ye,Ae,Se].join("|")+")"+Le,Me="(?:"+[Ee+ve+"?",ve,Ae,Se,pe].join("|")+")",xe=RegExp("['’]","g"),De=RegExp(ve,"g"),Re=RegExp(Ce+"(?="+Ce+")|"+Me+Le,"g"),Ie=RegExp([we+"?"+_e+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[ge,we,"$"].join("|")+")",ke+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[ge,we+Oe,"$"].join("|")+")",we+"?"+Oe+"+(?:['’](?:d|ll|m|re|s|t|ve))?",we+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",me,Pe].join("|"),"g"),Ne=RegExp("[\\u200d\\ud800-\\udfff"+fe+"\\ufe0e\\ufe0f]"),je=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Fe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Be=-1,Ue={};Ue[w]=Ue[O]=Ue[k]=Ue[T]=Ue[L]=Ue[P]=Ue["[object Uint8ClampedArray]"]=Ue[M]=Ue[x]=!0,Ue[l]=Ue[u]=Ue[A]=Ue[c]=Ue[S]=Ue[d]=Ue[f]=Ue[h]=Ue[g]=Ue[v]=Ue[m]=Ue[y]=Ue[_]=Ue[b]=Ue[E]=!1;var Ve={};Ve[l]=Ve[u]=Ve[A]=Ve[S]=Ve[c]=Ve[d]=Ve[w]=Ve[O]=Ve[k]=Ve[T]=Ve[L]=Ve[g]=Ve[v]=Ve[m]=Ve[y]=Ve[_]=Ve[b]=Ve[C]=Ve[P]=Ve["[object Uint8ClampedArray]"]=Ve[M]=Ve[x]=!0,Ve[f]=Ve[h]=Ve[E]=!1;var He={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ze=parseFloat,Ge=parseInt,Ke="object"==typeof e&&e&&e.Object===Object&&e,Ze="object"==typeof self&&self&&self.Object===Object&&self,We=Ke||Ze||Function("return this")(),qe=t&&!t.nodeType&&t,Ye=qe&&"object"==typeof n&&n&&!n.nodeType&&n,Qe=Ye&&Ye.exports===qe,Je=Qe&&Ke.process,Xe=function(){try{var e=Ye&&Ye.require&&Ye.require("util").types;return e||Je&&Je.binding&&Je.binding("util")}catch(e){}}(),$e=Xe&&Xe.isArrayBuffer,et=Xe&&Xe.isDate,tt=Xe&&Xe.isMap,rt=Xe&&Xe.isRegExp,nt=Xe&&Xe.isSet,it=Xe&&Xe.isTypedArray;function ot(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function at(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i-1}function ft(e,t,r){for(var n=-1,i=null==e?0:e.length;++n-1;);return r}function It(e,t){for(var r=e.length;r--&&Ct(t,e[r],0)>-1;);return r}function Nt(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}var jt=Ot({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Ft=Ot({"&":"&","<":"<",">":">",'"':""","'":"'"});function Bt(e){return"\\"+He[e]}function Ut(e){return Ne.test(e)}function Vt(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function Ht(e,t){return function(r){return e(t(r))}}function zt(e,t){for(var r=-1,n=e.length,i=0,o=[];++r",""":'"',"'":"'"});var Qt=function e(t){var r,n=(t=null==t?We:Qt.defaults(We.Object(),t,Qt.pick(We,Fe))).Array,i=t.Date,Y=t.Error,fe=t.Function,he=t.Math,pe=t.Object,ge=t.RegExp,ve=t.String,me=t.TypeError,ye=n.prototype,_e=fe.prototype,be=pe.prototype,Ce=t["__core-js_shared__"],Ee=_e.toString,Ae=be.hasOwnProperty,Se=0,we=(r=/[^.]+$/.exec(Ce&&Ce.keys&&Ce.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Oe=be.toString,ke=Ee.call(pe),Te=We._,Le=ge("^"+Ee.call(Ae).replace(Z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Pe=Qe?t.Buffer:void 0,Me=t.Symbol,Re=t.Uint8Array,Ne=Pe?Pe.allocUnsafe:void 0,He=Ht(pe.getPrototypeOf,pe),Ke=pe.create,Ze=be.propertyIsEnumerable,qe=ye.splice,Ye=Me?Me.isConcatSpreadable:void 0,Je=Me?Me.iterator:void 0,Xe=Me?Me.toStringTag:void 0,yt=function(){try{var e=eo(pe,"defineProperty");return e({},"",{}),e}catch(e){}}(),Ot=t.clearTimeout!==We.clearTimeout&&t.clearTimeout,Jt=i&&i.now!==We.Date.now&&i.now,Xt=t.setTimeout!==We.setTimeout&&t.setTimeout,$t=he.ceil,er=he.floor,tr=pe.getOwnPropertySymbols,rr=Pe?Pe.isBuffer:void 0,nr=t.isFinite,ir=ye.join,or=Ht(pe.keys,pe),ar=he.max,sr=he.min,lr=i.now,ur=t.parseInt,cr=he.random,dr=ye.reverse,fr=eo(t,"DataView"),hr=eo(t,"Map"),pr=eo(t,"Promise"),gr=eo(t,"Set"),vr=eo(t,"WeakMap"),mr=eo(pe,"create"),yr=vr&&new vr,_r={},br=To(fr),Cr=To(hr),Er=To(pr),Ar=To(gr),Sr=To(vr),wr=Me?Me.prototype:void 0,Or=wr?wr.valueOf:void 0,kr=wr?wr.toString:void 0;function Tr(e){if(Ka(e)&&!Ra(e)&&!(e instanceof xr)){if(e instanceof Mr)return e;if(Ae.call(e,"__wrapped__"))return Lo(e)}return new Mr(e)}var Lr=function(){function e(){}return function(t){if(!Ga(t))return{};if(Ke)return Ke(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function Pr(){}function Mr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function xr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Dr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function Qr(e,t,r,n,i,o){var a,s=1&t,u=2&t,f=4&t;if(r&&(a=i?r(e,n,i,o):r(e)),void 0!==a)return a;if(!Ga(e))return e;var E=Ra(e);if(E){if(a=function(e){var t=e.length,r=new e.constructor(t);t&&"string"==typeof e[0]&&Ae.call(e,"index")&&(r.index=e.index,r.input=e.input);return r}(e),!s)return yi(e,a)}else{var D=no(e),R=D==h||D==p;if(Fa(e))return fi(e,s);if(D==m||D==l||R&&!i){if(a=u||R?{}:oo(e),!s)return u?function(e,t){return _i(e,ro(e),t)}(e,function(e,t){return e&&_i(t,Es(t),e)}(a,e)):function(e,t){return _i(e,to(e),t)}(e,Zr(a,e))}else{if(!Ve[D])return i?e:{};a=function(e,t,r){var n=e.constructor;switch(t){case A:return hi(e);case c:case d:return new n(+e);case S:return function(e,t){var r=t?hi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case w:case O:case k:case T:case L:case P:case"[object Uint8ClampedArray]":case M:case x:return pi(e,r);case g:return new n;case v:case b:return new n(e);case y:return function(e){var t=new e.constructor(e.source,ne.exec(e));return t.lastIndex=e.lastIndex,t}(e);case _:return new n;case C:return i=e,Or?pe(Or.call(i)):{}}var i}(e,D,s)}}o||(o=new jr);var I=o.get(e);if(I)return I;o.set(e,a),Qa(e)?e.forEach((function(n){a.add(Qr(n,t,r,n,e,o))})):Za(e)&&e.forEach((function(n,i){a.set(i,Qr(n,t,r,i,e,o))}));var N=E?void 0:(f?u?Wi:Zi:u?Es:Cs)(e);return st(N||e,(function(n,i){N&&(n=e[i=n]),zr(a,i,Qr(n,t,r,i,e,o))})),a}function Jr(e,t,r){var n=r.length;if(null==e)return!n;for(e=pe(e);n--;){var i=r[n],o=t[i],a=e[i];if(void 0===a&&!(i in e)||!o(a))return!1}return!0}function Xr(e,t,r){if("function"!=typeof e)throw new me(o);return Co((function(){e.apply(void 0,r)}),t)}function $r(e,t,r,n){var i=-1,o=dt,a=!0,s=e.length,l=[],u=t.length;if(!s)return l;r&&(t=ht(t,Mt(r))),n?(o=ft,a=!1):t.length>=200&&(o=Dt,a=!1,t=new Nr(t));e:for(;++i-1},Rr.prototype.set=function(e,t){var r=this.__data__,n=Gr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Ir.prototype.clear=function(){this.size=0,this.__data__={hash:new Dr,map:new(hr||Rr),string:new Dr}},Ir.prototype.delete=function(e){var t=Xi(this,e).delete(e);return this.size-=t?1:0,t},Ir.prototype.get=function(e){return Xi(this,e).get(e)},Ir.prototype.has=function(e){return Xi(this,e).has(e)},Ir.prototype.set=function(e,t){var r=Xi(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Nr.prototype.add=Nr.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Nr.prototype.has=function(e){return this.__data__.has(e)},jr.prototype.clear=function(){this.__data__=new Rr,this.size=0},jr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},jr.prototype.get=function(e){return this.__data__.get(e)},jr.prototype.has=function(e){return this.__data__.has(e)},jr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Rr){var n=r.__data__;if(!hr||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Ir(n)}return r.set(e,t),this.size=r.size,this};var en=Ei(un),tn=Ei(cn,!0);function rn(e,t){var r=!0;return en(e,(function(e,n,i){return r=!!t(e,n,i)})),r}function nn(e,t,r){for(var n=-1,i=e.length;++n0&&r(s)?t>1?an(s,t-1,r,n,i):pt(i,s):n||(i[i.length]=s)}return i}var sn=Ai(),ln=Ai(!0);function un(e,t){return e&&sn(e,t,Cs)}function cn(e,t){return e&&ln(e,t,Cs)}function dn(e,t){return ct(t,(function(t){return Va(e[t])}))}function fn(e,t){for(var r=0,n=(t=li(t,e)).length;null!=e&&rt}function vn(e,t){return null!=e&&Ae.call(e,t)}function mn(e,t){return null!=e&&t in pe(e)}function yn(e,t,r){for(var i=r?ft:dt,o=e[0].length,a=e.length,s=a,l=n(a),u=1/0,c=[];s--;){var d=e[s];s&&t&&(d=ht(d,Mt(t))),u=sr(d.length,u),l[s]=!r&&(t||o>=120&&d.length>=120)?new Nr(s&&d):void 0}d=e[0];var f=-1,h=l[0];e:for(;++f=s)return l;var u=r[n];return l*("desc"==u?-1:1)}}return e.index-t.index}(e,t,r)}))}function Rn(e,t,r){for(var n=-1,i=t.length,o={};++n-1;)s!==e&&qe.call(s,l,1),qe.call(e,l,1);return e}function Nn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==o){var o=i;so(i)?qe.call(e,i,1):ei(e,i)}}return e}function jn(e,t){return e+er(cr()*(t-e+1))}function Fn(e,t){var r="";if(!e||t<1||t>9007199254740991)return r;do{t%2&&(r+=e),(t=er(t/2))&&(e+=e)}while(t);return r}function Bn(e,t){return Eo(vo(e,t,Ws),e+"")}function Un(e){return Br(Ps(e))}function Vn(e,t){var r=Ps(e);return wo(r,Yr(t,0,r.length))}function Hn(e,t,r,n){if(!Ga(e))return e;for(var i=-1,o=(t=li(t,e)).length,a=o-1,s=e;null!=s&&++io?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=n(o);++i>>1,a=e[o];null!==a&&!Xa(a)&&(r?a<=t:a=200){var u=t?null:Fi(e);if(u)return Gt(u);a=!1,i=Dt,l=new Nr}else l=t?[]:s;e:for(;++n=n?e:Zn(e,t,r)}var di=Ot||function(e){return We.clearTimeout(e)};function fi(e,t){if(t)return e.slice();var r=e.length,n=Ne?Ne(r):new e.constructor(r);return e.copy(n),n}function hi(e){var t=new e.constructor(e.byteLength);return new Re(t).set(new Re(e)),t}function pi(e,t){var r=t?hi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function gi(e,t){if(e!==t){var r=void 0!==e,n=null===e,i=e==e,o=Xa(e),a=void 0!==t,s=null===t,l=t==t,u=Xa(t);if(!s&&!u&&!o&&e>t||o&&a&&l&&!s&&!u||n&&a&&l||!r&&l||!i)return 1;if(!n&&!o&&!u&&e1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,a&&lo(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),t=pe(t);++n-1?i[o?t[a]:a]:void 0}}function Ti(e){return Ki((function(t){var r=t.length,n=r,i=Mr.prototype.thru;for(e&&t.reverse();n--;){var a=t[n];if("function"!=typeof a)throw new me(o);if(i&&!s&&"wrapper"==Yi(a))var s=new Mr([],!0)}for(n=s?n:r;++n1&&_.reverse(),d&&us))return!1;var u=o.get(e),c=o.get(t);if(u&&c)return u==t&&c==e;var d=-1,f=!0,h=2&r?new Nr:void 0;for(o.set(e,t),o.set(t,e);++d-1&&e%1==0&&e1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(Q,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return st(s,(function(r){var n="_."+r[0];t&r[1]&&!dt(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(J);return t?t[1].split(X):[]}(n),r)))}function So(e){var t=0,r=0;return function(){var n=lr(),i=16-(n-r);if(r=n,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function wo(e,t){var r=-1,n=e.length,i=n-1;for(t=void 0===t?n:t;++r1?e[t-1]:void 0;return r="function"==typeof r?(e.pop(),r):void 0,Yo(e,r)}));function ra(e){var t=Tr(e);return t.__chain__=!0,t}function na(e,t){return t(e)}var ia=Ki((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,i=function(t){return qr(t,e)};return!(t>1||this.__actions__.length)&&n instanceof xr&&so(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:na,args:[i],thisArg:void 0}),new Mr(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(void 0),e}))):this.thru(i)}));var oa=bi((function(e,t,r){Ae.call(e,r)?++e[r]:Wr(e,r,1)}));var aa=ki(Do),sa=ki(Ro);function la(e,t){return(Ra(e)?st:en)(e,Ji(t,3))}function ua(e,t){return(Ra(e)?lt:tn)(e,Ji(t,3))}var ca=bi((function(e,t,r){Ae.call(e,r)?e[r].push(t):Wr(e,r,[t])}));var da=Bn((function(e,t,r){var i=-1,o="function"==typeof t,a=Na(e)?n(e.length):[];return en(e,(function(e){a[++i]=o?ot(t,e,r):_n(e,t,r)})),a})),fa=bi((function(e,t,r){Wr(e,r,t)}));function ha(e,t){return(Ra(e)?ht:Tn)(e,Ji(t,3))}var pa=bi((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]}));var ga=Bn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&lo(e,t[0],t[1])?t=[]:r>2&&lo(t[0],t[1],t[2])&&(t=[t[0]]),Dn(e,an(t,1),[])})),va=Jt||function(){return We.Date.now()};function ma(e,t,r){return t=r?void 0:t,Ui(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function ya(e,t){var r;if("function"!=typeof t)throw new me(o);return e=is(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=void 0),r}}var _a=Bn((function(e,t,r){var n=1;if(r.length){var i=zt(r,Qi(_a));n|=32}return Ui(e,n,t,r,i)})),ba=Bn((function(e,t,r){var n=3;if(r.length){var i=zt(r,Qi(ba));n|=32}return Ui(t,n,e,r,i)}));function Ca(e,t,r){var n,i,a,s,l,u,c=0,d=!1,f=!1,h=!0;if("function"!=typeof e)throw new me(o);function p(t){var r=n,o=i;return n=i=void 0,c=t,s=e.apply(o,r)}function g(e){return c=e,l=Co(m,t),d?p(e):s}function v(e){var r=e-u;return void 0===u||r>=t||r<0||f&&e-c>=a}function m(){var e=va();if(v(e))return y(e);l=Co(m,function(e){var r=t-(e-u);return f?sr(r,a-(e-c)):r}(e))}function y(e){return l=void 0,h&&n?p(e):(n=i=void 0,s)}function _(){var e=va(),r=v(e);if(n=arguments,i=this,u=e,r){if(void 0===l)return g(u);if(f)return di(l),l=Co(m,t),p(u)}return void 0===l&&(l=Co(m,t)),s}return t=as(t)||0,Ga(r)&&(d=!!r.leading,a=(f="maxWait"in r)?ar(as(r.maxWait)||0,t):a,h="trailing"in r?!!r.trailing:h),_.cancel=function(){void 0!==l&&di(l),c=0,n=u=i=l=void 0},_.flush=function(){return void 0===l?s:y(va())},_}var Ea=Bn((function(e,t){return Xr(e,1,t)})),Aa=Bn((function(e,t,r){return Xr(e,as(t)||0,r)}));function Sa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new me(o);var r=function r(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(Sa.Cache||Ir),r}function wa(e){if("function"!=typeof e)throw new me(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Sa.Cache=Ir;var Oa=ui((function(e,t){var r=(t=1==t.length&&Ra(t[0])?ht(t[0],Mt(Ji())):ht(an(t,1),Mt(Ji()))).length;return Bn((function(n){for(var i=-1,o=sr(n.length,r);++i=t})),Da=bn(function(){return arguments}())?bn:function(e){return Ka(e)&&Ae.call(e,"callee")&&!Ze.call(e,"callee")},Ra=n.isArray,Ia=$e?Mt($e):function(e){return Ka(e)&&pn(e)==A};function Na(e){return null!=e&&za(e.length)&&!Va(e)}function ja(e){return Ka(e)&&Na(e)}var Fa=rr||al,Ba=et?Mt(et):function(e){return Ka(e)&&pn(e)==d};function Ua(e){if(!Ka(e))return!1;var t=pn(e);return t==f||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!qa(e)}function Va(e){if(!Ga(e))return!1;var t=pn(e);return t==h||t==p||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ha(e){return"number"==typeof e&&e==is(e)}function za(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Ga(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ka(e){return null!=e&&"object"==typeof e}var Za=tt?Mt(tt):function(e){return Ka(e)&&no(e)==g};function Wa(e){return"number"==typeof e||Ka(e)&&pn(e)==v}function qa(e){if(!Ka(e)||pn(e)!=m)return!1;var t=He(e);if(null===t)return!0;var r=Ae.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Ee.call(r)==ke}var Ya=rt?Mt(rt):function(e){return Ka(e)&&pn(e)==y};var Qa=nt?Mt(nt):function(e){return Ka(e)&&no(e)==_};function Ja(e){return"string"==typeof e||!Ra(e)&&Ka(e)&&pn(e)==b}function Xa(e){return"symbol"==typeof e||Ka(e)&&pn(e)==C}var $a=it?Mt(it):function(e){return Ka(e)&&za(e.length)&&!!Ue[pn(e)]};var es=Ii(kn),ts=Ii((function(e,t){return e<=t}));function rs(e){if(!e)return[];if(Na(e))return Ja(e)?Wt(e):yi(e);if(Je&&e[Je])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Je]());var t=no(e);return(t==g?Vt:t==_?Gt:Ps)(e)}function ns(e){return e?(e=as(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function is(e){var t=ns(e),r=t%1;return t==t?r?t-r:t:0}function os(e){return e?Yr(is(e),0,4294967295):0}function as(e){if("number"==typeof e)return e;if(Xa(e))return NaN;if(Ga(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ga(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Pt(e);var r=oe.test(e);return r||se.test(e)?Ge(e.slice(2),r?2:8):ie.test(e)?NaN:+e}function ss(e){return _i(e,Es(e))}function ls(e){return null==e?"":Xn(e)}var us=Ci((function(e,t){if(ho(t)||Na(t))_i(t,Cs(t),e);else for(var r in t)Ae.call(t,r)&&zr(e,r,t[r])})),cs=Ci((function(e,t){_i(t,Es(t),e)})),ds=Ci((function(e,t,r,n){_i(t,Es(t),e,n)})),fs=Ci((function(e,t,r,n){_i(t,Cs(t),e,n)})),hs=Ki(qr);var ps=Bn((function(e,t){e=pe(e);var r=-1,n=t.length,i=n>2?t[2]:void 0;for(i&&lo(t[0],t[1],i)&&(n=1);++r1),t})),_i(e,Wi(e),r),n&&(r=Qr(r,7,zi));for(var i=t.length;i--;)ei(r,t[i]);return r}));var Os=Ki((function(e,t){return null==e?{}:function(e,t){return Rn(e,t,(function(t,r){return ms(e,r)}))}(e,t)}));function ks(e,t){if(null==e)return{};var r=ht(Wi(e),(function(e){return[e]}));return t=Ji(t),Rn(e,r,(function(e,r){return t(e,r[0])}))}var Ts=Bi(Cs),Ls=Bi(Es);function Ps(e){return null==e?[]:xt(e,Cs(e))}var Ms=wi((function(e,t,r){return t=t.toLowerCase(),e+(r?xs(t):t)}));function xs(e){return Us(ls(e).toLowerCase())}function Ds(e){return(e=ls(e))&&e.replace(ue,jt).replace(De,"")}var Rs=wi((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),Is=wi((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Ns=Si("toLowerCase");var js=wi((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}));var Fs=wi((function(e,t,r){return e+(r?" ":"")+Us(t)}));var Bs=wi((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Us=Si("toUpperCase");function Vs(e,t,r){return e=ls(e),void 0===(t=r?void 0:t)?function(e){return je.test(e)}(e)?function(e){return e.match(Ie)||[]}(e):function(e){return e.match($)||[]}(e):e.match(t)||[]}var Hs=Bn((function(e,t){try{return ot(e,void 0,t)}catch(e){return Ua(e)?e:new Y(e)}})),zs=Ki((function(e,t){return st(t,(function(t){t=ko(t),Wr(e,t,_a(e[t],e))})),e}));function Gs(e){return function(){return e}}var Ks=Ti(),Zs=Ti(!0);function Ws(e){return e}function qs(e){return Sn("function"==typeof e?e:Qr(e,1))}var Ys=Bn((function(e,t){return function(r){return _n(r,e,t)}})),Qs=Bn((function(e,t){return function(r){return _n(e,r,t)}}));function Js(e,t,r){var n=Cs(t),i=dn(t,n);null!=r||Ga(t)&&(i.length||!n.length)||(r=t,t=e,e=this,i=dn(t,Cs(t)));var o=!(Ga(r)&&"chain"in r&&!r.chain),a=Va(e);return st(i,(function(r){var n=t[r];e[r]=n,a&&(e.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=e(this.__wrapped__),i=r.__actions__=yi(this.__actions__);return i.push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,pt([this.value()],arguments))})})),e}function Xs(){}var $s=xi(ht),el=xi(ut),tl=xi(mt);function rl(e){return uo(e)?wt(ko(e)):function(e){return function(t){return fn(t,e)}}(e)}var nl=Ri(),il=Ri(!0);function ol(){return[]}function al(){return!1}var sl=Mi((function(e,t){return e+t}),0),ll=ji("ceil"),ul=Mi((function(e,t){return e/t}),1),cl=ji("floor");var dl,fl=Mi((function(e,t){return e*t}),1),hl=ji("round"),pl=Mi((function(e,t){return e-t}),0);return Tr.after=function(e,t){if("function"!=typeof t)throw new me(o);return e=is(e),function(){if(--e<1)return t.apply(this,arguments)}},Tr.ary=ma,Tr.assign=us,Tr.assignIn=cs,Tr.assignInWith=ds,Tr.assignWith=fs,Tr.at=hs,Tr.before=ya,Tr.bind=_a,Tr.bindAll=zs,Tr.bindKey=ba,Tr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ra(e)?e:[e]},Tr.chain=ra,Tr.chunk=function(e,t,r){t=(r?lo(e,t,r):void 0===t)?1:ar(is(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var o=0,a=0,s=n($t(i/t));oi?0:i+r),(n=void 0===n||n>i?i:is(n))<0&&(n+=i),n=r>n?0:os(n);r>>0)?(e=ls(e))&&("string"==typeof t||null!=t&&!Ya(t))&&!(t=Xn(t))&&Ut(e)?ci(Wt(e),0,r):e.split(t,r):[]},Tr.spread=function(e,t){if("function"!=typeof e)throw new me(o);return t=null==t?0:ar(is(t),0),Bn((function(r){var n=r[t],i=ci(r,0,t);return n&&pt(i,n),ot(e,this,i)}))},Tr.tail=function(e){var t=null==e?0:e.length;return t?Zn(e,1,t):[]},Tr.take=function(e,t,r){return e&&e.length?Zn(e,0,(t=r||void 0===t?1:is(t))<0?0:t):[]},Tr.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?Zn(e,(t=n-(t=r||void 0===t?1:is(t)))<0?0:t,n):[]},Tr.takeRightWhile=function(e,t){return e&&e.length?ri(e,Ji(t,3),!1,!0):[]},Tr.takeWhile=function(e,t){return e&&e.length?ri(e,Ji(t,3)):[]},Tr.tap=function(e,t){return t(e),e},Tr.throttle=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new me(o);return Ga(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Ca(e,t,{leading:n,maxWait:t,trailing:i})},Tr.thru=na,Tr.toArray=rs,Tr.toPairs=Ts,Tr.toPairsIn=Ls,Tr.toPath=function(e){return Ra(e)?ht(e,ko):Xa(e)?[e]:yi(Oo(ls(e)))},Tr.toPlainObject=ss,Tr.transform=function(e,t,r){var n=Ra(e),i=n||Fa(e)||$a(e);if(t=Ji(t,4),null==r){var o=e&&e.constructor;r=i?n?new o:[]:Ga(e)&&Va(o)?Lr(He(e)):{}}return(i?st:un)(e,(function(e,n,i){return t(r,e,n,i)})),r},Tr.unary=function(e){return ma(e,1)},Tr.union=Ko,Tr.unionBy=Zo,Tr.unionWith=Wo,Tr.uniq=function(e){return e&&e.length?$n(e):[]},Tr.uniqBy=function(e,t){return e&&e.length?$n(e,Ji(t,2)):[]},Tr.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?$n(e,void 0,t):[]},Tr.unset=function(e,t){return null==e||ei(e,t)},Tr.unzip=qo,Tr.unzipWith=Yo,Tr.update=function(e,t,r){return null==e?e:ti(e,t,si(r))},Tr.updateWith=function(e,t,r,n){return n="function"==typeof n?n:void 0,null==e?e:ti(e,t,si(r),n)},Tr.values=Ps,Tr.valuesIn=function(e){return null==e?[]:xt(e,Es(e))},Tr.without=Qo,Tr.words=Vs,Tr.wrap=function(e,t){return ka(si(t),e)},Tr.xor=Jo,Tr.xorBy=Xo,Tr.xorWith=$o,Tr.zip=ea,Tr.zipObject=function(e,t){return oi(e||[],t||[],zr)},Tr.zipObjectDeep=function(e,t){return oi(e||[],t||[],Hn)},Tr.zipWith=ta,Tr.entries=Ts,Tr.entriesIn=Ls,Tr.extend=cs,Tr.extendWith=ds,Js(Tr,Tr),Tr.add=sl,Tr.attempt=Hs,Tr.camelCase=Ms,Tr.capitalize=xs,Tr.ceil=ll,Tr.clamp=function(e,t,r){return void 0===r&&(r=t,t=void 0),void 0!==r&&(r=(r=as(r))==r?r:0),void 0!==t&&(t=(t=as(t))==t?t:0),Yr(as(e),t,r)},Tr.clone=function(e){return Qr(e,4)},Tr.cloneDeep=function(e){return Qr(e,5)},Tr.cloneDeepWith=function(e,t){return Qr(e,5,t="function"==typeof t?t:void 0)},Tr.cloneWith=function(e,t){return Qr(e,4,t="function"==typeof t?t:void 0)},Tr.conformsTo=function(e,t){return null==t||Jr(e,t,Cs(t))},Tr.deburr=Ds,Tr.defaultTo=function(e,t){return null==e||e!=e?t:e},Tr.divide=ul,Tr.endsWith=function(e,t,r){e=ls(e),t=Xn(t);var n=e.length,i=r=void 0===r?n:Yr(is(r),0,n);return(r-=t.length)>=0&&e.slice(r,i)==t},Tr.eq=Pa,Tr.escape=function(e){return(e=ls(e))&&B.test(e)?e.replace(j,Ft):e},Tr.escapeRegExp=function(e){return(e=ls(e))&&W.test(e)?e.replace(Z,"\\$&"):e},Tr.every=function(e,t,r){var n=Ra(e)?ut:rn;return r&&lo(e,t,r)&&(t=void 0),n(e,Ji(t,3))},Tr.find=aa,Tr.findIndex=Do,Tr.findKey=function(e,t){return _t(e,Ji(t,3),un)},Tr.findLast=sa,Tr.findLastIndex=Ro,Tr.findLastKey=function(e,t){return _t(e,Ji(t,3),cn)},Tr.floor=cl,Tr.forEach=la,Tr.forEachRight=ua,Tr.forIn=function(e,t){return null==e?e:sn(e,Ji(t,3),Es)},Tr.forInRight=function(e,t){return null==e?e:ln(e,Ji(t,3),Es)},Tr.forOwn=function(e,t){return e&&un(e,Ji(t,3))},Tr.forOwnRight=function(e,t){return e&&cn(e,Ji(t,3))},Tr.get=vs,Tr.gt=Ma,Tr.gte=xa,Tr.has=function(e,t){return null!=e&&io(e,t,vn)},Tr.hasIn=ms,Tr.head=No,Tr.identity=Ws,Tr.includes=function(e,t,r,n){e=Na(e)?e:Ps(e),r=r&&!n?is(r):0;var i=e.length;return r<0&&(r=ar(i+r,0)),Ja(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&Ct(e,t,r)>-1},Tr.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:is(r);return i<0&&(i=ar(n+i,0)),Ct(e,t,i)},Tr.inRange=function(e,t,r){return t=ns(t),void 0===r?(r=t,t=0):r=ns(r),function(e,t,r){return e>=sr(t,r)&&e=-9007199254740991&&e<=9007199254740991},Tr.isSet=Qa,Tr.isString=Ja,Tr.isSymbol=Xa,Tr.isTypedArray=$a,Tr.isUndefined=function(e){return void 0===e},Tr.isWeakMap=function(e){return Ka(e)&&no(e)==E},Tr.isWeakSet=function(e){return Ka(e)&&"[object WeakSet]"==pn(e)},Tr.join=function(e,t){return null==e?"":ir.call(e,t)},Tr.kebabCase=Rs,Tr.last=Uo,Tr.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=n;return void 0!==r&&(i=(i=is(r))<0?ar(n+i,0):sr(i,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,i):bt(e,At,i,!0)},Tr.lowerCase=Is,Tr.lowerFirst=Ns,Tr.lt=es,Tr.lte=ts,Tr.max=function(e){return e&&e.length?nn(e,Ws,gn):void 0},Tr.maxBy=function(e,t){return e&&e.length?nn(e,Ji(t,2),gn):void 0},Tr.mean=function(e){return St(e,Ws)},Tr.meanBy=function(e,t){return St(e,Ji(t,2))},Tr.min=function(e){return e&&e.length?nn(e,Ws,kn):void 0},Tr.minBy=function(e,t){return e&&e.length?nn(e,Ji(t,2),kn):void 0},Tr.stubArray=ol,Tr.stubFalse=al,Tr.stubObject=function(){return{}},Tr.stubString=function(){return""},Tr.stubTrue=function(){return!0},Tr.multiply=fl,Tr.nth=function(e,t){return e&&e.length?xn(e,is(t)):void 0},Tr.noConflict=function(){return We._===this&&(We._=Te),this},Tr.noop=Xs,Tr.now=va,Tr.pad=function(e,t,r){e=ls(e);var n=(t=is(t))?Zt(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return Di(er(i),r)+e+Di($t(i),r)},Tr.padEnd=function(e,t,r){e=ls(e);var n=(t=is(t))?Zt(e):0;return t&&nt){var n=e;e=t,t=n}if(r||e%1||t%1){var i=cr();return sr(e+i*(t-e+ze("1e-"+((i+"").length-1))),t)}return jn(e,t)},Tr.reduce=function(e,t,r){var n=Ra(e)?gt:kt,i=arguments.length<3;return n(e,Ji(t,4),r,i,en)},Tr.reduceRight=function(e,t,r){var n=Ra(e)?vt:kt,i=arguments.length<3;return n(e,Ji(t,4),r,i,tn)},Tr.repeat=function(e,t,r){return t=(r?lo(e,t,r):void 0===t)?1:is(t),Fn(ls(e),t)},Tr.replace=function(){var e=arguments,t=ls(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Tr.result=function(e,t,r){var n=-1,i=(t=li(t,e)).length;for(i||(i=1,e=void 0);++n9007199254740991)return[];var r=4294967295,n=sr(e,4294967295);e-=4294967295;for(var i=Lt(n,t=Ji(t));++r=o)return e;var s=r-Zt(n);if(s<1)return n;var l=a?ci(a,0,s).join(""):e.slice(0,s);if(void 0===i)return l+n;if(a&&(s+=l.length-s),Ya(i)){if(e.slice(s).search(i)){var u,c=l;for(i.global||(i=ge(i.source,ls(ne.exec(i))+"g")),i.lastIndex=0;u=i.exec(c);)var d=u.index;l=l.slice(0,void 0===d?s:d)}}else if(e.indexOf(Xn(i),s)!=s){var f=l.lastIndexOf(i);f>-1&&(l=l.slice(0,f))}return l+n},Tr.unescape=function(e){return(e=ls(e))&&F.test(e)?e.replace(N,Yt):e},Tr.uniqueId=function(e){var t=++Se;return ls(e)+t},Tr.upperCase=Bs,Tr.upperFirst=Us,Tr.each=la,Tr.eachRight=ua,Tr.first=No,Js(Tr,(dl={},un(Tr,(function(e,t){Ae.call(Tr.prototype,t)||(dl[t]=e)})),dl),{chain:!1}),Tr.VERSION="4.17.21",st(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Tr[e].placeholder=Tr})),st(["drop","take"],(function(e,t){xr.prototype[e]=function(r){r=void 0===r?1:ar(is(r),0);var n=this.__filtered__&&!t?new xr(this):this.clone();return n.__filtered__?n.__takeCount__=sr(r,n.__takeCount__):n.__views__.push({size:sr(r,4294967295),type:e+(n.__dir__<0?"Right":"")}),n},xr.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),st(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;xr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Ji(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),st(["head","last"],(function(e,t){var r="take"+(t?"Right":"");xr.prototype[e]=function(){return this[r](1).value()[0]}})),st(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");xr.prototype[e]=function(){return this.__filtered__?new xr(this):this[r](1)}})),xr.prototype.compact=function(){return this.filter(Ws)},xr.prototype.find=function(e){return this.filter(e).head()},xr.prototype.findLast=function(e){return this.reverse().find(e)},xr.prototype.invokeMap=Bn((function(e,t){return"function"==typeof e?new xr(this):this.map((function(r){return _n(r,e,t)}))})),xr.prototype.reject=function(e){return this.filter(wa(Ji(e)))},xr.prototype.slice=function(e,t){e=is(e);var r=this;return r.__filtered__&&(e>0||t<0)?new xr(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),void 0!==t&&(r=(t=is(t))<0?r.dropRight(-t):r.take(t-e)),r)},xr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},xr.prototype.toArray=function(){return this.take(4294967295)},un(xr.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),i=Tr[n?"take"+("last"==t?"Right":""):t],o=n||/^find/.test(t);i&&(Tr.prototype[t]=function(){var t=this.__wrapped__,a=n?[1]:arguments,s=t instanceof xr,l=a[0],u=s||Ra(t),c=function(e){var t=i.apply(Tr,pt([e],a));return n&&d?t[0]:t};u&&r&&"function"==typeof l&&1!=l.length&&(s=u=!1);var d=this.__chain__,f=!!this.__actions__.length,h=o&&!d,p=s&&!f;if(!o&&u){t=p?t:new xr(this);var g=e.apply(t,a);return g.__actions__.push({func:na,args:[c],thisArg:void 0}),new Mr(g,d)}return h&&p?e.apply(this,a):(g=this.thru(c),h?n?g.value()[0]:g.value():g)})})),st(["pop","push","shift","sort","splice","unshift"],(function(e){var t=ye[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Tr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(Ra(i)?i:[],e)}return this[r]((function(r){return t.apply(Ra(r)?r:[],e)}))}})),un(xr.prototype,(function(e,t){var r=Tr[t];if(r){var n=r.name+"";Ae.call(_r,n)||(_r[n]=[]),_r[n].push({name:t,func:r})}})),_r[Li(void 0,2).name]=[{name:"wrapper",func:void 0}],xr.prototype.clone=function(){var e=new xr(this.__wrapped__);return e.__actions__=yi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=yi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=yi(this.__views__),e},xr.prototype.reverse=function(){if(this.__filtered__){var e=new xr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},xr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Ra(e),n=t<0,i=r?e.length:0,o=function(e,t,r){var n=-1,i=r.length;for(;++n=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},Tr.prototype.plant=function(e){for(var t,r=this;r instanceof Pr;){var n=Lo(r);n.__index__=0,n.__values__=void 0,t?i.__wrapped__=n:t=n;var i=n;r=r.__wrapped__}return i.__wrapped__=e,t},Tr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof xr){var t=e;return this.__actions__.length&&(t=new xr(this)),(t=t.reverse()).__actions__.push({func:na,args:[Go],thisArg:void 0}),new Mr(t,this.__chain__)}return this.thru(Go)},Tr.prototype.toJSON=Tr.prototype.valueOf=Tr.prototype.value=function(){return ni(this.__wrapped__,this.__actions__)},Tr.prototype.first=Tr.prototype.head,Je&&(Tr.prototype[Je]=function(){return this}),Tr}();We._=Qt,void 0===(i=function(){return Qt}.call(t,r,t,n))||(n.exports=i)}).call(this)}).call(this,r(155),r(350)(e))},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAOdJREFUOBGtlEEOgyAQRYXoAWrShRfoppdoe/H2Ej2DCxJ7AE3sPKOGUgY0cVbA/P8YBrQoJJxzl7Ztz4z3BB68eAyDvu9fMu6MMfemaRyJXAAZx/EpurqqqpsdhuEjk04WryS2VLZA8OCFYdjZT0hV71RlmnYCbYVpEPwrKAdLQf5AGox1+kdPtKP/VISBCHdnLQUhHwWR8GGTMHMJFtEREa3Ir4aesNHuo4UQ3tQM2t7sGGT5ZFI5NlqPlhMiTmkmUEoAwA9Na7SEbw7HMY8ty/Ikwlp7sSGEOX2z1j7mG61nxjE/ti9bnUOcIiJWhgAAAABJRU5ErkJggg=="},,,function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAASElEQVR4AWMYPMDY2Pg/sRinAcRYNNwNgGFkMZzylNg2iA0wNTW1A2p6DaJhBqCLk2QIyABkPskuARkA00yO/+WgBsjRNBMCALF3R8EeB25UAAAAAElFTkSuQmCC"},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAhElEQVR4Ae3OAQbAMBQD0F5iu0hbKL3Qzrv7bD4+BDLWoCR8qN+fVxwHU2t9FLMfoCyKAQYYsC8Ahxwm/zcC8CBAHQMM6L1fc87jKyB248+y8ihprd2JQACWx268L0HkQUAAgO9KEAlg5TJEAki5DpEAUq5D5JByHYKUazPGOBPwt9x5AUD4HGzwiqKGAAAAAElFTkSuQmCC"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1844);Object.defineProperty(t,"LocaleSwitcher",{enumerable:!0,get:function(){return n.LocaleSwitcher}})},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgwIiBoZWlnaHQ9IjU2IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxwYXRoIGZpbGw9IiNGM0YzRjMiIGQ9Ik03MiAxMS41aDMydjMySDcyeiIvPgogIDxwYXRoIGQ9Ik03NCAxMi41aDI4di0ySDc0djJ6bTI5IDF2MjhoMnYtMjhoLTJ6bS0xIDI5SDc0djJoMjh2LTJ6bS0yOS0xdi0yOGgtMnYyOGgyem0xIDFjLS41NTIzIDAtMS0uNDQ3Ny0xLTFoLTJjMCAxLjY1NjkgMS4zNDMxIDMgMyAzdi0yem0yOS0xYzAgLjU1MjMtLjQ0NzcgMS0xIDF2MmMxLjY1NjkgMCAzLTEuMzQzMSAzLTNoLTJ6bS0xLTI5Yy41NTIzIDAgMSAuNDQ3NyAxIDFoMmMwLTEuNjU2OS0xLjM0MzEtMy0zLTN2MnptLTI4LTJjLTEuNjU2OSAwLTMgMS4zNDMxLTMgM2gyYzAtLjU1MjMuNDQ3Ny0xIDEtMXYtMnoiIGZpbGwtb3BhY2l0eT0iLjE1Ii8+CiAgPHBhdGggZmlsbD0iI0YzRjNGMyIgZD0iTTEyMCAxMS41aDEwOS4zMzN2MTJIMTIwem0wIDIwaDE2NHYxMkgxMjB6Ii8+Cjwvc3ZnPgo="},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgwIiBoZWlnaHQ9IjU2IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxwYXRoIGZpbGw9IiMzMDMwMzAiIGQ9Ik03MiAxMS41aDMydjMySDcyeiIvPgogIDxwYXRoIGZpbGwtb3BhY2l0eT0iLjE1IiBkPSJNNzQgMTIuNWgyOHYtMkg3NHYyem0yOSAxdjI4aDJ2LTI4aC0yem0tMSAyOUg3NHYyaDI4di0yem0tMjktMXYtMjhoLTJ2MjhoMnptMSAxYy0uNTUyMyAwLTEtLjQ0NzctMS0xaC0yYzAgMS42NTY5IDEuMzQzMSAzIDMgM3YtMnptMjktMWMwIC41NTIzLS40NDc3IDEtMSAxdjJjMS42NTY5IDAgMy0xLjM0MzEgMy0zaC0yem0tMS0yOWMuNTUyMyAwIDEgLjQ0NzcgMSAxaDJjMC0xLjY1NjktMS4zNDMxLTMtMy0zdjJ6bS0yOC0yYy0xLjY1NjkgMC0zIDEuMzQzMS0zIDNoMmMwLS41NTIzLjQ0NzctMSAxLTF2LTJ6Ii8+CiAgPHBhdGggZmlsbD0iIzMwMzAzMCIgZD0iTTEyMCAxMS41aDEwOS4zMzN2MTJIMTIwem0wIDIwaDE2NHYxMkgxMjB6Ii8+Cjwvc3ZnPgo="},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPHBhdGggZmlsbD0icmdiKDE1MywgMTUzLCAxNTMpIiBmaWxsLXJ1bGU9Im5vbnplcm8iIGQ9Ik0xOSA2LjQxTDE3LjU5IDUgMTIgMTAuNTkgNi40MSA1IDUgNi40MSAxMC41OSAxMiA1IDE3LjU5IDYuNDEgMTkgMTIgMTMuNDEgMTcuNTkgMTkgMTkgMTcuNTkgMTMuNDEgMTJ6Ii8+CiAgICA8L2c+Cjwvc3ZnPgo="},function(e,t,r){e.exports=r.p+"assets/images/stations-dark-ac5da2cb.svg"},function(e,t,r){e.exports=r.p+"assets/images/stations-dark-bd0284e2.svg"},function(e,t,r){e.exports=r.p+"assets/images/stations-dark-4f8bb702.svg"},function(e,t,r){e.exports=r.p+"assets/images/waves-37181b61.svg"},function(e,t,r){e.exports=r.p+"assets/images/saturation-668d0a0e.png"},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAABkCAMAAABw8qpSAAABLFBMVEXqFBb/ABH/ACL/ADH/AEH/AFD/AGD/AG7/AH7/AI3/AJ3/AKz/ALz/AMr/ANv/AOr/APr2AP/mAP/XAP/HAP+4AP+oAP+aAP+JAP97AP9rAP9cAP9MAP8+AP8tAP8fAP8PAP8BAv8AEP8AH/8AL/8APv8ATv8AXP8Abf8Ae/8Ai/8Amv8Aqv8AuP8Ayf8A1/8A5/8A9/8A//gA/+kA/9kA/8oA/7oA/6wA/5sA/40A/30A/24A/14A/1AA/z8A/zEA/yEA/xEB/wMN/wAd/wAs/wA8/wBK/wBb/wBp/wB5/wCI/wCY/wCm/wC3/wDF/wDV/wDk/wD1/wD/+gD/7AD/3AD/zAD/vgD/rQD/nwD/jgD/gAD/cAD/YgD/UQD/QwD/MgD/JAD/FAD4Eg42qAedAAAAh0lEQVR4XgXAg3EDAAAAwI9to7Zt27a1/w49BASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTS1tHXo1KVbj159+g0YNGTYiFFjxk2YNGXajFlz5i1YtGTZilVr1m3YtGXbjl179h04dOTYiVNnzl24dOXajVt37j149OTZi1dv3n349OXbj19//wOxE1dQ8reGAAAAAElFTkSuQmCC"},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAABkCAQAAAAVxWkcAAABr0lEQVR4Xo2VwU0DQQxF7dmRuNIFlzlSAR3QAaXQQdIBJVABFXDcOVAAd67cjJLR07dkhcSrkZKfb/t7bG88rFo3B5gZPMNycItu2xloGV7MWHzM9zuzFWCkmA0nK6AszCUJDW6+mG6R03ncw5v8EMTEvZ2O3AliYjpslblc0RF9LmZYWxURU6aKytWZYsoWCAe+xwOZp1GsEukGiIkYxcQCHck99+gRgB7JncyIB5SGEhP3Yh5P6JwX+u6AnYot104d8DJT7uH7M9JH6OZbimj0vfMVaYnJIZFJDBW9kHlerL2C6JV4mSt7uuo2N57RxnZ+usQjn0R1jwBJBrNO3evJpVYUWsJ/E3UiXRlv24/7YZ04xmEdWlzcKS+B/eapeyMvFd2k0+hRk/T0AmTW8h69s2sjYMsdPntECiILhAeIMZAeH4QvUwfn6ijC0tTV+fT9ky8jM9nK2g7Ly1VjSpKYq6IvsAm7MtNu1orEqa/K3KNvgMFdhfquPfJmp2dbh0/8Gzb6Y22ViaNr6n5410zXdngVhbu6XqdOtWOuin5hjABGp4a2uotZ71MVCfwDBt2/v37yo6AAAAAASUVORK5CYII="},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAABCAMAAAAfBfuPAAABLFBMVEXqFBb/ABH/ACL/ADH/AEH/AFD/AGD/AG7/AH7/AI3/AJ3/AKz/ALz/AMr/ANv/AOr/APr2AP/mAP/XAP/HAP+4AP+oAP+aAP+JAP97AP9rAP9cAP9MAP8+AP8tAP8fAP8PAP8BAv8AEP8AH/8AL/8APv8ATv8AXP8Abf8Ae/8Ai/8Amv8Aqv8AuP8Ayf8A1/8A5/8A9/8A//gA/+kA/9kA/8oA/7oA/6wA/5sA/40A/30A/24A/14A/1AA/z8A/zEA/yEA/xEB/wMN/wAd/wAs/wA8/wBK/wBb/wBp/wB5/wCI/wCY/wCm/wC3/wDF/wDV/wDk/wD1/wD/+gD/7AD/3AD/zAD/vgD/rQD/nwD/jgD/gAD/cAD/YgD/UQD/QwD/MgD/JAD/FAD4Eg42qAedAAAAbUlEQVR4XgXAghEDsbxtlrZt27ax/w49ACAYQTGcICmaYTleECVZUTXdMC1Wm93hdLk9Xp8/EAyFI9FYPJFMpTPZXL5QLJUr1Vq90Wy1O91efzAcjSfT2XyxXK03293+cDydL9fb/fF8vT/f3x+LfRNXARMbCAAAAABJRU5ErkJggg=="},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAKCAQAAADoFTP1AAAB9ElEQVR4XoWTQW4VMRBEu9qWEimL7DhEMp8NF+ASnJJLcAQgE1bcgBUSkYKUuHCrZ9pjeqSU5Yn9LPu7umJQBIIv+k7vIOrtK66L4lmr3pVOrOv3otp619KZ0/KjdNI79L52Uo09FBQWrU0vfe5trezU+hLsoUKd3Repovte+0vbq/7Lj5XbaHECKasR9G4MPlbp+gzZxd6koPEJCkAYC5SjcOTAIIOK90Dja1IfIZ8Z+zAY9jm3b5Ia+MT5sFcqRJrR2AYYA8Kua5BzYRrFPNmD4PQMegGJMOffJJUsWiI3nCHZZjInNdffLWOufzbc3JaboCAVxwmnRHbhLSPwRJ4wU0BRSc6HkECYYVw95nMKgJOcylxrJttE5Ibzf9Xq9GPvP+WX3MiV/MGHfRu/SentRQrfG1GzsIrytdNXucSRKxQNIGHM9YhGFQJcdjNcBZvfJayuYe4Sia1CzwW+19mWOhe37HsxJWKwbu/jluEU15QzAQjAqCEbhMJc78GYV2E0kooHDubUImWkTOhGpgv8PoT8DJG/bzxna4BZ0eOFSOaLADGeSpFsg5AzeaDZIDQQXjZ4y/8ryfzUXBwdELRjTjCNvOeT0rNlrJz90vwy6N9pXXQEluX0inElpPWokSdiLCfiNJJjMKQ8Qsh8GEKQKMo/eiHrNbI9UksAAAAASUVORK5CYII="},function(e,t,r){e.exports=r.p+"assets/images/visual-13f1a3d3.svg"},function(e,t,r){e.exports=r.p+"assets/images/classic-light-75c1db47.svg"},function(e,t,r){e.exports=r.p+"assets/images/classic-dark-826d7b78.svg"},function(e,t,r){e.exports=r.p+"assets/images/mini-light-aa88e8ae.svg"},function(e,t,r){e.exports=r.p+"assets/images/mini-dark-c5bfbdaa.svg"},function(e,t,r){e.exports=r.p+"assets/images/at-icon-d02289ec.svg"},function(e,t,r){e.exports=r.p+"assets/images/playlist-cover-bg_small-1e402003.png"},function(e,t,r){e.exports=r.p+"assets/images/playlist-cover-bg_small@2x-c437aa7f.png"},function(e,t,r){e.exports=r.p+"assets/images/abla-0994d1c6.jpg"},,,function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAICAYAAADA+m62AAAAL0lEQVQY02NgIBf8D2Kw+x/CcPp/KMMpEBu3Qoii/2AMZBOnEGgqYatBGJ/V9AMAio8geR9OCzIAAAAASUVORK5CYII="},,,,,,,,function(e,t,r){var n={buttonText:r(2).Lingua.t("I need help"),buttonLink:"https://help.soundcloud.com"},i={buttonText:r(2).Lingua.t("Learn more"),buttonLink:"https://help.soundcloud.com/hc/articles/115003563948-Can-t-find-a-track-anymore"},o={buttonText:r(2).Lingua.t("Get latest status"),buttonLink:"https://status.soundcloud.com"},a={buttonText:r(2).Lingua.t("Back to home"),buttonLink:"/discover"};e.exports={UNKNOWN:r(1).assign({title:r(2).Lingua.t("Something doesn’t sound right."),message:r(2).Lingua.t("A report has been sent to our tech team,
and they’re looking into the problem.
Please check back in a bit.")},o),PAGE_NOT_FOUND:r(1).assign({title:r(2).Lingua.t("We can’t find that page.")},n),SOUND_NOT_FOUND:r(1).assign({title:r(2).Lingua.t("We can’t find that track."),message:r(2).Lingua.t("Did you try to access a private track while not being signed in?
Maybe the track has been removed.")},i),PLAYLIST_NOT_FOUND:r(1).assign({title:r(2).Lingua.t("We can’t find that playlist."),message:r(2).Lingua.t("This playlist is not available. You may have to log in to view this playlist, or it may have been deleted or made private by the creator."),BackToHomeButton:a},i),STATION_NOT_FOUND:r(1).assign({title:r(2).Lingua.t("We can’t find that station.")},n),USER_NOT_FOUND:r(1).assign({title:r(2).Lingua.t("We can’t find that user.")},n),USER_INFO_NOT_LOADED:r(1).assign({title:r(2).Lingua.t("We’re unable to load your profile information at the moment.")},n)}},,function(e,t,r){function n(e,t){var r=e.previousAttributes().username;/^user\d+$/.test(r)&&this.set("permalink",t.replace(/^[_-]/,"").replace(/[_-]$/,"").replace(/([_-]){2,}/g,"$1").replace(/[^a-z0-9_-]/g,""))}function i(){var e=this.getAttributesFromModel();this.set(e),this.unsetImageFile({force:!0}),this.markFieldsClean(),this.resetAllFieldValidations()}e.exports=r(110).extend(r(749),r(243).withOptions({attr:"username"}),r(337),{resource_type:"profile-settings",_meUser:null,_webProfileForms:null,_webProfilesDisabled:!1,fields:{username:{defaultValue:""},permalink:{defaultValue:""},description:{defaultValue:""},avatar_url:{defaultValue:null},first_name:{defaultValue:""},last_name:{defaultValue:""},city:{defaultValue:""},country_code:{defaultValue:""}},constraints:{username:[[r(98),{message:r(2).Lingua.t("Enter your display name. You can change it later.")}],[r(122),{maxLength:50,message:function(){return r(2).Lingua.t("Enter a display name that is up to [[maxLength]] characters.",{maxLength:this.maxLength})}}]],permalink:[[r(98),{message:r(2).Lingua.t("Enter a profile URL.")}],[r(1618),{getResource:function(){return r(4).get("me")}}]],first_name:[[r(122),{maxLength:35,message:function(){return r(2).Lingua.t("Enter a name that is up to [[maxLength]] characters.",{maxLength:this.maxLength})}}]],last_name:[[r(122),{maxLength:35,message:function(){return r(2).Lingua.t("Enter a name that is up to [[maxLength]] characters.",{maxLength:this.maxLength})}}]],city:[[r(122),{maxLength:35,message:function(){return r(2).Lingua.t("Enter a city that is up to [[maxLength]] characters.",{maxLength:this.maxLength})}}]]},actions:{default:"save",save:function(){var e=this,t=r(10).defer();return this.validate().done((function(n){n?function(e){if(function(e){var t=e.getMeUser();return t.get("verified")&&e.get("username")!==t.get("username")}(e))return r(404).confirm(r(2).Lingua.t("Are you sure? If you change your display name your verified status will be at risk and you may need to reapply."));return r(10).resolve()}(e).then((function(){e.saveEdits().done((function(){e.trigger("saved"),t.resolve(),e.markFieldsClean()})).fail(t.reject)}),t.reject):t.reject()})),t},cancel:function(){this.cancelEdits()}},buttons:{save:{label:r(2).Lingua.t("Save changes"),pendingLabel:r(2).Lingua.t("Saving"),action:"save"},cancel:{label:r(2).Lingua.t("Cancel"),action:"cancel"}},setFieldDisabled:function(e,t){"web-profiles"===e?this._webProfilesDisabled=!!t:r(110).prototype.setFieldDisabled.call(this,e,!!t)},setup:function(){this._meUser=r(4).get("me"),this._webProfileForms=new(r(1036))(null,{userId:this._meUser.id}),this.listenTo(this._webProfileForms,"form:dirty",this.enableAction).listenTo(this._webProfileForms,"form:clean",this.disableAction).listenTo(this,"imageDataChanged",this.markFieldsDirty.bind(this,"avatar_url")).listenTo(this,"change:avatar_url",this.markFieldsDirty.bind(this,"avatar_url")),this.listenTo(this._meUser,"change:avatar_url",i),i.call(this),this.listenTo(this,"change:username",n)},getMeUser:function(){return this._meUser},getWebProfileForms:function(){return this._webProfileForms},cancelEdits:function(){this.unsetImageFile(),i.call(this),this.trigger("canceled"),this.getWebProfileForms().fetch()},isDirty:function(){var e=r(110).prototype.isDirty.apply(this,arguments);return e||this.getWebProfileForms().some((function(e){return e.isDirty()}),this)},markFieldsClean:function(){r(110).prototype.markFieldsClean.apply(this,arguments),this.getWebProfileForms().invoke("markFieldsClean")},validate:function(){return r(10).allTruthy([r(110).prototype.validate.apply(this,arguments),this._webProfilesDisabled?r(10).value(!0):this.getWebProfileForms().validate()])},saveEdits:function(){var e=this,t=this.getMeUser(),n=this.getWebProfileForms(),i=this.getAttributesToBeSaved(),o=[],a=r(1).clone(t.attributes);t.set(i),this._webProfilesDisabled||o.push(n.saveEdits()),o.push(t.save(i));var s=this.getImageFileInfo();return s.file?(t.setImageFile(s.file,s.source),t.once("imageTranscodingDone",(function(t){e.unsetImageFile({silent:!0}),e.set("avatar_url",t.avatar_url)})),o.push(t.uploadImage())):a.avatar_url&&!this.attributes.avatar_url&&o.push(t.deleteImage()),this.isDirty(Object.keys(i))&&r(518).trackUserProfileMetadataUpdated(r(4).get("me").getUrn()),this.isDirty("avatar_url")&&r(518).trackUserProfileImageUpdated(r(4).get("me").getUrn()),r(10).all(o).done((function(){var e=new(r(45))({id:t.get("id")});n.fetch(),e.fetch(),e.release(),r(11).trigger("profile:saved",{previousAttributes:a,attributes:i})}))},getAttributesToBeSaved:function(){return r(1).pick(this.attributes,"city","country_code","first_name","last_name","description","permalink","username")},getAttributesFromModel:function(){var e=this.getMeUser(),t=r(1).pick(e.attributes,"avatar_url","city","first_name","last_name","description","permalink","username");return t.country_code=e.getCountryCode(),t}},{hashFn:function(){return 1},onCleanup:function(e){e._webProfileForms.release()}})},,,,,,,,function(e,t,r){var n={bandpage:/\bbandpage\.com/i,bandcamp:/\bbandcamp\.com/i,bandsintown:/\bbandsintown\.com/i,beatport:/\bbeatport\.com/i,berklee:/\bberkleemusic\.com/i,ccmixter:/\bccmixter\.org/i,discogs:/\bdiscogs\.com/i,facebook:/\bfacebook\.com/i,flavors:/\bflavors.me/i,flickr:/\bflickr\.com/i,foursquare:/\bfoursquare\.com/i,freesound:/\bfreesound\.org/i,gigatools:/\bgigs\.gigatools\.com/i,google_plus:/\bplus\.google\.com/i,hypem:/\bhypem\.com/i,instagram:/\binstagram\.com/i,itunes_podcast:/\bitunes\.apple\.com/i,lastfm:/\b(last\.fm|lastfm\.[a-z]*)/i,linktree:/\blinktr\.ee/i,mixcloud:/\bmixcloud\.com/i,myspace:/\bmyspace\.com/i,ning:/\bning\.com/i,pinterest:/\bpinterest\.com/i,purevolume:/\bpurevolume\.com/i,residentadvisor:/\bresidentadvisor\.net\/(profile|dj)/i,residentadvisorlabel:/\bresidentadvisor\.net\/record-label/i,reverbnation:/\breverbnation\.com/i,snapchat:/\bsnapchat\.com/i,songkick:/\bsongkick\.com/i,soundcloud:/\bsoundcloud\.com/i,spotify:/\bspotify\.com/i,thedjlist:/\bthedjlist.com/i,tumblr:/\btumblr\.com/i,twitter:/\btwitter\.com/i,vimeo:/\bvimeo\.com/i,vkontakte:/\bvk\.com/i,virb:/\bvirb\.com/i,whatpeopleplay:/\bwhatpeopleplay\.com/i,wordpress:/\bwordpress\.com/i,youtube:/\byoutube\.com/i,zeroinch:/\bzero-inch\.com/i},i=new RegExp("^(https?://)?(www.)?("+["paypal\\.me\\/","paypal\\.com\\/","patreon\\.com\\/","[a-z0-9-]+\\.bandcamp\\.com(\\/|$)","cash\\.app\\/","cash\\.me\\/","([a-z0-9-]+\\.)?myshopify\\.com(\\/|$)","venmo\\.com\\/","gofundme\\.com\\/","kickstarter\\.com\\/","kck\\.st\\/"].join("|")+")","i"),o=r(121).extend({message:r(2).Lingua.t("This platform is not yet supported."),shouldCheck:function(e){return!!e&&this.isSupportLink()},check:function(e,t){t(!(this.shouldCheck.call(this._form,e)&&!1===i.test(e)))}});e.exports=r(110).extend({resource_type:"web-profile-form",_webProfile:null,fields:{icon:{defaultValue:""},url:{defaultValue:""},title:{defaultValue:""}},constraints:{url:[[r(98),{message:r(2).Lingua.t("Enter a web or email address.")}],[r(1037),{message:r(2).Lingua.t("This URL or email is invalid."),constraints:[[r(402),{strict:!1}],[r(982)]]}],[o]]},constraintConditions:{url:{fields:["title"],constraints:[r(98)],check:Boolean}},setup:function(e,t){this._webProfile=new(r(671))(e,t),this.addSubmodel(this._webProfile),l.call(this),this.listenTo(this,"change:url",a).listenTo(this,"change:network",s)},removeWebProfile:function(){this.trigger("form:dirty"),this.destroy()},getAttributesFromModel:function(){var e=this._webProfile.getNetworkClassName();return r(1).assign(this.getWebProfile().pick("id","title","url","network"),{icon:e})},getWebProfile:function(){return this._webProfile},isEmpty:function(){var e=this,t=function(t){return e.get(t)};return!t("url")&&!t("title")},isSupportLink:function(){return/^support(:[a-z]+)?$/.test((this.get("network")||"").trim())}});function a(e,t){var i=r(164).isEmail(t),o=t&&(i?t:r(33).normalize(t))||"";o!==t&&this.set("url",o),this.isSupportLink()||this.set("network",function(e){var t;if(!e)return"";if(r(1).any(n,(function(r,n){if(r.test(e))return t=n,!0})),r(164).isEmail(e))return"email";return t||"personal"}(o))}function s(e,t){this._webProfile.set("network",t),this.set("icon",this._webProfile.getNetworkClassName())}function l(){var e=this.getAttributesFromModel();this.set(e),this.markFieldsClean()}},,function(e,t,r){e.exports=r(110).extend(r(273).withOptions({read:"artwork_url"}),r(661),{resource_type:"multi-track-artwork",fields:{artwork_url:{defaultValue:""}},setup:function(){var e=this,t=this.unsetImageFile.bind(this,{force:!0});this.on("imageDataChanged",(function(t){t.file&&e.markFieldsDirty("artwork_url")})).on("canceled",t).on("allSaved",t)},saveSound:function(e){var t=this.getImageFileInfo(),n={sound:e,isSuccess:!1},i={sound:e,isSuccess:!0};return t.file?(e.setImageFile(t.file,t.source),e.uploadImage().then((function(){return i}),(function(){return n}))):r(10).reject(n)},getAttributesFromModels:function(){return null},getAttributesToBeSaved:function(){return{}}})},,,,,,function(e,t,r){var n=r(351),i=r(352);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==n(e)}},,,function(e,t,r){e.exports=r(54).extend({model:r(129),lastFetchTime:Date.now(),next_href:!1},{neverRelease:!0,hashFn:function(){return 1}})},,function(e,t,r){var n={user:{playlists:"userPlaylists",playlists_without_albums:"userPlaylistsWithoutAlbums",albums:"userAlbums"},sound:{playlists:"playlistsForTrack",playlists_without_albums:"playlistsWithoutAlbumsForTrack",albums:"albumsForTrack"}},i=(e.exports=r(207).extend({model:r(67),defaults:{resource_id:null,playlists_for:null,exclude:null,playlistType:"playlists"},setupSources:function(){var e=this.options.exclude;return e&&(this.filters=[function(t){return t.id!==e}]),[new i(null,this.options)]}},{hashFn:function(e,t){var r=i.hashFn.apply(this,arguments);return t.exclude&&(r+="_"+t.exclude),r}}),r(54).extend({model:r(67),parse:function(e){return e.collection.forEach((function(e){null===e.tracks&&delete e.tracks})),e.collection},baseUrl:function(){var e,t=this.options,r=t.playlists_for,i=t.resource_id,o=t.playlistType,a=((e={})["user"===r?"id":"trackId"]=i,e);return this.getEndpointUrl(n[r][o],a,{representation:"mini"})}},{hashFn:function(e,t){return t.playlists_for+"_"+t.resource_id+"_"+t.limit+"_"+t.offset+"_"+t.playlistType}}))},,,,,,,,,function(e,t,r){var n=r(1403),i=r(1410),o=r(805);e.exports=function(e){return o(e)?n(e):i(e)}},function(e,t,r){e.exports=r(54).extend({model:r(686),attachments:null,setup:function(e){var t=e.resource_id;this.attachments=new(r(1427))(null,{conversationId:t}),this.listenTo(this,"audibleInformationUpdated",n).listenTo(r(11),"new-unread-messages",i)},baseUrl:function(){return r(311).baseUrlWithId(this.resource_id,"messages")},comparator:function(e,t){return t.sentAt()-e.sentAt()},fetchUnread:function(){this.fetch({add:!0,remove:!1,url:this.baseUrl()+"?limit=10&linked_partitioning=1"})},getAttachments:function(){return this.attachments}},{onCleanup:function(e){e.attachments.release()}});function n(e){var t=e.audibleInformation.model;t&&this.attachments.add({urn:t.getUrn(),timestamp:e.timestamp})}function i(e){var t=this;e.some((function(e){if(e===t.options.resource_id)return t.fetchUnread(),!0}))}},function(e,t,r){e.exports=r(227).extend(r(1039),{defaults:{type:"sounds"},baseUrl:function(){return this.getEndpointUrl("streamUserProfile",{id:this.options.userId})},setup:function(e){r(227).prototype.setup.call(this,e),this.isMe=r(17).currentUserId()===e.userId},parse:function(e){var t=e.collection,n=void 0===t?[]:t,i=r(17).currentUserId();return n.length&&!this.isMe&&(n=n.filter((function(e){var t;return e.user&&(delete e.user.cpp,delete e.user.default_tracks_feedable),e.track||(null==(t=e.playlist)?void 0:t.track_count)||e.playlist&&e.playlist.user_id===i}))),n}})},,function(e,t,r){e.exports=r(30).extend({resource_type:"email",setup:function(e,t){null==t||!t.userId||null!=e&&e.user_id||this.set({user_id:t.userId})},baseUrl:null,getEndpointForMethod:function(e){switch(e){case"create":return{name:"userEmailCreate",pathParams:{user_id:this.get("user_id")},data:this.toJSON()};case"update":return{name:"userEmailUpdate",pathParams:{id:this.get("id"),user_id:this.get("user_id")},data:this.toJSON()};case"delete":return{name:"userEmailDelete",pathParams:{id:this.get("id"),user_id:this.get("user_id")}}}},makeEmailPrimary:function(e){var t=this,n=e.token;r(345).callGraphQl({query:"\n mutation ChangePrimaryEmail($input: ChangePrimaryEmailInput!) {\n changePrimaryEmail(input: $input) {\n __typename\n ... on ValidateOtpTokenFailure {\n code\n }\n ... on ChangePrimaryEmailSuccess {\n success\n }\n }\n }\n ",operationName:"ChangePrimaryEmail",variables:{input:{emailId:String(this.id),otp:{token:n}}}}).then((function(e){var n,i=e.body;if("ChangePrimaryEmailSuccess"!==(null==i||null==(n=i.data)?void 0:n.changePrimaryEmail.__typename))throw r(11).trigger("change-primary-email:error",t),new Error("Failed to change primary email address",{cause:i});r(11).trigger("change-primary-email:success",t),t.set({primary:!0})}))}})},,,,,,,function(e,t,r){e.exports=r(110).extend(r(661),{resource_type:"multi-track-geoblocking",fields:{geoblocking:{defaultValue:!1},availableCountries:{defaultValue:function(){return r(74).countryCodes()}}},setup:function(){this.on("allSaved",(function(){r(19).trackV1Click({click_name:"bulk-track-edit::saved_with_geoblocking_changes"})}))},getRequiredModelAttributes:function(){return["geo_blockings"]},getAttributesFromModels:function(){return this.reduceSounds({geoblocking:function(e){return e.isGeoblocked()},availableCountries:function(e){return e.getAvailableCountries()}})},getAttributesToBeSaved:function(e){var t=this.get("availableCountries"),n={geo_blockings:t?r(74).complement(t):[]};return r(1).object(e.map((function(e){return[e.id,n]})))}})},,function(e,t,r){var n=[{emitter:r(51),event:"comment",getInstance:function(e,t){var r=t.target;return e.options.sound_id===r},handler:function(e){var t=e.state,r=e.object;t&&!this.contains(r)&&this.onCommentCreated(r)}}];e.exports=r(54).extend(r(228).withOptions({events:n}),{model:r(229),defaults:{sound_id:null,secret_token:null},soundDuration:null,setup:function(e){var t=e.sound_id,n=new(r(29))({id:t});this.options.secret_token=n.get("secret_token"),this.soundDuration=n.duration(),n.release()},baseUrl:function(){return this.getEndpointUrl("trackComments",{id:this.options.sound_id})},parse:function(e){var t=this,r=/^http:/;return e.collection.map((function(e){return e.timestamp=t.normalizeTimestamp(e.timestamp),r.test(e.user.avatar_url)&&(e.user.avatar_url=e.user.avatar_url.replace(r,"https:")),e}))},normalizeTimestamp:function(e){return(e>this.soundDuration||e<0)&&(e=r(229).EMPTY_TIMESTAMP),e},onCommentCreated:function(e){this.add(e,{at:0})}},{hashFn:function(e,t){return(null==t?void 0:t.sound_id)||null}})},,,,function(e,t,r){var n=r(744),i=r(745);e.exports=function(e,t,r){var o=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||n)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[o+s]=a[s];return t||i(a)}},function(e,t,r){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r(1219),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(155))},function(e,t,r){var n=new(r(1264).default)({baseUrl:"https://pages.soundcloud.com/",appLocale:r(7).LinguaLib.getLocale()});e.exports=r(30).extend({fetch:function(){var e=this,t=r(10).defer();return n.retrieve((function(r,n){r?(e.trigger("error",r),t.reject(r)):(e.set("body",n.html),e.set("title",n.title),t.resolve())}),this.id),t}})},function(e,t){e.exports=function(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o-1&&e%1==0&&e0&&o<=1?o:2-o,o/=2,a>1&&(a=1),{h:isNaN(i)?0:i,s:isNaN(a)?0:a,l:isNaN(o)?0:o,a:isNaN(n)?0:n}},toAlias:function(e,t,r,n){var i,o=0===arguments.length?this.toHex():this.toHex(e,t,r,n),a="alias"===this.origFormat?o:this.toString(this.origFormat,!1);for(var s in this.colors)if((i=this.colors[s].toLowerCase().trim())===o||i===a)return s;return!1},RGBtoHSB:function(e,t,r,n){var i,o,a,s;return e/=255,t/=255,r/=255,i=((i=0==(s=(a=Math.max(e,t,r))-Math.min(e,t,r))?null:a===e?(t-r)/s:a===t?(r-e)/s+2:(e-t)/s+4)+360)%6*60/360,o=0===s?0:s/a,{h:this._sanitizeNumber(i),s:o,b:a,a:this._sanitizeNumber(n)}},HueToRGB:function(e,t,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?e+(t-e)*r*6:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e},HSLtoRGB:function(e,t,r,n){var i;t<0&&(t=0);var o=2*r-(i=r<=.5?r*(1+t):r+t-r*t),a=e+1/3,s=e,l=e-1/3;return[Math.round(255*this.HueToRGB(o,i,a)),Math.round(255*this.HueToRGB(o,i,s)),Math.round(255*this.HueToRGB(o,i,l)),this._sanitizeNumber(n)]},parse:function(t){if(0===arguments.length)return!1;var r,n,i=this,o=!1,a=void 0!==this.colors[t];return a&&(t=this.colors[t].toLowerCase().trim()),e.each(this.stringParsers,(function(e,s){var l=s.re.exec(t);return!(r=l&&s.parse.apply(i,[l]))||(o={},n=a?"alias":s.format?s.format:i.getValidFallbackFormat(),(o=n.match(/hsla?/)?i.RGBtoHSB.apply(i,i.HSLtoRGB.apply(i,r)):i.RGBtoHSB.apply(i,r))instanceof Object&&(o.format=n),!1)})),o},getValidFallbackFormat:function(){var e=["rgba","rgb","hex","hsla","hsl"];return this.origFormat&&-1!==e.indexOf(this.origFormat)?this.origFormat:this.fallbackFormat&&-1!==e.indexOf(this.fallbackFormat)?this.fallbackFormat:"rgba"},toString:function(e,r){r=r||!1;var n=!1;switch(e=e||this.origFormat||this.fallbackFormat){case"rgb":return n=this.toRGB(),this.rgbaIsTransparent(n)?"transparent":"rgb("+n.r+","+n.g+","+n.b+")";case"rgba":return"rgba("+(n=this.toRGB()).r+","+n.g+","+n.b+","+n.a+")";case"hsl":return n=this.toHSL(),"hsl("+Math.round(360*n.h)+","+Math.round(100*n.s)+"%,"+Math.round(100*n.l)+"%)";case"hsla":return n=this.toHSL(),"hsla("+Math.round(360*n.h)+","+Math.round(100*n.s)+"%,"+Math.round(100*n.l)+"%,"+n.a+")";case"hex":return this.toHex();case"alias":return!1===(n=this.toAlias())?this.toString(this.getValidFallbackFormat()):r&&!(n in t.webColors)&&n in this.predefinedColors?this.predefinedColors[n]:n;default:return n}},stringParsers:[{re:/rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*?\)/,format:"rgb",parse:function(e){return[e[1],e[2],e[3],1]}},{re:/rgb\(\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*?\)/,format:"rgb",parse:function(e){return[2.55*e[1],2.55*e[2],2.55*e[3],1]}},{re:/rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d*(?:\.\d+)?)\s*)?\)/,format:"rgba",parse:function(e){return[e[1],e[2],e[3],e[4]]}},{re:/rgba\(\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*(?:,\s*(\d*(?:\.\d+)?)\s*)?\)/,format:"rgba",parse:function(e){return[2.55*e[1],2.55*e[2],2.55*e[3],e[4]]}},{re:/hsl\(\s*(\d*(?:\.\d+)?)\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*?\)/,format:"hsl",parse:function(e){return[e[1]/360,e[2]/100,e[3]/100,e[4]]}},{re:/hsla\(\s*(\d*(?:\.\d+)?)\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*(?:,\s*(\d*(?:\.\d+)?)\s*)?\)/,format:"hsla",parse:function(e){return[e[1]/360,e[2]/100,e[3]/100,e[4]]}},{re:/#?([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,format:"hex",parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16),1]}},{re:/#?([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/,format:"hex",parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16),1]}}],colorNameToHex:function(e){return void 0!==this.colors[e.toLowerCase()]&&this.colors[e.toLowerCase()]}};var r={horizontal:!1,inline:!1,color:!1,format:!1,input:"input",container:!1,component:".add-on, .input-group-addon",fallbackColor:!1,fallbackFormat:"hex",hexNumberSignPrefix:!0,sliders:{saturation:{maxLeft:100,maxTop:100,callLeft:"setSaturation",callTop:"setBrightness"},hue:{maxLeft:0,maxTop:100,callLeft:!1,callTop:"setHue"},alpha:{maxLeft:0,maxTop:100,callLeft:!1,callTop:"setAlpha"}},slidersHorz:{saturation:{maxLeft:100,maxTop:100,callLeft:"setSaturation",callTop:"setBrightness"},hue:{maxLeft:100,maxTop:0,callLeft:"setHue",callTop:!1},alpha:{maxLeft:100,maxTop:0,callLeft:"setAlpha",callTop:!1}},template:'