@dolby-optiview/ads-sdk-core 1.0.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +68 -0
- package/dist/OptiViewAds.d.ts +1 -0
- package/dist/OptiViewAds.js +1 -1
- package/dist/diagnostics/recordEventTimeline.d.ts +3 -0
- package/dist/diagnostics/recordEventTimeline.js +1 -0
- package/dist/generated/diagnosticCodes.d.ts +142 -2
- package/dist/generated/diagnosticCodes.js +1 -1
- package/dist/generated/version.d.ts +1 -1
- package/dist/generated/version.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/interfaces/PlayerAdapter.d.ts +33 -0
- package/dist/internal/index.d.ts +1 -1
- package/dist/internal/index.js +1 -1
- package/dist/services/AdPlayerController.d.ts +9 -1
- package/dist/services/AdPlayerController.js +1 -1
- package/dist/services/BreakScheduler.d.ts +5 -2
- package/dist/services/BreakScheduler.js +1 -1
- package/dist/services/CmcdAdReporter.d.ts +10 -0
- package/dist/services/CmcdAdReporter.js +1 -1
- package/dist/services/GamPodAdTracker.d.ts +12 -1
- package/dist/services/GamPodAdTracker.js +1 -1
- package/dist/services/LensReporter.d.ts +3 -1
- package/dist/services/LensReporter.js +1 -1
- package/dist/services/LiveStartPushbackController.d.ts +36 -0
- package/dist/services/LiveStartPushbackController.js +1 -0
- package/dist/services/MetadataCueTracker.d.ts +42 -1
- package/dist/services/MetadataCueTracker.js +1 -1
- package/dist/services/VastAdManager.js +1 -1
- package/dist/services/adPlayer/AdPlayerState.d.ts +11 -0
- package/dist/services/adPlayer/AdPlayerState.js +1 -1
- package/dist/services/adPlayer/AdPreloader.d.ts +9 -1
- package/dist/services/adPlayer/AdPreloader.js +1 -1
- package/dist/services/adPlayer/AdStage.d.ts +5 -0
- package/dist/services/adPlayer/AdStage.js +1 -1
- package/dist/services/adPlayer/AssetPlayback.d.ts +15 -1
- package/dist/services/adPlayer/AssetPlayback.js +1 -1
- package/dist/services/adPlayer/ContentRecovery.js +1 -1
- package/dist/services/adPlayer/ContentResumeCoordinator.d.ts +81 -2
- package/dist/services/adPlayer/ContentResumeCoordinator.js +1 -1
- package/dist/services/adPlayer/GamPodBridge.d.ts +7 -0
- package/dist/services/adPlayer/GamPodBridge.js +1 -1
- package/dist/services/adPlayer/PreparedPresentation.d.ts +32 -0
- package/dist/services/adPlayer/PreparedPresentation.js +1 -0
- package/dist/services/adPlayer/SharedElementBreakPlayer.d.ts +8 -0
- package/dist/services/adPlayer/SharedElementBreakPlayer.js +1 -1
- package/dist/services/adPlayer/classifyMediaError.d.ts +9 -0
- package/dist/services/adPlayer/classifyMediaError.js +1 -0
- package/dist/services/adPlayer/liveEdge.d.ts +29 -0
- package/dist/services/adPlayer/liveEdge.js +1 -1
- package/dist/services/adPlayer/streamClockMapping.d.ts +65 -0
- package/dist/services/adPlayer/streamClockMapping.js +1 -0
- package/dist/services/adPlayer/streamClockResume.d.ts +94 -0
- package/dist/services/adPlayer/streamClockResume.js +1 -0
- package/dist/services/anvatoCueRuntime.d.ts +19 -0
- package/dist/services/anvatoCueRuntime.js +1 -1
- package/dist/services/breakTiming.d.ts +7 -0
- package/dist/services/breakTiming.js +1 -1
- package/dist/services/classifyImaAdError.d.ts +6 -0
- package/dist/services/classifyImaAdError.js +1 -0
- package/dist/services/html5ImaErrorNames.d.ts +2 -0
- package/dist/services/html5ImaErrorNames.js +1 -0
- package/dist/services/lensBackend.d.ts +1 -1
- package/dist/services/resolveLiveStartPushback.d.ts +1 -0
- package/dist/services/resolveLiveStartPushback.js +1 -0
- package/dist/session/AdBreakStatusTracker.js +1 -1
- package/dist/session/BreakLifecycle.js +1 -1
- package/dist/session/SessionStarter.d.ts +1 -0
- package/dist/session/SessionStarter.js +1 -1
- package/dist/types/AdError.d.ts +12 -0
- package/dist/types/AdError.js +1 -0
- package/dist/types/OptiViewAdsConfig.d.ts +17 -0
- package/dist/types/VendorAdError.d.ts +6 -5
- package/dist/types/VendorAdError.js +1 -1
- package/dist/vendor/lens-sdk/THIRD-PARTY-NOTICES.txt +1 -1
- package/dist/vendor/lens-sdk/index.d.ts +1 -1
- package/dist/vendor/lens-sdk/index.js +1 -1
- package/dist/vendor/lens-sdk/lens-core-uGZfZpQy.js +1 -0
- package/dist/vendor/lens-sdk/lens.d.ts +2 -0
- package/dist/vendor/lens-sdk/teardown.d.ts +13 -0
- package/dist/vendor/lens-sdk/transport.d.ts +11 -2
- package/dist/vendor/lens-sdk/types.d.ts +56 -5
- package/dist/vendor/lens-sdk/validation.d.ts +4 -1
- package/package.json +1 -1
- package/dist/vendor/lens-sdk/lens-core-Q5lbQGMC.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getPreRollDelay as e}from"../types/BreakManifest";import{manifestHasGamAssets as s,resolveGamVendorConfiguration as t}from"../services/resolveGamVendorConfiguration";import{SsaiController as i}from"../services/SsaiController";import{resolveUrlOrigin as a}from"../services/urlOrigin";import{filterSsaiClientBreaks as r,resolveStitchedStreamVendor as n,SsaiUnavailableError as o}from"../services/resolveDeliveryMode";import{detectDeviceType as d}from"../services/detectDeviceType";import{decideDeliveryMode as l,detectChannelSwitch as h,gamPodIdentityChanged as c}from"../services/channelSwitch";import{prepareWebRuntime as m}from"../services/webCompatibility";const p=1e4;function S(e){return"stitcherUrl"in e}function u(e){return"string"==typeof e&&""!==e.trim()}export class SessionStarter{constructor(e,s){this.state=e,this.deps=s}async startSession(s){if("ssai"===this.deps.mode){if(!S(s)||!u(s.stitcherUrl))throw new Error('[OptiViewAds] mode "ssai" requires a stitcherUrl in startSession().')}else if(S(s)||!u(s.manifestUrl))throw new Error("[OptiViewAds] startSession requires a manifestUrl (the full break-manifest URL).");this.state.sessionActive&&(this.deps.log("Ending previous session before starting new one"),this.deps.endSessionInternal("session-restart"));const t=this.state.sessionGeneration;this.state.sessionActive=!0;try{const e=m();e&&await e}catch(e){if(this.isStaleStart(t))return;throw this.state.sessionActive=!1,e}if(this.isStaleStart(t))return;if(this.deps.lensReporter.startSession(),S(s))return s.adInsertionType&&this.deps.diagnose("DA-INSERTION-TYPE-IGNORED-SSAI",`adInsertionType "${s.adInsertionType}" ignored in SSAI mode; the stitcher controls ad insertion.`,{adInsertionType:s.adInsertionType}),void await this.startSsaiSession(s,t);const i=s.manifestUrl;this.state.sessionConfig=s,this.state.manifestOrigin=a(i),this.deps.manifestService.setManifestUrl(i),this.deps.log("Session starting, manifest URL:",i);const r=Date.now(),n=e=>{this.deps.diagnose("DA-SESSION-STARTING",`Session start: ${e}`,{step:e,manifestUrl:i,elapsedMs:Date.now()-r})};n("begin");const o=s.assetParameters;let d;this.deps.adPlayerController.setSessionAssetParameters(o),this.deps.adPlayerController.setSessionAssetParameterMacros(s.assetParameterMacros),this.state.configSummary.gam&&(this.state.configSummary.gam={...this.state.configSummary.gam,hasAssetParameters:!!o}),n("manifest-fetch");try{d=await this.deps.manifestService.fetchManifest()}catch(e){if(this.isStaleStart(t))return;throw this.failSessionStart(e)}if(this.deps.cmcdAdReporter.onSessionStart(d),!this.isStaleStart(t))if(this.state.sessionManifest=d,"ssai"!==this.resolveSessionDeliveryMode(d))try{if(await this.startGamForManifest(d,o,n),this.isStaleStart(t))return;const a=s.adInsertionType;this.deps.adPlayerController.setBreakResumePolicy(a,d.timebase,this.deps.continueContentDuringBreak),this.deps.diagnose("DA-INSERTION-TYPE-RESOLVED",void 0===a?`Ad insertion type: unset — the manifest's resumeOffset drives the resume point (timebase: ${d.timebase})`:`Ad insertion type: ${a}, client-set (timebase: ${d.timebase})`,{adInsertionType:a??null,source:void 0===a?"unset":"client",timebase:d.timebase}),n("scheduling"),this.deps.breakScheduler.updateManifest(d),this.deps.pauseAdController.updateManifest(d),this.state.pauseAdTickInterval=setInterval(()=>this.deps.pauseAdController?.tick(),250);const r=(d.adStartDelay??0)>0?void 0:d.breaks.find(s=>0===e(s));r?(this.deps.adPlayerController.holdContentForPreRoll(r),this.state.heldImmediatePreRollId=r.id,this.state.heldPreRollArmed=!1,this.state.heldPreRollWaitStartedAt=Date.now(),this.contentIsReady()?this.armHeldImmediatePreRoll():this.state.heldPreRollArmInterval=setInterval(()=>{this.contentIsReady()?this.armHeldImmediatePreRoll():this.armHeldImmediatePreRollIfTimedOut()},250)):this.markPlaybackStartIfPlaying(),this.startBreakScheduler(),this.startManifestPolling(),this.deps.diagnose("DA-SESSION-STARTED",`Session active for manifest ${i}`,{manifestUrl:i}),this.deps.log("Session active")}catch(e){if(this.isStaleStart(t))return;throw this.failSessionStart(e)}else await this.startSteeredSsaiSession(d,s,n)}markPlaybackStartIfPlaying(){this.deps.player.paused||this.deps.breakScheduler.markPlaybackStart()}contentIsReady(){return!Number.isNaN(this.deps.player.duration)||!this.deps.player.paused}clearHeldImmediatePreRollArmInterval(){this.state.heldPreRollArmInterval&&(clearInterval(this.state.heldPreRollArmInterval),this.state.heldPreRollArmInterval=null)}armHeldImmediatePreRoll(){this.state.heldImmediatePreRollId&&!this.state.heldPreRollArmed&&(this.clearHeldImmediatePreRollArmInterval(),this.state.heldPreRollArmed=!0,this.deps.breakScheduler.markPlaybackStart())}armHeldImmediatePreRollIfTimedOut(){if(!this.state.heldImmediatePreRollId||this.state.heldPreRollArmed)return;const e=this.state.heldPreRollWaitStartedAt;if(null===e||Date.now()-e<p)return;const s=this.state.heldImmediatePreRollId;this.armHeldImmediatePreRoll(),this.deps.diagnose("DA-PREROLL-CONTENT-WAIT-TIMEOUT","Pending pre-roll began after waiting 10000ms for content readiness.",{breakId:s,waitMs:p})}cancelHeldImmediatePreRollOnContentError(){const e=this.state.heldImmediatePreRollId;return!(!e||this.state.heldPreRollArmed)&&(this.clearHeldImmediatePreRollArmInterval(),this.deps.breakScheduler?.completeBreak(e),this.deps.adPlayerController?.releaseContentHold(),this.state.heldImmediatePreRollId=null,this.state.heldPreRollArmed=!1,this.state.heldPreRollWaitStartedAt=null,this.deps.diagnose("DA-PREROLL-CANCELLED-CONTENT-ERROR","A pending pre-roll was cancelled because the content failed to load before it could begin.",{breakId:e}),!0)}clearHeldImmediatePreRollArm(){this.clearHeldImmediatePreRollArmInterval(),this.state.heldImmediatePreRollId=null,this.state.heldPreRollArmed=!1,this.state.heldPreRollWaitStartedAt=null}failSessionStart(e){const s=e instanceof Error?e:new Error(String(e)),t=this.deps.manifestService?.takeLastFailure();return this.deps.diagnose("DA-MANIFEST-FETCH-FAILED",s.message,t?{...t}:void 0),this.state.sessionActive=!1,this.deps.cmcdAdReporter.onSessionEnd(),this.deps.lensReporter.endSession(),s}resolveSessionDeliveryMode(e,s="manifest"){const t=this.state.sessionDeliveryMode,i=l(e,d(),this.deps.hasExplicitMode?this.deps.mode:null,s);return null!==i.unknownMode&&this.deps.diagnose("DA-DELIVERY-MODE-UNKNOWN",`Delivery rule ${i.ruleIndex} carries unrecognized mode "${i.unknownMode}"; using sgai.`,{unknownMode:i.unknownMode,ruleIndex:i.ruleIndex}),this.deps.hasExplicitMode&&i.manifestMode!==i.mode&&this.deps.diagnose("DA-DELIVERY-MODE-OVERRIDDEN",`Manifest delivery rules resolve "${i.manifestMode}" but the explicit config mode "${i.mode}" takes precedence.`,{manifestMode:i.manifestMode,configuredMode:i.mode}),this.state.sessionDeliveryMode=i.mode,this.deps.diagnose("DA-DELIVERY-MODE-RESOLVED",`Delivery mode: ${i.mode}`,{mode:i.mode,ruleIndex:i.ruleIndex,source:i.source,..."channel-switch"===s?{previousMode:t}:{}}),i.mode}async startSteeredSsaiSession(e,s,t){const i=n(e.vendorConfiguration);if(!i){const e="Manifest selected ssai delivery but no vendor configuration provides a stitched stream (no gam entry with an assetKey).";throw this.deps.diagnose("DA-SSAI-UNAVAILABLE",e),this.deps.manifestService.reset(),this.state.sessionActive=!1,new o(e)}try{t("ssai-live-stream"),this.state.steeredSsaiActive=!0,this.state.ssaiController=this.createSsaiController(i.networkCode),await this.state.ssaiController.startSteered(i,s.assetParameters,s.assetParameterMacros),t("scheduling");const a=r(e);this.deps.adPlayerController.setBreakResumePolicy(s.adInsertionType,e.timebase,!1),this.deps.breakScheduler.updateManifest(a),this.deps.pauseAdController.updateManifest(a),this.state.pauseAdTickInterval=setInterval(()=>this.deps.pauseAdController?.tick(),250),this.markPlaybackStartIfPlaying(),this.startBreakScheduler(),this.startManifestPolling(),this.deps.diagnose("DA-SESSION-STARTED",`SSAI session active (manifest-steered) for ${s.manifestUrl}`,{manifestUrl:s.manifestUrl}),this.deps.log("SSAI session active (manifest-steered)")}catch(e){const s=e instanceof Error?e:new Error(String(e));throw this.deps.diagnose("DA-SSAI-SESSION-FAILED",s.message),this.state.steeredSsaiActive=!1,this.deps.manifestService.reset(),this.state.sessionActive=!1,s}}createSsaiController(e){return new i(this.deps.player,{gam:this.state.steeredSsaiOptions?.streamActivityMonitorId?{streamActivityMonitorId:this.state.steeredSsaiOptions.streamActivityMonitorId}:{},ssai:{networkCode:e},maxBitrate:this.state.steeredSsaiOptions?.maxBitrate,autoplay:this.state.steeredSsaiOptions?.autoplay,debug:this.deps.debug},{emit:(e,s)=>this.deps.emit(e,s),diagnose:(e,s,t)=>this.deps.diagnose(e,s,t),log:(...e)=>this.deps.log(...e)})}startBreakScheduler(){this.deps.breakScheduler.start((e,s)=>{this.deps.breakLifecycle.onBreakStart(e,s)},e=>!this.deps.adPlayerController.isAdPlaying()&&(this.deps.adPlayerController.preload(e).catch(s=>{this.deps.diagnose("DA-PRELOAD-FAILED",s instanceof Error?s.message:String(s),{breakId:e.id})}),!0),(e,s,t)=>{this.deps.adBreakStatusTracker.onBreakWarning(e,s,t)},e=>{this.deps.breakLifecycle.onBreakAborted(e)})}startManifestPolling(){this.deps.manifestService.startPolling(e=>{if(!this.state.sessionActive)return;const s=this.deps.notedManifestBreakIds(e);this.deps.diagnose("DA-MANIFEST-POLLED","Manifest polled",{breaks:e.breaks.length,newBreakIds:s,pollingIntervalSeconds:this.deps.manifestService.currentPollingIntervalSeconds});const t=this.state.sessionManifest,i=t?h(t,e):null;if(this.state.pendingChannelSwitch||i&&this.deps.breakScheduler.getActiveBreak())return this.state.pendingChannelSwitch=e,void this.deps.log("Channel switch deferred until the active break ends");i?this.switchChannel(e,i):this.applyManifestUpdate(e)},e=>{this.state.sessionActive&&this.deps.diagnose("DA-MANIFEST-POLL-FAILED",e.message)})}applyPendingChannelSwitch(){if(!this.state.sessionActive||!this.state.pendingChannelSwitch)return;const e=this.state.pendingChannelSwitch;this.state.pendingChannelSwitch=null;const s=h(this.state.sessionManifest,e);s?this.switchChannel(e,s):this.applyManifestUpdate(e)}applyManifestUpdate(e){this.diagnoseIgnoredDeliveryModeChange(e);const s=t(e);this.state.steeredSsaiActive?this.state.ssaiController?.setManifestAssetParameters(s.ssai?.assetParameters):this.deps.adPlayerController.setManifestAssetParameters(s.sgaiAssetParameters);const i=this.state.steeredSsaiActive?r(e):e;this.deps.breakScheduler.updateManifest(i),this.deps.pauseAdController.updateManifest(i)}diagnoseIgnoredDeliveryModeChange(e){if(!this.state.sessionDeliveryMode)return;const s=l(e,d(),null,"manifest");s.manifestMode!==this.state.sessionDeliveryMode&&this.deps.diagnose("DA-DELIVERY-MODE-CHANGE-IGNORED",`Polled manifest resolves delivery mode "${s.manifestMode}" but "${this.state.sessionDeliveryMode}" is pinned for this session.`,{polledMode:s.manifestMode,pinnedMode:this.state.sessionDeliveryMode})}async switchChannel(e,s){if(this.state.channelSwitchInFlight)return;const t=this.state.sessionConfig,i=this.state.sessionManifest,a={previousChannelId:s.previousChannelId,channelId:s.channelId,reason:s.reason,manifestUrl:t.manifestUrl};this.deps.diagnose("DA-MANIFEST-CHANNEL-CHANGED",`Manifest channel changed (${s.reason}): ${s.previousChannelId??"none"} -> ${s.channelId??"none"}`,a),this.state.sessionManifest=e,this.state.channelSwitchInFlight=!0;const r=this.state.sessionGeneration,n=this.state.sessionDeliveryMode??"sgai";try{let s=this.resolveSessionDeliveryMode(e,"channel-switch");if(this.deps.cmcdAdReporter.onSessionEnd(),this.deps.cmcdAdReporter.onSessionStart(e),this.deps.lensReporter.endSession(),this.deps.lensReporter.startSession(),"ssai"===s&&"sgai"===n){const a=await this.switchToSteeredSsai(e,t);if(this.isStaleStart(r))return;a||(s="sgai",this.state.sessionDeliveryMode="sgai",await this.applySameModeChannelSwitch(i,e,t,r))}else"sgai"===s&&"ssai"===n?await this.switchToSgai(e,t,r):await this.applySameModeChannelSwitch(i,e,t,r);if(this.isStaleStart(r))return}finally{this.state.channelSwitchInFlight=!1}this.emitChannelChange({...a,previousDeliveryMode:n,deliveryMode:this.state.sessionDeliveryMode??n})}emitChannelChange(e){this.deps.emit("adchannelchange",{type:"adchannelchange",timestamp:Date.now(),...e})}async applySameModeChannelSwitch(e,s,i,a){const n=this.state.steeredSsaiActive,o=n?r(s):s;if(this.deps.breakScheduler.resetForChannelSwitch(o),this.deps.pauseAdController.updateManifest(o),this.deps.adPlayerController.setBreakResumePolicy(i.adInsertionType,s.timebase,this.deps.continueContentDuringBreak),!n&&c(e,s)){const e=this.deps.adPlayerController.updatedAssetParameters,t=this.deps.adPlayerController.sessionAssetParameterMacros;if(this.deps.adPlayerController.endGamSession(),this.deps.adPlayerController.setSessionAssetParameters(i.assetParameters),this.deps.adPlayerController.setSessionAssetParameterMacros(t),await this.startGamForManifest(s,i.assetParameters,e=>{this.deps.diagnose("DA-SESSION-STARTING",`Channel switch: ${e}`,{step:e,manifestUrl:i.manifestUrl})}),this.isStaleStart(a))return;e&&this.deps.adPlayerController.updateAssetParameters(e)}else if(n){const e=t(s);this.state.ssaiController?.setManifestAssetParameters(e.ssai?.assetParameters)}else{const e=t(s);this.deps.adPlayerController.setManifestAssetParameters(e.sgaiAssetParameters)}}async switchToSteeredSsai(e,s){const t=n(e.vendorConfiguration);if(!t)return this.deps.diagnose("DA-SSAI-UNAVAILABLE","Channel switch resolved ssai delivery but no vendor configuration provides a stitched stream; the session stays in sgai.",{manifestUrl:s.manifestUrl,previousMode:"sgai"}),!1;const i=this.deps.adPlayerController,a=i.updatedAssetParameters,o=i.sessionAssetParameterMacros;i.stopActiveBreak(),i.releaseContentHold(),i.endGamSession(),i.setSessionAssetParameters(s.assetParameters),i.setSessionAssetParameterMacros(o),a&&i.updateAssetParameters(a);const d=this.createSsaiController(t.networkCode);this.state.ssaiController=d,this.state.steeredSsaiActive=!0,this.deps.diagnose("DA-SESSION-STARTING","Channel switch: ssai-live-stream",{step:"ssai-live-stream",manifestUrl:s.manifestUrl});try{await d.startSteered(t,s.assetParameters,o),a&&d.updateAssetParameters(a);const n=r(e);return this.deps.breakScheduler.resetForChannelSwitch(n),this.deps.pauseAdController.updateManifest(n),i.setBreakResumePolicy(s.adInsertionType,e.timebase,!1),!0}catch(e){const s=e instanceof Error?e.message:String(e);return this.deps.diagnose("DA-SSAI-SESSION-FAILED",s),d.stop(),delete this.state.ssaiController,this.state.steeredSsaiActive=!1,!1}}async switchToSgai(e,s,t){const i=this.state.ssaiController?.sessionAssetParameterMacros;this.state.ssaiController?.stop(),delete this.state.ssaiController,this.state.steeredSsaiActive=!1,this.deps.breakScheduler.resetForChannelSwitch(e),this.deps.pauseAdController.updateManifest(e);const a=this.deps.adPlayerController;a.setBreakResumePolicy(s.adInsertionType,e.timebase,this.deps.continueContentDuringBreak);const r=a.updatedAssetParameters;a.endGamSession(),a.setSessionAssetParameters(s.assetParameters),a.setSessionAssetParameterMacros(i??s.assetParameterMacros),await this.startGamForManifest(e,s.assetParameters,e=>{this.deps.diagnose("DA-SESSION-STARTING",`Channel switch: ${e}`,{step:e,manifestUrl:s.manifestUrl})}),this.isStaleStart(t)||r&&a.updateAssetParameters(r)}async startGamForManifest(e,i,a){const r=t(e);if(this.deps.adPlayerController.setManifestAssetParameters(r.sgaiAssetParameters),r.unknownTypes.length>0&&this.deps.diagnose("DA-VENDOR-CONFIG-UNKNOWN-TYPE",`Ignored ${r.unknownTypes.length} vendorConfiguration `+(1===r.unknownTypes.length?"entry":"entries")+" with unrecognised type: "+`${r.unknownTypes.join(", ")}.`,{types:r.unknownTypes}),this.deps.adPlayerController.isGamEnabled())if(r.identity){this.deps.diagnose("DA-GAM-CONFIG-RESOLVED",`GAM session identity: network ${r.identity.networkCode}, custom asset ${r.identity.customAssetKey}`,{networkCode:r.identity.networkCode,customAssetKey:r.identity.customAssetKey,channelId:e.channelId,duplicateEntriesIgnored:r.duplicateGam});try{a("gam-init"),await this.deps.adPlayerController.startGamSession(r.identity,i),this.deps.log("GAM session started")}catch(e){this.deps.diagnose("DA-GAM-SESSION-FAILED",e instanceof Error?e.message:String(e))}}else s(e)&&this.deps.diagnose("DA-GAM-CONFIG-MISSING",'The break manifest carries GAM pod assets but no usable "gam" vendorConfiguration entry; those assets will be skipped.',{reason:r.reason});else s(e)&&this.deps.diagnose("DA-GAM-CONFIG-MISSING","The break manifest carries GAM pod assets but GAM is disabled for this session (gam.enabled === false); those assets will be skipped.",{reason:"gam-disabled"})}async startSsaiSession(e,s){try{if(this.state.stitcherOrigin=a(e.stitcherUrl),this.state.configSummary.gam&&(this.state.configSummary.gam={...this.state.configSummary.gam,hasAssetParameters:!!e.assetParameters}),await this.state.ssaiController.start(e),this.isStaleStart(s))return;this.deps.diagnose("DA-SESSION-STARTED",`SSAI session active for ${e.stitcherUrl}`,{stitcherUrl:e.stitcherUrl}),this.deps.log("SSAI session active")}catch(e){if(this.isStaleStart(s))return;const t=e instanceof Error?e:new Error(String(e));throw this.deps.diagnose("DA-SSAI-SESSION-FAILED",t.message),this.state.sessionActive=!1,this.deps.cmcdAdReporter.onSessionEnd(),this.deps.lensReporter.endSession(),t}}isStaleStart(e){return e!==this.state.sessionGeneration&&(this.deps.log("Session start aborted — the session ended or was replaced while starting"),!0)}}
|
|
1
|
+
import{getPreRollDelay as e}from"../types/BreakManifest";import{manifestHasGamAssets as s,resolveGamVendorConfiguration as t}from"../services/resolveGamVendorConfiguration";import{SsaiController as i}from"../services/SsaiController";import{resolveUrlOrigin as a}from"../services/urlOrigin";import{filterSsaiClientBreaks as r,resolveStitchedStreamVendor as n,SsaiUnavailableError as o}from"../services/resolveDeliveryMode";import{detectDeviceType as d}from"../services/detectDeviceType";import{decideDeliveryMode as l,detectChannelSwitch as h,gamPodIdentityChanged as c}from"../services/channelSwitch";import{prepareWebRuntime as m}from"../services/webCompatibility";const p=1e4;function S(e){return"stitcherUrl"in e}function u(e){return"string"==typeof e&&""!==e.trim()}export class SessionStarter{constructor(e,s){this.state=e,this.deps=s}async startSession(s){if("ssai"===this.deps.mode){if(!S(s)||!u(s.stitcherUrl))throw new Error('[OptiViewAds] mode "ssai" requires a stitcherUrl in startSession().')}else if(S(s)||!u(s.manifestUrl))throw new Error("[OptiViewAds] startSession requires a manifestUrl (the full break-manifest URL).");this.state.sessionActive&&(this.deps.log("Ending previous session before starting new one"),this.deps.endSessionInternal("session-restart"));const t=this.state.sessionGeneration;this.state.sessionActive=!0;try{const e=m();e&&await e}catch(e){if(this.isStaleStart(t))return;throw this.state.sessionActive=!1,e}if(this.isStaleStart(t))return;if(this.deps.lensReporter.startSession(),S(s))return s.adInsertionType&&this.deps.diagnose("DA-INSERTION-TYPE-IGNORED-SSAI",`adInsertionType "${s.adInsertionType}" ignored in SSAI mode; the stitcher controls ad insertion.`,{adInsertionType:s.adInsertionType}),void await this.startSsaiSession(s,t);const i=s.manifestUrl;this.state.sessionConfig=s,this.state.manifestOrigin=a(i),this.deps.manifestService.setManifestUrl(i),this.deps.log("Session starting, manifest URL:",i);const r=Date.now(),n=e=>{this.deps.diagnose("DA-SESSION-STARTING",`Session start: ${e}`,{step:e,manifestUrl:i,elapsedMs:Date.now()-r})};n("begin");const o=s.assetParameters;let d;this.deps.adPlayerController.setSessionAssetParameters(o),this.deps.adPlayerController.setSessionAssetParameterMacros(s.assetParameterMacros),this.state.configSummary.gam&&(this.state.configSummary.gam={...this.state.configSummary.gam,hasAssetParameters:!!o}),n("manifest-fetch");try{d=await this.deps.manifestService.fetchManifest()}catch(e){if(this.isStaleStart(t))return;throw this.failSessionStart(e)}if(this.deps.cmcdAdReporter.onSessionStart(d),!this.isStaleStart(t))if(this.state.sessionManifest=d,"ssai"!==this.resolveSessionDeliveryMode(d))try{if(await this.startGamForManifest(d,o,n),this.isStaleStart(t))return;const a=s.adInsertionType;this.deps.adPlayerController.setBreakResumePolicy(a,d.timebase,this.deps.continueContentDuringBreak),this.deps.diagnose("DA-INSERTION-TYPE-RESOLVED",void 0===a?`Ad insertion type: unset — the manifest's resumeOffset drives the resume point (timebase: ${d.timebase})`:`Ad insertion type: ${a}, client-set (timebase: ${d.timebase})`,{adInsertionType:a??null,source:void 0===a?"unset":"client",timebase:d.timebase}),n("scheduling"),this.deps.breakScheduler.updateManifest(d),this.deps.pauseAdController.updateManifest(d),this.state.pauseAdTickInterval=setInterval(()=>this.deps.pauseAdController?.tick(),250);const r=(d.adStartDelay??0)>0?void 0:d.breaks.find(s=>0===e(s));r?(this.deps.adPlayerController.holdContentForPreRoll(r),this.state.heldImmediatePreRollId=r.id,this.state.heldPreRollArmed=!1,this.state.heldPreRollWaitStartedAt=Date.now(),this.contentIsReady()?this.armHeldImmediatePreRoll():this.state.heldPreRollArmInterval=setInterval(()=>{this.contentIsReady()?this.armHeldImmediatePreRoll():this.armHeldImmediatePreRollIfTimedOut()},250)):this.markPlaybackStartIfPlaying(),this.deps.startLivePushback(),this.startBreakScheduler(),this.startManifestPolling(),this.deps.diagnose("DA-SESSION-STARTED",`Session active for manifest ${i}`,{manifestUrl:i}),this.deps.log("Session active")}catch(e){if(this.isStaleStart(t))return;throw this.failSessionStart(e)}else await this.startSteeredSsaiSession(d,s,n)}markPlaybackStartIfPlaying(){this.deps.player.paused||this.deps.breakScheduler.markPlaybackStart()}contentIsReady(){return!Number.isNaN(this.deps.player.duration)||!this.deps.player.paused}clearHeldImmediatePreRollArmInterval(){this.state.heldPreRollArmInterval&&(clearInterval(this.state.heldPreRollArmInterval),this.state.heldPreRollArmInterval=null)}armHeldImmediatePreRoll(){this.state.heldImmediatePreRollId&&!this.state.heldPreRollArmed&&(this.clearHeldImmediatePreRollArmInterval(),this.state.heldPreRollArmed=!0,this.deps.breakScheduler.markPlaybackStart())}armHeldImmediatePreRollIfTimedOut(){if(!this.state.heldImmediatePreRollId||this.state.heldPreRollArmed)return;const e=this.state.heldPreRollWaitStartedAt;if(null===e||Date.now()-e<p)return;const s=this.state.heldImmediatePreRollId;this.armHeldImmediatePreRoll(),this.deps.diagnose("DA-PREROLL-CONTENT-WAIT-TIMEOUT","Pending pre-roll began after waiting 10000ms for content readiness.",{breakId:s,waitMs:p})}cancelHeldImmediatePreRollOnContentError(){const e=this.state.heldImmediatePreRollId;return!(!e||this.state.heldPreRollArmed)&&(this.clearHeldImmediatePreRollArmInterval(),this.deps.breakScheduler?.completeBreak(e),this.deps.adPlayerController?.releaseContentHold(),this.state.heldImmediatePreRollId=null,this.state.heldPreRollArmed=!1,this.state.heldPreRollWaitStartedAt=null,this.deps.diagnose("DA-PREROLL-CANCELLED-CONTENT-ERROR","A pending pre-roll was cancelled because the content failed to load before it could begin.",{breakId:e}),!0)}clearHeldImmediatePreRollArm(){this.clearHeldImmediatePreRollArmInterval(),this.state.heldImmediatePreRollId=null,this.state.heldPreRollArmed=!1,this.state.heldPreRollWaitStartedAt=null}failSessionStart(e){const s=e instanceof Error?e:new Error(String(e)),t=this.deps.manifestService?.takeLastFailure();return this.deps.diagnose("DA-MANIFEST-FETCH-FAILED",s.message,t?{...t}:void 0),this.state.sessionActive=!1,this.deps.cmcdAdReporter.onSessionEnd(),this.deps.lensReporter.endSession(),s}resolveSessionDeliveryMode(e,s="manifest"){const t=this.state.sessionDeliveryMode,i=l(e,d(),this.deps.hasExplicitMode?this.deps.mode:null,s);return null!==i.unknownMode&&this.deps.diagnose("DA-DELIVERY-MODE-UNKNOWN",`Delivery rule ${i.ruleIndex} carries unrecognized mode "${i.unknownMode}"; using sgai.`,{unknownMode:i.unknownMode,ruleIndex:i.ruleIndex}),this.deps.hasExplicitMode&&i.manifestMode!==i.mode&&this.deps.diagnose("DA-DELIVERY-MODE-OVERRIDDEN",`Manifest delivery rules resolve "${i.manifestMode}" but the explicit config mode "${i.mode}" takes precedence.`,{manifestMode:i.manifestMode,configuredMode:i.mode}),this.state.sessionDeliveryMode=i.mode,this.deps.diagnose("DA-DELIVERY-MODE-RESOLVED",`Delivery mode: ${i.mode}`,{mode:i.mode,ruleIndex:i.ruleIndex,source:i.source,..."channel-switch"===s?{previousMode:t}:{}}),i.mode}async startSteeredSsaiSession(e,s,t){const i=n(e.vendorConfiguration);if(!i){const e="Manifest selected ssai delivery but no vendor configuration provides a stitched stream (no gam entry with an assetKey).";throw this.deps.diagnose("DA-SSAI-UNAVAILABLE",e),this.deps.manifestService.reset(),this.state.sessionActive=!1,new o(e)}try{t("ssai-live-stream"),this.state.steeredSsaiActive=!0,this.state.ssaiController=this.createSsaiController(i.networkCode),await this.state.ssaiController.startSteered(i,s.assetParameters,s.assetParameterMacros),t("scheduling");const a=r(e);this.deps.adPlayerController.setBreakResumePolicy(s.adInsertionType,e.timebase,!1),this.deps.breakScheduler.updateManifest(a),this.deps.pauseAdController.updateManifest(a),this.state.pauseAdTickInterval=setInterval(()=>this.deps.pauseAdController?.tick(),250),this.markPlaybackStartIfPlaying(),this.deps.startLivePushback(),this.startBreakScheduler(),this.startManifestPolling(),this.deps.diagnose("DA-SESSION-STARTED",`SSAI session active (manifest-steered) for ${s.manifestUrl}`,{manifestUrl:s.manifestUrl}),this.deps.log("SSAI session active (manifest-steered)")}catch(e){const s=e instanceof Error?e:new Error(String(e));throw this.deps.diagnose("DA-SSAI-SESSION-FAILED",s.message),this.state.steeredSsaiActive=!1,this.deps.manifestService.reset(),this.state.sessionActive=!1,s}}createSsaiController(e){return new i(this.deps.player,{gam:this.state.steeredSsaiOptions?.streamActivityMonitorId?{streamActivityMonitorId:this.state.steeredSsaiOptions.streamActivityMonitorId}:{},ssai:{networkCode:e},maxBitrate:this.state.steeredSsaiOptions?.maxBitrate,autoplay:this.state.steeredSsaiOptions?.autoplay,debug:this.deps.debug},{emit:(e,s)=>this.deps.emit(e,s),diagnose:(e,s,t)=>this.deps.diagnose(e,s,t),log:(...e)=>this.deps.log(...e)})}startBreakScheduler(){this.deps.breakScheduler.start((e,s)=>{this.deps.breakLifecycle.onBreakStart(e,s)},e=>!this.deps.adPlayerController.isAdPlaying()&&(this.deps.adPlayerController.preload(e).catch(s=>{this.deps.diagnose("DA-PRELOAD-FAILED",s instanceof Error?s.message:String(s),{breakId:e.id})}),!0),(e,s,t)=>{this.deps.adBreakStatusTracker.onBreakWarning(e,s,t)},e=>{this.deps.breakLifecycle.onBreakAborted(e)})}startManifestPolling(){this.deps.manifestService.startPolling(e=>{if(!this.state.sessionActive)return;const s=this.deps.notedManifestBreakIds(e);this.deps.diagnose("DA-MANIFEST-POLLED","Manifest polled",{breaks:e.breaks.length,newBreakIds:s,pollingIntervalSeconds:this.deps.manifestService.currentPollingIntervalSeconds});const t=this.state.sessionManifest,i=t?h(t,e):null;if(this.state.pendingChannelSwitch||i&&this.deps.breakScheduler.getActiveBreak())return this.state.pendingChannelSwitch=e,void this.deps.log("Channel switch deferred until the active break ends");i?this.switchChannel(e,i):this.applyManifestUpdate(e)},e=>{this.state.sessionActive&&this.deps.diagnose("DA-MANIFEST-POLL-FAILED",e.message)})}applyPendingChannelSwitch(){if(!this.state.sessionActive||!this.state.pendingChannelSwitch)return;const e=this.state.pendingChannelSwitch;this.state.pendingChannelSwitch=null;const s=h(this.state.sessionManifest,e);s?this.switchChannel(e,s):this.applyManifestUpdate(e)}applyManifestUpdate(e){this.diagnoseIgnoredDeliveryModeChange(e);const s=t(e);this.state.steeredSsaiActive?this.state.ssaiController?.setManifestAssetParameters(s.ssai?.assetParameters):this.deps.adPlayerController.setManifestAssetParameters(s.sgaiAssetParameters);const i=this.state.steeredSsaiActive?r(e):e;this.deps.breakScheduler.updateManifest(i),this.deps.pauseAdController.updateManifest(i)}diagnoseIgnoredDeliveryModeChange(e){if(!this.state.sessionDeliveryMode)return;const s=l(e,d(),null,"manifest");s.manifestMode!==this.state.sessionDeliveryMode&&this.deps.diagnose("DA-DELIVERY-MODE-CHANGE-IGNORED",`Polled manifest resolves delivery mode "${s.manifestMode}" but "${this.state.sessionDeliveryMode}" is pinned for this session.`,{polledMode:s.manifestMode,pinnedMode:this.state.sessionDeliveryMode})}async switchChannel(e,s){if(this.state.channelSwitchInFlight)return;const t=this.state.sessionConfig,i=this.state.sessionManifest,a={previousChannelId:s.previousChannelId,channelId:s.channelId,reason:s.reason,manifestUrl:t.manifestUrl};this.deps.diagnose("DA-MANIFEST-CHANNEL-CHANGED",`Manifest channel changed (${s.reason}): ${s.previousChannelId??"none"} -> ${s.channelId??"none"}`,a),this.state.sessionManifest=e,this.state.channelSwitchInFlight=!0;const r=this.state.sessionGeneration,n=this.state.sessionDeliveryMode??"sgai";try{let s=this.resolveSessionDeliveryMode(e,"channel-switch");if(this.deps.cmcdAdReporter.onSessionEnd(),this.deps.cmcdAdReporter.onSessionStart(e),this.deps.lensReporter.endSession(),this.deps.lensReporter.startSession(),"ssai"===s&&"sgai"===n){const a=await this.switchToSteeredSsai(e,t);if(this.isStaleStart(r))return;a||(s="sgai",this.state.sessionDeliveryMode="sgai",await this.applySameModeChannelSwitch(i,e,t,r))}else"sgai"===s&&"ssai"===n?await this.switchToSgai(e,t,r):await this.applySameModeChannelSwitch(i,e,t,r);if(this.isStaleStart(r))return}finally{this.state.channelSwitchInFlight=!1}this.deps.startLivePushback(),this.emitChannelChange({...a,previousDeliveryMode:n,deliveryMode:this.state.sessionDeliveryMode??n})}emitChannelChange(e){this.deps.emit("adchannelchange",{type:"adchannelchange",timestamp:Date.now(),...e})}async applySameModeChannelSwitch(e,s,i,a){const n=this.state.steeredSsaiActive,o=n?r(s):s;if(this.deps.breakScheduler.resetForChannelSwitch(o),this.deps.pauseAdController.updateManifest(o),this.deps.adPlayerController.setBreakResumePolicy(i.adInsertionType,s.timebase,this.deps.continueContentDuringBreak),!n&&c(e,s)){const e=this.deps.adPlayerController.updatedAssetParameters,t=this.deps.adPlayerController.sessionAssetParameterMacros;if(this.deps.adPlayerController.endGamSession(),this.deps.adPlayerController.setSessionAssetParameters(i.assetParameters),this.deps.adPlayerController.setSessionAssetParameterMacros(t),await this.startGamForManifest(s,i.assetParameters,e=>{this.deps.diagnose("DA-SESSION-STARTING",`Channel switch: ${e}`,{step:e,manifestUrl:i.manifestUrl})}),this.isStaleStart(a))return;e&&this.deps.adPlayerController.updateAssetParameters(e)}else if(n){const e=t(s);this.state.ssaiController?.setManifestAssetParameters(e.ssai?.assetParameters)}else{const e=t(s);this.deps.adPlayerController.setManifestAssetParameters(e.sgaiAssetParameters)}}async switchToSteeredSsai(e,s){const t=n(e.vendorConfiguration);if(!t)return this.deps.diagnose("DA-SSAI-UNAVAILABLE","Channel switch resolved ssai delivery but no vendor configuration provides a stitched stream; the session stays in sgai.",{manifestUrl:s.manifestUrl,previousMode:"sgai"}),!1;const i=this.deps.adPlayerController,a=i.updatedAssetParameters,o=i.sessionAssetParameterMacros;i.stopActiveBreak(),i.releaseContentHold(),i.endGamSession(),i.setSessionAssetParameters(s.assetParameters),i.setSessionAssetParameterMacros(o),a&&i.updateAssetParameters(a);const d=this.createSsaiController(t.networkCode);this.state.ssaiController=d,this.state.steeredSsaiActive=!0,this.deps.diagnose("DA-SESSION-STARTING","Channel switch: ssai-live-stream",{step:"ssai-live-stream",manifestUrl:s.manifestUrl});try{await d.startSteered(t,s.assetParameters,o),a&&d.updateAssetParameters(a);const n=r(e);return this.deps.breakScheduler.resetForChannelSwitch(n),this.deps.pauseAdController.updateManifest(n),i.setBreakResumePolicy(s.adInsertionType,e.timebase,!1),!0}catch(e){const s=e instanceof Error?e.message:String(e);return this.deps.diagnose("DA-SSAI-SESSION-FAILED",s),d.stop(),delete this.state.ssaiController,this.state.steeredSsaiActive=!1,!1}}async switchToSgai(e,s,t){const i=this.state.ssaiController?.sessionAssetParameterMacros;this.state.ssaiController?.stop(),delete this.state.ssaiController,this.state.steeredSsaiActive=!1,this.deps.breakScheduler.resetForChannelSwitch(e),this.deps.pauseAdController.updateManifest(e);const a=this.deps.adPlayerController;a.setBreakResumePolicy(s.adInsertionType,e.timebase,this.deps.continueContentDuringBreak);const r=a.updatedAssetParameters;a.endGamSession(),a.setSessionAssetParameters(s.assetParameters),a.setSessionAssetParameterMacros(i??s.assetParameterMacros),await this.startGamForManifest(e,s.assetParameters,e=>{this.deps.diagnose("DA-SESSION-STARTING",`Channel switch: ${e}`,{step:e,manifestUrl:s.manifestUrl})}),this.isStaleStart(t)||r&&a.updateAssetParameters(r)}async startGamForManifest(e,i,a){const r=t(e);if(this.deps.adPlayerController.setManifestAssetParameters(r.sgaiAssetParameters),r.unknownTypes.length>0&&this.deps.diagnose("DA-VENDOR-CONFIG-UNKNOWN-TYPE",`Ignored ${r.unknownTypes.length} vendorConfiguration `+(1===r.unknownTypes.length?"entry":"entries")+" with unrecognised type: "+`${r.unknownTypes.join(", ")}.`,{types:r.unknownTypes}),this.deps.adPlayerController.isGamEnabled())if(r.identity){this.deps.diagnose("DA-GAM-CONFIG-RESOLVED",`GAM session identity: network ${r.identity.networkCode}, custom asset ${r.identity.customAssetKey}`,{networkCode:r.identity.networkCode,customAssetKey:r.identity.customAssetKey,channelId:e.channelId,duplicateEntriesIgnored:r.duplicateGam});try{a("gam-init"),await this.deps.adPlayerController.startGamSession(r.identity,i),this.deps.log("GAM session started")}catch(e){this.deps.diagnose("DA-GAM-SESSION-FAILED",e instanceof Error?e.message:String(e))}}else s(e)&&this.deps.diagnose("DA-GAM-CONFIG-MISSING",'The break manifest carries GAM pod assets but no usable "gam" vendorConfiguration entry; those assets will be skipped.',{reason:r.reason});else s(e)&&this.deps.diagnose("DA-GAM-CONFIG-MISSING","The break manifest carries GAM pod assets but GAM is disabled for this session (gam.enabled === false); those assets will be skipped.",{reason:"gam-disabled"})}async startSsaiSession(e,s){try{if(this.state.stitcherOrigin=a(e.stitcherUrl),this.state.configSummary.gam&&(this.state.configSummary.gam={...this.state.configSummary.gam,hasAssetParameters:!!e.assetParameters}),await this.state.ssaiController.start(e),this.isStaleStart(s))return;this.deps.diagnose("DA-SESSION-STARTED",`SSAI session active for ${e.stitcherUrl}`,{stitcherUrl:e.stitcherUrl}),this.deps.startLivePushback(),this.deps.log("SSAI session active")}catch(e){if(this.isStaleStart(s))return;const t=e instanceof Error?e:new Error(String(e));throw this.deps.diagnose("DA-SSAI-SESSION-FAILED",t.message),this.state.sessionActive=!1,this.deps.cmcdAdReporter.onSessionEnd(),this.deps.lensReporter.endSession(),t}}isStaleStart(e){return e!==this.state.sessionGeneration&&(this.deps.log("Session start aborted — the session ended or was replaced while starting"),!0)}}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { KnownDiagnosticCode } from '../diagnostics/errorCodes';
|
|
2
|
+
/**
|
|
3
|
+
* An ad failure classified with its canonical `DA-*` code, which telemetry reports as CMCD
|
|
4
|
+
* `adec`. Failures that are not an `AdError` report the generic `DA-AD-PLAYBACK-ERROR`.
|
|
5
|
+
*/
|
|
6
|
+
export declare class AdError extends Error {
|
|
7
|
+
/** Canonical Ads SDK error code for this failure. */
|
|
8
|
+
readonly code: KnownDiagnosticCode;
|
|
9
|
+
constructor(message: string, code: KnownDiagnosticCode);
|
|
10
|
+
}
|
|
11
|
+
/** Canonical code of an ad failure; `DA-AD-PLAYBACK-ERROR` when it was not classified. */
|
|
12
|
+
export declare function adErrorCode(error: unknown): KnownDiagnosticCode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export class AdError extends Error{constructor(r,o){super(r),this.name="AdError",this.code=o}}export function adErrorCode(r){return r instanceof AdError?r.code:"DA-AD-PLAYBACK-ERROR"}
|
|
@@ -109,6 +109,18 @@ export type AdInsertionMode = 'overlay' | 'shared-element' | 'adaptive' | 'auto'
|
|
|
109
109
|
* is not consumed. Primarily for VOD (PTS timebase).
|
|
110
110
|
* @category SDK & Sessions */
|
|
111
111
|
export type AdInsertionType = 'replacement' | 'insertion';
|
|
112
|
+
/** Initial live-playback distance from the reported edge. @category Configuration */
|
|
113
|
+
export interface LiveStartPushbackConfig {
|
|
114
|
+
/**
|
|
115
|
+
* Apply once per session/channel. When omitted, it follows `ptsSource`: on for `'anvatoCue'`,
|
|
116
|
+
* off for `'mediaTime'`. An explicit value always wins.
|
|
117
|
+
*/
|
|
118
|
+
enabled?: boolean;
|
|
119
|
+
/** Minimum total distance in target durations, not an additional rewind. @default 5 */
|
|
120
|
+
minimumDistanceTargetDurations?: number;
|
|
121
|
+
/** Declared HLS target duration in seconds when the adapter cannot provide it. */
|
|
122
|
+
targetDurationSeconds?: number;
|
|
123
|
+
}
|
|
112
124
|
/**
|
|
113
125
|
* - `sgai` (default): the SDK polls the break manifest, schedules breaks and plays ads in its own overlay.
|
|
114
126
|
* - `ssai`: the content player plays a pre-stitched stream; the SDK only creates the IMA DAI
|
|
@@ -335,6 +347,11 @@ export interface OptiViewAdsConfig {
|
|
|
335
347
|
* @default false
|
|
336
348
|
*/
|
|
337
349
|
continueContentDuringBreak?: boolean;
|
|
350
|
+
/**
|
|
351
|
+
* Live startup adjustment, on by default with `ptsSource: 'anvatoCue'`; does not change later
|
|
352
|
+
* break-resume policy.
|
|
353
|
+
*/
|
|
354
|
+
liveStartPushback?: LiveStartPushbackConfig;
|
|
338
355
|
/** Hook on the parsed manifest before scheduling (initial fetch and every poll). See {@link ManifestResponseInterceptor}. */
|
|
339
356
|
interceptManifestResponse?: ManifestResponseInterceptor;
|
|
340
357
|
/**
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import type { KnownDiagnosticCode } from '../diagnostics/errorCodes';
|
|
2
|
+
import { AdError } from './AdError';
|
|
1
3
|
/**
|
|
2
4
|
* An ad playback error that carries the ad vendor's own error code (e.g. the
|
|
3
5
|
* numeric IMA/VAST `AdError` code), so telemetry can report it (`adevc`)
|
|
4
|
-
* alongside the SDK's
|
|
5
|
-
* this type when the vendor supplies a code
|
|
6
|
-
* `Error`s.
|
|
6
|
+
* alongside the SDK's canonical code (`adec`). Vendor integrations wrap their
|
|
7
|
+
* errors in this type when the vendor supplies a code.
|
|
7
8
|
*/
|
|
8
|
-
export declare class VendorAdError extends
|
|
9
|
+
export declare class VendorAdError extends AdError {
|
|
9
10
|
/** The vendor's error code, stringified (e.g. IMA's numeric AdError code). */
|
|
10
11
|
readonly vendorCode: string;
|
|
11
|
-
constructor(message: string, vendorCode: string);
|
|
12
|
+
constructor(message: string, vendorCode: string, code?: KnownDiagnosticCode);
|
|
12
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export class VendorAdError extends
|
|
1
|
+
import{AdError as r}from"./AdError";export class VendorAdError extends r{constructor(r,o,e="DA-AD-PLAYBACK-ERROR"){super(r,e),this.name="VendorAdError",this.vendorCode=o}}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { Lens } from './lens';
|
|
2
2
|
export { LensEventType, LensToken } from './types';
|
|
3
|
-
export type { LensAdPayload, LensConsent, LensBackend, LensConfigureOptions, LensDestination, LensDestinationFilter, LensEvent, LensEventKeys, LensHandle, LensJoinOptions, LensPayload, LensSession, LensStartSessionOptions, } from './types';
|
|
3
|
+
export type { LensAdPayload, LensBatch, LensConsent, LensBackend, LensConfigureOptions, LensDestination, LensDestinationFilter, LensEvent, LensEventKeys, LensHandle, LensJoinOptions, LensPayload, LensSession, LensSourceChange, LensStartSessionOptions, } from './types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{L as Lens,a as LensEventType,b as LensToken}from"./lens-core-
|
|
1
|
+
export{L as Lens,a as LensEventType,b as LensToken}from"./lens-core-uGZfZpQy.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var n,e,i,o,u,a,c,f,s,l,v,h,d,p,y,g,m={};function b(){if(e)return n;e=1;var t=function(r){return r&&r.Math===Math&&r};return n=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof r&&r)||t("object"==typeof n&&n)||function(){return this}()||Function("return this")()}function w(){return o?i:(o=1,i=function(r){try{return!!r()}catch(r){return!0}})}function S(){if(a)return u;a=1;var r=w();return u=!r(function(){var r=function(){}.bind();return"function"!=typeof r||r.hasOwnProperty("prototype")})}function O(){if(f)return c;f=1;var r=S(),t=Function.prototype,n=t.apply,e=t.call;return c="object"==typeof Reflect&&Reflect.apply||(r?e.bind(n):function(){return e.apply(n,arguments)}),c}function k(){if(l)return s;l=1;var r=S(),t=Function.prototype,n=t.call,e=r&&t.bind.bind(n,n);return s=r?e:function(r){return function(){return n.apply(r,arguments)}},s}function A(){if(h)return v;h=1;var r=k(),t=r({}.toString),n=r("".slice);return v=function(r){return n(t(r),8,-1)}}function j(){if(p)return d;p=1;var r=A(),t=k();return d=function(n){if("Function"===r(n))return t(n)}}function P(){if(g)return y;g=1;var r="object"==typeof document&&document.all;return y=void 0===r&&void 0!==r?function(t){return"function"==typeof t||t===r}:function(r){return"function"==typeof r}}var I,T,E,x,C={};function R(){if(T)return I;T=1;var r=w();return I=!r(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})}function L(){if(x)return E;x=1;var r=S(),t=Function.prototype.call;return E=r?t.bind(t):function(){return t.apply(t,arguments)},E}var F,M,U,N,D,z,B,_,H,q,J,W,G,$,V,K,Q,Z,X,Y,rr,tr,nr,er,ir,or,ur,ar,cr,fr,sr,lr,vr,hr,dr,pr,yr,gr={};function mr(){if(F)return gr;F=1;var r={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,n=t&&!r.call({1:2},1);return gr.f=n?function(r){var n=t(this,r);return!!n&&n.enumerable}:r,gr}function br(){return U?M:(U=1,M=function(r,t){return{enumerable:!(1&r),configurable:!(2&r),writable:!(4&r),value:t}})}function wr(){if(D)return N;D=1;var r=k(),t=w(),n=A(),e=Object,i=r("".split);return N=t(function(){return!e("z").propertyIsEnumerable(0)})?function(r){return"String"===n(r)?i(r,""):e(r)}:e}function Sr(){return B?z:(B=1,z=function(r){return null==r})}function Or(){if(H)return _;H=1;var r=Sr(),t=TypeError;return _=function(n){if(r(n))throw new t("Can't call method on "+n);return n}}function kr(){if(J)return q;J=1;var r=wr(),t=Or();return q=function(n){return r(t(n))}}function Ar(){if(G)return W;G=1;var r=P();return W=function(t){return"object"==typeof t?null!==t:r(t)}}function jr(){return V?$:(V=1,$={})}function Pr(){if(Q)return K;Q=1;var r=jr(),t=b(),n=P(),e=function(r){return n(r)?r:void 0};return K=function(n,i){return arguments.length<2?e(r[n])||e(t[n]):r[n]&&r[n][i]||t[n]&&t[n][i]},K}function Ir(){if(X)return Z;X=1;var r=k();return Z=r({}.isPrototypeOf)}function Tr(){if(rr)return Y;rr=1;var r=b().navigator,t=r&&r.userAgent;return Y=t?String(t):""}function Er(){if(nr)return tr;nr=1;var r,t,n=b(),e=Tr(),i=n.process,o=n.Deno,u=i&&i.versions||o&&o.version,a=u&&u.v8;return a&&(t=(r=a.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!t&&e&&(!(r=e.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=e.match(/Chrome\/(\d+)/))&&(t=+r[1]),tr=t}function xr(){if(ir)return er;ir=1;var r=Er(),t=w(),n=b().String;return er=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol("symbol detection");return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}),er}function Cr(){if(ur)return or;ur=1;var r=xr();return or=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function Rr(){if(cr)return ar;cr=1;var r=Pr(),t=P(),n=Ir(),e=Cr(),i=Object;return ar=e?function(r){return"symbol"==typeof r}:function(e){var o=r("Symbol");return t(o)&&n(o.prototype,i(e))}}function Lr(){if(sr)return fr;sr=1;var r=String;return fr=function(t){try{return r(t)}catch(r){return"Object"}}}function Fr(){if(vr)return lr;vr=1;var r=P(),t=Lr(),n=TypeError;return lr=function(e){if(r(e))return e;throw new n(t(e)+" is not a function")}}function Mr(){if(dr)return hr;dr=1;var r=Fr(),t=Sr();return hr=function(n,e){var i=n[e];return t(i)?void 0:r(i)}}function Ur(){if(yr)return pr;yr=1;var r=L(),t=P(),n=Ar(),e=TypeError;return pr=function(i,o){var u,a;if("string"===o&&t(u=i.toString)&&!n(a=r(u,i)))return a;if(t(u=i.valueOf)&&!n(a=r(u,i)))return a;if("string"!==o&&t(u=i.toString)&&!n(a=r(u,i)))return a;throw new e("Can't convert object to primitive value")}}var Nr,Dr,zr,Br,_r,Hr,qr,Jr,Wr,Gr,$r,Vr,Kr,Qr,Zr,Xr,Yr,rt,tt,nt,et,it,ot,ut,at,ct,ft,st,lt={exports:{}};function vt(){return Dr?Nr:(Dr=1,Nr=!0)}function ht(){if(Br)return zr;Br=1;var r=b(),t=Object.defineProperty;return zr=function(n,e){try{t(r,n,{value:e,configurable:!0,writable:!0})}catch(t){r[n]=e}return e}}function dt(){if(_r)return lt.exports;_r=1;var r=vt(),t=b(),n=ht(),e="__core-js_shared__",i=lt.exports=t[e]||n(e,{});return(i.versions||(i.versions=[])).push({version:"3.50.0",mode:r?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.50.0/LICENSE",source:"https://github.com/zloirock/core-js"}),lt.exports}function pt(){if(qr)return Hr;qr=1;var r=dt(),t=Object.create||Object;return Hr=function(n,e){return r[n]||(r[n]=e||t(null))}}function yt(){if(Wr)return Jr;Wr=1;var r=Or(),t=Object;return Jr=function(n){return t(r(n))}}function gt(){if($r)return Gr;$r=1;var r=k(),t=yt(),n=r({}.hasOwnProperty);return Gr=Object.hasOwn||function(r,e){return n(t(r),e)}}function mt(){if(Kr)return Vr;Kr=1;var r=k(),t=0,n=Math.random(),e=r(1.1.toString);return Vr=function(r){return"Symbol("+(void 0===r?"":r)+")_"+e(++t+n,36)}}function bt(){if(Zr)return Qr;Zr=1;var r=b(),t=pt(),n=gt(),e=mt(),i=xr(),o=Cr(),u=r.Symbol,a=t("wks"),c=o?u.for||u:u&&u.withoutSetter||e;return Qr=function(r){return n(a,r)||(a[r]=i&&n(u,r)?u[r]:c("Symbol."+r)),a[r]}}function wt(){if(Yr)return Xr;Yr=1;var r=L(),t=Ar(),n=Rr(),e=Mr(),i=Ur(),o=bt(),u=TypeError,a=o("toPrimitive");return Xr=function(o,c){if(!t(o)||n(o))return o;var f,s=e(o,a);if(s){if(void 0===c&&(c="default"),f=r(s,o,c),!t(f)||n(f))return f;throw new u("Can't convert object to primitive value")}return void 0===c&&(c="number"),i(o,c)}}function St(){if(tt)return rt;tt=1;var r=wt(),t=Rr();return rt=function(n){var e=r(n,"string");return t(e)?e:e+""}}function Ot(){if(et)return nt;et=1;var r=b(),t=Ar(),n=r.document,e=t(n)&&t(n.createElement);return nt=function(r){return e?n.createElement(r):{}}}function kt(){if(ot)return it;ot=1;var r=R(),t=w(),n=Ot();return it=!r&&!t(function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a})}function At(){if(ut)return C;ut=1;var r=R(),t=L(),n=mr(),e=br(),i=kr(),o=St(),u=gt(),a=kt(),c=Object.getOwnPropertyDescriptor;return C.f=r?c:function(r,f){if(r=i(r),f=o(f),a)try{return c(r,f)}catch(r){}if(u(r,f))return e(!t(n.f,r,f),r[f])},C}function jt(){if(ct)return at;ct=1;var r=w(),t=P(),n=/#|\.prototype\./,e=function(n,e){var c=o[i(n)];return c===a||c!==u&&(t(e)?r(e):!!e)},i=e.normalize=function(r){return String(r).replace(n,".").toLowerCase()},o=e.data={},u=e.NATIVE="N",a=e.POLYFILL="P";return at=e}function Pt(){if(st)return ft;st=1;var r=j(),t=Fr(),n=S(),e=r(r.bind);return ft=function(r,i){return t(r),void 0===i?r:n?e(r,i):function(){return r.apply(i,arguments)}},ft}var It,Tt,Et,xt,Ct,Rt,Lt,Ft,Mt,Ut,Nt,Dt,zt,Bt,_t,Ht,qt,Jt,Wt,Gt,$t,Vt,Kt,Qt,Zt,Xt,Yt,rn,tn,nn,en,on,un,an,cn,fn,sn,ln,vn,hn,dn={};function pn(){if(Tt)return It;Tt=1;var r=R(),t=w();return It=r&&t(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})}function yn(){if(xt)return Et;xt=1;var r=Ar(),t=String,n=TypeError;return Et=function(e){if(r(e))return e;throw new n(t(e)+" is not an object")}}function gn(){if(Ct)return dn;Ct=1;var r=R(),t=kt(),n=pn(),e=yn(),i=St(),o=TypeError,u=Object.defineProperty,a=Object.getOwnPropertyDescriptor,c="enumerable",f="configurable",s="writable";return dn.f=r?n?function(r,t,n){if(e(r),t=i(t),e(n),"function"==typeof r&&"prototype"===t&&"value"in n&&s in n&&!n[s]){var o=a(r,t);o&&o[s]&&(r[t]=n.value,n={configurable:f in n?n[f]:o[f],enumerable:c in n?n[c]:o[c],writable:!1})}return u(r,t,n)}:u:function(r,n,a){if(e(r),n=i(n),e(a),t)try{return u(r,n,a)}catch(r){}if("get"in a||"set"in a)throw new o("Accessors not supported");return"value"in a&&(r[n]=a.value),r},dn}function mn(){if(Lt)return Rt;Lt=1;var r=R(),t=gn(),n=br();return Rt=r?function(r,e,i){return t.f(r,e,n(1,i))}:function(r,t,n){return r[t]=n,r}}function bn(){if(Mt)return Ft;Mt=1;var r=b(),t=O(),n=j(),e=P(),i=At().f,o=jt(),u=jr(),a=Pt(),c=mn(),f=gt(),s=function(r){var n=function(e,i,o){if(this instanceof n){switch(arguments.length){case 0:return new r;case 1:return new r(e);case 2:return new r(e,i)}return new r(e,i,o)}return t(r,this,arguments)};return n.prototype=r.prototype,n};return Ft=function(t,l){var v,h,d,p,y,g,m,b,w,S=t.target,O=t.global,k=t.stat,A=t.proto,j=O?r:k?r[S]:r[S]&&r[S].prototype,P=O?u:u[S]||c(u,S,{})[S],I=P.prototype;for(p in l)h=!(v=o(O?p:S+(k?".":"#")+p,t.forced))&&j&&f(j,p),g=P[p],h&&(m=t.dontCallGetSet?(w=i(j,p))&&w.value:j[p]),y=h&&m?m:l[p],(v||A||typeof g!=typeof y)&&(b=t.bind&&h?a(y,r):t.wrap&&h?s(y):A&&e(y)?n(y):y,(t.sham||y&&y.sham||g&&g.sham)&&c(b,"sham",!0),c(P,p,b),A&&(f(u,d=S+"Prototype")||c(u,d,{}),c(u[d],p,y),t.real&&I&&(v||!I[p])&&c(I,p,y)))}}function wn(){if(Nt)return Ut;Nt=1;var r=A();return Ut=Array.isArray||function(t){return"Array"===r(t)}}function Sn(){if(_t)return Bt;_t=1;var r=function(){if(zt)return Dt;zt=1;var r=Math.ceil,t=Math.floor;return Dt=Math.trunc||function(n){var e=+n;return(e>0?t:r)(e)}}();return Bt=function(t){var n=+t;return n!=n||0===n?0:r(n)}}function On(){if(qt)return Ht;qt=1;var r=Sn(),t=Math.min;return Ht=function(n){var e=r(n);return e>0?t(e,9007199254740991):0}}function kn(){if(Wt)return Jt;Wt=1;var r=On();return Jt=function(t){return r(t.length)}}function An(){if($t)return Gt;$t=1;var r=TypeError;return Gt=function(t){if(t>9007199254740991)throw new r("Maximum allowed index exceeded");return t}}function jn(){if(Kt)return Vt;Kt=1;var r=R(),t=gn(),n=br();return Vt=function(e,i,o){r?t.f(e,i,n(0,o)):e[i]=o}}function Pn(){if(Zt)return Qt;Zt=1;var r=R(),t=wn(),n=TypeError,e=Object.getOwnPropertyDescriptor,i=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(r){return r instanceof TypeError}}();return Qt=i?function(r,i){if(t(r)&&!e(r,"length").writable)throw new n("Cannot set read only .length");return r.length=i}:function(r,t){return r.length=t}}function In(){if(Yt)return Xt;Yt=1;var r={};return r[bt()("toStringTag")]="z",Xt="[object z]"===String(r)}function Tn(){if(tn)return rn;tn=1;var r=In(),t=P(),n=A(),e=bt()("toStringTag"),i=Object,o="Arguments"===n(function(){return arguments}());return rn=r?n:function(r){var u,a,c;return void 0===r?"Undefined":null===r?"Null":"string"==typeof(a=function(r,t){try{return r[t]}catch(r){}}(u=i(r),e))?a:o?n(u):"Object"===(c=n(u))&&t(u.callee)?"Arguments":c}}function En(){if(en)return nn;en=1;var r=k(),t=P(),n=dt(),e=r(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(r){return e(r)}),nn=n.inspectSource}function xn(){if(un)return on;un=1;var r=k(),t=w(),n=P(),e=Tn(),i=Pr(),o=En(),u=function(){},a=i("Reflect","construct"),c=/^\s*(?:class|function)\b/,f=r(c.exec),s=!c.test(u),l=function(r){if(!n(r))return!1;try{return a(u,[],r),!0}catch(r){return!1}},v=function(r){if(!n(r))return!1;switch(e(r)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return s||!!f(c,o(r))}catch(r){return!0}};return v.sham=!0,on=!a||t(function(){var r;return l(l.call)||!l(Object)||!l(function(){r=!0})||r})?v:l}function Cn(){if(cn)return an;cn=1;var r=wn(),t=xn(),n=Ar(),e=bt()("species"),i=Array;return an=function(o){var u;return r(o)&&(u=o.constructor,(t(u)&&(u===i||r(u.prototype))||n(u)&&null===(u=u[e]))&&(u=void 0)),void 0===u?i:u}}function Rn(){if(sn)return fn;sn=1;var r=Cn();return fn=function(t,n){return new(r(t))(0===n?0:n)}}function Ln(){if(vn)return ln;vn=1;var r=w(),t=bt(),n=Er(),e=t("species");return ln=function(t){return n>=51||!r(function(){var r=[];return(r.constructor={})[e]=function(){return{foo:1}},1!==r[t](Boolean).foo})}}function Fn(){if(hn)return m;hn=1;var r=bn(),t=w(),n=wn(),e=Ar(),i=yt(),o=kn(),u=An(),a=jn(),c=Pn(),f=Rn(),s=Ln(),l=bt(),v=Er(),h=l("isConcatSpreadable"),d=v>=51||!t(function(){var r=[];return r[h]=!1,r.concat()[0]!==r}),p=function(r){if(!e(r))return!1;var t=r[h];return void 0!==t?!!t:n(r)};return r({target:"Array",proto:!0,arity:1,forced:!d||!s("concat")},{concat:function(r){var t,n,e,s,l,v=i(this),h=f(v,0),d=0;for(t=-1,e=arguments.length;t<e;t++)if(p(l=-1===t?v:arguments[t]))for(s=o(l),u(d+s),n=0;n<s;n++,d++)n in l&&a(h,d,l[n]);else u(d+1),a(h,d++,l);return c(h,d),h}}),m}var Mn,Un,Nn={},Dn={};function zn(){if(Un)return Mn;Un=1;var r=Tn(),t=String;return Mn=function(n){if("Symbol"===r(n))throw new TypeError("Cannot convert a Symbol value to a string");return t(n)}}var Bn,_n,Hn,qn,Jn,Wn,Gn,$n,Vn,Kn,Qn,Zn,Xn,Yn,re,te,ne,ee,ie,oe={};function ue(){if(_n)return Bn;_n=1;var r=Sn(),t=Math.max,n=Math.min;return Bn=function(e,i){var o=r(e);return o<0?t(o+i,0):n(o,i)}}function ae(){if(qn)return Hn;qn=1;var r=kr(),t=ue(),n=kn(),e=function(e){return function(i,o,u){var a=r(i),c=n(a);if(0===c)return!e&&-1;var f,s=t(u,c);if(e&&o!=o){for(;c>s;)if((f=a[s++])!=f)return!0}else for(;c>s;s++)if((e||s in a)&&a[s]===o)return e||s||0;return!e&&-1}};return Hn={includes:e(!0),indexOf:e(!1)}}function ce(){return Wn?Jn:(Wn=1,Jn={})}function fe(){if($n)return Gn;$n=1;var r=k(),t=gt(),n=kr(),e=ae().indexOf,i=ce(),o=r([].push);return Gn=function(r,u){var a,c=n(r),f=0,s=[];for(a in c)!t(i,a)&&t(c,a)&&o(s,a);for(;u.length>f;)t(c,a=u[f++])&&(~e(s,a)||o(s,a));return s}}function se(){return Kn?Vn:(Kn=1,Vn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function le(){if(Zn)return Qn;Zn=1;var r=fe(),t=se();return Qn=Object.keys||function(n){return r(n,t)}}function ve(){if(Xn)return oe;Xn=1;var r=R(),t=pn(),n=gn(),e=yn(),i=kr(),o=le();return oe.f=r&&!t?Object.defineProperties:function(r,t){e(r);for(var u,a=i(t),c=o(t),f=c.length,s=0;f>s;)n.f(r,u=c[s++],a[u]);return r},oe}function he(){if(re)return Yn;re=1;var r=Pr();return Yn=r("document","documentElement")}function de(){if(ne)return te;ne=1;var r=pt(),t=mt(),n=r("keys");return te=function(r){return n[r]||(n[r]=t(r))}}function pe(){if(ie)return ee;ie=1;var r,t=yn(),n=ve(),e=se(),i=ce(),o=he(),u=Ot(),a=de(),c="prototype",f="script",s=a("IE_PROTO"),l=function(){},v=function(r){return"<"+f+">"+r+"</"+f+">"},h=function(r){r.write(v("")),r.close();var t=r.parentWindow.Object;return r=null,t},d=function(){try{r=new ActiveXObject("htmlfile")}catch(r){}var t,n,i;d="undefined"!=typeof document?document.domain&&r?h(r):(n=u("iframe"),i="java"+f+":",n.style.display="none",o.appendChild(n),n.src=String(i),(t=n.contentWindow.document).open(),t.write(v("document.F=Object")),t.close(),t.F):h(r);for(var a=e.length;a--;)delete d[c][e[a]];return d()};return i[s]=!0,ee=Object.create||function(r,e){var i;return null!==r?(l[c]=t(r),i=new l,l[c]=null,i[s]=r):i=d(),void 0===e?i:n.f(i,e)}}var ye,ge={};function me(){if(ye)return ge;ye=1;var r=fe(),t=se().concat("length","prototype");return ge.f=Object.getOwnPropertyNames||function(n){return r(n,t)},ge}var be,we,Se,Oe={};function ke(){if(we)return be;we=1;var r=k();return be=r([].slice)}function Ae(){if(Se)return Oe;Se=1;var r=A(),t=kr(),n=me().f,e=ke(),i="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];return Oe.f=function(o){return i&&"Window"===r(o)?function(r){try{return n(r)}catch(r){return e(i)}}(o):n(t(o))},Oe}var je,Pe,Ie,Te,Ee,xe={};function Ce(){return je||(je=1,xe.f=Object.getOwnPropertySymbols),xe}function Re(){if(Ie)return Pe;Ie=1;var r=mn();return Pe=function(t,n,e,i){return i&&i.enumerable?t[n]=e:r(t,n,e),t}}function Le(){if(Ee)return Te;Ee=1;var r=gn();return Te=function(t,n,e){return r.f(t,n,e)}}var Fe,Me,Ue,Ne,De,ze,Be,_e,He,qe,Je,We,Ge,$e,Ve,Ke,Qe={};function Ze(){if(Fe)return Qe;Fe=1;var r=bt();return Qe.f=r,Qe}function Xe(){if(Ue)return Me;Ue=1;var r=jr(),t=gt(),n=Ze(),e=gn().f;return Me=function(i){var o=r.Symbol||(r.Symbol={});t(o,i)||e(o,i,{value:n.f(i)})}}function Ye(){if(De)return Ne;De=1;var r=L(),t=Pr(),n=bt(),e=Re();return Ne=function(){var i=t("Symbol"),o=i&&i.prototype,u=o&&o.valueOf,a=n("toPrimitive");o&&!o[a]&&e(o,a,function(t){return r(u,this)},{arity:1})}}function ri(){if(He)return _e;He=1;var r=In(),t=gn().f,n=mn(),e=gt(),i=function(){if(Be)return ze;Be=1;var r=In(),t=Tn();return ze=r?{}.toString:function(){return"[object "+t(this)+"]"}}(),o=bt()("toStringTag");return _e=function(u,a,c,f){var s=c?u:u&&u.prototype;s&&(e(s,o)||t(s,o,{configurable:!0,value:a}),f&&!r&&n(s,"toString",i))}}function ti(){if(Ge)return We;Ge=1;var r,t,n,e=function(){if(Je)return qe;Je=1;var r=b(),t=P(),n=r.WeakMap;return qe=t(n)&&/native code/.test(String(n))}(),i=b(),o=Ar(),u=mn(),a=gt(),c=dt(),f=de(),s=ce(),l="Object already initialized",v=i.TypeError,h=i.WeakMap;if(e||c.state){var d=c.state||(c.state=new h);d.get=d.get,d.has=d.has,d.set=d.set,r=function(r,t){if(d.has(r))throw new v(l);return t.facade=r,d.set(r,t),t},t=function(r){return d.get(r)||{}},n=function(r){return d.has(r)}}else{var p=f("state");s[p]=!0,r=function(r,t){if(a(r,p))throw new v(l);return t.facade=r,u(r,p,t),t},t=function(r){return a(r,p)?r[p]:{}},n=function(r){return a(r,p)}}return We={set:r,get:t,has:n,enforce:function(e){return n(e)?t(e):r(e,{})},getterFor:function(r){return function(n){var e;if(!o(n)||(e=t(n)).type!==r)throw new v("Incompatible receiver, "+r+" required");return e}}}}function ni(){if(Ve)return $e;Ve=1;var r=Pt(),t=wr(),n=yt(),e=kn(),i=Rn(),o=jn(),u=function(u){var a=1===u,c=2===u,f=3===u,s=4===u,l=6===u,v=7===u,h=5===u||l;return function(d,p,y){for(var g,m,b=n(d),w=t(b),S=e(w),O=r(p,y),k=0,A=0,j=a?i(d,S):c||v?i(d,0):void 0;S>k;k++)if((h||k in w)&&(m=O(g=w[k],k,b),u))if(a)o(j,k,m);else if(m)switch(u){case 3:return!0;case 5:return g;case 6:return k;case 2:o(j,A++,g)}else switch(u){case 4:return!1;case 7:o(j,A++,g)}return l?-1:f||s?s:j}};return $e={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)}}var ei,ii,oi,ui={};function ai(){if(ii)return ei;ii=1;var r=xr();return ei=r&&!!Symbol.for&&!!Symbol.keyFor}var ci,fi={};var si,li,vi,hi,di,pi,yi,gi,mi,bi={};function wi(){if(hi)return vi;hi=1;var r=k();return vi=r(1.1.valueOf)}function Si(){if(mi)return bi;mi=1;var r=bn(),t=Pr(),n=L(),e=k(),i=w(),o=wn(),u=P(),a=Ar(),c=pe(),f=function(){if(li)return si;li=1;var r=Ar(),t=ti().get;return si=function(n){if(!r(n))return!1;var e=t(n);return!!e&&"RawJSON"===e.type}}(),s=Rr(),l=A(),v=wi(),h=ae().includes,d=gt(),p=zn(),y=function(){if(pi)return di;pi=1;var r=k(),t=gt(),n=SyntaxError,e=parseInt,i=String.fromCharCode,o=r("".charAt),u=r("".slice),a=r(/./.exec),c={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},f=/^[\da-f]{4}$/i,s=/^[\u0000-\u001F]$/;return di=function(r,l){for(var v=!0,h="";l<r.length;){var d=o(r,l);if("\\"===d){var p=u(r,l,l+2);if(t(c,p))h+=c[p],l+=2;else{if("\\u"!==p)throw new n('Unknown escape sequence: "'+p+'"');var y=u(r,l+=2,l+4);if(!a(f,y))throw new n("Bad Unicode escape at: "+l);h+=i(e(y,16)),l+=4}}else{if('"'===d){v=!1,l++;break}if(a(s,d))throw new n("Bad control character in string literal at: "+l);h+=d,l++}}if(v)throw new n("Unterminated string at: "+l);return{value:h,end:l}}}(),g=mt(),m=xr(),b=function(){if(gi)return yi;gi=1;var r=w();return yi=!r(function(){var r="9007199254740993",t=JSON.rawJSON(r);return!JSON.isRawJSON(t)||JSON.stringify(t)!==r})}(),S=String,O=TypeError,j=t("JSON","stringify"),I=t("BigInt"),T=e("".valueOf),E=e((!0).valueOf),x=I&&e(I.prototype.valueOf),C=e(/./.exec),R=e("".charAt),F=e("".charCodeAt),M=e("".replace),U=e("".slice),N=e([].push),D=e([].pop),z=e(1.1.toString),B=/[\uD800-\uDFFF]/g,_=/^[\uD800-\uDBFF]$/,H=/^[\uDC00-\uDFFF]$/,q=/^\d+$/,J=g(),W=g(),G=g(),$=J.length,V=W.length,K=!m||i(function(){var r=t("Symbol")("stringify detection");return"[null]"!==j([r])||"{}"!==j({a:r})||"{}"!==j(Object(r))}),Q=i(function(){return'"\\udf06\\ud834"'!==j("\udf06\ud834")||'"\\udead"'!==j("\udead")}),Z=b?t("JSON","isRawJSON"):f,X=K?function(r,t,e){return j(r,function(r,e){var i=n(t,this,r,e);if(!s(i))return i},e)}:j,Y=function(r,t,n){var e=R(n,t-1),i=R(n,t+1);return C(_,r)&&!C(H,i)||C(H,r)&&!C(_,e)?"\\u"+z(F(r,0),16):r},rr=function(r,t){try{return r(t),!0}catch(r){return!1}},tr=function(r){if(!a(r)||u(r)||o(r))return!1;try{return!function(r){var t=l(r);return"Number"===t&&rr(v,r)||"String"===t&&rr(T,r)||"Boolean"===t&&rr(E,r)||!!x&&"BigInt"===t&&rr(x,r)}(r)}catch(r){return!0}},nr=function(r,t){return{toJSON:function(){var e=r[t];if(a(e)||"bigint"==typeof e){var i=e.toJSON;u(i)&&(e=n(i,e,t))}return e}}};return j&&r({target:"JSON",stat:!0,arity:3,forced:K||Q||!b},{stringify:function(r,t,e){var i,a=u(t)?t:void 0,f=a?void 0:function(r){if(o(r)){for(var t=r.length,n=[],e=c(null),i=0;i<t;i++){var u,a=r[i];if("string"==typeof a)u=a;else{if("number"!=typeof a&&"Number"!==l(a)&&"String"!==l(a))continue;u=p(a)}d(e,u)||(e[u]=!0,N(n,u))}return n}}(t),s=f&&function(r){for(var t=0,n=r.length;t<n;t++)if(C(q,r[t]))return W;return""}(f),v=[],g=[],m=[],w=!1,k=!0,A=X(r,function(r,t){if(r=S(r),f){if(r===G)return D(g),void(i=D(m));if(k)k=!1;else if(this!==i&&!o(this)&&!h(f,r))return}else a&&(t=n(a,this,r,t));if(Z(t))return b?t:(w=!0,J+(N(v,t.rawJSON)-1));if(f&&tr(t)){if(h(g,t))throw new O("Converting circular structure to JSON");var e=function(r,t,n){for(var e=c(null),i=0,o=t.length;i<o;i++){var u=t[i];e[n+u]=nr(r,u)}return e[G]=null,e}(t,f,s);return N(g,t),N(m,i),i=e,s&&(w=!0),e}return t},e);if("string"!=typeof A)return A;if(Q&&(A=M(A,B,Y)),!w)return A;for(var j="",P=A.length,I=0;I<P;I++){var T=R(A,I);if('"'===T){var E=y(A,++I).end-1,x=U(A,I,E);U(x,0,$)===J?j+=v[U(x,$)]:U(x,0,V)===W?j+='"'+U(x,V)+'"':j+='"'+x+'"',I=E}else j+=T}return j}}),bi}var Oi,ki,Ai={};function ji(){return ki||(ki=1,function(){if(Ke)return Dn;Ke=1;var r=bn(),t=b(),n=L(),e=k(),i=vt(),o=R(),u=xr(),a=w(),c=gt(),f=Ir(),s=yn(),l=kr(),v=St(),h=zn(),d=br(),p=pe(),y=le(),g=me(),m=Ae(),S=Ce(),O=At(),A=gn(),j=ve(),P=mr(),I=Re(),T=Le(),E=pt(),x=de(),C=ce(),F=mt(),M=bt(),U=Ze(),N=Xe(),D=Ye(),z=ri(),B=ti(),_=ni().forEach,H=x("hidden"),q="Symbol",J="prototype",W=B.set,G=B.getterFor(q),$=Object[J],V=t.Symbol,K=V&&V[J],Q=t.RangeError,Z=t.TypeError,X=t.QObject,Y=O.f,rr=A.f,tr=m.f,nr=P.f,er=e([].push),ir=E("symbols"),or=E("op-symbols"),ur=E("wks"),ar=!X||!X[J]||!X[J].findChild,cr=function(r,t,n){var e=Y($,t);return e&&delete $[t],rr(r,t,n),e&&r!==$&&rr($,t,e),r},fr=o&&a(function(){return 7!==p(rr({},"a",{get:function(){return rr(this,"a",{value:7}).a}})).a})?cr:rr,sr=function(r,t){var n=ir[r]=p(K);return W(n,{type:q,tag:r,description:t}),o||(n.description=t),n},lr=function(r,t,n){r===$&&lr(or,t,n),s(r);var e=v(t);return s(n),c(ir,e)?(("enumerable"in n?!n.enumerable:!c(r,e)||c(r,H)&&r[H][e])?(c(r,H)||rr(r,H,d(1,p(null))),r[H][e]=!0):(c(r,H)&&r[H][e]&&(r[H][e]=!1),n=p(n,{enumerable:d(0,!1)})),fr(r,e,n)):rr(r,e,n)},vr=function(r,t){s(r);var e=l(t),i=y(e).concat(yr(e));return _(i,function(t){o&&!n(hr,e,t)||lr(r,t,e[t])}),r},hr=function(r){var t=v(r),e=n(nr,this,t);return!(this===$&&c(ir,t)&&!c(or,t))&&(!(e||!c(this,t)||!c(ir,t)||c(this,H)&&this[H][t])||e)},dr=function(r,t){var n=l(r),e=v(t);if(n!==$||!c(ir,e)||c(or,e)){var i=Y(n,e);return!i||!c(ir,e)||c(n,H)&&n[H][e]||(i.enumerable=!0),i}},pr=function(r){var t=tr(l(r)),n=[];return _(t,function(r){c(ir,r)||c(C,r)||er(n,r)}),n},yr=function(r){var t=r===$,n=tr(t?or:l(r)),e=[];return _(n,function(r){!c(ir,r)||t&&!c($,r)||er(e,ir[r])}),e};u||(V=function(){if(f(K,this))throw new Z("Symbol is not a constructor");var r=arguments.length&&void 0!==arguments[0]?h(arguments[0]):void 0,e=F(r),i=function(r){var o=void 0===this?t:this;o===$&&n(i,or,r),c(o,H)&&c(o[H],e)&&(o[H][e]=!1);var u=d(1,r);try{fr(o,e,u)}catch(r){if(!(r instanceof Q))throw r;cr(o,e,u)}};return o&&ar&&fr($,e,{configurable:!0,set:i}),sr(e,r)},I(K=V[J],"toString",function(){return G(this).tag}),I(V,"withoutSetter",function(r){return sr(F(r),r)}),P.f=hr,A.f=lr,j.f=vr,O.f=dr,g.f=m.f=pr,S.f=yr,U.f=function(r){return sr(M(r),r)},o&&(T(K,"description",{configurable:!0,get:function(){return G(this).description}}),i||I($,"propertyIsEnumerable",hr,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!u,sham:!u},{Symbol:V}),_(y(ur),function(r){N(r)}),r({target:q,stat:!0,forced:!u},{useSetter:function(){ar=!0},useSimple:function(){ar=!1}}),r({target:"Object",stat:!0,forced:!u,sham:!o},{create:function(r,t){return void 0===t?p(r):vr(p(r),t)},defineProperty:lr,defineProperties:vr,getOwnPropertyDescriptor:dr}),r({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:pr}),D(),z(V,q),C[H]=!0}(),function(){if(oi)return ui;oi=1;var r=bn(),t=Pr(),n=gt(),e=zn(),i=pt(),o=ai(),u=i("string-to-symbol-registry"),a=i("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!o},{for:function(r){var i=e(r);if(n(u,i))return u[i];var o=t("Symbol")(i);return u[i]=o,a[o]=i,o}})}(),function(){if(ci)return fi;ci=1;var r=bn(),t=gt(),n=Rr(),e=Lr(),i=pt(),o=ai(),u=i("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!o},{keyFor:function(r){if(!n(r))throw new TypeError(e(r)+" is not a symbol");if(t(u,r))return u[r]}})}(),Si(),function(){if(Oi)return Ai;Oi=1;var r=bn(),t=xr(),n=w(),e=Ce(),i=yt();r({target:"Object",stat:!0,forced:!t||n(function(){e.f(1)})},{getOwnPropertySymbols:function(r){var t=e.f;return t?t(i(r)):[]}})}()),Nn}var Pi,Ii={};function Ti(){return Pi||(Pi=1,Xe()("asyncDispose")),Ii}var Ei;var xi,Ci={};function Ri(){return xi||(xi=1,Xe()("dispose")),Ci}var Li;var Fi;var Mi,Ui={};function Ni(){return Mi||(Mi=1,Xe()("iterator")),Ui}var Di;var zi;var Bi;var _i;var Hi;var qi;var Ji,Wi={};function Gi(){if(Ji)return Wi;Ji=1;var r=Xe(),t=Ye();return r("toPrimitive"),t(),Wi}var $i,Vi={};var Ki;var Qi,Zi,Xi,Yi={};function ro(){if(Xi)return Zi;Xi=1,Fn(),ji(),Ti(),Ei||(Ei=1,Xe()("asyncIterator")),Ri(),Li||(Li=1,Xe()("hasInstance")),Fi||(Fi=1,Xe()("isConcatSpreadable")),Ni(),Di||(Di=1,Xe()("match")),zi||(zi=1,Xe()("matchAll")),Bi||(Bi=1,Xe()("replace")),_i||(_i=1,Xe()("search")),Hi||(Hi=1,Xe()("species")),qi||(qi=1,Xe()("split")),Gi(),function(){if($i)return Vi;$i=1;var r=Pr(),t=Xe(),n=ri();t("toStringTag"),n(r("Symbol"),"Symbol")}(),Ki||(Ki=1,Xe()("unscopables")),function(){if(Qi)return Yi;Qi=1;var r=b();ri()(r.JSON,"JSON",!0)}();var r=jr();return Zi=r.Symbol}var to,no,eo,io,oo,uo,ao,co,fo,so,lo,vo,ho,po,yo,go,mo,bo,wo,So,Oo,ko,Ao,jo,Po,Io,To,Eo,xo,Co,Ro,Lo,Fo,Mo={};function Uo(){return no?to:(no=1,to=function(){})}function No(){return io?eo:(io=1,eo=Object.create?Object.create(null):{})}function Do(){if(uo)return oo;uo=1;var r=R(),t=gt(),n=Function.prototype,e=r&&Object.getOwnPropertyDescriptor,i=t(n,"name"),o=i&&"something"===function(){}.name,u=i&&(!r||r&&e(n,"name").configurable);return oo={EXISTS:i,PROPER:o,CONFIGURABLE:u}}function zo(){if(co)return ao;co=1;var r=w();return ao=!r(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype})}function Bo(){if(so)return fo;so=1;var r=gt(),t=P(),n=yt(),e=de(),i=zo(),o=e("IE_PROTO"),u=Object,a=u.prototype;return fo=i?u.getPrototypeOf:function(e){var i=n(e);if(r(i,o))return i[o];var c=i.constructor;return t(c)&&i instanceof c?c.prototype:i instanceof u?a:null}}function _o(){if(vo)return lo;vo=1;var r,t,n,e=w(),i=P(),o=Ar(),u=pe(),a=Bo(),c=Re(),f=bt(),s=vt(),l=f("iterator"),v=!1;return[].keys&&("next"in(n=[].keys())?(t=a(a(n)))!==Object.prototype&&(r=t):v=!0),!o(r)||e(function(){var t={};return r[l].call(t)!==t})?r={}:s&&(r=u(r)),i(r[l])||c(r,l,function(){return this}),lo={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:v}}function Ho(){if(po)return ho;po=1;var r=_o().IteratorPrototype,t=pe(),n=br(),e=ri(),i=No(),o=function(){return this};return ho=function(u,a,c,f){var s=a+" Iterator";return u.prototype=t(r,{next:n(+!f,c)}),e(u,s,!1,!0),i[s]=o,u}}function qo(){if(bo)return mo;bo=1;var r=Ar();return mo=function(t){return r(t)||null===t}}function Jo(){if(So)return wo;So=1;var r=qo(),t=String,n=TypeError;return wo=function(e){if(r(e))return e;throw new n("Can't set "+t(e)+" as a prototype")}}function Wo(){if(ko)return Oo;ko=1;var r=function(){if(go)return yo;go=1;var r=k(),t=Fr();return yo=function(n,e,i){try{return r(t(Object.getOwnPropertyDescriptor(n,e)[i]))}catch(r){}}}(),t=Ar(),n=Or(),e=Jo();return Oo=Object.setPrototypeOf||("__proto__"in{}?function(){var i,o=!1,u={};try{(i=r(Object.prototype,"__proto__","set"))(u,[]),o=u instanceof Array}catch(r){}return function(r,u){return n(r),e(u),t(r)?(o?i(r,u):r.__proto__=u,r):r}}():void 0)}function Go(){if(jo)return Ao;jo=1;var r=bn(),t=L(),n=vt(),e=Do(),i=P(),o=Ho(),u=Bo(),a=Wo(),c=ri(),f=mn(),s=Re(),l=bt(),v=No(),h=_o(),d=e.PROPER,p=e.CONFIGURABLE,y=h.IteratorPrototype,g=h.BUGGY_SAFARI_ITERATORS,m=l("iterator"),b="keys",w="values",S="entries",O=function(){return this};return Ao=function(e,l,h,k,A,j,P){o(h,l,k);var I,T,E,x=function(r){if(r===A&&M)return M;if(!g&&r&&r in L)return L[r];switch(r){case b:case w:case S:return function(){return new h(this,r)}}return function(){return new h(this)}},C=l+" Iterator",R=!1,L=e.prototype,F=L[m]||L["@@iterator"]||A&&L[A],M=!g&&F||x(A),U="Array"===l&&L.entries||F;if(U&&(I=u(U.call(new e)))!==Object.prototype&&I.next&&(n||u(I)===y||(a?a(I,y):i(I[m])||s(I,m,O)),c(I,C,!0,!0),n&&(v[C]=O)),d&&A===w&&F&&F.name!==w&&(!n&&p?f(L,"name",w):(R=!0,M=function(){return t(F,this)})),A)if(T={values:x(w),keys:j?M:x(b),entries:x(S)},P)for(E in T)(g||R||!(E in L))&&s(L,E,T[E]);else r({target:l,proto:!0,forced:g||R},T);return n&&!P||L[m]===M||s(L,m,M,{name:A}),v[l]=M,T},Ao}function $o(){return Io?Po:(Io=1,Po=function(r,t){return{value:r,done:t}})}function Vo(){if(Eo)return To;Eo=1;var r=kr(),t=Uo(),n=No(),e=ti(),i=gn().f,o=Go(),u=$o(),a=vt(),c=R(),f="Array Iterator",s=e.set,l=e.getterFor(f);To=o(Array,"Array",function(t,n){s(this,{type:f,target:r(t),index:0,kind:n})},function(){var r=l(this),t=r.target,n=r.index++;if(!t||n>=t.length)return r.target=null,u(void 0,!0);switch(r.kind){case"keys":return u(n,!1);case"values":return u(t[n],!1)}return u([n,t[n]],!1)},"values");var v=n.Arguments=n.Array;if(t("keys"),t("values"),t("entries"),!a&&c&&"values"!==v.name)try{i(v,"name",{value:"values"})}catch(r){}return To}function Ko(){if(Ro)return Mo;Ro=1,Vo();var r=Co?xo:(Co=1,xo={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),t=b(),n=ri(),e=No();for(var i in r)n(t[i],i),e[i]=e.Array;return Mo}var Qo,Zo={};var Xo;var Yo;var ru,tu,nu;function eu(){if(nu)return tu;nu=1;var r=function(){if(Fo)return Lo;Fo=1;var r=ro();return Ko(),Lo=r}();return function(){if(Qo)return Zo;Qo=1;var r=bt(),t=gn().f,n=r("metadata"),e=Function.prototype;void 0===e[n]&&t(e,n,{value:null})}(),Xo||(Xo=1,Ti()),Yo||(Yo=1,Ri()),ru||(ru=1,Xe()("metadata")),tu=r}var iu,ou,uu;function au(){if(ou)return iu;ou=1;var r=Pr(),t=k(),n=r("Symbol"),e=n.keyFor,i=t(n.prototype.valueOf);return iu=n.isRegisteredSymbol||function(r){try{return void 0!==e(i(r))}catch(r){return!1}}}var cu,fu,su;function lu(){if(fu)return cu;fu=1;for(var r=pt(),t=Pr(),n=k(),e=Rr(),i=bt(),o=t("Symbol"),u=o.isWellKnownSymbol,a=t("Object","getOwnPropertyNames"),c=n(o.prototype.valueOf),f=r("wks"),s=0,l=a(o),v=l.length;s<v;s++)try{var h=l[s];e(o[h])&&i(h)}catch(r){}return cu=function(r){if(u&&u(r))return!0;try{for(var t=c(r),n=0,e=a(f),i=e.length;n<i;n++)if(f[e[n]]==t)return!0}catch(r){}return!1},cu}var vu;var hu;var du;var pu;var yu;var gu;var mu;var bu,wu,Su,Ou,ku;function Au(){if(Su)return wu;Su=1;var r=eu();return uu||(uu=1,bn()({target:"Symbol",stat:!0},{isRegisteredSymbol:au()})),su||(su=1,bn()({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:lu()})),vu||(vu=1,Xe()("customMatcher")),hu||(hu=1,Xe()("observable")),du||(du=1,bn()({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:au()})),pu||(pu=1,bn()({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:lu()})),yu||(yu=1,Xe()("matcher")),gu||(gu=1,Xe()("metadataKey")),mu||(mu=1,Xe()("patternMatch")),bu||(bu=1,Xe()("replaceAll")),wu=r}var ju,Pu,Iu,Tu,Eu,xu,Cu,Ru,Lu,Fu,Mu,Uu,Nu,Du=t(ku?Ou:(ku=1,Ou=Au())),zu={};function Bu(){if(Pu)return ju;Pu=1;var r=k(),t=Sn(),n=zn(),e=Or(),i=r("".charAt),o=r("".charCodeAt),u=r("".slice),a=function(r){return function(a,c){var f,s,l=n(e(a)),v=t(c),h=l.length;return v<0||v>=h?r?"":void 0:(f=o(l,v))<55296||f>56319||v+1===h||(s=o(l,v+1))<56320||s>57343?r?i(l,v):f:r?u(l,v,v+2):s-56320+(f-55296<<10)+65536}};return ju={codeAt:a(!1),charAt:a(!0)}}function _u(){if(Iu)return zu;Iu=1;var r=Bu().charAt,t=zn(),n=ti(),e=Go(),i=$o(),o="String Iterator",u=n.set,a=n.getterFor(o);return e(String,"String",function(r){u(this,{type:o,string:t(r),index:0})},function(){var t,n=a(this),e=n.string,o=n.index;return o>=e.length?i(void 0,!0):(t=r(e,o),n.index+=t.length,i(t,!1))}),zu}function Hu(){if(Cu)return xu;Cu=1;var r=function(){if(Eu)return Tu;Eu=1,Vo(),_u(),Ni();var r=Ze();return Tu=r.f("iterator")}();return Ko(),xu=r}function qu(){if(Mu)return Fu;Mu=1;var r=function(){if(Lu)return Ru;Lu=1;var r=Hu();return Ru=r}();return Fu=r}var Ju=t(Nu?Uu:(Nu=1,Uu=qu()));function Wu(r){return Wu="function"==typeof Du&&"symbol"==typeof Ju?function(r){return typeof r}:function(r){return r&&"function"==typeof Du&&r.constructor===Du&&r!==Du.prototype?"symbol":typeof r},Wu(r)}function Gu(r){if(null!=r){var t=r["function"==typeof Du&&Ju||"@@iterator"],n=0;if(t)return t.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length))return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}}}throw new TypeError(Wu(r)+" is not iterable")}var $u,Vu,Ku,Qu,Zu,Xu,Yu,ra,ta,na,ea;function ia(){if(Ku)return Vu;Ku=1,$u||($u=1,bn()({target:"Object",stat:!0,sham:!R()},{create:pe()}));var r=jr().Object;return Vu=function(t,n){return r.create(t,n)}}function oa(){if(Yu)return Xu;Yu=1;var r=function(){if(Zu)return Qu;Zu=1;var r=ia();return Qu=r}();return Xu=r}var ua,aa,ca,fa,sa,la,va,ha,da,pa,ya,ga,ma,ba,wa,Sa,Oa,ka=t(ea?na:(ea=1,na=function(){if(ta)return ra;ta=1;var r=oa();return ra=r}())),Aa={};function ja(){if(aa)return ua;aa=1;var r=k(),t=Fr(),n=Ar(),e=gt(),i=ke(),o=S(),u=Function,a=r([].concat),c=r([].join),f={};return ua=o?u.bind:function(r){var o=t(this),s=o.prototype,l=i(arguments,1),v=function(){var t=a(l,i(arguments));return this instanceof v?function(r,t,n){if(!e(f,t)){for(var i=[],o=0;o<t;o++)i[o]="a["+o+"]";f[t]=u("C,a","return new C("+c(i,",")+")")}return f[t](r,n)}(o,t.length,t):o.apply(r,t)};return n(s)&&(v.prototype=s),v},ua}function Pa(){if(sa)return fa;sa=1;var r=b(),t=jr();return fa=function(n,e){var i=t[n+"Prototype"],o=i&&i[e];if(o)return o;var u=r[n],a=u&&u.prototype;return a&&a[e]}}function Ia(){if(va)return la;va=1,function(){if(ca)return Aa;ca=1;var r=bn(),t=ja();r({target:"Function",proto:!0,forced:Function.bind!==t},{bind:t})}();var r=Pa();return la=r("Function","bind")}function Ta(){if(ya)return pa;ya=1;var r=function(){if(da)return ha;da=1;var r=Ir(),t=Ia(),n=Function.prototype;return ha=function(e){var i=e.bind;return e===n||r(n,e)&&i===n.bind?t:i}}();return pa=r}function Ea(){if(wa)return ba;wa=1;var r=function(){if(ma)return ga;ma=1;var r=Ta();return ga=r}();return ba=r}var xa,Ca,Ra,La,Fa,Ma,Ua,Na,Da,za,Ba,_a=t(Oa?Sa:(Oa=1,Sa=Ea())),Ha={};function qa(){if(Ra)return Ca;Ra=1,function(){if(xa)return Ha;xa=1;var r=bn(),t=w(),n=yt(),e=Bo(),i=zo();r({target:"Object",stat:!0,forced:t(function(){e(1)}),sham:!i},{getPrototypeOf:function(r){return e(n(r))}})}();var r=jr();return Ca=r.Object.getPrototypeOf}function Ja(){if(Ua)return Ma;Ua=1;var r=function(){if(Fa)return La;Fa=1;var r=qa();return La=r}();return Ma=r}var Wa,Ga,$a,Va,Ka,Qa,Za,Xa,Ya,rc,tc,nc=t(Ba?za:(Ba=1,za=function(){if(Da)return Na;Da=1;var r=Ja();return Na=r}()));function ec(){if($a)return Ga;$a=1,Wa||(Wa=1,bn()({target:"Object",stat:!0},{setPrototypeOf:Wo()}));var r=jr();return Ga=r.Object.setPrototypeOf}function ic(){if(Za)return Qa;Za=1;var r=function(){if(Ka)return Va;Ka=1;var r=ec();return Va=r}();return Qa=r}var oc,uc,ac,cc,fc,sc,lc,vc,hc,dc,pc=t(tc?rc:(tc=1,rc=function(){if(Ya)return Xa;Ya=1;var r=ic();return Xa=r}())),yc={exports:{}},gc={};function mc(){if(oc)return gc;oc=1;var r=bn(),t=R(),n=gn().f;return r({target:"Object",stat:!0,forced:Object.defineProperty!==n,sham:!t},{defineProperty:n}),gc}function bc(){if(cc)return ac;cc=1;var r=function(){if(uc)return yc.exports;uc=1,mc();var r=jr().Object,t=yc.exports=function(t,n,e){return r.defineProperty(t,n,e)};return r.defineProperty.sham&&(t.sham=!0),yc.exports}();return ac=r}function wc(){if(vc)return lc;vc=1;var r=function(){if(sc)return fc;sc=1;var r=bc();return fc=r}();return lc=r}var Sc,Oc,kc,Ac,jc,Pc,Ic,Tc,Ec,xc,Cc=t(dc?hc:(dc=1,hc=wc()));function Rc(r,t,n,e){var i=Cc;try{i({},"",{})}catch(r){i=0}Rc=function(r,t,n,e){function o(t,n){Rc(r,t,function(r){return this._invoke(t,n,r)})}t?i?i(r,t,{value:n,enumerable:!e,configurable:!e,writable:!e}):r[t]=n:(o("next",0),o("throw",1),o("return",2))},Rc(r,t,n,e)}function Lc(){var r,t,n="function"==typeof Du?Du:{},e=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,e,i,o){var c=e&&e.prototype instanceof a?e:a,f=ka(c.prototype);return Rc(f,"_invoke",function(n,e,i){var o,a,c,f=0,s=i||[],l=!1,v={p:0,n:0,v:r,a:h,f:_a(h).call(h,r,4),d:function(t,n){return o=t,a=0,c=r,v.n=n,u}};function h(n,e){for(a=n,c=e,t=0;!l&&f&&!i&&t<s.length;t++){var i,o=s[t],h=v.p,d=o[2];n>3?(i=d===e)&&(c=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=r):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,v.v=e,v.n=o[1]):h<d&&(i=n<3||o[0]>e||e>d)&&(o[4]=n,o[5]=e,v.n=d,a=0))}if(i||n>1)return u;throw l=!0,e}return function(i,s,d){if(f>1)throw TypeError("Generator is already running");for(l&&1===s&&h(s,d),a=s,c=d;(t=a<2?r:c)||!l;){o||(a?a<3?(a>1&&(v.n=-1),h(a,c)):v.n=c:v.v=c);try{if(f=2,o){if(a||(i="next"),t=o[i]){if(!(t=t.call(o,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,a<2&&(a=0)}else 1===a&&(t=o.return)&&t.call(o),a<2&&(c=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=r}else if((t=(l=v.n<0)?c:n.call(e,v))!==u)break}catch(t){o=r,a=1,c=t}finally{f=1}}return{value:t,done:l}}}(n,i,o),!0),f}var u={};function a(){}function c(){}function f(){}t=nc;var s=[][e]?t(t([][e]())):(Rc(t={},e,function(){return this}),t),l=f.prototype=a.prototype=ka(s);function v(r){return pc?pc(r,f):(r.__proto__=f,Rc(r,i,"GeneratorFunction")),r.prototype=ka(l),r}return c.prototype=f,Rc(l,"constructor",f),Rc(f,"constructor",c),c.displayName="GeneratorFunction",Rc(f,i,"GeneratorFunction"),Rc(l),Rc(l,i,"Generator"),Rc(l,e,function(){return this}),Rc(l,"toString",function(){return"[object Generator]"}),(Lc=function(){return{w:o,m:v}})()}function Fc(){if(Ac)return kc;Ac=1;var r=function(){if(Oc)return Sc;Oc=1,Gi();var r=Ze();return Sc=r.f("toPrimitive")}();return kc=r}function Mc(){if(Tc)return Ic;Tc=1;var r=function(){if(Pc)return jc;Pc=1;var r=Fc();return jc=r}();return Ic=r}var Uc=t(xc?Ec:(xc=1,Ec=Mc()));function Nc(r){var t=function(r,t){if("object"!=Wu(r)||!r)return r;var n=r[Uc];if(void 0!==n){var e=n.call(r,t);if("object"!=Wu(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(r)}(r,"string");return"symbol"==Wu(t)?t:t+""}function Dc(r,t,n){return(t=Nc(t))in r?Cc(r,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[t]=n,r}var zc,Bc,_c,Hc,qc,Jc,Wc,Gc,$c,Vc,Kc;function Qc(){if(_c)return Bc;_c=1,zc||(zc=1,bn()({target:"Array",stat:!0},{isArray:wn()}));var r=jr();return Bc=r.Array.isArray}function Zc(){if(Wc)return Jc;Wc=1;var r=function(){if(qc)return Hc;qc=1;var r=Qc();return Hc=r}();return Jc=r}var Xc,Yc,rf,tf,nf,ef,of,uf,af,cf,ff,sf,lf,vf,hf=t(Kc?Vc:(Kc=1,Vc=function(){if($c)return Gc;$c=1;var r=Zc();return Gc=r}()));function df(r,t){(null==t||t>r.length)&&(t=r.length);for(var n=0,e=Array(t);n<t;n++)e[n]=r[n];return e}function pf(){if(Yc)return Xc;Yc=1;var r=Tn(),t=gt(),n=No();return Xc=function(e){var i=r(e);return"Arguments"===i&&(i="Array"),t(n,i)?n[i]:void 0}}function yf(){if(ef)return nf;ef=1,Vo(),_u();var r=function(){if(tf)return rf;tf=1;var r=pf(),t=bt()("iterator");return rf=function(n){return n[t]||n["@@iterator"]||r(n)}}();return nf=r}function gf(){if(cf)return af;cf=1;var r=function(){if(uf)return of;uf=1;var r=yf();return Ko(),of=r}();return af=r}var mf,bf,wf,Sf,Of,kf,Af,jf,Pf,If,Tf,Ef,xf,Cf,Rf,Lf,Ff,Mf,Uf,Nf,Df,zf,Bf,_f,Hf,qf=t(vf?lf:(vf=1,lf=function(){if(sf)return ff;sf=1;var r=gf();return ff=r}())),Jf={};function Wf(){if(bf)return mf;bf=1;var r=L(),t=yn(),n=Mr();return mf=function(e,i,o){var u,a;t(e);try{if(!(u=n(e,"return"))){if("throw"===i)throw o;return o}u=r(u,e)}catch(r){a=!0,u=r}if("throw"===i)throw o;if(a)throw u;return t(u),o},mf}function Gf(){if(Sf)return wf;Sf=1;var r=yn(),t=Wf();return wf=function(n,e,i,o){try{return o?e(r(i)[0],i[1]):e(i)}catch(r){t(n,"throw",r)}},wf}function $f(){if(kf)return Of;kf=1;var r=bt(),t=No(),n=r("iterator"),e=Array.prototype;return Of=function(r){return void 0!==r&&(t.Array===r||e[n]===r)}}function Vf(){if(jf)return Af;jf=1;var r=Mr(),t=Sr(),n=pf(),e=bt()("iterator");return Af=function(i){if(!t(i))return r(i,e)||r(i,"@@iterator")||n(i)}}function Kf(){if(If)return Pf;If=1;var r=L(),t=P(),n=yn(),e=Lr(),i=Vf(),o=TypeError;return Pf=function(u,a){var c=arguments.length<2?i(u):a;if(t(c))return n(r(c,u));throw new o(e(u)+" is not iterable")},Pf}function Qf(){if(Ef)return Tf;Ef=1;var r=Pt(),t=L(),n=yt(),e=Gf(),i=$f(),o=xn(),u=kn(),a=jn(),c=Pn(),f=Kf(),s=Vf(),l=Wf(),v=An(),h=Array;return Tf=function(d){var p=o(this),y=arguments.length,g=y>1?arguments[1]:void 0,m=void 0!==g;m&&(g=r(g,y>2?arguments[2]:void 0));var b,w,S,O,k,A,j=n(d),P=s(j),I=0;if(!P||this===h&&i(P))for(b=u(j),w=p?new this(b):h(b);b>I;I++)A=m?g(j[I],I):j[I],a(w,I,A);else for(w=p?new this:[],k=(O=f(j,P)).next;!(S=t(k,O)).done;I++){try{v(I)}catch(r){l(O,"throw",r)}A=m?e(O,g,[S.value,I],!0):S.value;try{a(w,I,A)}catch(r){l(O,"throw",r)}}return c(w,I),w},Tf}function Zf(){if(Cf)return xf;Cf=1;var r=bt()("iterator"),t=!1;try{var n=0,e={next:function(){return{done:!!n++}},return:function(){t=!0}};e[r]=function(){return this},Array.from(e,function(){throw 2})}catch(r){}return xf=function(n,e){try{if(!e&&!t)return!1}catch(r){return!1}var i=!1;try{var o={};o[r]=function(){return{next:function(){return{done:i=!0}}}},n(o)}catch(r){}return i}}function Xf(){if(Ff)return Lf;Ff=1,_u(),function(){if(Rf)return Jf;Rf=1;var r=bn(),t=Qf();r({target:"Array",stat:!0,forced:!Zf()(function(r){Array.from(r)})},{from:t})}();var r=jr();return Lf=r.Array.from}function Yf(){if(Uf)return Mf;Uf=1;var r=Xf();return Mf=r}function rs(){if(Bf)return zf;Bf=1;var r=function(){if(Df)return Nf;Df=1;var r=Yf();return Nf=r}();return zf=r}var ts=t(Hf?_f:(Hf=1,_f=rs()));var ns,es,is,os,us,as,cs,fs,ss,ls,vs,hs,ds,ps={};function ys(){if(is)return es;is=1,function(){if(ns)return ps;ns=1;var r=bn(),t=wn(),n=xn(),e=Ar(),i=ue(),o=kn(),u=kr(),a=jn(),c=Pn(),f=bt(),s=Ln(),l=ke(),v=s("slice"),h=f("species"),d=Array,p=Math.max;r({target:"Array",proto:!0,forced:!v},{slice:function(r,f){var s,v,y,g=u(this),m=o(g),b=i(r,m),w=i(void 0===f?m:f,m);if(t(g)&&(s=g.constructor,(n(s)&&(s===d||t(s.prototype))||e(s)&&null===(s=s[h]))&&(s=void 0),s===d||void 0===s))return l(g,b,w);for(v=new(void 0===s?d:s)(p(w-b,0)),y=0;b<w;b++,y++)b in g&&a(v,y,g[b]);return c(v,y),v}})}();var r=Pa();return es=r("Array","slice")}function gs(){if(cs)return as;cs=1;var r=function(){if(us)return os;us=1;var r=Ir(),t=ys(),n=Array.prototype;return os=function(e){var i=e.slice;return e===n||r(n,e)&&i===n.slice?t:i}}();return as=r}function ms(){if(vs)return ls;vs=1;var r=function(){if(ss)return fs;ss=1;var r=gs();return fs=r}();return ls=r}var bs=t(ds?hs:(ds=1,hs=ms()));function ws(r,t){if(r){var n;if("string"==typeof r)return df(r,t);var e=bs(n={}.toString.call(r)).call(n,8,-1);return"Object"===e&&r.constructor&&(e=r.constructor.name),"Map"===e||"Set"===e?ts(r):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?df(r,t):void 0}}function Ss(r){return function(r){if(hf(r))return df(r)}(r)||function(r){if(void 0!==Du&&null!=qf(r)||null!=r["@@iterator"])return ts(r)}(r)||ws(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Os(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function ks(r,t,n){return t&&function(r,t){for(var n=0;n<t.length;n++){var e=t[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Cc(r,Nc(e.key),e)}}(r.prototype,t),Cc(r,"prototype",{writable:!1}),r}var As,js,Ps,Is,Ts,Es,xs,Cs,Rs,Ls,Fs,Ms,Us,Ns={};function Ds(){if(Ps)return js;Ps=1,function(){if(As)return Ns;As=1;var r=bn(),t=yt(),n=kn(),e=Pn(),i=An();r({target:"Array",proto:!0,arity:1,forced:w()(function(){return 4294967297!==[].push.call({length:4294967296},1)})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(r){return r instanceof TypeError}}()},{push:function(r){var o=t(this),u=n(o),a=arguments.length;i(u+a);for(var c=0;c<a;c++)o[u]=arguments[c],u++;return e(o,u),u}})}();var r=Pa();return js=r("Array","push")}function zs(){if(xs)return Es;xs=1;var r=function(){if(Ts)return Is;Ts=1;var r=Ir(),t=Ds(),n=Array.prototype;return Is=function(e){var i=e.push;return e===n||r(n,e)&&i===n.push?t:i}}();return Es=r}function Bs(){if(Fs)return Ls;Fs=1;var r=function(){if(Rs)return Cs;Rs=1;var r=zs();return Cs=r}();return Ls=r}var _s=t(Us?Ms:(Us=1,Ms=Bs()));function Hs(r,t){return function(r){if(hf(r))return r}(r)||function(r,t){var n=null==r?null:void 0!==Du&&qf(r)||r["@@iterator"];if(null!=n){var e,i,o,u,a=[],c=!0,f=!1;try{if(o=(n=n.call(r)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(e=o.call(n)).done)&&(_s(a).call(a,e.value),a.length!==t);c=!0);}catch(r){f=!0,i=r}finally{try{if(!c&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(f)throw i}}return a}}(r,t)||ws(r,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 qs(r,t){var n=void 0!==Du&&qf(r)||r["@@iterator"];if(!n){if(hf(r)||(n=ws(r))||t){n&&(r=n);var e=0,i=function(){};return{s:i,n:function(){return e>=r.length?{done:!0}:{done:!1,value:r[e++]}},e:function(r){throw r},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,a=!1;return{s:function(){n=n.call(r)},n:function(){var r=n.next();return u=r.done,r},e:function(r){a=!0,o=r},f:function(){try{u||null==n.return||n.return()}finally{if(a)throw o}}}}var Js,Ws,Gs,$s,Vs,Ks,Qs,Zs={};function Xs(){if(Ws)return Js;Ws=1;var r=Pr(),t=k(),n=me(),e=Ce(),i=yn(),o=t([].concat);return Js=r("Reflect","ownKeys")||function(r){var t=n.f(i(r)),u=e.f;return u?o(t,u(r)):t},Js}function Ys(){if(Vs)return $s;Vs=1,function(){if(Gs)return Zs;Gs=1;var r=bn(),t=R(),n=Xs(),e=kr(),i=At(),o=jn();r({target:"Object",stat:!0,sham:!t},{getOwnPropertyDescriptors:function(r){for(var t,u,a=e(r),c=i.f,f=n(a),s={},l=0;f.length>l;)void 0!==(u=c(a,t=f[l++]))&&o(s,t,u);return s}})}();var r=jr();return $s=r.Object.getOwnPropertyDescriptors}var rl,tl,nl,el,il=t(function(){if(Qs)return Ks;Qs=1;var r=Ys();return Ks=r}());var ol,ul,al,cl,fl,sl,ll,vl,hl,dl,pl,yl,gl,ml,bl,wl,Sl=function(){if(el)return nl;el=1;var r=function(){if(tl)return rl;tl=1,ji();var r=jr();return rl=r.Object.getOwnPropertySymbols}();return nl=r}(),Ol=t(Sl),kl={},Al={};function jl(){if(ul)return ol;ul=1;var r=gt(),t=Xs(),n=At(),e=gn();return ol=function(i,o,u){for(var a=t(o),c=e.f,f=n.f,s=0;s<a.length;s++){var l=a[s];r(i,l)||u&&r(u,l)||c(i,l,f(o,l))}},ol}function Pl(){if(cl)return al;cl=1;var r=Ar(),t=mn();return al=function(n,e){r(e)&&"cause"in e&&t(n,"cause",e.cause)}}function Il(){if(dl)return hl;dl=1;var r=mn(),t=function(){if(sl)return fl;sl=1;var r=k(),t=Error,n=r("".replace),e=String(new t("zxcasd").stack),i=/\n\s*at [^:]*:[^\n]*/,o=i.test(e);return fl=function(r,e){if(o&&"string"==typeof r&&!t.prepareStackTrace)for(;e--;)r=n(r,i,"");return r}}(),n=function(){if(vl)return ll;vl=1;var r=w(),t=br();return ll=!r(function(){var r=new Error("a");return!("stack"in r)||(Object.defineProperty(r,"stack",t(1,7)),7!==r.stack)})}(),e=Error.captureStackTrace;return hl=function(i,o,u,a){n&&(e?e(i,o):r(i,"stack",t(u,a)))}}function Tl(){if(yl)return pl;yl=1;var r=Pt(),t=L(),n=yn(),e=Lr(),i=$f(),o=kn(),u=Ir(),a=Kf(),c=Vf(),f=Wf(),s=TypeError,l=function(r,t){this.stopped=r,this.result=t},v=l.prototype;return pl=function(h,d,p){var y,g,m,b,w,S,O,k=p&&p.that,A=!(!p||!p.AS_ENTRIES),j=!(!p||!p.IS_RECORD),P=!(!p||!p.IS_ITERATOR),I=!(!p||!p.INTERRUPTED),T=r(d,k),E=function(r){var t=y;return y=void 0,t&&f(t,"normal"),new l(!0,r)},x=function(r){return A?(n(r),I?T(r[0],r[1],E):T(r[0],r[1])):I?T(r,E):T(r)};if(j)y=h.iterator;else if(P)y=h;else{if(!(g=c(h)))throw new s(e(h)+" is not iterable");if(i(g)){for(m=0,b=o(h);b>m;m++)if((w=x(h[m]))&&u(v,w))return w;return new l(!1)}y=a(h,g)}for(S=j?h.next:y.next;!(O=t(S,y)).done;){var C=O.value;try{w=x(C)}catch(r){if(!y)throw r;f(y,"throw",r)}if("object"==typeof w&&w&&u(v,w))return w}return new l(!1)},pl}function El(){if(ml)return gl;ml=1;var r=zn();return gl=function(t,n){return void 0===t?arguments.length<2?"":n:r(t)},gl}function xl(){return wl||(wl=1,function(){if(bl)return Al;bl=1;var r=bn(),t=Ir(),n=Bo(),e=Wo(),i=jl(),o=pe(),u=mn(),a=br(),c=Pl(),f=Il(),s=Tl(),l=El(),v=bt()("toStringTag"),h=Error,d=[].push,p=function(r,i){var a,g=t(y,this);e?a=e(new h,g?n(this):y):(a=g?this:o(y),u(a,v,"Error")),void 0!==i&&u(a,"message",l(i)),f(a,p,a.stack,1),arguments.length>2&&c(a,arguments[2]);var m=[];return s(r,d,{that:m}),u(a,"errors",m),a};e?e(p,h):i(p,h,{name:!0});var y=p.prototype=o(h.prototype,{constructor:a(1,p),message:a(1,""),name:a(1,"AggregateError")});r({global:!0,constructor:!0,arity:2},{AggregateError:p})}()),kl}var Cl,Rl,Ll,Fl,Ml,Ul,Nl,Dl,zl,Bl,_l,Hl,ql,Jl,Wl,Gl,$l,Vl,Kl,Ql,Zl,Xl,Yl,rv,tv,nv,ev,iv,ov,uv,av,cv,fv,sv,lv,vv,hv={},dv={};function pv(){if(Rl)return Cl;Rl=1;var r=b(),t=Tr(),n=A(),e=function(r){return t.slice(0,r.length)===r};return Cl=e("Bun/")?"BUN":e("Cloudflare-Workers")?"CLOUDFLARE":e("Deno/")?"DENO":e("Node.js/")?"NODE":r.Bun&&"string"==typeof Bun.version?"BUN":r.Deno&&"object"==typeof Deno.version?"DENO":"process"===n(r.process)?"NODE":r.window&&r.document?"BROWSER":"REST"}function yv(){if(Fl)return Ll;Fl=1;var r=pv();return Ll="NODE"===r}function gv(){if(Ul)return Ml;Ul=1;var r=Pr(),t=Le(),n=bt(),e=R(),i=n("species");return Ml=function(n){var o=r(n);e&&o&&!o[i]&&t(o,i,{configurable:!0,get:function(){return this}})}}function mv(){if(Dl)return Nl;Dl=1;var r=Ir(),t=TypeError;return Nl=function(n,e){if(r(e,n))return n;throw new t("Incorrect invocation")}}function bv(){if(Bl)return zl;Bl=1;var r=xn(),t=Lr(),n=TypeError;return zl=function(e){if(r(e))return e;throw new n(t(e)+" is not a constructor")}}function wv(){if(Hl)return _l;Hl=1;var r=yn(),t=bv(),n=Sr(),e=bt()("species");return _l=function(i,o){var u,a=r(i).constructor;return void 0===a||n(u=r(a)[e])?o:t(u)}}function Sv(){if(Jl)return ql;Jl=1;var r=TypeError;return ql=function(t,n){if(t<n)throw new r("Not enough arguments");return t}}function Ov(){if(Gl)return Wl;Gl=1;var r=Tr();return Wl=/ipad|iphone|ipod/i.test(r)&&/applewebkit/i.test(r)}function kv(){if(Vl)return $l;Vl=1;var r,t,n,e,i=b(),o=O(),u=Pt(),a=P(),c=gt(),f=w(),s=he(),l=ke(),v=Ot(),h=Sv(),d=Ov(),p=yv(),y=i.setImmediate,g=i.clearImmediate,m=i.process,S=i.Dispatch,k=i.Function,A=i.MessageChannel,j=i.String,I=0,T={},E="onreadystatechange";f(function(){r=i.location});var x=function(r){if(c(T,r)){var t=T[r];delete T[r],t()}},C=function(r){return function(){x(r)}},R=function(r){x(r.data)},L=function(t){i.postMessage(j(t),r.protocol+"//"+r.host)};return y&&g||(y=function(r){h(arguments.length,1);var n=a(r)?r:k(r),e=l(arguments,1);return T[++I]=function(){o(n,void 0,e)},t(I),I},g=function(r){delete T[r]},p?t=function(r){m.nextTick(C(r))}:S&&S.now?t=function(r){S.now(C(r))}:A&&!d?(e=(n=new A).port2,n.port1.onmessage=R,t=u(e.postMessage,e)):i.addEventListener&&a(i.postMessage)&&!i.importScripts&&r&&"file:"!==r.protocol&&!f(L)?(t=L,i.addEventListener("message",R,!1)):t=E in v("script")?function(r){s.appendChild(v("script"))[E]=function(){s.removeChild(this),x(r)}}:function(r){setTimeout(C(r),0)}),$l={set:y,clear:g}}function Av(){if(Ql)return Kl;Ql=1;var r=b(),t=R(),n=Object.getOwnPropertyDescriptor;return Kl=function(e){if(!t)return r[e];var i=n(r,e);return i&&i.value}}function jv(){if(Xl)return Zl;Xl=1;var r=function(){this.head=null,this.tail=null};return r.prototype={add:function(r){var t={item:r,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var r=this.head;if(r)return null===(this.head=r.next)&&(this.tail=null),r.item}},Zl=r}function Pv(){if(iv)return ev;iv=1;var r,t,n,e,i,o=b(),u=Av(),a=Pt(),c=kv().set,f=jv(),s=Ov(),l=function(){if(rv)return Yl;rv=1;var r=Tr();return Yl=/ipad|iphone|ipod/i.test(r)&&"undefined"!=typeof Pebble}(),v=function(){if(nv)return tv;nv=1;var r=Tr();return tv=/web0s(?!.*chrome)/i.test(r)}(),h=yv(),d=o.MutationObserver||o.WebKitMutationObserver,p=o.document,y=o.process,g=o.Promise,m=u("queueMicrotask");if(!m){var w=new f,S=function(){var t,n;for(h&&(t=y.domain)&&t.exit();n=w.get();)try{n()}catch(t){throw w.head&&r(),t}t&&t.enter()};s||h||v||!d||!p?!l&&g&&g.resolve?((e=g.resolve(void 0)).constructor=g,i=a(e.then,e),r=function(){i(S)}):h?r=function(){y.nextTick(S)}:(c=a(c,o),r=function(){c(S)}):(t=!0,n=p.createTextNode(""),new d(S).observe(n,{characterData:!0}),r=function(){n.data=t=!t}),m=function(t){w.head||r(),w.add(t)}}return ev=m}function Iv(){return uv||(uv=1,ov=function(r,t){try{1===arguments.length?console.error(r):console.error(r,t)}catch(r){}}),ov}function Tv(){return cv?av:(cv=1,av=function(r){try{return{error:!1,value:r()}}catch(r){return{error:!0,value:r}}})}function Ev(){if(sv)return fv;sv=1;var r=b();return fv=r.Promise}function xv(){if(vv)return lv;vv=1;var r=b(),t=Ev(),n=P(),e=jt(),i=En(),o=bt(),u=pv(),a=vt(),c=Er(),f=t&&t.prototype,s=o("species"),l=!1,v=n(r.PromiseRejectionEvent),h=e("Promise",function(){var r=i(t),n=r!==String(t);if(!n&&66===c)return!0;if(a&&(!f.catch||!f.finally))return!0;if(!c||c<51||!/native code/.test(r)){var e=new t(function(r){r(1)}),o=function(r){r(function(){},function(){})};if((e.constructor={})[s]=o,!(l=e.then(function(){})instanceof o))return!0}return!(n||"BROWSER"!==u&&"DENO"!==u||v)});return lv={CONSTRUCTOR:h,REJECTION_EVENT:v,SUBCLASSING:l}}var Cv,Rv,Lv={};function Fv(){if(Cv)return Lv;Cv=1;var r=Fr(),t=TypeError,n=function(n){var e,i;this.promise=new n(function(r,n){if(void 0!==e||void 0!==i)throw new t("Bad Promise constructor");e=r,i=n}),this.resolve=r(e),this.reject=r(i)};return Lv.f=function(r){return new n(r)},Lv}var Mv,Uv,Nv,Dv={};function zv(){if(Uv)return Mv;Uv=1;var r=Ev(),t=Zf(),n=xv().CONSTRUCTOR;return Mv=n||!t(function(t){r.all(t).then(void 0,function(){})})}var Bv,_v={};var Hv,qv={};var Jv,Wv={};var Gv,$v,Vv,Kv,Qv={};function Zv(){if($v)return Gv;$v=1;var r=yn(),t=Ar(),n=Fv();return Gv=function(e,i){if(r(e),t(i)&&i.constructor===e)return i;var o=n.f(e);return(0,o.resolve)(i),o.promise}}function Xv(){return Kv||(Kv=1,function(){if(Rv)return dv;Rv=1;var r,t,n,e,i=bn(),o=vt(),u=yv(),a=b(),c=jr(),f=L(),s=Re(),l=Wo(),v=ri(),h=gv(),d=Fr(),p=P(),y=Ar(),g=mv(),m=wv(),w=kv().set,S=Pv(),O=Iv(),k=Tv(),A=jv(),j=ti(),I=Ev(),T=xv(),E=Fv(),x="Promise",C=T.CONSTRUCTOR,R=T.REJECTION_EVENT,F=T.SUBCLASSING,M=j.getterFor(x),U=j.set,N=I&&I.prototype,D=I,z=N,B=a.TypeError,_=a.document,H=a.process,q=E.f,J=q,W=!!(_&&_.createEvent&&a.dispatchEvent),G="unhandledrejection",$=function(r){var t;return!(!y(r)||!p(t=r.then))&&t},V=function(r,t){var n,e,i,o=t.value,u=1===t.state,a=u?r.ok:r.fail,c=r.resolve,s=r.reject,l=r.domain;try{a?(u||(2===t.rejection&&Y(t),t.rejection=1),!0===a?n=o:(l&&l.enter(),n=a(o),l&&(l.exit(),i=!0)),n===r.promise?s(new B("Promise-chain cycle")):(e=$(n))?f(e,n,c,s):c(n)):s(o)}catch(r){l&&!i&&l.exit(),s(r)}},K=function(r,t){r.notified||(r.notified=!0,S(function(){for(var n,e=r.reactions;n=e.get();)V(n,r);r.notified=!1,t&&!r.rejection&&Z(r)}))},Q=function(r,t,n){var e,i;W?((e=_.createEvent("Event")).promise=t,e.reason=n,e.initEvent(r,!1,!0),a.dispatchEvent(e)):e={promise:t,reason:n},!R&&(i=a["on"+r])?i(e):r===G&&O("Unhandled promise rejection",n)},Z=function(r){f(w,a,function(){var t,n=r.facade,e=r.value;if(X(r)&&(t=k(function(){u?H.emit("unhandledRejection",e,n):Q(G,n,e)}),r.rejection=u||X(r)?2:1,t.error))throw t.value})},X=function(r){return 1!==r.rejection&&!r.parent},Y=function(r){f(w,a,function(){var t=r.facade;u?H.emit("rejectionHandled",t):Q("rejectionhandled",t,r.value)})},rr=function(r,t,n){return function(e){r(t,e,n)}},tr=function(r,t,n){r.done||(r.done=!0,n&&(r=n),r.value=t,r.state=2,K(r,!0))},nr=function(r,t,n){if(!r.done){r.done=!0,n&&(r=n);try{if(r.facade===t)throw new B("Promise can't be resolved itself");var e=$(t);e?S(function(){var n={done:!1};try{f(e,t,rr(nr,n,r),rr(tr,n,r))}catch(t){tr(n,t,r)}}):(r.value=t,r.state=1,K(r,!1))}catch(t){tr({done:!1},t,r)}}};if(C&&(z=(D=function(t){g(this,z),d(t),f(r,this);var n=M(this);try{t(rr(nr,n),rr(tr,n))}catch(r){tr(n,r)}}).prototype,(r=function(r){U(this,{type:x,done:!1,notified:!1,parent:!1,reactions:new A,rejection:!1,state:0,value:null})}).prototype=s(z,"then",function(r,t){var n=M(this),e=q(m(this,D));return n.parent=!0,e.ok=!p(r)||r,e.fail=p(t)&&t,e.domain=u?H.domain:void 0,0===n.state?n.reactions.add(e):S(function(){V(e,n)}),e.promise}),t=function(){var t=new r,n=M(t);this.promise=t,this.resolve=rr(nr,n),this.reject=rr(tr,n)},E.f=q=function(r){return r===D||r===n?new t(r):J(r)},!o&&p(I)&&N!==Object.prototype)){e=N.then,F||s(N,"then",function(r,t){var n=this;return new D(function(r,t){f(e,n,r,t)}).then(r,t)},{unsafe:!0});try{delete N.constructor}catch(r){}l&&l(N,z)}i({global:!0,constructor:!0,wrap:!0,forced:C},{Promise:D}),n=c.Promise,v(D,x,!1,!0),h(x)}(),function(){if(Nv)return Dv;Nv=1;var r=bn(),t=L(),n=Fr(),e=Fv(),i=Tv(),o=Tl();r({target:"Promise",stat:!0,forced:zv()},{all:function(r){var u=this,a=e.f(u),c=a.resolve,f=a.reject,s=i(function(){var e=n(u.resolve),i=[],a=0,s=1;o(r,function(r){var n=a++,o=!1;s++,t(e,u,r).then(function(r){o||(o=!0,i[n]=r,--s||c(i))},f)}),--s||c(i)});return s.error&&f(s.value),a.promise}})}(),function(){if(Bv)return _v;Bv=1;var r=bn(),t=vt(),n=xv().CONSTRUCTOR,e=Ev(),i=Pr(),o=P(),u=Re(),a=e&&e.prototype;if(r({target:"Promise",proto:!0,forced:n,real:!0},{catch:function(r){return this.then(void 0,r)}}),!t&&o(e)){var c=i("Promise").prototype.catch;a.catch!==c&&u(a,"catch",c,{unsafe:!0})}}(),function(){if(Hv)return qv;Hv=1;var r=bn(),t=L(),n=Fr(),e=Fv(),i=Tv(),o=Tl();r({target:"Promise",stat:!0,forced:zv()},{race:function(r){var u=this,a=e.f(u),c=a.reject,f=i(function(){var e=n(u.resolve);o(r,function(r){t(e,u,r).then(a.resolve,c)})});return f.error&&c(f.value),a.promise}})}(),function(){if(Jv)return Wv;Jv=1;var r=bn(),t=Fv();r({target:"Promise",stat:!0,forced:xv().CONSTRUCTOR},{reject:function(r){var n=t.f(this);return(0,n.reject)(r),n.promise}})}(),function(){if(Vv)return Qv;Vv=1;var r=bn(),t=Pr(),n=vt(),e=Ev(),i=xv().CONSTRUCTOR,o=Zv(),u=t("Promise"),a=n&&!i;r({target:"Promise",stat:!0,forced:n||i},{resolve:function(r){return o(a&&this===u?e:this,r)}})}()),hv}var Yv,rh={};var th,nh={};var eh,ih={};var oh,uh={};var ah,ch,fh,sh,lh,vh={};function hh(){if(fh)return ch;fh=1,xl(),Vo(),Xv(),function(){if(Yv)return rh;Yv=1;var r=bn(),t=L(),n=Fr(),e=Fv(),i=Tv(),o=Tl();r({target:"Promise",stat:!0,forced:zv()},{allSettled:function(r){var u=this,a=e.f(u),c=a.resolve,f=a.reject,s=i(function(){var e=n(u.resolve),i=[],a=0,f=1;o(r,function(r){var n=a++,o=!1;f++,t(e,u,r).then(function(r){o||(o=!0,i[n]={status:"fulfilled",value:r},--f||c(i))},function(r){o||(o=!0,i[n]={status:"rejected",reason:r},--f||c(i))})}),--f||c(i)});return s.error&&f(s.value),a.promise}})}(),function(){if(th)return nh;th=1;var r=bn(),t=L(),n=Fr(),e=Pr(),i=Fv(),o=Tv(),u=Tl(),a=zv(),c="No one promise resolved";r({target:"Promise",stat:!0,forced:a},{any:function(r){var a=this,f=e("AggregateError"),s=i.f(a),l=s.resolve,v=s.reject,h=o(function(){var e=n(a.resolve),i=[],o=0,s=1,h=!1;u(r,function(r){var n=o++,u=!1;s++,t(e,a,r).then(function(r){u||h||(h=!0,l(r))},function(r){u||h||(u=!0,i[n]=r,--s||v(new f(i,c)))})}),--s||v(new f(i,c))});return h.error&&v(h.value),s.promise}})}(),function(){if(eh)return ih;eh=1;var r=bn(),t=b(),n=O(),e=ke(),i=Zv(),o=Fv(),u=Fr(),a=Tv(),c=w(),f=t.Promise,s=!1;r({target:"Promise",stat:!0,forced:!f||!f.try||c(function(){var r=f.resolve();return f.try(function(t){return s=8===t,r},8)!==r})||!s},{try:function(r){var t=arguments.length>1?e(arguments,1):[],c=a(function(){return n(u(r),void 0,t)});if(!c.error)return i(this,c.value);var f=o.f(this);return(0,f.reject)(c.value),f.promise}})}(),function(){if(oh)return uh;oh=1;var r=bn(),t=Fv();r({target:"Promise",stat:!0},{withResolvers:function(){var r=t.f(this);return{promise:r.promise,resolve:r.resolve,reject:r.reject}}})}(),function(){if(ah)return vh;ah=1;var r=bn(),t=vt(),n=Ev(),e=w(),i=Pr(),o=P(),u=wv(),a=Zv(),c=Re(),f=n&&n.prototype;if(r({target:"Promise",proto:!0,real:!0,forced:!!n&&e(function(){f.finally.call({then:function(){}},function(){})})},{finally:function(r){var t=u(this,i("Promise")),n=o(r);return this.then(n?function(n){return a(t,r()).then(function(){return n})}:r,n?function(n){return a(t,r()).then(function(){throw n})}:r)}}),!t&&o(n)){var s=i("Promise").prototype.finally;f.finally!==s&&c(f,"finally",s,{unsafe:!0})}}(),_u();var r=jr();return ch=r.Promise}var dh,ph,yh,gh,mh,bh=t(function(){if(lh)return sh;lh=1;var r=hh();return Ko(),sh=r}()),wh=t(gs()),Sh={};function Oh(){return yh?ph:(yh=1,function(){if(dh)return Sh;dh=1;var r=bn(),t=b();r({global:!0,forced:t.globalThis!==t},{globalThis:t})}(),ph=b())}var kh,Ah,jh,Ph=t(function(){if(mh)return gh;mh=1;var r=Oh();return gh=r}()),Ih={};var Th,Eh,xh,Ch,Rh,Lh,Fh,Mh,Uh,Nh,Dh,zh,Bh,_h,Hh,qh=function(){if(jh)return Ah;jh=1,function(){if(kh)return Ih;kh=1;var r=bn(),t=b();r({global:!0,forced:t.self!==t},{self:t})}();var r=jr();return Ah=r.self}(),Jh=t(qh),Wh={},Gh={exports:{}};function $h(){if(Ch)return xh;Ch=1;var r=w(),t=Ar(),n=A(),e=function(){if(Eh)return Th;Eh=1;var r=w();return Th=r(function(){if("function"==typeof ArrayBuffer){var r=new ArrayBuffer(8);Object.isExtensible(r)&&Object.defineProperty(r,"a",{value:8})}})}(),i=Object.isExtensible,o=r(function(){});return xh=o||e?function(r){return!!t(r)&&((!e||"ArrayBuffer"!==n(r))&&(!i||i(r)))}:i}function Vh(){if(Fh)return Gh.exports;Fh=1;var r=bn(),t=k(),n=ce(),e=Ar(),i=gt(),o=gn().f,u=me(),a=Ae(),c=$h(),f=mt(),s=function(){if(Lh)return Rh;Lh=1;var r=w();return Rh=!r(function(){return Object.isExtensible(Object.preventExtensions({}))})}(),l=!1,v=f("meta"),h=0,d=function(r){o(r,v,{value:{objectID:"O"+h++,weakData:{}}})},p=Gh.exports={enable:function(){p.enable=function(){},l=!0;var n=u.f,e=t([].splice),i={};i[v]=1,n(i).length&&(u.f=function(r){for(var t=n(r),i=0,o=t.length;i<o;i++)if(t[i]===v){e(t,i,1);break}return t},r({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:a.f}))},fastKey:function(r,t){if(!e(r))return"symbol"==typeof r?r:("string"==typeof r?"S":"P")+r;if(!i(r,v)){if(!c(r))return"F";if(!t)return"E";d(r)}return r[v].objectID},getWeakData:function(r,t){if(!i(r,v)){if(!c(r))return!0;if(!t)return!1;d(r)}return r[v].weakData},onFreeze:function(r){return s&&l&&c(r)&&!i(r,v)&&d(r),r}};return n[v]=!0,Gh.exports}function Kh(){if(Uh)return Mh;Uh=1;var r=bn(),t=b(),n=Vh(),e=L(),i=w(),o=mn(),u=Tl(),a=mv(),c=P(),f=Ar(),s=Sr(),l=ri(),v=gn().f,h=ni().forEach,d=R(),p=ti(),y=p.set,g=p.getterFor;return Mh=function(p,m,b){var w,S=-1!==p.indexOf("Map"),O=-1!==p.indexOf("Weak"),k=S?"set":"add",A=t[p],j=A&&A.prototype,P={};if(d&&c(A)&&(O||j.forEach&&!i(function(){(new A).entries().next()}))){var I=(w=m(function(r,t){y(a(r,I),{type:p,collection:new A}),s(t)||u(t,r[k],{that:r,AS_ENTRIES:S})})).prototype,T=g(p);h(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(r){var t="add"===r||"set"===r;!(r in j)||O&&"clear"===r||o(I,r,function(n,i){var o=this,u=T(o).collection;if(!t&&O&&!f(n))return"get"===r&&void 0;var a=u[r]("forEach"===r?function(r,t){e(n,i,r,t,o)}:0===n?0:n,i);return t?o:a})}),O||v(I,"size",{configurable:!0,get:function(){return T(this).collection.size}})}else w=b.getConstructor(m,p,S,k),n.enable();return l(w,p,!1,!0),P[p]=w,r({global:!0,forced:!0},P),O||b.setStrong(w,p,S),w},Mh}function Qh(){if(Dh)return Nh;Dh=1;var r=Re();return Nh=function(t,n,e){for(var i in n)e&&e.unsafe&&t[i]?t[i]=n[i]:r(t,i,n[i],e);return t}}function Zh(){if(Bh)return zh;Bh=1;var r=pe(),t=Le(),n=Qh(),e=Pt(),i=mv(),o=Sr(),u=Tl(),a=Go(),c=$o(),f=gv(),s=R(),l=Vh().fastKey,v=ti(),h=v.set,d=v.getterFor;return zh={getConstructor:function(a,c,f,v){var p=a(function(t,n){i(t,y),h(t,{type:c,index:r(null),first:null,last:null,size:0}),s||(t.size=0),o(n)||u(n,t[v],{that:t,AS_ENTRIES:f})}),y=p.prototype,g=d(c),m=function(r,t,n){var e,i,o=g(r),u=b(r,t);return u?u.value=n:(o.last=u={index:i=l(t,!0),key:t,value:n,previous:e=o.last,next:null,removed:!1},o.first||(o.first=u),e&&(e.next=u),s?o.size++:r.size++,"F"!==i&&(o.index[i]=u)),r},b=function(r,t){var n,e=g(r),i=l(t);if("F"!==i)return e.index[i];for(n=e.first;n;n=n.next)if(n.key===t)return n};return n(y,{clear:function(){for(var t=g(this),n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=null),n=n.next;t.first=t.last=null,t.index=r(null),s?t.size=0:this.size=0},delete:function(r){var t=this,n=g(t),e=b(t,r);if(e){var i=e.next,o=e.previous;delete n.index[e.index],e.removed=!0,o&&(o.next=i),i&&(i.previous=o),n.first===e&&(n.first=i),n.last===e&&(n.last=o),s?n.size--:t.size--}return!!e},forEach:function(r){for(var t,n=g(this),i=e(r,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(i(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(r){return!!b(this,r)}}),n(y,f?{get:function(r){var t=b(this,r);return t&&t.value},set:function(r,t){return m(this,0===r?0:r,t)}}:{add:function(r){return m(this,r=0===r?0:r,r)}}),s&&t(y,"size",{configurable:!0,get:function(){return g(this).size}}),p},setStrong:function(r,t,n){var e=t+" Iterator",i=d(t),o=d(e);a(r,t,function(r,t){h(this,{type:e,target:r,state:i(r),kind:t,last:null})},function(){for(var r=o(this),t=r.kind,n=r.last;n&&n.removed;)n=n.previous;return r.target&&(r.last=n=n?n.next:r.state.first)?c("keys"===t?n.key:"values"===t?n.value:[n.key,n.value],!1):(r.target=null,c(void 0,!0))},n?"entries":"values",!n,!0),f(t)}},zh}function Xh(){return Hh||(Hh=1,_h||(_h=1,Kh()("Map",function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},Zh()))),Wh}var Yh,rd,td,nd,ed,id={};function od(){return rd?Yh:(rd=1,Yh=function(r,t){return 1===t?function(t,n){return t[r](n)}:function(t,n,e){return t[r](n,e)}})}function ud(){if(nd)return td;nd=1;var r=Pr(),t=od(),n=r("Map");return td={Map:n,set:t("set",2),get:t("get",1),has:t("has",1),remove:t("delete",1),proto:n.prototype}}var ad,cd={};var fd,sd,ld,vd,hd,dd={};function pd(){if(ld)return sd;ld=1,Vo(),Xh(),function(){if(ed)return id;ed=1;var r=bn(),t=k(),n=Fr(),e=Or(),i=Tl(),o=An(),u=ud(),a=vt(),c=w(),f=u.Map,s=u.has,l=u.get,v=u.set,h=t([].push),d=a||c(function(){return 1!==f.groupBy("ab",function(r){return r}).get("a").length});r({target:"Map",stat:!0,forced:a||d},{groupBy:function(r,t){e(r),n(t);var u=new f,a=0;return i(r,function(r){o(a);var n=t(r,a++);s(u,n)?h(l(u,n),r):v(u,n,[r])}),u}})}(),function(){if(ad)return cd;ad=1;var r=bn(),t=ud(),n=vt(),e=t.get,i=t.has,o=t.set;r({target:"Map",proto:!0,real:!0,forced:n},{getOrInsert:function(r,t){return i(this,r)?e(this,r):(o(this,r,t),t)}})}(),function(){if(fd)return dd;fd=1;var r=bn(),t=Fr(),n=ud(),e=vt(),i=n.get,o=n.has,u=n.set;r({target:"Map",proto:!0,real:!0,forced:e},{getOrInsertComputed:function(r,n){var e=o(this,r);if(t(n),e)return i(this,r);0===r&&1/r==-1/0&&(r=0);var a=n(r);return u(this,r,a),a}})}(),_u();var r=jr();return sd=r.Map}var yd,gd,md,bd,wd,Sd,Od=t(function(){if(hd)return vd;hd=1;var r=pd();return Ko(),vd=r}());function kd(){if(bd)return md;bd=1;var r=Ir(),t=function(){if(gd)return yd;gd=1,Fn();var r=Pa();return yd=r("Array","concat")}(),n=Array.prototype;return md=function(e){var i=e.concat;return e===n||r(n,e)&&i===n.concat?t:i}}var Ad,jd,Pd,Id,Td,Ed,xd=t(function(){if(Sd)return wd;Sd=1;var r=kd();return wd=r}()),Cd=t(zs());function Rd(){if(Id)return Pd;Id=1;var r=function(){if(jd)return Ad;jd=1,Vo();var r=Pa();return Ad=r("Array","entries")}();return Pd=r}var Ld,Fd,Md,Ud,Nd,Dd,zd,Bd,_d,Hd=function(){if(Ed)return Td;Ed=1,Ko();var r=Tn(),t=gt(),n=Ir(),e=Rd(),i=Array.prototype,o={DOMTokenList:!0,NodeList:!0};return Td=function(u){var a=u.entries;return u===i||n(i,u)&&a===i.entries||t(o,r(u))?e:a}}(),qd=t(Hd),Jd={};function Wd(){if(Fd)return Ld;Fd=1;var r=w();return Ld=function(t,n){var e=[][t];return!!e&&r(function(){e.call(null,n||function(){return 1},1)})}}function Gd(){if(Nd)return Ud;Nd=1,function(){if(Md)return Jd;Md=1;var r=bn(),t=j(),n=ae().indexOf,e=Wd(),i=t([].indexOf),o=!!i&&1/i([1],1,-0)<0;r({target:"Array",proto:!0,forced:o||!e("indexOf")},{indexOf:function(r){var t=arguments.length>1?arguments[1]:void 0;return o?i(this,r,t)||0:n(this,r,t)}})}();var r=Pa();return Ud=r("Array","indexOf")}var $d,Vd,Kd,Qd,Zd,Xd,Yd,rp,tp,np=t(function(){if(_d)return Bd;_d=1;var r=function(){if(zd)return Dd;zd=1;var r=Ir(),t=Gd(),n=Array.prototype;return Dd=function(e){var i=e.indexOf;return e===n||r(n,e)&&i===n.indexOf?t:i}}();return Bd=r}()),ep={};function ip(){if(Vd)return $d;Vd=1;var r=Lr(),t=TypeError;return $d=function(n,e){if(!delete n[e])throw new t("Cannot delete property "+r(e)+" of "+r(n))}}function op(){if(Zd)return Qd;Zd=1,function(){if(Kd)return ep;Kd=1;var r=bn(),t=yt(),n=ue(),e=Sn(),i=kn(),o=Pn(),u=An(),a=Rn(),c=jn(),f=ip(),s=Ln()("splice"),l=Math.max,v=Math.min;r({target:"Array",proto:!0,forced:!s},{splice:function(r,s){var h,d,p,y,g,m,b=t(this),w=i(b),S=n(r,w),O=arguments.length;for(0===O?h=d=0:1===O?(h=0,d=w-S):(h=O-2,d=v(l(e(s),0),w-S)),u(w+h-d),p=a(b,d),y=0;y<d;y++)(g=S+y)in b&&c(p,y,b[g]);if(o(p,d),h<d){for(y=S;y<w-d;y++)m=y+h,(g=y+d)in b?b[m]=b[g]:f(b,m);for(y=w;y>w-d+h;y--)f(b,y-1)}else if(h>d)for(y=w-d;y>S;y--)m=y+h-1,(g=y+d-1)in b?b[m]=b[g]:f(b,m);for(y=0;y<h;y++)b[y+S]=arguments[y+2];return o(b,w-d+h),p}})}();var r=Pa();return Qd=r("Array","splice")}var up,ap,cp=t(function(){if(tp)return rp;tp=1;var r=function(){if(Yd)return Xd;Yd=1;var r=Ir(),t=op(),n=Array.prototype;return Xd=function(e){var i=e.splice;return e===n||r(n,e)&&i===n.splice?t:i}}();return rp=r}());function fp(){if(ap)return up;ap=1;var r=w(),t=bt(),n=R(),e=vt(),i=t("iterator");return up=!r(function(){var r=new URL("b?a=1&b=2&c=3","https://a"),t=r.searchParams,o=new URLSearchParams("a=1&a=2&b=3"),u="";return r.pathname="c%20d",t.forEach(function(r,n){t.delete("b"),u+=n+r}),o.delete("a",2),o.delete("b",void 0),e&&(!r.toJSON||!o.has("a",1)||o.has("a",2)||!o.has("a",void 0)||o.has("b"))||!t.size&&(e||!n)||!t.sort||"https://a/c%20d?a=1&c=3"!==r.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[i]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==u||"x"!==new URL("https://x",void 0).host}),up}var sp,lp,vp,hp,dp,pp,yp,gp={};function mp(){if(vp)return lp;vp=1,function(){if(sp)return gp;sp=1;var r=bn(),t=k(),n=ue(),e=RangeError,i=String.fromCharCode,o=String.fromCodePoint,u=t([].join);r({target:"String",stat:!0,arity:1,forced:!!o&&1!==o.length},{fromCodePoint:function(r){for(var t,o=[],a=arguments.length,c=0;a>c;){if(n(t=+arguments[c],1114111)!==t)throw new e(t+" is not a valid code point");o[c++]=t<65536?i(t):i(55296+((t-=65536)>>10),t%1024+56320)}return u(o,"")}})}();var r=Pr(),t=k(),n=String.fromCharCode,e=r("String","fromCodePoint"),i=encodeURIComponent,o=parseInt,u=t("".charAt),a=t([].push),c=t("".replace),f=t("".slice),s=t(/./.exec),l="�",v=/^[0-9a-f]+$/i,h=/[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDFFF]/g,d=function(r,t){var n=f(r,t,t+2);return s(v,n)?o(n,16):NaN},p=function(r){for(var t=0,n=128;n>0&&0!==(r&n);n>>=1)t++;return t},y=function(r){var t=null,n=r.length;switch(n){case 1:t=r[0];break;case 2:t=(31&r[0])<<6|63&r[1];break;case 3:t=(15&r[0])<<12|(63&r[1])<<6|63&r[2];break;case 4:t=(7&r[0])<<18|(63&r[1])<<12|(63&r[2])<<6|63&r[3]}return null===t||t>1114111||t>=55296&&t<=57343||t<(n>3?65536:n>2?2048:n>1?128:0)?null:t},g=function(r){return 2===r.length?r:l};return lp={decode:function(r){for(var t=r.length,i="",o=0;o<t;){var c=u(r,o);if("%"===c){if("%"===u(r,o+1)||o+3>t){i+="%",o++;continue}var f=d(r,o+1);if(f!=f){i+=c,o++;continue}o+=2;var s=p(f);if(0===s)c=n(f);else{if(1===s||s>4){i+=l,o++;continue}for(var v=[f],h=1;h<s&&!(++o+3>t||"%"!==u(r,o));){var g=d(r,o+1);if(g!=g||g>191||g<128)break;if(1===h){if(224===f&&g<160)break;if(237===f&&g>159)break;if(240===f&&g<144)break;if(244===f&&g>143)break}a(v,g),o+=2,h++}if(v.length!==s){i+=l;continue}var m=y(v);if(null===m){for(var b=0;b<s;b++)i+=l;o++;continue}c=e(m)}}i+=c,o++}return i},encode:function(r){try{return i(r)}catch(t){return i(c(r,h,g))}}}}function bp(){if(dp)return hp;dp=1;var r=ke(),t=Math.floor,n=function(e,i){var o=e.length;if(o<8)for(var u,a,c=1;c<o;){for(a=c,u=e[c];a&&i(e[a-1],u)>0;)e[a]=e[--a];a!==c++&&(e[a]=u)}else for(var f=t(o/2),s=n(r(e,0,f),i),l=n(r(e,f),i),v=s.length,h=l.length,d=0,p=0;d<v||p<h;)e[d+p]=d<v&&p<h?i(s[d],l[p])<=0?s[d++]:l[p++]:d<v?s[d++]:l[p++];return e};return hp=n}var wp,Sp,Op,kp,Ap,jp,Pp={};function Ip(){if(Sp)return wp;Sp=1;var r=R(),t=k(),n=L(),e=w(),i=le(),o=Ce(),u=mr(),a=yt(),c=wr(),f=Object.assign,s=Object.defineProperty,l=t([].concat);return wp=!f||e(function(){if(r&&1!==f({b:1},f(s({},"a",{enumerable:!0,get:function(){s(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},n={},e=Symbol("assign detection"),o="abcdefghijklmnopqrst";return t[e]=7,o.split("").forEach(function(r){n[r]=r}),7!==f({},t)[e]||i(f({},n)).join("")!==o})?function(t,e){for(var f=a(t),s=arguments.length,v=1,h=o.f,d=u.f;s>v;)for(var p,y=c(arguments[v++]),g=h?l(i(y),h(y)):i(y),m=g.length,b=0;m>b;)p=g[b++],r&&!n(d,y,p)||(f[p]=y[p]);return f}:f,wp}function Tp(){if(kp)return Op;kp=1;var r=k(),t=2147483647,n=/[^\0-\u007E]/,e=/[.\u3002\uFF0E\uFF61]/g,i="Overflow: input needs wider integers to process",o=RangeError,u=r(e.exec),a=Math.floor,c=String.fromCharCode,f=r("".charCodeAt),s=r([].join),l=r([].push),v=r("".replace),h=r("".split),d=r("".toLowerCase),p=function(r){return r+22+75*(r<26)},y=function(r,t,n){var e=0;for(r=n?a(r/700):r>>1,r+=a(r/t);r>455;)r=a(r/35),e+=36;return a(e+36*r/(r+38))},g=function(r){var n=[];r=function(r){for(var t=[],n=0,e=r.length;n<e;){var i=f(r,n++);if(i>=55296&&i<=56319&&n<e){var o=f(r,n++);56320==(64512&o)?l(t,((1023&i)<<10)+(1023&o)+65536):(l(t,i),n--)}else l(t,i)}return t}(r);var e,u,v=r.length,h=128,d=0,g=72;for(e=0;e<r.length;e++)(u=r[e])<128&&l(n,c(u));var m=n.length,b=m;for(m&&l(n,"-");b<v;){var w=t;for(e=0;e<r.length;e++)(u=r[e])>=h&&u<w&&(w=u);var S=b+1;if(w-h>a((t-d)/S))throw new o(i);for(d+=(w-h)*S,h=w,e=0;e<r.length;e++){if((u=r[e])<h&&++d>t)throw new o(i);if(u===h){for(var O=d,k=36;;){var A=k<=g?1:k>=g+26?26:k-g;if(O<A)break;var j=O-A,P=36-A;l(n,c(p(A+j%P))),O=a(j/P),k+=36}l(n,c(p(O))),g=y(d,S,b===m),d=0,b++}}d++,h++}return s(n,"")};return Op=function(r){var t,i,o=[],a=h(v(d(r),e,"."),".");for(t=0;t<a.length;t++)i=a[t],l(o,u(n,i)?"xn--"+g(i):i);return s(o,".")}}function Ep(){if(Ap)return Pp;Ap=1,_u();var r,t=bn(),n=R(),e=fp(),i=b(),o=Pt(),u=k(),a=Re(),c=Le(),f=mv(),s=gt(),l=Ip(),v=Qf(),h=ke(),d=Bu().codeAt,p=Tp(),y=mp(),g=zn(),m=ri(),w=Sv(),S=function(){if(yp)return pp;yp=1,Vo();var r=bn(),t=b(),n=Av(),e=L(),i=k(),o=R(),u=fp(),a=mp(),c=Re(),f=Le(),s=Qh(),l=ri(),v=Ho(),h=ti(),d=mv(),p=P(),y=gt(),g=Pt(),m=Tn(),w=yn(),S=Ar(),O=zn(),A=pe(),j=br(),I=Kf(),T=Vf(),E=$o(),x=Sv(),C=bt(),F=bp(),M=C("iterator"),U="URLSearchParams",N=U+"Iterator",D=h.set,z=h.getterFor(U),B=h.getterFor(N),_=a.decode,H=a.encode,q=n("fetch"),J=n("Request"),W=n("Headers"),G=J&&J.prototype,$=W&&W.prototype,V=t.TypeError,K=i("".charAt),Q=i([].join),Z=i([].push),X=i("".replace),Y=i([].shift),rr=i([].splice),tr=i("".split),nr=i("".slice),er=/\+/g,ir=function(r){return _(X(r,er," "))},or=/[!'()~]|%20/g,ur={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ar=function(r){return ur[r]},cr=function(r){return X(H(r),or,ar)},fr=v(function(r,t){D(this,{type:N,target:z(r).entries,index:0,kind:t})},U,function(){var r=B(this),t=r.target,n=r.index++;if(!t||n>=t.length)return r.target=null,E(void 0,!0);var e=t[n];switch(r.kind){case"keys":return E(e.key,!1);case"values":return E(e.value,!1)}return E([e.key,e.value],!1)},!0),sr=function(r){this.entries=[],this.url=null,void 0!==r&&(S(r)?this.parseObject(r):this.parseQuery("string"==typeof r?"?"===K(r,0)?nr(r,1):r:O(r)))};sr.prototype={type:U,bindURL:function(r){this.url=r,this.update()},parseObject:function(r){var t,n,i,o,u,a,c,f=this.entries,s=T(r);if(s)for(n=(t=I(r,s)).next;!(i=e(n,t)).done;){if(u=(o=I(w(i.value))).next,(a=e(u,o)).done||(c=e(u,o)).done||!e(u,o).done)throw new V("Expected sequence with length 2");Z(f,{key:O(a.value),value:O(c.value)})}else for(var l in r)y(r,l)&&Z(f,{key:l,value:O(r[l])})},parseQuery:function(r){if(r)for(var t,n,e=this.entries,i=tr(r,"&"),o=0;o<i.length;)(t=i[o++]).length&&(n=tr(t,"="),Z(e,{key:ir(Y(n)),value:ir(Q(n,"="))}))},serialize:function(){for(var r,t=this.entries,n=[],e=0;e<t.length;)r=t[e++],Z(n,cr(r.key)+"="+cr(r.value));return Q(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var lr=function(){d(this,vr);var r=D(this,new sr(arguments.length>0?arguments[0]:void 0));o||(this.size=r.entries.length)},vr=lr.prototype;if(s(vr,{append:function(r,t){var n=z(this);x(arguments.length,2),Z(n.entries,{key:O(r),value:O(t)}),o||this.size++,n.updateURL()},delete:function(r){for(var t=z(this),n=x(arguments.length,1),e=t.entries,i=O(r),u=n<2?void 0:arguments[1],a=void 0===u?u:O(u),c=0;c<e.length;){var f=e[c];f.key!==i||void 0!==a&&f.value!==a?c++:rr(e,c,1)}o||(this.size=e.length),t.updateURL()},get:function(r){var t=z(this).entries;x(arguments.length,1);for(var n=O(r),e=0;e<t.length;e++)if(t[e].key===n)return t[e].value;return null},getAll:function(r){var t=z(this).entries;x(arguments.length,1);for(var n=O(r),e=[],i=0;i<t.length;i++)t[i].key===n&&Z(e,t[i].value);return e},has:function(r){for(var t=z(this).entries,n=x(arguments.length,1),e=O(r),i=n<2?void 0:arguments[1],o=void 0===i?i:O(i),u=0;u<t.length;){var a=t[u++];if(a.key===e&&(void 0===o||a.value===o))return!0}return!1},set:function(r,t){var n=z(this);x(arguments.length,2);for(var e,i=n.entries,u=!1,a=O(r),c=O(t),f=0;f<i.length;f++)(e=i[f]).key===a&&(u?rr(i,f--,1):(u=!0,e.value=c));u||Z(i,{key:a,value:c}),o||(this.size=i.length),n.updateURL()},sort:function(){var r=z(this);F(r.entries,function(r,t){return r.key>t.key?1:-1}),r.updateURL()},forEach:function(r){for(var t,n=z(this).entries,e=g(r,arguments.length>1?arguments[1]:void 0),i=0;i<n.length;)e((t=n[i++]).value,t.key,this)},keys:function(){return new fr(this,"keys")},values:function(){return new fr(this,"values")},entries:function(){return new fr(this,"entries")}},{enumerable:!0}),c(vr,M,vr.entries,{name:"entries"}),c(vr,"toString",function(){return z(this).serialize()},{enumerable:!0}),o&&f(vr,"size",{get:function(){return z(this).entries.length},configurable:!0,enumerable:!0}),l(lr,U),r({global:!0,constructor:!0,forced:!u},{URLSearchParams:lr}),!u&&p(W)){var hr=i($.has),dr=i($.set),pr=function(r){if(S(r)){var t,n=r.body;if(m(n)===U)return t=r.headers?new W(r.headers):new W,hr(t,"content-type")||dr(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),A(r,{body:j(0,O(n)),headers:j(0,t)})}return r};if(p(q)&&r({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(r){return q(r,arguments.length>1?pr(arguments[1]):{})}}),p(J)){var yr=function(r){return d(this,G),new J(r,arguments.length>1?pr(arguments[1]):{})};G.constructor=yr,yr.prototype=G,r({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:yr})}}return pp={URLSearchParams:lr,getState:z}}(),O=ti(),A=O.set,j=O.getterFor("URL"),I=S.URLSearchParams,T=S.getState,E=y.decode,x=y.encode,C=i.URL,F=i.TypeError,M=i.parseInt,U=Math.floor,N=Math.pow,D=String.fromCharCode,z=u("".charAt),B=u(/./.exec),_=u([].join),H=u(1.1.toString),q=u([].pop),J=u([].push),W=u("".replace),G=u([].shift),$=u("".split),V=u("".indexOf),K=u("".slice),Q=u("".toLowerCase),Z=u([].unshift),X="Invalid scheme",Y="Invalid host",rr="Invalid port",tr=/[a-z]/i,nr=/[\d+\-.a-z]/i,er=/\d/,ir=/^0x/i,or=/^[0-7]+$/,ur=/^\d+$/,ar=/^[\da-f]+$/i,cr=/[\u0000-\u0020#%/:<>?@[\\\]^|\u007F]/,fr=/[\0\t\n\r #/:<>?@[\\\]^|]/,sr=/^[\u0000-\u0020]+/,lr=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,vr=/[\t\n\r]/g,hr=/[^\u0000-\u007F]/,dr=function(r){return 173===r||847===r||8203===r||12644===r||65279===r||65440===r||r>=4447&&r<=4448||r>=6068&&r<=6069||r>=6155&&r<=6159||r>=8288&&r<=8292||r>=8298&&r<=8303||r>=65024&&r<=65039||r>=917760&&r<=917999},pr=function(r){return 65533===r||r>=55296&&r<=57343||r>=128&&r<=159||r>=8206&&r<=8207||r>=8232&&r<=8233||r>=8234&&r<=8238||r>=8293&&r<=8297||r>=64976&&r<=65007||!(65534&~r)||r>=57344&&r<=63743||r>=983040&&r<=1114109},yr=function(r){return r>=65281&&r<=65374?r-65248:160===r||5760===r||8239===r||8287===r||12288===r||r>=8192&&r<=8202||r<=65535&&V("¨¯´¸˘˙˚˛˜˝ͺ΄΅᾽᾿῀῁῍῎῏῝῞῟῭΅´῾‗‾⁇⁈⁉℀℁℅℆⩴゛゜ﱞﱟﱠﱡﱢﱣﷺﷻ︓︖﹇﹈﹉﹊﹋﹌﹕﹖﹟﹤﹥﹨﹪﹫ﹰﹲﹴﹶﹸﹺﹼﹾ ̄",D(r))>-1?32:r},gr=function(r){var t,n,e,i;if("number"==typeof r){for(t=[],n=0;n<4;n++)Z(t,r%256),r=U(r/256);return _(t,".")}if("object"==typeof r){for(t="",e=function(r){for(var t=null,n=1,e=null,i=0,o=0;o<8;o++)0!==r[o]?(i>n&&(t=e,n=i),e=null,i=0):(null===e&&(e=o),++i);return i>n?e:t}(r),n=0;n<8;n++)i&&0===r[n]||(i&&(i=!1),e===n?(t+=n?":":"::",i=!0):(t+=H(r[n],16),n<7&&(t+=":")));return"["+t+"]"}return r},mr={},wr=l({},mr,{" ":1,'"':1,"#":1,"<":1,">":1}),Sr=l({},wr,{"'":1}),Or=l({},mr,{" ":1,'"':1,"<":1,">":1,"`":1}),kr=l({},Or,{"#":1,"?":1,"{":1,"}":1,"^":1}),jr=l({},kr,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Pr=function(r,t){var n=d(r,0);return n>=32&&n<127&&!s(t,r)?r:"'"===r&&s(t,r)?"%27":x(r)},Ir={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Tr=function(r,t){var n;return 2===r.length&&B(tr,z(r,0))&&(":"===(n=z(r,1))||!t&&"|"===n)},Er=function(r){var t;return r.length>1&&Tr(K(r,0,2))&&(2===r.length||"/"===(t=z(r,2))||"\\"===t||"?"===t||"#"===t)},xr=function(r){return"."===r||"%2e"===Q(r)},Cr=function(r){return".."===(r=Q(r))||"%2e."===r||".%2e"===r||"%2e%2e"===r},Rr={},Lr={},Fr={},Mr={},Ur={},Nr={},Dr={},zr={},Br={},_r={},Hr={},qr={},Jr={},Wr={},Gr={},$r={},Vr={},Kr={},Qr={},Zr={},Xr={},Yr=function(r,t,n){var e,i,o,u=g(r);if(t){if(i=this.parse(u))throw new F(i);this.searchParams=null}else{if(void 0!==n&&(e=new Yr(n,!0)),i=this.parse(u,null,e))throw new F(i);(o=T(new I)).bindURL(this),this.searchParams=o}};Yr.prototype={type:"URL",parse:function(t,n,e){var i,o,u,a,c=this,f=n||Rr,l=0,d="",p=!1,y=!1,m=!1;for(t=g(t),n||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,t=W(t,sr,""),t=W(t,lr,"$1")),t=W(t,vr,""),i=v(t);l<=i.length;){switch(o=i[l],f){case Rr:if(!o||!B(tr,o)){if(n)return X;f=Fr;continue}d+=Q(o),f=Lr;break;case Lr:if(o&&B(nr,o))d+=Q(o);else{if(":"!==o){if(n)return X;d="",f=Fr,l=0;continue}if(n&&(c.isSpecial()!==s(Ir,d)||"file"===d&&(c.includesCredentials()||null!==c.port)||"file"===c.scheme&&""===c.host))return;if(c.scheme=d,n)return void(c.isSpecial()&&Ir[c.scheme]===c.port&&(c.port=null));d="","file"===c.scheme?f=Wr:c.isSpecial()&&e&&e.scheme===c.scheme?f=Mr:c.isSpecial()?f=zr:"/"===i[l+1]?(f=Ur,l++):(c.cannotBeABaseURL=!0,J(c.path,""),f=Qr)}break;case Fr:if(!e||e.cannotBeABaseURL&&"#"!==o)return X;if(e.cannotBeABaseURL&&"#"===o){c.scheme=e.scheme,c.path=h(e.path),c.query=e.query,c.fragment="",c.cannotBeABaseURL=!0,f=Xr;break}f="file"===e.scheme?Wr:Nr;continue;case Mr:if("/"!==o||"/"!==i[l+1]){f=Nr;continue}f=Br,l++;break;case Ur:if("/"===o){f=_r;break}f=Kr;continue;case Nr:if(c.scheme=e.scheme,o===r)c.username=e.username,c.password=e.password,c.host=e.host,c.port=e.port,c.path=h(e.path),c.query=e.query;else if("/"===o||"\\"===o&&c.isSpecial())f=Dr;else if("?"===o)c.username=e.username,c.password=e.password,c.host=e.host,c.port=e.port,c.path=h(e.path),c.query="",f=Zr;else{if("#"!==o){c.username=e.username,c.password=e.password,c.host=e.host,c.port=e.port,c.path=h(e.path),c.path.length&&c.path.length--,f=Kr;continue}c.username=e.username,c.password=e.password,c.host=e.host,c.port=e.port,c.path=h(e.path),c.query=e.query,c.fragment="",f=Xr}break;case Dr:if(!c.isSpecial()||"/"!==o&&"\\"!==o){if("/"!==o){c.username=e.username,c.password=e.password,c.host=e.host,c.port=e.port,f=Kr;continue}f=_r}else f=Br;break;case zr:if(f=Br,"/"!==o||"/"!==i[l+1])continue;l++;break;case Br:if("/"!==o&&"\\"!==o){f=_r;continue}break;case _r:if("@"===o){p&&(d="%40"+d),p=!0,u=v(d);for(var b=0;b<u.length;b++){var w=u[b];if(":"!==w||m){var S=Pr(w,jr);m?c.password+=S:c.username+=S}else m=!0}d=""}else if(o===r||"/"===o||"?"===o||"#"===o||"\\"===o&&c.isSpecial()){if(p&&""===d)return"Invalid authority";l-=v(d).length+1,d="",f=Hr}else d+=o;break;case Hr:case qr:if(n&&"file"===c.scheme){f=$r;continue}if(":"!==o||y){if(o===r||"/"===o||"?"===o||"#"===o||"\\"===o&&c.isSpecial()){if(c.isSpecial()&&""===d)return Y;if(n&&""===d&&(c.includesCredentials()||null!==c.port))return;if(a=c.parseHost(d))return a;if(d="",f=Vr,n)return;continue}"["===o?y=!0:"]"===o&&(y=!1),d+=o}else{if(""===d)return Y;if(n===qr)return;if(a=c.parseHost(d))return a;d="",f=Jr}break;case Jr:if(!B(er,o)){if(o===r||"/"===o||"?"===o||"#"===o||"\\"===o&&c.isSpecial()||n){if(""!==d){var O=M(d,10);if(O>65535)return rr;c.port=c.isSpecial()&&O===Ir[c.scheme]?null:O,d=""}if(n)return;f=Vr;continue}return rr}d+=o;break;case Wr:if(c.scheme="file",c.host="","/"===o||"\\"===o)f=Gr;else{if(!e||"file"!==e.scheme){f=Kr;continue}switch(o){case r:c.host=e.host,c.path=h(e.path),c.query=e.query;break;case"?":c.host=e.host,c.path=h(e.path),c.query="",f=Zr;break;case"#":c.host=e.host,c.path=h(e.path),c.query=e.query,c.fragment="",f=Xr;break;default:c.host=e.host,Er(_(h(i,l),""))||(c.path=h(e.path),c.shortenPath()),f=Kr;continue}}break;case Gr:if("/"===o||"\\"===o){f=$r;break}e&&"file"===e.scheme&&(c.host=e.host,!Er(_(h(i,l),""))&&Tr(e.path[0],!0)&&J(c.path,e.path[0])),f=Kr;continue;case $r:if(o===r||"/"===o||"\\"===o||"?"===o||"#"===o){if(!n&&Tr(d))f=Kr;else if(""===d){if(c.host="",n)return;f=Vr}else{if(a=c.parseHost(d))return a;if("localhost"===c.host&&(c.host=""),n)return;d="",f=Vr}continue}d+=o;break;case Vr:if(c.isSpecial()){if(f=Kr,"/"!==o&&"\\"!==o)continue}else if(n||"?"!==o)if(n||"#"!==o){if(o!==r&&(f=Kr,"/"!==o))continue}else c.fragment="",f=Xr;else c.query="",f=Zr;break;case Kr:if(o===r||"/"===o||"\\"===o&&c.isSpecial()||!n&&("?"===o||"#"===o)){if(Cr(d)?(c.shortenPath(),"/"===o||"\\"===o&&c.isSpecial()||J(c.path,"")):xr(d)?"/"===o||"\\"===o&&c.isSpecial()||J(c.path,""):("file"===c.scheme&&!c.path.length&&Tr(d)&&(null!==c.host&&""!==c.host&&(c.host=""),d=z(d,0)+":"),J(c.path,d)),d="","file"===c.scheme&&(o===r||"?"===o||"#"===o))for(;c.path.length>1&&""===c.path[0];)G(c.path);"?"===o?(c.query="",f=Zr):"#"===o&&(c.fragment="",f=Xr)}else d+=Pr(o,kr);break;case Qr:"?"===o?(c.query="",f=Zr):"#"===o?(c.fragment="",f=Xr):o!==r&&(c.path[0]+=" "===o?"?"===i[l+1]||"#"===i[l+1]?"%20":" ":Pr(o,mr));break;case Zr:n||"#"!==o?o!==r&&(c.query+=Pr(o,c.isSpecial()?Sr:wr)):(c.fragment="",f=Xr);break;case Xr:o!==r&&(c.fragment+=Pr(o,Or))}l++}},parseHost:function(r){var t,n,e;if("["===z(r,0)){if("]"!==z(r,r.length-1))return Y;if(t=function(r){var t,n,e,i,o,u,a,c=[0,0,0,0,0,0,0,0],f=0,s=null,l=0,v=function(){return z(r,l)};if(":"===v()){if(":"!==z(r,1))return;l+=2,s=++f}for(;v();){if(8===f)return;if(":"!==v()){for(t=n=0;n<4&&B(ar,v());)t=16*t+M(v(),16),l++,n++;if("."===v()){if(0===n)return;if(l-=n,f>6)return;for(e=0;v();){if(i=null,e>0){if(!("."===v()&&e<4))return;l++}if(!B(er,v()))return;for(;B(er,v());){if(o=M(v(),10),null===i)i=o;else{if(0===i)return;i=10*i+o}if(i>255)return;l++}c[f]=256*c[f]+i,2!==++e&&4!==e||f++}if(4!==e)return;break}if(":"===v()){if(l++,!v())return}else if(v())return;c[f++]=t}else{if(null!==s)return;l++,s=++f}}if(null!==s)for(u=f-s,f=7;0!==f&&u>0;)a=c[f],c[f--]=c[s+u-1],c[s+--u]=a;else if(8!==f)return;return c}(K(r,1,-1)),!t)return Y;this.host=t}else if(this.isSpecial()){if(r=function(r){if(!B(hr,r))return""===r?null:p(r);var t,n,e,i=v(r),o="";for(t=0;t<i.length;t++){if(n=d(i[t],0),pr(n))return null;dr(n)||(o+=(e=yr(n))===n?i[t]:D(e))}return""===o?null:p(o)}(E(r)),null===r||B(cr,r))return Y;if(function(r){var t,n,e=$(r,".");if(""===e[e.length-1]){if(1===e.length)return!1;e.length--}return t=e[e.length-1],!!B(ur,t)||!!B(ir,t)&&(""===(n=K(t,2))||!!B(ar,n))}(r)){if(t=function(r){var t,n,e,i,o,u,a,c=$(r,".");if(c.length&&""===c[c.length-1]&&c.length--,(t=c.length)>4)return null;for(n=[],e=0;e<t;e++){if(""===(i=c[e]))return null;if(o=10,i.length>1&&"0"===z(i,0)&&(o=B(ir,i)?16:8,i=K(i,8===o?1:2)),""===i)u=0;else{if(!B(10===o?ur:8===o?or:ar,i))return null;u=M(i,o)}J(n,u)}for(e=0;e<t;e++)if(u=n[e],e===t-1){if(u>=N(256,5-t))return null}else if(u>255)return null;for(a=q(n),e=0;e<n.length;e++)a+=n[e]*N(256,3-e);return a}(r),null===t)return Y;this.host=t}else this.host=r}else{if(B(fr,r))return Y;for(t="",n=v(r),e=0;e<n.length;e++)t+=Pr(n[e],mr);this.host=t}},cannotHaveUsernamePasswordPort:function(){return null===this.host||""===this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return s(Ir,this.scheme)},shortenPath:function(){var r=this.path,t=r.length;!t||"file"===this.scheme&&1===t&&Tr(r[0],!0)||r.length--},serialize:function(){var r=this,t=r.scheme,n=r.username,e=r.password,i=r.host,o=r.port,u=r.path,a=r.query,c=r.fragment,f=t+":";return null!==i?(f+="//",r.includesCredentials()&&(f+=n+(e?":"+e:"")+"@"),f+=gr(i),null!==o&&(f+=":"+o)):"file"===t&&(f+="//"),null===i&&!r.cannotBeABaseURL&&u.length>1&&""===u[0]&&(f+="/."),f+=r.cannotBeABaseURL?u[0]:u.length?"/"+_(u,"/"):"",null!==a&&(f+="?"+a),null!==c&&(f+="#"+c),f},setHref:function(r){var t=this.parse(r);if(t)throw new F(t);this.searchParams.update()},getOrigin:function(){var r=this.scheme,t=this.port;if("blob"===r)try{return new rt(this.path[0]).origin}catch(r){return"null"}return"file"!==r&&this.isSpecial()?r+"://"+gr(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(r){this.parse(g(r)+":",Rr)},getUsername:function(){return this.username},setUsername:function(r){var t=v(g(r));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=Pr(t[n],jr)}},getPassword:function(){return this.password},setPassword:function(r){var t=v(g(r));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=Pr(t[n],jr)}},getHost:function(){var r=this.host,t=this.port;return null===r?"":null===t?gr(r):gr(r)+":"+t},setHost:function(r){this.cannotBeABaseURL||this.parse(r,Hr)},getHostname:function(){var r=this.host;return null===r?"":gr(r)},setHostname:function(r){this.cannotBeABaseURL||this.parse(r,qr)},getPort:function(){var r=this.port;return null===r?"":g(r)},setPort:function(r){this.cannotHaveUsernamePasswordPort()||(""===(r=g(r))?this.port=null:this.parse(r,Jr))},getPathname:function(){var r=this.path;return this.cannotBeABaseURL?r[0]:r.length?"/"+_(r,"/"):""},setPathname:function(r){this.cannotBeABaseURL||(this.path=[],this.parse(r,Vr))},getSearch:function(){var r=this.query;return r?"?"+r:""},setSearch:function(r){""===(r=g(r))?this.query=null:("?"===z(r,0)&&(r=K(r,1)),this.query="",this.parse(r,Zr)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var r=this.fragment;return r?"#"+r:""},setHash:function(r){""!==(r=g(r))?("#"===z(r,0)&&(r=K(r,1)),this.fragment="",this.parse(r,Xr)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var rt=function(r){var t=f(this,tt),e=w(arguments.length,1)>1?arguments[1]:void 0,i=A(t,new Yr(r,!1,e));n||(t.href=i.serialize(),t.origin=i.getOrigin(),t.protocol=i.getProtocol(),t.username=i.getUsername(),t.password=i.getPassword(),t.host=i.getHost(),t.hostname=i.getHostname(),t.port=i.getPort(),t.pathname=i.getPathname(),t.search=i.getSearch(),t.searchParams=i.getSearchParams(),t.hash=i.getHash())},tt=rt.prototype,nt=function(r,t){return{get:function(){return j(this)[r]()},set:t&&function(r){return j(this)[t](r)},configurable:!0,enumerable:!0}};if(n&&(c(tt,"href",nt("serialize","setHref")),c(tt,"origin",nt("getOrigin")),c(tt,"protocol",nt("getProtocol","setProtocol")),c(tt,"username",nt("getUsername","setUsername")),c(tt,"password",nt("getPassword","setPassword")),c(tt,"host",nt("getHost","setHost")),c(tt,"hostname",nt("getHostname","setHostname")),c(tt,"port",nt("getPort","setPort")),c(tt,"pathname",nt("getPathname","setPathname")),c(tt,"search",nt("getSearch","setSearch")),c(tt,"searchParams",nt("getSearchParams")),c(tt,"hash",nt("getHash","setHash"))),a(tt,"toJSON",function(){return j(this).serialize()},{enumerable:!0}),a(tt,"toString",function(){return j(this).serialize()},{enumerable:!0}),C){var et=C.createObjectURL,it=C.revokeObjectURL;et&&a(rt,"createObjectURL",o(et,C)),it&&a(rt,"revokeObjectURL",o(it,C))}return m(rt,"URL"),t({global:!0,constructor:!0,forced:!e,sham:!n},{URL:rt}),Pp}var xp,Cp={};var Rp,Lp,Fp,Mp,Up,Np={};function Dp(){if(Fp)return Lp;Fp=1,jp||(jp=1,Ep()),function(){if(xp)return Cp;xp=1;var r=bn(),t=Pr(),n=w(),e=Sv(),i=zn(),o=fp(),u=t("URL"),a=o&&n(function(){u.canParse()}),c=n(function(){return 1!==u.canParse.length});r({target:"URL",stat:!0,forced:!a||c},{canParse:function(r){var t=e(arguments.length,1),n=i(r),o=t<2||void 0===arguments[1]?void 0:i(arguments[1]);try{return!!new u(n,o)}catch(r){return!1}}})}(),function(){if(Rp)return Np;Rp=1;var r=bn(),t=Pr(),n=Sv(),e=zn(),i=fp(),o=t("URL");r({target:"URL",stat:!0,forced:!i},{parse:function(r){var t=n(arguments.length,1),i=e(r),u=t<2||void 0===arguments[1]?void 0:e(arguments[1]);try{return new o(i,u)}catch(r){return null}}})}();var r=jr();return Lp=r.URL}var zp,Bp,_p,Hp,qp,Jp,Wp,Gp,$p,Vp=t(function(){if(Up)return Mp;Up=1;var r=Dp();return Mp=r}()),Kp={};function Qp(){if(_p)return Kp;_p=1;var r=bn(),t=function(){if(Bp)return zp;Bp=1;var r=O(),t=kr(),n=Sn(),e=kn(),i=Wd(),o=Math.min,u=[].lastIndexOf,a=!!u&&1/[1].lastIndexOf(1,-0)<0,c=i("lastIndexOf");return zp=a||!c?function(i){if(a)return r(u,this,arguments)||0;var c=t(this),f=e(c);if(0===f)return-1;var s=f-1;for(arguments.length>1&&(s=o(s,n(arguments[1]))),s<0&&(s=f+s);s>=0;s--)if(s in c&&c[s]===i)return s||0;return-1}:u,zp}();return r({target:"Array",proto:!0,forced:t!==[].lastIndexOf},{lastIndexOf:t}),Kp}function Zp(){if(Wp)return Jp;Wp=1;var r=Ir(),t=function(){if(qp)return Hp;qp=1,Qp();var r=Pa();return Hp=r("Array","lastIndexOf")}(),n=Array.prototype;return Jp=function(e){var i=e.lastIndexOf;return e===n||r(n,e)&&i===n.lastIndexOf?t:i}}var Xp,Yp,ry,ty,ny,ey=t(function(){if($p)return Gp;$p=1;var r=Zp();return Gp=r}());function iy(){return ry?Yp:(ry=1,Xp||(Xp=1,bn()({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)})),Yp=Math.pow(2,-52))}var oy,uy,ay,cy,fy,sy,ly,vy=t(function(){if(ny)return ty;ny=1;var r=iy();return ty=r}()),hy={};function dy(){if(ay)return uy;ay=1,function(){if(oy)return hy;oy=1;var r=bn(),t=yt(),n=kn(),e=Pn(),i=ip(),o=An();r({target:"Array",proto:!0,arity:1,forced:1!==[].unshift(0)||!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(r){return r instanceof TypeError}}()},{unshift:function(r){var u=t(this),a=n(u),c=arguments.length;if(c){o(a+c);for(var f=a;f--;){var s=f+c;f in u?u[s]=u[f]:i(u,s)}for(var l=0;l<c;l++)u[l]=arguments[l]}return e(u,a+c)}})}();var r=Pa();return uy=r("Array","unshift")}var py,yy,gy,my,by,wy,Sy,Oy=t(function(){if(ly)return sy;ly=1;var r=function(){if(fy)return cy;fy=1;var r=Ir(),t=dy(),n=Array.prototype;return cy=function(e){var i=e.unshift;return e===n||r(n,e)&&i===n.unshift?t:i}}();return sy=r}()),ky={};function Ay(){if(gy)return yy;gy=1,function(){if(py)return ky;py=1;var r=bn(),t=ni().map;r({target:"Array",proto:!0,forced:!Ln()("map")},{map:function(r){return t(this,r,arguments.length>1?arguments[1]:void 0)}})}();var r=Pa();return yy=r("Array","map")}var jy,Py,Iy,Ty,Ey,xy,Cy,Ry,Ly,Fy,My,Uy=t(function(){if(Sy)return wy;Sy=1;var r=function(){if(by)return my;by=1;var r=Ir(),t=Ay(),n=Array.prototype;return my=function(e){var i=e.map;return e===n||r(n,e)&&i===n.map?t:i}}();return wy=r}()),Ny={};function Dy(){if(Ty)return Iy;Ty=1;var r=k(),t=On(),n=zn(),e=function(){if(Py)return jy;Py=1;var r=Sn(),t=zn(),n=Or(),e=RangeError,i=Math.floor;return jy=function(o){var u=t(n(this)),a="",c=r(o);if(c<0||c===1/0)throw new e("Wrong number of repetitions");for(;c>0;(c=i(c/2))&&(u+=u))c%2&&(a+=u);return a}}(),i=Or(),o=r(e),u=r("".slice),a=Math.ceil,c=function(r){return function(e,c,f){var s=n(i(e)),l=t(c),v=s.length;if(l<=v)return s;var h,d,p=void 0===f?" ":n(f);return""===p?s:((d=o(p,a((h=l-v)/p.length))).length>h&&(d=u(d,0,h)),r?s+d:d+s)}};return Iy={start:c(!1),end:c(!0)}}function zy(){if(Cy)return Ny;Cy=1;var r=bn(),t=L(),n=yt(),e=wt(),i=function(){if(xy)return Ey;xy=1;var r=k(),t=w(),n=Dy().start,e=RangeError,i=isFinite,o=Math.abs,u=Date.prototype,a=u.toISOString,c=r(u.getTime),f=r(u.getUTCDate),s=r(u.getUTCFullYear),l=r(u.getUTCHours),v=r(u.getUTCMilliseconds),h=r(u.getUTCMinutes),d=r(u.getUTCMonth),p=r(u.getUTCSeconds);return Ey=t(function(){return"0385-07-25T07:06:39.999Z"!==a.call(new Date(-50000000000001))})||!t(function(){a.call(new Date(NaN))})?function(){if(!i(c(this)))throw new e("Invalid time value");var r=this,t=s(r),u=v(r),a=t<0?"-":t>9999?"+":"";return a+n(o(t),a?6:4,0)+"-"+n(d(r)+1,2,0)+"-"+n(f(r),2,0)+"T"+n(l(r),2,0)+":"+n(h(r),2,0)+":"+n(p(r),2,0)+"."+n(u,3,0)+"Z"}:a}(),o=A();return r({target:"Date",proto:!0,forced:w()(function(){return null!==new Date(NaN).toJSON()||1!==t(Date.prototype.toJSON,{toISOString:function(){return 1}})})},{toJSON:function(r){var u=n(this),a=e(u,"number");return"number"!=typeof a||isFinite(a)?"toISOString"in u||"Date"!==o(u)?u.toISOString():t(i,u):null}}),Ny}var By,_y,Hy=function(){if(My)return Fy;My=1;var r=function(){if(Ly)return Ry;Ly=1,zy(),Si();var r=jr(),t=O();return r.JSON||(r.JSON={stringify:JSON.stringify}),Ry=function(n,e,i){return t(r.JSON.stringify,null,arguments)},Ry}();return Fy=r}(),qy=t(Hy),Jy={};function Wy(){return _y||(_y=1,By||(By=1,Kh()("Set",function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},Zh()))),Jy}var Gy,$y,Vy,Ky,Qy,Zy,Xy,Yy,rg,tg,ng,eg,ig,og,ug,ag,cg,fg,sg,lg,vg,hg={};function dg(){if($y)return Gy;$y=1;var r=Lr(),t=TypeError;return Gy=function(n){if("object"==typeof n&&"size"in n&&"has"in n&&"add"in n&&"delete"in n&&"keys"in n)return n;throw new t(r(n)+" is not a set")}}function pg(){if(Ky)return Vy;Ky=1;var r=Pr(),t=od(),n=r("Set"),e=n.prototype;return Vy={Set:n,add:t("add",1),has:t("has",1),remove:t("delete",1),proto:e}}function yg(){if(Zy)return Qy;Zy=1;var r=L();return Qy=function(t,n,e){for(var i,o,u=e?t:t.iterator,a=t.next;!(i=r(a,u)).done;)if(void 0!==(o=n(i.value)))return o},Qy}function gg(){if(Yy)return Xy;Yy=1;var r=yg();return Xy=function(t,n,e){return e?r(t.keys(),n,!0):t.forEach(n)},Xy}function mg(){if(tg)return rg;tg=1;var r=pg(),t=gg(),n=r.Set,e=r.add;return rg=function(r){var i=new n;return t(r,function(r){e(i,r)}),i},rg}function bg(){return eg||(eg=1,ng=function(r){return r.size}),ng}function wg(){return og?ig:(og=1,ig=function(r){return{iterator:r,next:r.next,done:!1}})}function Sg(){if(ag)return ug;ag=1;var r=Fr(),t=yn(),n=L(),e=Sn(),i=wg(),o="Invalid size",u=RangeError,a=TypeError,c=Math.max,f=function(t,n){this.set=t,this.size=c(n,0),this.has=r(t.has),this.keys=r(t.keys)};return f.prototype={getIterator:function(){return i(t(n(this.keys,this.set)))},includes:function(r){return n(this.has,this.set,r)}},ug=function(r){t(r);var n=+r.size;if(n!=n)throw new a(o);var i=e(n);if(i<0)throw new u(o);return new f(r,i)}}function Og(){return lg?sg:(lg=1,sg=function(){return!1})}function kg(){if(vg)return hg;vg=1;var r=bn(),t=function(){if(fg)return cg;fg=1;var r=dg(),t=pg(),n=mg(),e=bg(),i=Sg(),o=gg(),u=yg(),a=t.has,c=t.remove;return cg=function(t){var f=r(this),s=i(t),l=n(f);return e(l)<=s.size?o(l,function(r){s.includes(r)&&c(l,r)}):u(s.getIterator(),function(r){a(l,r)&&c(l,r)}),l}}(),n=w();return r({target:"Set",proto:!0,real:!0,forced:!Og()("difference",function(r){return 0===r.size})||n(function(){var r={size:1,has:function(){return!0},keys:function(){var r=0;return{next:function(){var n=r++>1;return t.has(1)&&t.clear(),{done:n,value:2}}}}},t=new Set([1,2,3,4]);return 3!==t.difference(r).size})},{difference:t}),hg}var Ag,jg,Pg,Ig={};function Tg(){if(Pg)return Ig;Pg=1;var r=bn(),t=w(),n=function(){if(jg)return Ag;jg=1;var r=dg(),t=pg(),n=bg(),e=Sg(),i=gg(),o=yg(),u=t.Set,a=t.add,c=t.has;return Ag=function(t){var f=r(this),s=e(t),l=new u;return n(f)>s.size?o(s.getIterator(),function(r){c(f,r)&&a(l,r)}):i(f,function(r){s.includes(r)&&a(l,r)}),l}}();return r({target:"Set",proto:!0,real:!0,forced:!Og()("intersection",function(r){return 2===r.size&&r.has(1)&&r.has(2)})||t(function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))})},{intersection:n}),Ig}var Eg,xg,Cg,Rg={};function Lg(){if(Cg)return Rg;Cg=1;var r=bn(),t=function(){if(xg)return Eg;xg=1;var r=dg(),t=pg().has,n=bg(),e=Sg(),i=gg(),o=yg(),u=Wf();return Eg=function(a){var c=r(this),f=e(a);if(n(c)<=f.size)return!1!==i(c,function(r){if(f.includes(r))return!1},!0);var s=f.getIterator();return!1!==o(s,function(r){if(t(c,r))return u(s.iterator,"normal",!1)})},Eg}();return r({target:"Set",proto:!0,real:!0,forced:!Og()("isDisjointFrom",function(r){return!r})},{isDisjointFrom:t}),Rg}var Fg,Mg,Ug,Ng={};function Dg(){if(Ug)return Ng;Ug=1;var r=bn(),t=function(){if(Mg)return Fg;Mg=1;var r=dg(),t=bg(),n=gg(),e=Sg();return Fg=function(i){var o=r(this),u=e(i);return!(t(o)>u.size)&&!1!==n(o,function(r){if(!u.includes(r))return!1},!0)}}();return r({target:"Set",proto:!0,real:!0,forced:!Og()("isSubsetOf",function(r){return r})},{isSubsetOf:t}),Ng}var zg,Bg,_g,Hg={};function qg(){if(_g)return Hg;_g=1;var r=bn(),t=function(){if(Bg)return zg;Bg=1;var r=dg(),t=pg().has,n=bg(),e=Sg(),i=yg(),o=Wf();return zg=function(u){var a=r(this),c=e(u);if(n(a)<c.size)return!1;var f=c.getIterator();return!1!==i(f,function(r){if(!t(a,r))return o(f.iterator,"normal",!1)})},zg}();return r({target:"Set",proto:!0,real:!0,forced:!Og()("isSupersetOf",function(r){return!r})},{isSupersetOf:t}),Hg}var Jg,Wg,Gg,$g,Vg,Kg={};function Qg(){return $g?Gg:($g=1,Gg=function(r){try{var t=new Set,n={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return t.clear(),t.add(4),function(){return{done:!0}}}})}},e=t[r](n);return 1===e.size&&4===e.values().next().value}catch(r){return!1}})}function Zg(){if(Vg)return Kg;Vg=1;var r=bn(),t=function(){if(Wg)return Jg;Wg=1;var r=dg(),t=pg(),n=mg(),e=Sg(),i=yg(),o=t.add,u=t.has,a=t.remove;return Jg=function(t){var c=r(this),f=e(t).getIterator(),s=n(c);return i(f,function(r){u(c,r)?a(s,r):o(s,r)}),s}}(),n=Qg();return r({target:"Set",proto:!0,real:!0,forced:!Og()("symmetricDifference")||!n("symmetricDifference")},{symmetricDifference:t}),Kg}var Xg,Yg,rm,tm,nm,em,im,om={};function um(){if(rm)return om;rm=1;var r=bn(),t=function(){if(Yg)return Xg;Yg=1;var r=dg(),t=pg().add,n=mg(),e=Sg(),i=yg();return Xg=function(o){var u=r(this),a=e(o).getIterator(),c=n(u);return i(a,function(r){t(c,r)}),c}}(),n=Qg();return r({target:"Set",proto:!0,real:!0,forced:!Og()("union")||!n("union")},{union:t}),om}var am,cm,fm,sm=function(){if(im)return em;im=1;var r=function(){if(nm)return tm;nm=1,Vo(),Wy(),kg(),Tg(),Lg(),Dg(),qg(),Zg(),um(),_u();var r=jr();return tm=r.Set}();return Ko(),em=r}(),lm=t(sm),vm={};function hm(){if(fm)return cm;fm=1,function(){if(am)return vm;am=1;var r=bn(),t=ae().includes,n=w(),e=Uo(),i=n(function(){return!Array(1).includes()}),o=n(function(){return[,1].includes(void 0,1)});r({target:"Array",proto:!0,forced:i||o},{includes:function(r){return t(this,r,arguments.length>1?arguments[1]:void 0)}}),e("includes")}();var r=Pa();return cm=r("Array","includes")}var dm,pm,ym,gm,mm,bm,wm,Sm,Om,km,Am,jm,Pm,Im={};function Tm(){if(gm)return ym;gm=1;var r=function(){if(pm)return dm;pm=1;var r=Ar(),t=A(),n=bt()("match");return dm=function(e){var i;return r(e)&&(void 0!==(i=e[n])?!!i:"RegExp"===t(e))}}(),t=TypeError;return ym=function(n){if(r(n))throw new t("The method doesn't accept regular expressions");return n}}function Em(){if(wm)return Im;wm=1;var r=bn(),t=k(),n=Tm(),e=Or(),i=zn(),o=function(){if(bm)return mm;bm=1;var r=bt()("match");return mm=function(t){var n=/./;try{"/./"[t](n)}catch(e){try{return n[r]=!1,"/./"[t](n)}catch(r){}}return!1}}(),u=t("".indexOf);return r({target:"String",proto:!0,forced:!o("includes")},{includes:function(r){return!!~u(i(e(this)),i(n(r)),arguments.length>1?arguments[1]:void 0)}}),Im}function xm(){if(Am)return km;Am=1;var r=Ir(),t=hm(),n=function(){if(Om)return Sm;Om=1,Em();var r=Pa();return Sm=r("String","includes")}(),e=Array.prototype,i=String.prototype;return km=function(o){var u=o.includes;return o===e||r(e,o)&&u===e.includes?t:"string"==typeof o||o===i||r(i,o)&&u===i.includes?n:u}}var Cm,Rm,Lm,Fm,Mm,Um,Nm,Dm=t(function(){if(Pm)return jm;Pm=1;var r=xm();return jm=r}());function zm(){if(Rm)return Cm;Rm=1;var r=b().isFinite;return Cm=Number.isFinite||function(t){return"number"==typeof t&&r(t)}}function Bm(){if(Mm)return Fm;Mm=1,Lm||(Lm=1,bn()({target:"Number",stat:!0},{isFinite:zm()}));var r=jr();return Fm=r.Number.isFinite}var _m,Hm,qm,Jm,Wm,Gm,$m,Vm=t(function(){if(Nm)return Um;Nm=1;var r=Bm();return Um=r}());function Km(){if(Hm)return _m;Hm=1;var r=Ar(),t=Math.floor;return _m=Number.isInteger||function(n){return!r(n)&&isFinite(n)&&t(n)===n}}function Qm(){if(Wm)return Jm;Wm=1,qm||(qm=1,bn()({target:"Number",stat:!0},{isInteger:Km()}));var r=jr();return Jm=r.Number.isInteger}var Zm,Xm,Ym,rb,tb,nb,eb,ib=t(function(){if($m)return Gm;$m=1;var r=Qm();return Gm=r}()),ob={};function ub(){if(Ym)return ob;Ym=1;var r=bn(),t=function(){if(Xm)return Zm;Xm=1;var r=R(),t=w(),n=k(),e=Bo(),i=le(),o=kr(),u=n(mr().f),a=n([].push),c=r&&t(function(){var r=Object.create(null);return r[2]=2,!u(r,2)}),f=function(t){return function(n){for(var f,s=o(n),l=i(s),v=c&&null===e(s),h=l.length,d=0,p=[];h>d;)f=l[d++],r&&!(v?f in s:u(s,f))||a(p,t?[f,s[f]]:s[f]);return p}};return Zm={entries:f(!0),values:f(!1)}}().entries;return r({target:"Object",stat:!0},{entries:function(r){return t(r)}}),ob}var ab,cb,fb,sb,lb,vb,hb,db=function(){if(eb)return nb;eb=1;var r=function(){if(tb)return rb;tb=1,ub();var r=jr();return rb=r.Object.entries}();return nb=r}(),pb=t(db),yb=t(Yf()),gb={};function mb(){if(fb)return cb;fb=1,function(){if(ab)return gb;ab=1;var r=bn(),t=ni().find,n=Uo(),e="find",i=!0;e in[]&&Array(1)[e](function(){i=!1}),r({target:"Array",proto:!0,forced:i},{find:function(r){return t(this,r,arguments.length>1?arguments[1]:void 0)}}),n(e)}();var r=Pa();return cb=r("Array","find")}var bb,wb,Sb,Ob,kb,Ab,jb,Pb=t(function(){if(hb)return vb;hb=1;var r=function(){if(lb)return sb;lb=1;var r=Ir(),t=mb(),n=Array.prototype;return sb=function(e){var i=e.find;return e===n||r(n,e)&&i===n.find?t:i}}();return vb=r}()),Ib={};function Tb(){if(Sb)return wb;Sb=1,function(){if(bb)return Ib;bb=1;var r=bn(),t=ni().filter;r({target:"Array",proto:!0,forced:!Ln()("filter")},{filter:function(r){return t(this,r,arguments.length>1?arguments[1]:void 0)}})}();var r=Pa();return wb=r("Array","filter")}var Eb,xb,Cb,Rb,Lb,Fb=t(function(){if(jb)return Ab;jb=1;var r=function(){if(kb)return Ob;kb=1;var r=Ir(),t=Tb(),n=Array.prototype;return Ob=function(e){var i=e.filter;return e===n||r(n,e)&&i===n.filter?t:i}}();return Ab=r}()),Mb={};function Ub(){if(Cb)return xb;Cb=1,function(){if(Eb)return Mb;Eb=1;var r=bn(),t=yt(),n=le();r({target:"Object",stat:!0,forced:w()(function(){n(1)})},{keys:function(r){return n(t(r))}})}();var r=jr();return xb=r.Object.keys}var Nb,Db,zb,Bb,_b,Hb,qb,Jb,Wb,Gb,$b,Vb,Kb,Qb=t(function(){if(Lb)return Rb;Lb=1;var r=Ub();return Rb=r}()),Zb={};function Xb(){if(qb)return Zb;qb=1;var r=bn(),t=k(),n=Fr(),e=yt(),i=kn(),o=ip(),u=zn(),a=w(),c=bp(),f=Wd(),s=function(){if(Db)return Nb;Db=1;var r=Tr().match(/firefox\/(\d+)/i);return Nb=!!r&&+r[1]}(),l=function(){if(Bb)return zb;Bb=1;var r=Tr();return zb=/MSIE|Trident/.test(r)}(),v=Er(),h=function(){if(Hb)return _b;Hb=1;var r=Tr().match(/AppleWebKit\/(\d+)\./);return _b=!!r&&+r[1]}(),d=[],p=t(d.sort),y=t(d.push),g=a(function(){d.sort(void 0)}),m=a(function(){d.sort(null)}),b=f("sort"),S=!a(function(){if(v)return v<70;if(!(s&&s>3)){if(l)return!0;if(h)return h<603;var r,t,n,e,i="";for(r=65;r<76;r++){switch(t=String.fromCharCode(r),r){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(e=0;e<47;e++)d.push({k:t+e,v:n})}for(d.sort(function(r,t){return t.v-r.v}),e=0;e<d.length;e++)t=d[e].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}});return r({target:"Array",proto:!0,forced:g||!m||!b||!S},{sort:function(r){void 0!==r&&n(r);var t=e(this);if(S)return void 0===r?p(t):p(t,r);var a,f,s=[],l=i(t);for(f=0;f<l;f++)f in t&&y(s,t[f]);for(c(s,function(r){return function(t,n){if(void 0===n)return-1;if(void 0===t)return 1;if(void 0!==r)return+r(t,n)||0;var e=u(t),i=u(n);return e===i?0:e>i?1:-1}}(r)),a=i(s),f=0;f<a;)t[f]=s[f++];for(;f<l;)o(t,f++);return t}}),Zb}function Yb(){if($b)return Gb;$b=1;var r=Ir(),t=function(){if(Wb)return Jb;Wb=1,Xb();var r=Pa();return Jb=r("Array","sort")}(),n=Array.prototype;return Gb=function(e){var i=e.sort;return e===n||r(n,e)&&i===n.sort?t:i}}var rw,tw,nw,ew,iw,ow,uw=t(function(){if(Kb)return Vb;Kb=1;var r=Yb();return Vb=r}());function aw(){if(ew)return nw;ew=1;var r=function(){if(tw)return rw;tw=1,Vo();var r=Pa();return rw=r("Array","keys")}();return nw=r}var cw,fw,sw,lw,vw,hw,dw,pw,yw,gw,mw,bw,ww,Sw=function(){if(ow)return iw;ow=1,Ko();var r=Tn(),t=gt(),n=Ir(),e=aw(),i=Array.prototype,o={DOMTokenList:!0,NodeList:!0};return iw=function(u){var a=u.keys;return u===i||n(i,u)&&a===i.keys||t(o,r(u))?e:a}}(),Ow=t(Sw),kw={};function Aw(){return fw?cw:(fw=1,cw="\t\n\v\f\r \u2028\u2029\ufeff")}function jw(){if(dw)return kw;dw=1;var r=bn(),t=function(){if(lw)return sw;lw=1;var r=k(),t=Or(),n=zn(),e=Aw(),i=r("".replace),o=RegExp("^["+e+"]+"),u=RegExp("(^|[^"+e+"])["+e+"]+$"),a=function(r){return function(e){var a=n(t(e));return 1&r&&(a=i(a,o,"")),2&r&&(a=i(a,u,"$1")),a}};return sw={start:a(1),end:a(2),trim:a(3)}}().trim,n=function(){if(hw)return vw;hw=1;var r=Do().PROPER,t=w(),n=Aw();return vw=function(e){return t(function(){return!!n[e]()||"
"!=="
"[e]()||r&&n[e].name!==e})}}();return r({target:"String",proto:!0,forced:n("trim")},{trim:function(){return t(this)}}),kw}function Pw(){if(mw)return gw;mw=1;var r=Ir(),t=function(){if(yw)return pw;yw=1,jw();var r=Pa();return pw=r("String","trim")}(),n=String.prototype;return gw=function(e){var i=e.trim;return"string"==typeof e||e===n||r(n,e)&&i===n.trim?t:i}}var Iw,Tw,Ew,xw,Cw,Rw=t(function(){if(ww)return bw;ww=1;var r=Pw();return bw=r}()),Lw={};function Fw(){if(Ew)return Tw;Ew=1,function(){if(Iw)return Lw;Iw=1;var r=bn(),t=Ip();r({target:"Object",stat:!0,arity:2,forced:Object.assign!==t},{assign:t})}();var r=jr();return Tw=r.Object.assign}var Mw,Uw,Nw=t(function(){if(Cw)return xw;Cw=1;var r=Fw();return xw=r}()),Dw=Object.defineProperty,zw=Object.defineProperties,Bw=il,_w=Ol,Hw=Object.prototype.hasOwnProperty,qw=Object.prototype.propertyIsEnumerable,Jw=Math.pow,Ww=function(r,t,n){return t in r?Dw(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n},Gw=function(r,t){for(var n in t||(t={}))Hw.call(t,n)&&Ww(r,n,t[n]);if(_w){var e,i=qs(_w(t));try{for(i.s();!(e=i.n()).done;){n=e.value;qw.call(t,n)&&Ww(r,n,t[n])}}catch(r){i.e(r)}finally{i.f()}}return r},$w=function(r,t){return zw(r,Bw(t))},Vw=function(r,t,n){return new bh(function(e,i){var o=function(r){try{a(n.next(r))}catch(r){i(r)}},u=function(r){try{a(n.throw(r))}catch(r){i(r)}},a=function(r){return r.done?e(r.value):bh.resolve(r.value).then(o,u)};a((n=n.apply(r,t)).next())})};function Kw(){var r="undefined"!=typeof crypto?crypto:void 0;if(null==r?void 0:r.randomUUID)return r.randomUUID().toLowerCase();var t=new Uint8Array(16);if(null==r?void 0:r.getRandomValues)r.getRandomValues(t);else for(var n=0;n<16;n++)t[n]=Math.floor(256*Math.random());t[6]=15&t[6]|64,t[8]=63&t[8]|128;for(var e="",i=0;i<16;i++){var o;e+=wh(o=(t[i]+256).toString(16)).call(o,1),3!==i&&5!==i&&7!==i&&9!==i||(e+="-")}return e}function Qw(r){var t,n={},e=qs(r);try{for(e.s();!(t=e.n()).done;){var i=Hs(t.value,2),o=i[0],u=i[1];Object.defineProperty(n,o,{value:u,enumerable:!0,writable:!0,configurable:!0})}}catch(r){e.e(r)}finally{e.f()}return n}var Zw="com.dolby.optiview.lens",Xw="0.5.0";function Yw(){return{schemaVersion:1,copies:[],backend:void 0,developmentIngestUrl:void 0,snRegistry:new Od}}function rS(r){"undefined"!=typeof console&&console.warn(r)}var tS,nS,eS,iS=(tS=function(){var r=void 0!==Ph?Ph:void 0!==Jh?Jh:"undefined"!=typeof window?window:void 0;if(!r)return Yw();var t,n,e=r[Zw];if(void 0===e){var i=Yw();return r[Zw]=i,i}return function(r){if("object"!==Wu(r)||null===r)return!1;var t=r;return 1===t.schemaVersion&&Array.isArray(t.copies)&&t.snRegistry instanceof Od}(e)?e:(rS(xd(t=xd(n="Lens: the global key '".concat(Zw,"' holds state this copy (")).call(n,Xw,", schema ")).call(t,1,") cannot share; falling back to per-copy state. Ship one Lens copy per app — see docs/distribution.md.")),Yw())}(),Cd(nS=tS.copies).call(nS,Xw),tS.copies.length>1&&rS(xd(eS="Lens: ".concat(tS.copies.length," copies of the Lens SDK are loaded (versions ")).call(eS,tS.copies.join(", "),"). They share one backend, dev URL, and sequence space, but ship one Lens copy per app — see docs/distribution.md.")),tS),oS=ks(function r(){Os(this,r),this.entries=[]},[{key:"add",value:function(r){var t=this,n=qd(this);return null===n?(r(),function(){}):(Cd(n).call(n,r),function(){var n=qd(t),e=null===n?-1:np(n).call(n,r);-1!==e&&(cp(n).call(n,e,1),r())})}},{key:"release",value:function(){var r=qd(this);if(null!==r){this.entries=null;for(var t=r.length-1;t>=0;t--)r[t]()}}}]);function uS(r,t){if(r<0)return-uS(-r,t);var n=Math.pow(10,t);if(Math.abs(r*n%1-.5)<vy){var e=Math.floor(r*n);return(e%2==0?e:e+1)/n}return Math.round(r*n)/n}var aS=ks(function r(t,n){Os(this,r),Array.isArray(t)&&(t=Uy(t).call(t,function(t){return t instanceof r?t:new r(t)})),this.value=t,this.params=n});function cS(r,t,n,e){var i,o,u;return new Error(xd(i=xd(o="failed to ".concat(r,' "')).call(o,(u=t,Array.isArray(u)?qy(u):u instanceof Od?"Map{}":u instanceof lm?"Set{}":"object"===Wu(u)?qy(u):String(u)),'" as ')).call(i,n),{cause:e})}var fS="Bare Item";var sS=/[\x00-\x1f\x7f]+/,lS=ks(function r(t){Os(this,r),this.description=t});function vS(r,t,n){return cS("serialize",r,t,n)}function hS(r){if(!1===ArrayBuffer.isView(r))throw vS(r,"Byte Sequence");return":".concat((t=r,btoa(String.fromCharCode.apply(String,Ss(t)))),":");var t}function dS(r){if(function(r){return r<-999999999999999||999999999999999<r}(r))throw vS(r,"Integer");return r.toString()}function pS(r){var t=uS(r,3);if(Math.floor(Math.abs(t)).toString().length>12)throw vS(r,"Decimal");var n=t.toString();return Dm(n).call(n,".")?n:"".concat(n,".0")}function yS(r){var t=function(r){var t;return r.description||wh(t=r.toString()).call(t,7,-1)}(r);if(!1===/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(t))throw vS(t,"Token");return t}function gS(r){switch(Wu(r)){case"number":if(!Vm(r))throw vS(r,fS);return ib(r)?dS(r):pS(r);case"string":return function(r){if(sS.test(r))throw vS(r,"String");return'"'.concat(r.replace(/\\/g,"\\\\").replace(/"/g,'\\"'),'"')}(r);case"symbol":return yS(r);case"boolean":return function(r){if("boolean"!=typeof r)throw vS(r,"Boolean");return r?"?1":"?0"}(r);case"object":if(r instanceof Date)return function(r){return"@".concat(dS(r.getTime()/1e3))}(r);if(r instanceof Uint8Array)return hS(r);if(r instanceof lS)return yS(r);default:throw vS(r,fS)}}function mS(r){if(!1===/^[a-z*][a-z0-9\-_.*]*$/.test(r))throw vS(r,"Key");return r}function bS(r){var t;return null==r?"":Uy(t=pb(r)).call(t,function(r){var t,n=Hs(r,2),e=n[0],i=n[1];return!0===i?";".concat(mS(e)):xd(t=";".concat(mS(e),"=")).call(t,gS(i))}).join("")}function wS(r){var t;return r instanceof aS?xd(t="".concat(gS(r.value))).call(t,bS(r.params)):gS(r)}function SS(r,t){var n;if("object"!==Wu(r)||null==r)throw vS(r,"Dict");var e=r instanceof Od?qd(r).call(r):pb(r);return Uy(n=yb(e)).call(n,function(r){var t=Hs(r,2),n=t[0],e=t[1];e instanceof aS==!1&&(e=new aS(e));var i,o,u,a=mS(n);return!0===e.value?a+=bS(e.params):(a+="=",Array.isArray(e.value)?a+=xd(o="(".concat(Uy(u=(i=e).value).call(u,wS).join(" "),")")).call(o,bS(i.params)):a+=wS(e)),a}).join(",".concat(""))}var OS=function(r){return r instanceof aS?new aS(Math.round(r.value),r.params):Math.round(r)},kS=function(r){return Array.isArray(r)?Uy(r).call(r,OS):OS(r)},AS=function(r,t){return Array.isArray(r)?Uy(r).call(r,function(r){return AS(r,t)}):r instanceof aS&&"string"==typeof r.value?new aS(AS(r.value,t),r.params):(t.baseUrl&&(r=function(r,t){var n,e,i;try{i=new Vp(r)}catch(t){return r}var o=new Vp(t);if(i.origin!==o.origin)return r;for(var u=wh(n=i.pathname.split("/")).call(n,1),a=wh(e=o.pathname.split("/")).call(e,1,-1),c=Math.min(u.length,a.length),f=0;f<c&&u[f]===a[f];f++)u.shift(),a.shift();for(;a.length;)a.shift(),Oy(u).call(u,"..");return u.join("/")+i.search+i.hash}(r,function(r){var t,n="string"==typeof r?new Vp(r):r;return n.origin+n.pathname.substring(0,ey(t=n.pathname).call(t,"/")+1)}(t.baseUrl))),1===t.version?encodeURIComponent(r):r)},jS=function(r){return r instanceof aS?new aS(100*Math.round(r.value/100),r.params):100*Math.round(r/100)},PS=function(r){return Array.isArray(r)?Uy(r).call(r,jS):jS(r)},IS={br:kS,d:kS,bl:PS,dl:PS,mtp:PS,nor:function(r,t){var n=r;return t.version>=2&&(r instanceof aS&&"string"==typeof r.value?n=new aS([r]):"string"==typeof r&&(n=[r])),AS(n,t)},rtp:PS,tb:kS},TS="rr",ES=new Od([["ps","sta"],["pr","pr"],["c","cid"],["b","bg"],["bc","br"]]),xS="event",CS="request",RS=xS,LS=/^[a-z][a-z0-9.-]*$/;function FS(r){var t=np(r).call(r,"-",1);return t>0&&t<r.length-1&&LS.test(r)}var MS=new lm(["ab","bg","bl","br","bs","bsa","bsd","bsda","cdn","cid","cs","d","dfa","dl","ec","lab","lb","ltc","msd","mtp","nor","nr","ot","pb","pr","pt","rtp","sf","sid","sn","st","sta","su","tab","tb","tbl","tpb","v"]);function US(r){return MS.has(r)||FS(r)}var NS=new lm(["cmsdd","cmsds","rc","smrt","ttfb","ttfbb","ttlb","url"]);function DS(r){return NS.has(r)}var zS=new lm(["cen","e","h","ts"]);var BS=new lm(["ab","bl","br","bsa","bsd","bsda","lab","lb","mtp","pb","tab","tb","tbl","tpb"]),_S=new lm(["bl","br","bs","cid","d","dl","mtp","nor","nrr","ot","pr","rtp","sf","sid","st","su","tb","v"]);function HS(r){return _S.has(r)||FS(r)}var qS=new lm(["ot","sf","st","e","sta"]);function JS(r){return qS.has(r)}function WS(r){return"number"==typeof r?Vm(r):null!=r&&""!==r&&!1!==r}var GS=Dc(Dc({},xS,function(r){return US(r)||DS(r)||zS.has(r)}),CS,US);function $S(r,t){var n;return Array.isArray(r)?(t&&(n=Pb(r).call(r,function(r){var n;return(null==(n=r.params)?void 0:n.ot)===t})),n||(n=r[0]),$S(n)):r instanceof aS?r.value:r}function VS(r){var t,n,e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o={};if(null==r||"object"!==Wu(r))return o;var u=i.version||r.v||2,a=i.reportingMode||CS,c=1===u?function(r){for(var t,n={},e=0,i=pb(r);e<i.length;e++){var o=Hs(i[e],2),u=o[0],a=o[1];if(null!=a)if("nor"===u){var c=(Array.isArray(a)?a:[a])[0];c instanceof aS?(n.nor=c.value,(null==(t=c.params)?void 0:t.r)&&(n.nrr=c.params.r)):n.nor=c}else BS.has(u)?n[u]=$S(a,r.ot):n[u]=a;else n[u]=a}return n}(r):r,f=1===u?HS:GS[a],s=Fb(t=Qb(c)).call(t,f);c.e&&c.e!==TS&&(s=Fb(s).call(s,function(r){return!DS(r)}));var l=Fb(i);"function"==typeof l&&(s=Fb(s).call(s,l));var v=a===xS;if(v){var h=c.e;Dm(s).call(s,"e")||null==h||Cd(s).call(s,"e"),Dm(s).call(s,"ts")||Cd(s).call(s,"ts"),Dm(s).call(s,"cen")||null==c.cen||"ce"!==h||Cd(s).call(s,"cen"),Dm(s).call(s,"ec")||null==c.ec||"e"!==h||Cd(s).call(s,"ec"),Dm(s).call(s,"url")||null==c.url||h!==TS||Cd(s).call(s,"url");var d=h?ES.get(h):void 0;d&&null!=c[d]&&!Dm(s).call(s,d)&&Cd(s).call(s,d)}if(0===s.length)return o;u>1&&!Dm(s).call(s,"v")&&Cd(s).call(s,"v");var p={version:u,reportingMode:a,baseUrl:i.baseUrl};uw(s).call(s);var y,g=qs(s);try{for(g.s();!(y=g.n()).done;){var m=y.value,b=c[m],w=null!=(e=null==(n=i.formatters)?void 0:n[m])?e:IS[m];if("function"==typeof w&&(b=w(b,p)),"v"===m){if(1===u)continue;b=u}if("pr"!==m||1!==b||v&&"pr"===c.e){v&&"ts"===m&&!Vm(b)&&(b=Date.now());var S=v&&!1===b&&"bg"===m&&"b"===c.e;(WS(b)||S)&&(JS(m)&&"string"==typeof b&&(b=new lS(b)),o[m]=b)}}}catch(r){g.e(r)}finally{g.f()}return o}function KS(r){return SS(r)}function QS(r){return{wireCode:r}}new Od(xd(Mw=[]).call(Mw,Ss(ES),[["ce","cen"],["e","ec"],[TS,"url"]]));var ZS={AD_BREAK_START:QS("abs"),AD_START:QS("as"),AD_END:QS("ae"),AD_BREAK_END:QS("abe"),AD_SKIP:QS("sk")},XS=ks(function r(t){Os(this,r),this.value=t}),YS=new Od,rO=ks(function r(){Os(this,r),this.contentType="application/cmcd"},[{key:"encode",value:function(r){return Uy(r).call(r,tO).join("\n")}}]);function tO(r){for(var t,n,e,i=Qw(Fb(t=pb(r)).call(t,function(r){var t=Hs(r,1)[0];return sO.has(t)})),o=function(r){return r?KS(VS(r,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})):""}(i,{version:2,reportingMode:RS}),u=Uy(n=""===o?[]:function(r){for(var t=[],n=0,e=!1,i=!1,o=0;o<r.length;o++){var u=r[o];i?i=!1:e&&"\\"===u?i=!0:'"'===u?e=!e:","!==u||e||(Cd(t).call(t,wh(r).call(r,n,o)),n=o+1)}return Cd(t).call(t,wh(r).call(r,n)),t}(o)).call(n,function(r){return{key:wh(r).call(r,0,np(r).call(r,"=")),field:r}}),a=0,c=pb(r);a<c.length;a++){var f=Hs(c[a],2),s=f[0],l=f[1];if(!sO.has(s)){var v,h=lO+s,d=vO.has(s)?xd(v="".concat(h,"=")).call(v,String(l)):nO(h,s,String(r.sid),l);Cd(u).call(u,{key:h,field:d})}}return Uy(e=uw(u).call(u,function(r,t){return r.key<t.key?-1:r.key>t.key?1:0})).call(e,function(r){return r.field}).join(",")}function nO(r,t,n,e){var i,o;"string"==typeof e&&(e.replace(dO," ").length>64&&function(r,t){var n,e=YS.get(r);if(!e&&(e=new lm,YS.set(r,e),YS.size>64)){var i=Ow(YS).call(YS).next().value;YS.delete(i)}if(e.has(t))return;e.add(t),console.warn(xd(n="Lens: custom value for '".concat(t,"' exceeds ")).call(n,64," UTF-16 units and is truncated on the CMCD wire"))}(n,t));var u=function(r){return"boolean"==typeof r?new lS(r?"true":"false"):r instanceof XS?new lS(r.value):function(r,t){var n,e=0,i="",o=qs(r);try{for(o.s();!(n=o.n()).done;){var u=n.value;if(e+u.length>t)break;i+=u,e+=u.length}}catch(r){o.e(r)}finally{o.f()}return i}(String(r).replace(dO," "),64)}(e);return u instanceof lS?xd(i="".concat(r,"=")).call(i,u.description):xd(o="".concat(r,'="')).call(o,function(r){return r.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}(u),'"')}var eO,iO=ks(function r(){Os(this,r),this.contentType="application/json"},[{key:"encode",value:function(r){var t=Uy(r).call(r,function(r){var t;return Qw(Uy(t=pb(r)).call(t,function(r){var t=Hs(r,2),n=t[0],e=t[1];return[n,e instanceof XS?e.value:e]}))});return qy({reports:t})}}]),oO=["bn","bv","dc","os","osv","p"],uO={Android:"Android","Chrome OS":"ChromeOS","Chromium OS":"ChromeOS",Linux:"Linux",Windows:"Windows",macOS:"macOS",iOS:"iOS"},aO=[["Edge",/Edg(?:e|A|iOS)?\/(\d+)/],["Opera",/(?:OPR|OPT|Opera)\/(\d+)/],["Samsung Internet",/SamsungBrowser\/(\d+)/],["Firefox",/(?:Firefox|FxiOS)\/(\d+)/],["Chrome",/(?:Chrome|CriOS)\/(\d+)/],["Chromium",/Chromium\/(\d+)/],["Safari",/Version\/(\d+)[.\d]*(?: \S+)* Safari\//]],cO=/Tizen|Web0S|WebOS|SMART-TV|SmartTV|HbbTV|Android TV|GoogleTV|CrKey|AFT[A-Z]|BRAVIA|NetCast|Viera/i;function fO(r){var t,n=null==r?void 0:r.userAgentData,e=null!=(t=null==r?void 0:r.userAgent)?t:"",i=function(r){var t=/Tizen[ /]?(\d+(?:\.\d+)*)?/.exec(r);if(t)return{os:"Tizen",osv:t[1]};if(/Web0S|WebOS|hpwOS/i.test(r))return{os:"webOS"};if(/CrOS/.test(r))return{os:"ChromeOS"};if(t=/Windows NT (\d+(?:\.\d+)*)/.exec(r))return"10.0"===t[1]?{os:"Windows"}:{os:"Windows",osv:t[1]};if(t=/Android (\d+(?:\.\d+)*)/.exec(r))return{os:"Android",osv:t[1]};if(t=/(iPhone|iPod) OS (\d+(?:_\d+)*)/.exec(r))return{os:"iOS",osv:t[2].replace(/_/g,".")};if(t=/iPad;.*OS (\d+(?:_\d+)*)/.exec(r))return{os:"iPadOS",osv:t[1].replace(/_/g,".")};if(t=/Mac OS X (\d+(?:[._]\d+)*)/.exec(r)){var n=t[1].replace(/_/g,".");return"10.15.7"===n?{os:"macOS"}:{os:"macOS",osv:n}}return/Macintosh/.test(r)?{os:"macOS"}:/Linux/.test(r)?{os:"Linux"}:{}}(e),o=(null==n?void 0:n.platform)?uO[n.platform]:void 0,u=null!=o?o:i.os,a=o&&i.os!==o?void 0:i.osv,c=function(r){for(var t=0,n=aO;t<n.length;t++){var e=Hs(n[t],2),i=e[0],o=e[1].exec(r);if(o)return{bn:i,bv:o[1]}}return{}}(e),f=c.bn,s=c.bv,l=function(r,t,n){return cO.test(r)?"tv":"iPadOS"===t||/iPad/.test(r)?"tablet":"Android"===t?/Mobile/.test(r)?"mobile":"tablet":!0===n||/iPhone|iPod|Windows Phone|Mobile/.test(r)?"mobile":"Windows"===t||"macOS"===t||"Linux"===t||"ChromeOS"===t?"desktop":void 0}(e,u,null==n?void 0:n.mobile),v={p:"web"};return void 0!==u&&(v.os=u),void 0!==a&&(v.osv=a),void 0!==f&&(v.bn=f),void 0!==s&&(v.bv=s),void 0!==l&&(v.dc=l),v}var sO=new lm(["e","cen","ts","sid","sn","v","cid","sf","st","h","sta"]),lO="com.dolby.optiview-",vO=new lm(["p","dc"]),hO={p:{web:"w",android:"a",ios:"i",tvos:"tv"},dc:{desktop:"d",mobile:"m",tablet:"t",tv:"tv"}},dO=/[\x00-\x1f\x7f]/g;function pO(r,t,n,e){var i,o,u=Ow(r)?Qw(uw(i=pb(Ow(r))).call(i,function(r,t){var n=Hs(r,1)[0],e=Hs(t,1)[0];return n<e?-1:n>e?1:0})):void 0,a=Gw($w(Gw($w(Gw(Gw(Gw(Gw(Gw($w(Gw({e:r.type},void 0!==r.customName&&{cen:r.customName}),{ts:r.timestamp,sid:r.session.sessionId}),void 0!==r.contentId&&{cid:r.contentId}),void 0!==r.streamingFormat&&{sf:r.streamingFormat}),void 0!==r.streamType&&{st:r.streamType}),void 0!==r.hostname&&{h:r.hostname}),void 0!==r.playbackState&&{sta:r.playbackState}),{sn:t,v:2,ns:r.namespace}),function(r){for(var t,n,e={},i=0,o=oO;i<o.length;i++){var u=o[i],a=r[u];void 0!==a&&(e[u]=null!=(n=null==(t=hO[u])?void 0:t[a])?n:a)}return e}(n)),{u:e}),u);return Qw(Fb(o=pb(a)).call(o,function(r){var t=Hs(r,2)[1];return"number"!=typeof t||isFinite(t)}))}var yO={cmcd:new rO,json:new iO};function gO(r,t){var n=function(r){return yO[r]}(r);return{body:n.encode(t),contentType:n.contentType}}var mO,bO="com.dolby.optiview.lens.u",wO=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/;function SO(){var r;return void 0===mO&&function(r){var t;try{null==(t=OO())||t.setItem(bO,r)}catch(r){}}(mO=null!=(r=function(){var r,t;try{var n=null!=(t=null==(r=OO())?void 0:r.getItem(bO))?t:void 0;return void 0!==n&&wO.test(n)?n:void 0}catch(r){return}}())?r:Kw()),mO}function OO(){return"undefined"!=typeof localStorage?localStorage:void 0}var kO=new Od,AO=new lm,jO=new lm;function PO(r,t,n){var e,i=xd(e="".concat(r,"|")).call(e,t);jO.has(i)||(jO.add(i),"undefined"!=typeof console&&console.warn(n))}var IO=ks(function r(t,n,e){var i,o;Os(this,r),this.disposed=!1;var u,a=function(r,t){if("disabled"!==r){var n="development"===r?iS.developmentIngestUrl:"https://data-ingest-api.dolby.io/api/v1/cmcd/events";return Gw({url:n,format:"cmcd"},t?{batch:t}:{})}}(n,e);this.queues=Uy(i=xd(o=a?[{destination:a,isBuiltIn:!0}]:[]).call(o,Uy(t).call(t,function(r){return{destination:r,isBuiltIn:!1}}))).call(i,function(r){return{destination:r.destination,isBuiltIn:r.isBuiltIn,pending:[],timer:void 0}}),u=this,LO.add(u),DO||void 0===UO||(DO=!0,UO.addEventListener("pagehide",NO))},[{key:"destinations",get:function(){var r;return Uy(r=this.queues).call(r,function(r){return r.destination})}},{key:"declaredDestinations",get:function(){var r,t;return Uy(r=Fb(t=this.queues).call(t,function(r){return!r.isBuiltIn})).call(r,function(r){return r.destination})}},{key:"enqueue",value:function(r,t){var n,e,i,o,u;if(!this.disposed){var a=Pb(n=this.queues).call(n,function(t){return t.destination===r});if(a){Cd(e=a.pending).call(e,t);var c=null!=(o=null==(i=r.batch)?void 0:i.maxEvents)?o:1;if(a.pending.length>=c)TO(a);else{var f=null==(u=r.batch)?void 0:u.maxDelayMs;void 0!==f&&void 0===a.timer&&(a.timer=setTimeout(function(){return TO(a)},f))}}}}},{key:"flush",value:function(){var r,t=qs(this.queues);try{for(t.s();!(r=t.n()).done;)TO(r.value,{bypassCooldown:!0})}catch(r){t.e(r)}finally{t.f()}}},{key:"purge",value:function(){var r,t=qs(this.queues);try{for(t.s();!(r=t.n()).done;){var n=r.value;void 0!==n.timer&&(clearTimeout(n.timer),n.timer=void 0),n.pending=[]}}catch(r){t.e(r)}finally{t.f()}}},{key:"dispose",value:function(){var r;this.disposed||(this.flush(),this.disposed=!0,r=this,LO.delete(r),DO&&0===LO.size&&(DO=!1,UO.removeEventListener("pagehide",NO)))}}]);function TO(r,t){var n,e;if(void 0!==r.timer&&(clearTimeout(r.timer),r.timer=void 0),0!==r.pending.length){var i=(r.isBuiltIn,r.destination.url);if(AO.has(i))r.pending=[];else{var o=(null!=(n=kO.get(i))?n:0)-Date.now();if(o>0&&!(null==t?void 0:t.bypassCooldown)){var u;r.pending.length>128&&cp(u=r.pending).call(u,0,r.pending.length-128),r.timer=setTimeout(function(){return TO(r)},o)}else{var a=r.pending;r.pending=[];var c=(null!=eO||(eO=fO("undefined"!=typeof navigator?navigator:void 0)),eO),f=SO(),s=Uy(a).call(a,function(r){return pO(r,function(r,t){var n,e="event|".concat(r),i=iS.snRegistry.get(e);i||(i=new Od,iS.snRegistry.set(e,i));var o=(null!=(n=i.get(t))?n:0)+1;if(i.delete(t),i.set(t,o),i.size>64){var u=Ow(i).call(i).next().value;i.delete(u)}return o}(i,r.session.sessionId),c,f)}),l=gO(null!=(e=r.destination.format)?e:"cmcd",s),v=l.body,h=l.contentType;!function(r,t,n){Vw(this,null,Lc().m(function e(){var i,o,u,a;return Lc().w(function(e){for(;;)switch(e.n){case 0:o=Lc().m(function e(){var o,u,c;return Lc().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,RO(r,t,n);case 1:if("delivered"!==(o=e.v).kind){e.n=2;break}return kO.delete(r),e.a(2,{v:void 0});case 2:if("cease"!==o.kind){e.n=3;break}return AO.add(r),PO("cease",r,"Lens: ".concat(r," answered 410 Gone — ceasing delivery to it for this run")),e.a(2,{v:void 0});case 3:if("drop"!==o.kind){e.n=4;break}return e.a(2,{v:void 0});case 4:if(!(a>=3)){e.n=5;break}return PO("drop",r,xd(u="Lens: dropping a batch for ".concat(r," after ")).call(u,3," failed retries")),e.a(2,{v:void 0});case 5:return c=null!=(i=o.retryAfterMs)?i:EO(1e3*Jw(2,a)),kO.set(r,Date.now()+c),e.n=6,new bh(function(r){return setTimeout(r,c)});case 6:return e.a(2)}},e)}),a=0;case 1:return e.d(Gu(o()),2);case 2:if(!(u=e.v)){e.n=3;break}return e.a(2,u.v);case 3:a++,e.n=1;break;case 4:return e.a(2)}},e)}))}(i,v,h)}}}}function EO(r){return r*(.8+.4*Math.random())}function xO(r,t){return r>=200&&r<300?{kind:"delivered"}:410===r?{kind:"cease"}:429===r||r>=500?{kind:"retry",retryAfterMs:CO(t,r)}:{kind:"drop"}}function CO(r,t){if(null!==r&&(429===t||503===t)&&/^\d+$/.test(Rw(r).call(r)))return Math.min(1e3*Number(Rw(r).call(r)),3e4)}function RO(r,t,n){return Vw(this,null,Lc().m(function e(){var i;return Lc().w(function(e){for(;;)switch(e.p=e.n){case 0:if("function"!=typeof fetch){e.n=4;break}return e.p=1,e.n=2,fetch(r,{method:"POST",headers:{"Content-Type":n},body:t,keepalive:!0});case 2:return i=e.v,e.a(2,xO(i.status,i.headers.get("Retry-After")));case 3:return e.p=3,e.v,e.a(2,{kind:"retry"});case 4:return e.a(2,new bh(function(e){try{var i=new XMLHttpRequest;i.open("POST",r,!0),i.setRequestHeader("Content-Type",n),i.timeout=5e3,i.onload=function(){return e(xO(i.status,i.getResponseHeader("Retry-After")))},i.onerror=function(){return e({kind:"retry"})},i.ontimeout=function(){return e({kind:"retry"})},i.onabort=function(){return e({kind:"retry"})},i.send(t)}catch(r){e({kind:"retry"})}}))}},e,null,[[1,3]])}))}var LO=new lm,FO=!0;var MO,UO="undefined"!=typeof window?window:void 0;function NO(){if(null==MO||MO(),FO){var r,t=qs(LO);try{for(t.s();!(r=t.n()).done;){r.value.flush()}}catch(r){t.e(r)}finally{t.f()}}}var DO=!1;var zO=new lm(["ab","bg","bl","br","bs","bsa","bsd","bsda","cdn","cen","cid","cmsdd","cmsds","cs","d","dfa","dl","e","ec","h","lab","lb","ltc","msd","mtp","nor","nr","nrr","ns","ot","pb","pr","pt","rc","rtp","sf","sid","smrt","sn","st","sta","su","tab","tb","tbl","tpb","ts","ttfb","ttfbb","ttlb","url","v"]),BO=new lm(xd(Uw=[]).call(Uw,oO,["u"])),_O=/^[a-z][a-z0-9_]*$/,HO=64-lO.length,qO=/^[A-Za-z0-9_-]+$/,JO=/^[\x20-\x7E]{1,64}$/,WO=/^[A-Za-z*][A-Za-z0-9!#$%&'*+\-.^_`|~:/]*$/;function GO(r,t){if(t)throw new Error(r);console.warn(r)}function $O(r,t){if(r){for(var n={},e=0,i=pb(r);e<i.length;e++){var o=Hs(i[e],2),u=o[0],a=o[1];if(zO.has(u))GO("Lens: '".concat(u,"' is a registered CMCD key and cannot be a custom key"),t);else if(BO.has(u))GO("Lens: '".concat(u,"' is a Lens-owned key and cannot be a custom key"),t);else if(_O.test(u))if(u.length>HO){var c;GO(xd(c="Lens: custom key '".concat(u,"' exceeds ")).call(c,HO," characters (the spec's 64 minus the wire prefix)"),t)}else"number"!=typeof a||isFinite(a)?a instanceof XS&&!WO.test(a.value)?GO("Lens: invalid custom token value '".concat(a.value,"' — must match the RFC 8941 sf-token grammar"),t):a instanceof XS&&a.value.length>64?GO("Lens: custom token value exceeds ".concat(64," UTF-16 units"),t):n[u]=a:GO("Lens: custom key '".concat(u,"' has a non-finite value (NaN or Infinity)"),t);else GO("Lens: invalid custom key '".concat(u,"' — lowercase letter first, then lowercase letters, digits, underscores"),t)}return Qb(n).length>0?n:void 0}}var VO=/^[\x20-\x7E]{1,128}$/,KO=new lm(["d","h","s","e","o"]),QO=new lm(["v","l","ll"]);function ZO(r){if(!VO.test(r))throw new Error("Lens: contentId must be 1-128 printable ASCII characters")}function XO(r){if(!KO.has(r))throw new Error("Lens: streamingFormat must be one of 'd', 'h', 's', 'e', 'o'")}var YO=/^[\x20-\x7E]{1,128}$/;function rk(r,t){if(!JO.test(r))throw new Error("Lens: ".concat(t," must be 1-64 printable ASCII characters"))}var tk="lens";function nk(r){if(!("number"==typeof r&&isFinite(r)&&Math.floor(r)===r)||r<0||r>0&&r<1e3)throw new Error("Lens: heartbeatMs must be 0 (off) or a whole number of milliseconds >= ".concat(1e3))}var ek=Kw;var ik=new lm(["as","ae","sk"]),ok=ks(function r(t){Os(this,r),this.anchor=t,this.handles=[],this.current=null}),uk=new Od,ak=new lm;function ck(r,t){var n,e,i=Fb(n=r.handles).call(n,function(r){return r.hasConsent()});return null!=(e=Pb(i).call(i,function(r){return r===t.minter}))?e:i[0]}function fk(r){var t=r.current;if(t){sk(r,t),r.current=null,ak.delete(r);var n,e=qs(r.handles);try{for(e.s();!(n=e.n()).done;){n.value.sessionEnded()}}catch(r){e.e(r)}finally{e.f()}}}function sk(r,t){if(!t.quitSent){t.quitSent=!0;var n=ck(r,t);if(void 0!==n){var e,i={},o=qs(r.handles);try{for(o.s();!(e=o.n()).done;){var u=e.value;u.hasConsent()&&u.contributeQuitContext(i)}}catch(r){o.e(r)}finally{o.f()}n.deliverQuit(t,Qb(i).length>0?i:void 0)}}}MO=function(){for(var r=0,t=yb(ak);r<t.length;r++)fk(t[r])};var lk=ks(function r(t){var n,e,i,o,u,a=this;Os(this,r),this.teardown=new oS,this.disposed=!1,this.stopHeartbeat=null,this.signaled=!1,this.namespace=t.namespace,this.strict=null!=(e=t.strict)&&e,this.transport=new IO(null!=(i=t.destinations)?i:[],(null!=iS.backend||(iS.backend="production"),iS.backend),t.batch),this.teardown.add(function(){return a.transport.dispose()}),this.consent=null!=(o=t.consent)?o:"granted",this.heartbeatMs=null!=(u=t.heartbeatMs)?u:3e4,this.binding=function(r){if(void 0===r)return new ok(void 0);var t=uk.get(r);return t||(t=new ok(r),uk.set(r,t)),t}(t.player),Cd(n=this.binding.handles).call(n,this)},[{key:"startSession",value:function(r){var t;if(void 0!==(null==r?void 0:r.sessionId)&&rk(r.sessionId,"sessionId"),void 0!==(null==r?void 0:r.contentId)&&ZO(r.contentId),void 0!==(null==r?void 0:r.streamingFormat)&&XO(r.streamingFormat),void 0!==(null==r?void 0:r.streamType)&&function(r){if(!QO.has(r))throw new Error("Lens: streamType must be one of 'v', 'l', 'll'")}(r.streamType),this.disposed)return{sessionId:null!=(t=null==r?void 0:r.sessionId)?t:ek()};var n=this.binding.current;return this.signaled=!0,n&&n.minter!==this?(this.armHeartbeat(),n.session):(function(r,t,n){var e;if(r.current){sk(r,r.current);var i,o=qs(r.handles);try{for(o.s();!(i=o.n()).done;)i.value.flushTransport()}catch(r){o.e(r)}finally{o.f()}}r.current={session:{sessionId:null!=(e=n.sessionId)?e:ek()},contentId:n.contentId,streamingFormat:n.streamingFormat,streamType:n.streamType,hostname:void 0,minter:t,quitSent:!1},ak.add(r);var u,a=qs(r.handles);try{for(a.s();!(u=a.n()).done;)u.value.sessionStarted()}catch(r){a.e(r)}finally{a.f()}}(this.binding,this,null!=r?r:{}),this.binding.current.session)}},{key:"endSession",value:function(){if(!this.disposed){var r=this.binding.current;r&&r.minter!==this?console.warn("Lens: endSession() ignored — the session is shared and was not started by this handle"):r?fk(this.binding):(this.cancelHeartbeat(),this.transport.flush())}}},{key:"reportSourceChange",value:function(r){!function(r){if("boolean"!=typeof r)throw new Error("Lens: source change must state newSession as true or false")}(r.newSession),void 0!==r.contentId&&ZO(r.contentId),void 0!==r.hostname&&function(r){if(!YO.test(r))throw new Error("Lens: hostname must be 1-128 printable ASCII characters")}(r.hostname),void 0!==r.streamingFormat&&XO(r.streamingFormat),this.disposed||function(r,t,n){var e,i,o,u=r.current;if(u)if(n.newSession){sk(r,u);var a,c=qs(r.handles);try{for(c.s();!(a=c.n()).done;)a.value.flushTransport()}catch(r){c.e(r)}finally{c.f()}r.current={session:{sessionId:ek()},contentId:null!=(e=n.contentId)?e:u.contentId,streamingFormat:null!=(i=n.streamingFormat)?i:u.streamingFormat,streamType:u.streamType,hostname:null!=(o=n.hostname)?o:u.hostname,minter:u.minter,quitSent:!1};var f,s=qs(r.handles);try{for(s.s();!(f=s.n()).done;)f.value.sessionStarted()}catch(r){s.e(r)}finally{s.f()}}else{var l=void 0!==n.contentId&&void 0!==u.contentId&&n.contentId!==u.contentId,v=void 0!==n.hostname&&void 0!==u.hostname&&n.hostname!==u.hostname;void 0!==n.contentId&&(u.contentId=n.contentId),void 0!==n.streamingFormat&&(u.streamingFormat=n.streamingFormat),void 0!==n.hostname&&(u.hostname=n.hostname);var h=ck(r,u);void 0!==h&&(l&&h.deliverSessionEvent("c",u,void 0),v&&h.deliverSessionEvent("h",u,n.hostname))}}(this.binding,0,r)}},{key:"session",get:function(){var r,t;return this.disposed?null:null!=(t=null==(r=this.binding.current)?void 0:r.session)?t:null}},{key:"emit",value:function(r,t){this.dispatch(r.wireCode,void 0,t)}},{key:"emitCustom",value:function(r,t){(function(r,t){return qO.test(r)?!(r.length>64&&(GO(xd(n="Lens: custom event name '".concat(r,"' exceeds ")).call(n,64," characters"),t),1)):(GO("Lens: invalid custom event name '".concat(r,"' — letters, digits, hyphens, underscores"),t),!1);var n})(r,this.strict)&&this.dispatch("ce",r,t)}},{key:"setHeartbeatPayload",value:function(r){var t=$O(null==r?void 0:r.custom,this.strict);this.disposed||(this.heartbeatKeys=t)}},{key:"setHeartbeatInterval",value:function(r){nk(r),this.disposed||r===this.heartbeatMs||(this.heartbeatMs=r,this.armHeartbeat())}},{key:"flush",value:function(){this.disposed||this.transport.flush()}},{key:"setConsent",value:function(r){this.disposed||this.consent!==r&&(this.consent=r,"denied"===r&&(this.transport.purge(),function(){var r;mO=void 0;try{null==(r=OO())||r.removeItem(bO)}catch(r){}}()),this.armHeartbeat())}},{key:"dispose",value:function(){var r,t;if(!this.disposed){this.binding.current&&1===this.binding.handles.length&&fk(this.binding);var n=np(r=this.binding.handles).call(r,this);-1!==n&&cp(t=this.binding.handles).call(t,n,1),void 0!==this.binding.anchor&&0===this.binding.handles.length&&uk.delete(this.binding.anchor),this.disposed=!0,this.adContentId=void 0,this.stopHeartbeat=null,this.teardown.release()}}},{key:"sessionStarted",value:function(){this.adContentId=void 0,this.signaled&&this.armHeartbeat()}},{key:"sessionEnded",value:function(){this.adContentId=void 0,this.signaled=!1,this.cancelHeartbeat(),this.transport.flush()}},{key:"flushTransport",value:function(){this.transport.flush()}},{key:"hasConsent",value:function(){return!this.disposed&&"granted"===this.consent}},{key:"contributeQuitContext",value:function(r){void 0!==this.heartbeatKeys&&Nw(r,this.heartbeatKeys)}},{key:"deliverQuit",value:function(r,t){this.deliver($w(Gw(Gw(Gw($w(Gw({type:"ps",namespace:tk},void 0!==t&&{keys:t}),{timestamp:yk(),session:r.session}),void 0!==r.contentId&&{contentId:r.contentId}),void 0!==r.streamingFormat&&{streamingFormat:r.streamingFormat}),void 0!==r.streamType&&{streamType:r.streamType}),{playbackState:"q"}),!0)}},{key:"deliverSessionEvent",value:function(r,t,n){this.deliver(Gw(Gw(Gw(Gw({type:r,namespace:tk,timestamp:yk(),session:t.session},void 0!==t.contentId&&{contentId:t.contentId}),void 0!==t.streamingFormat&&{streamingFormat:t.streamingFormat}),void 0!==t.streamType&&{streamType:t.streamType}),void 0!==n&&{hostname:n}),!1)}},{key:"dispatch",value:function(r,t,n){var e=$O(null==n?void 0:n.custom,this.strict),i=ik.has(r)?function(r,t){if(void 0!==r)return VO.test(r)?r:void GO("Lens: contentId must be 1-128 printable ASCII characters",t)}(null==n?void 0:n.contentId,this.strict):void 0,o=this.binding.current;if(!this.disposed&&o&&"denied"!==this.consent){var u=this.effectiveContentId(r,i,o.contentId),a=Gw(Gw(Gw($w(Gw($w(Gw({type:r},void 0!==t&&{customName:t}),{namespace:this.namespace}),void 0!==e&&{keys:e}),{timestamp:yk(),session:o.session}),void 0!==u&&{contentId:u}),void 0!==o.streamingFormat&&{streamingFormat:o.streamingFormat}),void 0!==o.streamType&&{streamType:o.streamType});this.deliver(a,!1)}}},{key:"effectiveContentId",value:function(r,t,n){var e,i;if("as"===r)return this.adContentId=t,null!=t?t:n;if("ae"===r||"sk"===r){var o=null!=(e=null!=t?t:this.adContentId)?e:n;return this.adContentId=void 0,o}return"abe"===r?(this.adContentId=void 0,n):null!=(i=this.adContentId)?i:n}},{key:"heartbeat",value:function(){var r=this.binding.current;if(!this.disposed&&r&&"denied"!==this.consent){var t=this.heartbeatKeys;this.deliver(Gw(Gw(Gw($w(Gw({type:"t",namespace:this.namespace},void 0!==t&&{keys:t}),{timestamp:yk(),session:r.session}),void 0!==r.contentId&&{contentId:r.contentId}),void 0!==r.streamingFormat&&{streamingFormat:r.streamingFormat}),void 0!==r.streamType&&{streamType:r.streamType}),!0)}}},{key:"deliver",value:function(r,t){var n,e=function(n){return function(r,t){var n,e=null!=(n=Fb(r))?n:{},i=e.namespaces,o=e.events;return!(i&&!Dm(i).call(i,t.namespace)||o&&!Dm(o).call(o,function(r){var t;return null!=(t=r.customName)?t:r.type}(t)))}(n,r)&&(!t||function(r){var t,n;return null!=(n=r.heartbeat)?n:"cmcd"===(null!=(t=r.format)?t:"cmcd")}(n))},i=qs(this.transport.destinations);try{for(i.s();!(n=i.n()).done;){var o=n.value;e(o)&&this.transport.enqueue(o,r)}}catch(r){i.e(r)}finally{i.f()}}},{key:"armHeartbeat",value:function(){var r=this;this.cancelHeartbeat(),!this.disposed&&this.binding.current&&"denied"!==this.consent&&0!==this.heartbeatMs&&(this.stopHeartbeat=this.teardown.add(pk(this.heartbeatMs,function(){return r.heartbeat()})),this.heartbeat())}},{key:"cancelHeartbeat",value:function(){this.stopHeartbeat&&this.stopHeartbeat(),this.stopHeartbeat=null}}]);function vk(r){if(void 0!==iS.backend&&iS.backend!==r)throw new Error("Lens: backend is already locked to '".concat(iS.backend,"'"));iS.backend=r}function hk(r){!function(r){var t=iS.developmentIngestUrl;if(void 0!==t&&t!==r)throw new Error("Lens: a development ingest URL is already registered");iS.developmentIngestUrl=r}(r),vk("development")}var dk={configure:function(r){var t,n,e;if(!Dm(t=["production","disabled"]).call(t,r.backend))throw new Error("Lens: invalid backend '".concat(String(r.backend),"'"));vk(r.backend),e=null==(n=r.lifecycleFlush)||n,FO=e},join:function(r){return function(r){if(rk(r,"namespace"),r.toLowerCase()===tk)throw new Error("Lens: namespace '".concat(tk,"' is reserved for the SDK's own reports"))}(r.namespace),void 0!==r.heartbeatMs&&nk(r.heartbeatMs),void 0!==r.batch&&function(r){if("object"!==Wu(r)||null===r||Array.isArray(r))throw new Error("Lens: batch must be an object");var t=r.maxEvents;if(void 0!==t&&!("number"==typeof t&&Vm(t)&&ib(t)&&t>=1))throw new Error("Lens: batch.maxEvents must be a whole number >= 1");var n=r.maxDelayMs;if(void 0!==n&&!("number"==typeof n&&Vm(n)&&ib(n)&&n>=0&&n<=2147483647))throw new Error("Lens: batch.maxDelayMs must be a whole number of milliseconds from 0 to 2147483647")}(r.batch),new lk(r)}},pk=function(r,t){var n,e=setInterval(t,Math.min(r,2147483647));return null==(n=e.unref)||n.call(e),function(){return clearInterval(e)}},yk=Date.now;export{dk as L,ZS as a,XS as b,hk as u};
|
|
@@ -17,5 +17,7 @@ export type LensTicker = (intervalMs: number, tick: () => void) => () => void;
|
|
|
17
17
|
export declare function setTickerForTesting(next: LensTicker | undefined): void;
|
|
18
18
|
/** Deterministic timestamps for the behavioral fixtures. */
|
|
19
19
|
export declare function setClockForTesting(next: (() => number) | undefined): void;
|
|
20
|
+
/** Deterministic minted sids for the behavioral fixtures. */
|
|
21
|
+
export declare function setSessionIdFactoryForTesting(next: (() => string) | undefined): void;
|
|
20
22
|
/** Test seam: reset the process-wide backend configuration lock. */
|
|
21
23
|
export declare function resetConfigurationForTesting(): void;
|