GBP/USD Testing 1.2700 Ahead of US NFPs

[ad_1]

British Pound Latest: GBP/USD Testing 1.2700 Ahead of US NFPs

British Pound Latest: GBP/USD Charts and Analysis

Most Read: EUR/GBP – Respecting Multi-Month Boundaries

Download our brand new British Pound Q1 2024 Forecast below

Recommended by Nick Cawley

Get Your Free GBP Forecast

Sterling has found a short-term level of support against the greenback between 1.2610 and 1.2628 (38.6% Fibonacci retracement) and is using this support zone to press higher and re-test 1.2700. Cable has been under pressure of late from a strong US dollar but with the greenback flat on the session so far, 1.2700 may not hold for long.

The British Pound is also pushing ahead against the Euro with EUR/GBP nearly one point lower from the recent 0.8715 high. EUR/GBP has been a multi-month range trade (See story above) and this looks set to continue in the weeks ahead.

Today sees the latest ADP employment report released at 13:15 UK with analysts forecasting little change from the November 103k release. While ADP is important, Friday’s US Jobs Report (NFP) will set the market tone for the near term. The market is forecasting 150k new jobs in December, down from a prior month’s 199k and any deviation from forecast, or revision of last month’s data should be noted.

For all market-moving economic data and events see the DailyFX Economic Calendar

Recommended by Nick Cawley

Trading Forex News: The Strategy

The daily GBP/USD chart looks mixed to mildly positive with the CCI indicator in neutral territory. Support between 1.2610 and 1.2628 should prove robust ahead of US NFPs and any US dollar weakness could see cable test 1.2742. A confirmed break here would leave the recent multi-month high of 1.2828 vulnerable.

GBP/USD Daily Price Chart

image2.png

Chart using TradingView

Retail trader GBP/USD data show 52.43% of traders are net-long with the ratio of traders long to short at 1.10 to 1.The number of traders net-long is 10.48% lower than yesterday and 29.73% higher than last week, while the number of traders net-short is 12.07% higher than yesterday and 17.09% lower than last week.

We typically take a contrarian view to crowd sentiment, and the fact traders are net-long suggests GBP/USD prices may continue to fall.

What Does Changing Retail Sentiment Mean for GBP/USD Price Action?




of clients are net long.




of clients are net short.

Change in Longs Shorts OI
Daily -17% 16% -3%
Weekly 16% -9% 2%

What is your view on the British Pound – bullish or bearish?? You can let us know via the form at the end of this piece or you can contact the author via Twitter @nickcawley1.

!function(){function errMsg(errCode,msg){return(msg||””)+” (SystemJS Error#”+errCode+” https://github.com/systemjs/systemjs/blob/main/docs/errors.md#”+errCode+”)”}var baseUrl,baseEl,hasSymbol=”undefined”!=typeof Symbol,hasSelf=”undefined”!=typeof self,hasDocument=”undefined”!=typeof document,envGlobal=hasSelf?self:global,backslashRegEx=(!hasDocument||(baseEl=document.querySelector(“base(href)”))&&(baseUrl=baseEl.href),baseUrl||”undefined”==typeof location||-1!==(baseEl=(baseUrl=location.href.split(“#”)(0).split(“?”)(0)).lastIndexOf(“/”))&&(baseUrl=baseUrl.slice(0,baseEl+1)),/\\/g);function resolveIfNotPlainOrUrl(relUrl,parentUrl){if(“/”===(relUrl=-1!==relUrl.indexOf(“\\”)?relUrl.replace(backslashRegEx,”/”):relUrl)(0)&&”/”===relUrl(1))return parentUrl.slice(0,parentUrl.indexOf(“:”)+1)+relUrl;if(“.”===relUrl(0)&&(“/”===relUrl(1)||”.”===relUrl(1)&&(“/”===relUrl(2)||2===relUrl.length&&(relUrl+=”/”))||1===relUrl.length&&(relUrl+=”/”))||”/”===relUrl(0)){var parentProtocol=parentUrl.slice(0,parentUrl.indexOf(“:”)+1),pathname=”/”===parentUrl(parentProtocol.length+1)?”file:”!==parentProtocol?(pathname=parentUrl.slice(parentProtocol.length+2)).slice(pathname.indexOf(“/”)+1):parentUrl.slice(8):parentUrl.slice(parentProtocol.length+(“/”===parentUrl(parentProtocol.length)));if(“/”===relUrl(0))return parentUrl.slice(0,parentUrl.length-pathname.length-1)+relUrl;for(var segmented=pathname.slice(0,pathname.lastIndexOf(“/”)+1)+relUrl,output=(),segmentIndex=-1,i=0;ipkgName.length&&”/”!==packages(packages.length-1)?void targetWarning(“W2″,pkgName,packages,”should have a trailing ‘/'”):packages+id.slice(pkgName.length)}}function targetWarning(code,match,target,msg){console.warn(errMsg(code,”Package target “+msg+”, resolving target ‘”+target+”‘ for “+match))}function resolveImportMap(importMap,resolvedOrPlain,parentUrl){for(var scopes=importMap.scopes,scopeUrl=parentUrl&&getMatch(parentUrl,scopes);scopeUrl;){var packageResolution=applyPackages(resolvedOrPlain,scopes(scopeUrl));if(packageResolution)return packageResolution;scopeUrl=getMatch(scopeUrl.slice(0,scopeUrl.lastIndexOf(“/”)),scopes)}return applyPackages(resolvedOrPlain,importMap.imports)||-1!==resolvedOrPlain.indexOf(“:”)&&resolvedOrPlain}var toStringTag$1=hasSymbol&&Symbol.toStringTag,REGISTRY=hasSymbol?Symbol():”@”;function SystemJS(){this(REGISTRY)={}}var lastRegister,systemJSPrototype=SystemJS.prototype;function loadToId(load){return load.id}function triggerOnload(loader,load,err,isErrSource){if(loader.onload(err,load.id,load.d&&load.d.map(loadToId),!!isErrSource),err)throw err}function getOrCreateLoad(loader,id,firstParentUrl,meta){var importerSetters,ns,instantiatePromise,linkPromise,load=loader(REGISTRY)(id);return load||(importerSetters=(),ns=Object.create(null),toStringTag$1&&Object.defineProperty(ns,toStringTag$1,{value:”Module”}),linkPromise=(instantiatePromise=Promise.resolve().then(function(){return loader.instantiate(id,firstParentUrl,meta)}).then(function(registration){var declared;if(registration)return declared=registration(1)(function _export(name,value){var changed=!(load.h=!0);if(“string”==typeof name)name in ns&&ns(name)===value||(ns(name)=value,changed=!0);else{for(var p in name){value=name(p);p in ns&&ns(p)===value||(ns(p)=value,changed=!0)}name&&name.__esModule&&(ns.__esModule=name.__esModule)}if(changed)for(var i=0;i<importerSetters.length;i++){var setter=importerSetters(i);setter&&setter(ns)}return value},2===registration(1).length?{import:function(importId,meta){return loader.import(importId,id,meta)},meta:loader.createContext(id)}:void 0),load.e=declared.execute||function(){},(registration(0),declared.setters||(),registration(2)||());throw Error(errMsg(2,"Module "+id+" did not instantiate"))},function(err){throw load.e=null,load.er=err,triggerOnload(loader,load,err,!0),err})).then(function(instantiation){return Promise.all(instantiation(0).map(function(dep,i){var setter=instantiation(1)(i),meta=instantiation(2)(i);return Promise.resolve(loader.resolve(dep,id)).then(function(depId){var depLoad=getOrCreateLoad(loader,depId,id,meta);return Promise.resolve(depLoad.I).then(function(){return setter&&(depLoad.i.push(setter),!depLoad.h&&depLoad.I||setter(depLoad.n)),depLoad})})})).then(function(depLoads){load.d=depLoads})}),load=loader(REGISTRY)(id)={id:id,i:importerSetters,n:ns,m:meta,I:instantiatePromise,L:linkPromise,h:!1,d:void 0,e:void 0,er:void 0,E:void 0,C:void 0,p:void 0})}systemJSPrototype.import=function(id,parentUrl,meta){var loader=this;return parentUrl&&"object"==typeof parentUrl&&(meta=parentUrl,parentUrl=void 0),Promise.resolve(loader.prepareImport()).then(function(){return loader.resolve(id,parentUrl,meta)}).then(function(id){id=getOrCreateLoad(loader,id,void 0,meta);return id.C||function topLevelLoad(loader,load){return load.C=function instantiateAll(loader,load,parent,loaded){if(!loaded(load.id))return loaded(load.id)=!0,Promise.resolve(load.L).then(function(){return load.p&&null!==load.p.e||(load.p=parent),Promise.all(load.d.map(function(dep){return instantiateAll(loader,dep,parent,loaded)}))}).catch(function(err){throw load.er||(load.e=null,triggerOnload(loader,load,err,!1)),err})}(loader,load,load,{}).then(function(){return function postOrderExec(loader,load,seen){if(seen(load.id))return;seen(load.id)=!0;if(!load.e){if(load.er)throw load.er;return load.E?load.E:void 0}var exec=load.e;load.e=null;var depLoadPromises;load.d.forEach(function(depLoad){try{var depLoadPromise=postOrderExec(loader,depLoad,seen);depLoadPromise&&(depLoadPromises=depLoadPromises||()).push(depLoadPromise)}catch(err){throw load.er=err,triggerOnload(loader,load,err,!1),err}});if(depLoadPromises)return Promise.all(depLoadPromises).then(doExec);return doExec();function doExec(){try{var execPromise=exec.call(nullContext);if(execPromise)return execPromise=execPromise.then(function(){load.C=load.n,load.E=null,triggerOnload(loader,load,null,!0)},function(err){throw load.er=err,load.E=null,triggerOnload(loader,load,err,!0),err}),load.E=execPromise;load.C=load.n,load.L=load.I=void 0}catch(err){throw load.er=err}finally{triggerOnload(loader,load,load.er,!0)}}}(loader,load,{})}).then(function(){return load.n})}(loader,id)})},systemJSPrototype.createContext=function(parentId){var loader=this;return{url:parentId,resolve:function(id,parentUrl){return Promise.resolve(loader.resolve(id,parentUrl||parentId))}}},systemJSPrototype.onload=function(){},systemJSPrototype.register=function(deps,declare,metas){lastRegister=(deps,declare,metas)},systemJSPrototype.getRegister=function(){var _lastRegister=lastRegister;return lastRegister=void 0,_lastRegister};var nullContext=Object.freeze(Object.create(null));envGlobal.System=new SystemJS;var baseOrigin,lastAutoImportDeps,lastAutoImportTimeout,importMapPromise=Promise.resolve(),importMap={imports:{},scopes:{},depcache:{},integrity:{}},processFirst=hasDocument;function processScripts(){().forEach.call(document.querySelectorAll("script"),function(script){var fetchPromise;script.sp||("systemjs-module"===script.type?(script.sp=!0,script.src&&System.import("import:"===script.src.slice(0,7)?script.src.slice(7):resolveUrl(script.src,baseUrl)).catch(function(e){var event;return-1<e.message.indexOf("https://github.com/systemjs/systemjs/blob/main/docs/errors.md#3")&&((event=document.createEvent("Event")).initEvent("error",!1,!1),script.dispatchEvent(event)),Promise.reject(e)})):"systemjs-importmap"===script.type&&(script.sp=!0,fetchPromise=script.src?(System.fetch||fetch)(script.src,{integrity:script.integrity,passThrough:!0}).then(function(res){if(res.ok)return res.text();throw Error("Invalid status code: "+res.status)}).catch(function(err){return err.message=errMsg("W4","Error fetching systemjs-import map "+script.src)+"\n"+err.message,console.warn(err),"function"==typeof script.onerror&&script.onerror(),"{}"}):script.innerHTML,importMapPromise=importMapPromise.then(function(){return fetchPromise}).then(function(text){!function extendImportMap(importMap,newMapText,newMapUrl){var newMap={};try{newMap=JSON.parse(newMapText)}catch(err){console.warn(Error(errMsg("W5","systemjs-importmap contains invalid JSON")+"\n\n"+newMapText+"\n"))}resolveAndComposeImportMap(newMap,newMapUrl,importMap)}(importMap,text,script.src||baseUrl)})))})}systemJSPrototype.prepareImport=function(doProcessScripts){return(processFirst||doProcessScripts)&&(processScripts(),processFirst=!1),importMapPromise},hasDocument&&(processScripts(),window.addEventListener("DOMContentLoaded",processScripts)),systemJSPrototype.addImportMap=function(newMap,mapBase){resolveAndComposeImportMap(newMap,mapBase||baseUrl,importMap)},hasDocument&&(window.addEventListener("error",function(evt){lastWindowErrorUrl=evt.filename,lastWindowError=evt.error}),baseOrigin=location.origin),systemJSPrototype.createScript=function(url){var script=document.createElement("script"),integrity=(script.async=!0,url.indexOf(baseOrigin+"/")&&(script.crossOrigin="anonymous"),importMap.integrity(url));return integrity&&(script.integrity=integrity),script.src=url,script};var lastWindowErrorUrl,lastWindowError,autoImportCandidates={},systemRegister=systemJSPrototype.register,instantiate=(systemJSPrototype.register=function(deps,declare){var scripts,lastScript,loader;return hasDocument&&"loading"===document.readyState&&"string"!=typeof deps?(scripts=document.querySelectorAll("script(src)"),(lastScript=scripts(scripts.length-1))&&(lastScript.src,lastAutoImportDeps=deps,loader=this,lastAutoImportTimeout=setTimeout(function(){autoImportCandidates(lastScript.src)=(deps,declare),loader.import(lastScript.src)}))):lastAutoImportDeps=void 0,systemRegister.call(this,deps,declare)},systemJSPrototype.instantiate=function(url,firstParentUrl){var loader,autoImportRegistration=autoImportCandidates(url);return autoImportRegistration?(delete autoImportCandidates(url),autoImportRegistration):(loader=this,Promise.resolve(systemJSPrototype.createScript(url)).then(function(script){return new Promise(function(resolve,reject){script.addEventListener("error",function(){reject(Error(errMsg(3,"Error loading "+url+(firstParentUrl?" from "+firstParentUrl:""))))}),script.addEventListener("load",function(){var register;document.head.removeChild(script),lastWindowErrorUrl===url?reject(lastWindowError):((register=loader.getRegister(url))&&register(0)===lastAutoImportDeps&&clearTimeout(lastAutoImportTimeout),resolve(register))}),document.head.appendChild(script)})}))},systemJSPrototype.shouldFetch=function(){return!1},"undefined"!=typeof fetch&&(systemJSPrototype.fetch=fetch),systemJSPrototype.instantiate),jsContentTypeRegEx=/^(text|application)\/(x-)?javascript(;|$)/;systemJSPrototype.instantiate=function(url,parent,meta){var loader=this;return this.shouldFetch(url,parent,meta)?this.fetch(url,{credentials:"same-origin",integrity:importMap.integrity(url),meta:meta}).then(function(res){if(!res.ok)throw Error(errMsg(7,res.status+" "+res.statusText+", loading "+url+(parent?" from "+parent:"")));var contentType=res.headers.get("content-type");if(contentType&&jsContentTypeRegEx.test(contentType))return res.text().then(function(source){return source.indexOf("//# sourceURL=")<0&&(source+="\n//# sourceURL="+url),(0,eval)(source),loader.getRegister(url)});throw Error(errMsg(4,'Unknown Content-Type "'+contentType+'", loading '+url+(parent?" from "+parent:"")))}):instantiate.apply(this,arguments)},systemJSPrototype.resolve=function(id,parentUrl){return resolveImportMap(importMap,resolveIfNotPlainOrUrl(id,parentUrl=parentUrl||baseUrl)||id,parentUrl)||function throwUnresolved(id,parentUrl){throw Error(errMsg(8,"Unable to resolve bare specifier '"+id+(parentUrl?"' from "+parentUrl:"'")))}(id,parentUrl)};var systemInstantiate=systemJSPrototype.instantiate,toStringTag=(systemJSPrototype.instantiate=function(url,firstParentUrl,meta){var preloads=importMap.depcache(url);if(preloads)for(var i=0;i<preloads.length;i++)getOrCreateLoad(this,this.resolve(preloads(i),url),url);return systemInstantiate.call(this,url,firstParentUrl,meta)},hasSelf&&"function"==typeof importScripts&&(systemJSPrototype.instantiate=function(url){var loader=this;return Promise.resolve().then(function(){return importScripts(url),loader.getRegister(url)})}),!function(global){var firstGlobalProp,secondGlobalProp,lastGlobalProp,systemJSPrototype=global.System.constructor.prototype;var impt=systemJSPrototype.import,emptyInstantiation=(systemJSPrototype.import=function(id,parentUrl,meta){return function noteGlobalProps(){for(var p in firstGlobalProp=secondGlobalProp=void 0,global)shouldSkipProperty(p)||(firstGlobalProp?secondGlobalProp=secondGlobalProp||p:firstGlobalProp=p,lastGlobalProp=p)}(),impt.call(this,id,parentUrl,meta)},((),function(){return{}})),getRegister=systemJSPrototype.getRegister,isIE11=(systemJSPrototype.getRegister=function(){var lastRegister=getRegister.call(this);if(lastRegister)return lastRegister;var globalExport,lastRegister=function getGlobalProp(useFirstGlobalProp){var foundLastProp,result,p,cnt=0;for(p in global)if(!shouldSkipProperty(p)){if(0===cnt&&p!==firstGlobalProp||1===cnt&&p!==secondGlobalProp)return p;foundLastProp?(lastGlobalProp=p,result=useFirstGlobalProp&&result||p):foundLastProp=p===lastGlobalProp,cnt++}return result}(this.firstGlobalProp);if(!lastRegister)return emptyInstantiation;try{globalExport=global(lastRegister)}catch(e){return emptyInstantiation}return((),function(_export){return{execute:function(){_export(globalExport),_export({default:globalExport,__useDefault:!0})}}})},"undefined"!=typeof navigator&&-1!==navigator.userAgent.indexOf("Trident"));function shouldSkipProperty(p){return!global.hasOwnProperty(p)||!isNaN(p)&&pnew Promise((resolve,reject)=>{var fulfilled=value=>{try{step(generator.next(value))}catch(e){reject(e)}},rejected=value=>{try{step(generator.throw(value))}catch(e){reject(e)}},step=x=>x.done?resolve(x.value):Promise.resolve(x.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())});if(void 0!==window.Reflect&&void 0!==window.customElements&&!window.customElements.polyfillWrapFlushCallback){const BuiltInHTMLElement=HTMLElement,wrapperForTheName_HTMLElement=function HTMLElement2(){return Reflect.construct(BuiltInHTMLElement,(),this.constructor)};window.HTMLElement=wrapperForTheName_HTMLElement,HTMLElement.prototype=BuiltInHTMLElement.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,BuiltInHTMLElement)}function raise(errorConstructor,message,name){throw new errorConstructor(“Failed to execute ‘requestSubmit’ on ‘HTMLFormElement’: “+message+”.”,name)}”function”!=typeof(prototype=HTMLFormElement.prototype).requestSubmit&&(prototype.requestSubmit=function(submitter){submitter?(function validateSubmitter(submitter,form){submitter instanceof HTMLElement||raise(TypeError,”parameter 1 is not of type ‘HTMLElement'”),”submit”!=submitter.type&&raise(TypeError,”The specified element is not a submit button”),submitter.form!=form&&raise(DOMException,”The specified element is not owned by this form element”,”NotFoundError”)}(submitter,this),submitter.click()):((submitter=document.createElement(“input”)).type=”submit”,submitter.hidden=!0,this.appendChild(submitter),submitter.click(),this.removeChild(submitter))});const submittersByForm=new WeakMap;function clickCaptured(event){event=function findSubmitterFromClickTarget(target){return”submit”==(null==(target=(target=target instanceof Element?target:target instanceof Node?target.parentElement:null)?target.closest(“input, button”):null)?void 0:target.type)?target:null}(event.target);event&&event.form&&submittersByForm.set(event.form,event)}!function(){if(!(“submitter”in Event.prototype)){let prototype=window.Event.prototype;if(“SubmitEvent”in window&&/Apple Computer/.test(navigator.vendor))prototype=window.SubmitEvent.prototype;else if(“SubmitEvent”in window)return;addEventListener(“click”,clickCaptured,!0),Object.defineProperty(prototype,”submitter”,{get(){if(“submit”==this.type&&this.target instanceof HTMLFormElement)return submittersByForm.get(this.target)}})}}(),(prototype=FrameLoadingStyle=FrameLoadingStyle||{}).eager=”eager”,prototype.lazy=”lazy”;class FrameElement extends HTMLElement{static get observedAttributes(){return(“disabled”,”complete”,”loading”,”src”)}constructor(){super(),this.loaded=Promise.resolve(),this.delegate=new FrameElement.delegateConstructor(this)}connectedCallback(){this.delegate.connect()}disconnectedCallback(){this.delegate.disconnect()}reload(){return this.delegate.sourceURLReloaded()}attributeChangedCallback(name){“loading”==name?this.delegate.loadingStyleChanged():”complete”==name?this.delegate.completeChanged():”src”==name?this.delegate.sourceURLChanged():this.delegate.disabledChanged()}get src(){return this.getAttribute(“src”)}set src(value){value?this.setAttribute(“src”,value):this.removeAttribute(“src”)}get loading(){return function frameLoadingStyleFromString(style){{if(“lazy”!==style.toLowerCase())return FrameLoadingStyle.eager;return FrameLoadingStyle.lazy}}(this.getAttribute(“loading”)||””)}set loading(value){value?this.setAttribute(“loading”,value):this.removeAttribute(“loading”)}get disabled(){return this.hasAttribute(“disabled”)}set disabled(value){value?this.setAttribute(“disabled”,””):this.removeAttribute(“disabled”)}get autoscroll(){return this.hasAttribute(“autoscroll”)}set autoscroll(value){value?this.setAttribute(“autoscroll”,””):this.removeAttribute(“autoscroll”)}get complete(){return!this.delegate.isLoading}get isActive(){return this.ownerDocument===document&&!this.isPreview}get isPreview(){var _a;return null==(_a=null==(_a=this.ownerDocument)?void 0:_a.documentElement)?void 0:_a.hasAttribute(“data-turbo-preview”)}}function expandURL(locatable){return new URL(locatable.toString(),document.baseURI)}function getAnchor(url){return url.hash?url.hash.slice(1):(url=url.href.match(/#(.*)$/))?url(1):void 0}function getAction(form,submitter){return expandURL((null==submitter?void 0:submitter.getAttribute(“formaction”))||form.getAttribute(“action”)||form.action)}function getExtension(url){return(function getLastPathComponent(url){return function getPathComponents(url){return url.pathname.split(“/”).slice(1)}(url).slice(-1)(0)}(url).match(/\.(^.)*$/)||())(0)||””}function isPrefixedBy(baseURL,url){url=function getPrefix(url){return function addTrailingSlash(value){return value.endsWith(“/”)?value:value+”/”}(url.origin+url.pathname)}(url);return baseURL.href===expandURL(url).href||baseURL.href.startsWith(url)}function locationIsVisitable(location2,rootLocation){return isPrefixedBy(location2,rootLocation)&&function isHTML(url){return!!getExtension(url).match(/^(?:|\.(?:htm|html|xhtml|php))$/)}(location2)}function getRequestURL(url){var anchor=getAnchor(url);return null!=anchor?url.href.slice(0,-(anchor.length+1)):url.href}function toCacheKey(url){return getRequestURL(url)}class FetchResponse{constructor(response){this.response=response}get succeeded(){return this.response.ok}get failed(){return!this.succeeded}get clientError(){return 400<=this.statusCode&&this.statusCode<=499}get serverError(){return 500<=this.statusCode&&this.statusCoderequestAnimationFrame(()=>resolve()))}function parseHTMLDocument(html=””){return(new DOMParser).parseFromString(html,”text/html”)}function unindent(strings,…values){strings=function interpolate(strings,values){return strings.reduce((result,string,i)=>{return result+string+(null==values(i)?””:values(i))},””)}(strings,values).replace(/^\n/,””).split(“\n”),values=strings(0).match(/^\s+/);const indent=values?values(0).length:0;return strings.map(line=>line.slice(indent)).join(“\n”)}function uuid(){return Array.from({length:36}).map((_,i)=>8==i||13==i||18==i||23==i?”-“:14==i?”4”:(19==i?Math.floor(4*Math.random())+8:Math.floor(15*Math.random())).toString(16)).join(“”)}function getAttribute(attributeName,…elements){for(const value of elements.map(element=>null==element?void 0:element.getAttribute(attributeName)))if(“string”==typeof value)return value;return null}function markAsBusy(…elements){for(const element of elements)”turbo-frame”==element.localName&&element.setAttribute(“busy”,””),element.setAttribute(“aria-busy”,”true”)}function clearBusyState(…elements){for(const element of elements)”turbo-frame”==element.localName&&element.removeAttribute(“busy”),element.removeAttribute(“aria-busy”)}function getHistoryMethodForAction(action){switch(action){case”replace”:return history.replaceState;case”advance”:case”restore”:return history.pushState}}function getVisitAction(…elements){elements=getAttribute(“data-turbo-action”,…elements);return function isAction(action){return”advance”==action||”replace”==action||”restore”==action}(elements)?elements:null}function getMetaElement(name){return document.querySelector(`meta(name=”${name}”)`)}function getMetaContent(name){name=getMetaElement(name);return name&&name.content}function findClosestRecursively(element,selector){if(element instanceof Element)return element.closest(selector)||findClosestRecursively(element.assignedSlot||(null==(element=element.getRootNode())?void 0:element.host),selector)}(prototype=FetchMethod=FetchMethod||{})(prototype.get=0)=”get”,prototype(prototype.post=1)=”post”,prototype(prototype.put=2)=”put”,prototype(prototype.patch=3)=”patch”,prototype(prototype.delete=4)=”delete”;class FetchRequest{constructor(delegate,method,location2,body=new URLSearchParams,target=null){this.abortController=new AbortController,this.resolveRequestPromise=_value=>{},this.delegate=delegate,this.method=method,this.headers=this.defaultHeaders,this.body=body,this.url=location2,this.target=target}get location(){return this.url}get params(){return this.url.searchParams}get entries(){return this.body?Array.from(this.body.entries()):()}cancel(){this.abortController.abort()}perform(){return __async$3(this,null,function*(){var fetchOptions=this(“fetchOptions”);this.delegate.prepareRequest(this),yield this.allowRequestToBeIntercepted(fetchOptions);try{this.delegate.requestStarted(this);var response=yield fetch(this.url.href,fetchOptions);return yield this.receive(response)}catch(error){if(“AbortError”!==error.name)throw this.willDelegateErrorHandling(error)&&this.delegate.requestErrored(this,error),error}finally{this.delegate.requestFinished(this)}})}receive(response){return __async$3(this,null,function*(){var fetchResponse=new FetchResponse(response);return dispatch(“turbo:before-fetch-response”,{cancelable:!0,detail:{fetchResponse:fetchResponse},target:this.target}).defaultPrevented?this.delegate.requestPreventedHandlingResponse(this,fetchResponse):fetchResponse.succeeded?this.delegate.requestSucceededWithResponse(this,fetchResponse):this.delegate.requestFailedWithResponse(this,fetchResponse),fetchResponse})}get fetchOptions(){var _a;return{method:FetchMethod(this.method).toUpperCase(),credentials:”same-origin”,headers:this.headers,redirect:”follow”,body:this.isSafe?null:this.body,signal:this.abortSignal,referrer:null==(_a=this.delegate.referrer)?void 0:_a.href}}get defaultHeaders(){return{Accept:”text/html, application/xhtml+xml”}}get isSafe(){return this.method===FetchMethod.get}get abortSignal(){return this.abortController.signal}acceptResponseType(mimeType){this.headers.Accept=(mimeType,this.headers.Accept).join(“, “)}allowRequestToBeIntercepted(fetchOptions){return __async$3(this,null,function*(){var requestInterception=new Promise(resolve=>this.resolveRequestPromise=resolve);dispatch(“turbo:before-fetch-request”,{cancelable:!0,detail:{fetchOptions:fetchOptions,url:this.url,resume:this.resolveRequestPromise},target:this.target}).defaultPrevented&&(yield requestInterception)})}willDelegateErrorHandling(error){return!dispatch(“turbo:fetch-request-error”,{target:this.target,cancelable:!0,detail:{request:this,error:error}}).defaultPrevented}}class AppearanceObserver{constructor(delegate,element){this.started=!1,this.intersect=entries=>{entries=entries.slice(-1)(0);null!=entries&&entries.isIntersecting&&this.delegate.elementAppearedInViewport(this.element)},this.delegate=delegate,this.element=element,this.intersectionObserver=new IntersectionObserver(this.intersect)}start(){this.started||(this.started=!0,this.intersectionObserver.observe(this.element))}stop(){this.started&&(this.started=!1,this.intersectionObserver.unobserve(this.element))}}class StreamMessage{static wrap(message){return”string”==typeof message?new this(function createDocumentFragment(html){var template=document.createElement(“template”);return template.innerHTML=html,template.content}(message)):message}constructor(fragment){this.fragment=function importStreamElements(fragment){for(const element of fragment.querySelectorAll(“turbo-stream”)){var streamElement=document.importNode(element,!0);for(const inertScriptElement of streamElement.templateElement.content.querySelectorAll(“script”))inertScriptElement.replaceWith(activateScriptElement(inertScriptElement));element.replaceWith(streamElement)}return fragment}(fragment)}}StreamMessage.contentType=”text/vnd.turbo-stream.html”,(prototype=FormSubmissionState=FormSubmissionState||{})(prototype.initialized=0)=”initialized”,prototype(prototype.requesting=1)=”requesting”,prototype(prototype.waiting=2)=”waiting”,prototype(prototype.receiving=3)=”receiving”,prototype(prototype.stopping=4)=”stopping”,prototype(prototype.stopped=5)=”stopped”,(prototype=FormEnctype=FormEnctype||{}).urlEncoded=”application/x-www-form-urlencoded”,prototype.multipart=”multipart/form-data”,prototype.plain=”text/plain”;class FormSubmission{static confirmMethod(message,_element,_submitter){return Promise.resolve(confirm(message))}constructor(delegate,formElement,submitter,mustRedirect=!1){this.state=FormSubmissionState.initialized,this.delegate=delegate,this.formElement=formElement,this.submitter=submitter,this.formData=function buildFormData(formElement,submitter){var formElement=new FormData(formElement),name=null==submitter?void 0:submitter.getAttribute(“name”),submitter=null==submitter?void 0:submitter.getAttribute(“value”);name&&formElement.append(name,submitter||””);return formElement}(formElement,submitter),this.location=expandURL(this.action),this.method==FetchMethod.get&&function mergeFormDataEntries(url,entries){var searchParams=new URLSearchParams;for(var(name,value)of entries)value instanceof File||searchParams.append(name,value);url.search=searchParams.toString()}(this.location,(…this.body.entries())),this.fetchRequest=new FetchRequest(this,this.method,this.location,this.body,this.formElement),this.mustRedirect=mustRedirect}get method(){var _a;return function fetchMethodFromString(method){switch(method.toLowerCase()){case”get”:return FetchMethod.get;case”post”:return FetchMethod.post;case”put”:return FetchMethod.put;case”patch”:return FetchMethod.patch;case”delete”:return FetchMethod.delete}}(((null==(_a=this.submitter)?void 0:_a.getAttribute(“formmethod”))||this.formElement.getAttribute(“method”)||””).toLowerCase())||FetchMethod.get}get action(){var _a,formElementAction=”string”==typeof this.formElement.action?this.formElement.action:null;return null!=(_a=this.submitter)&&_a.hasAttribute(“formaction”)?this.submitter.getAttribute(“formaction”)||””:this.formElement.getAttribute(“action”)||formElementAction||””}get body(){return this.enctype==FormEnctype.urlEncoded||this.method==FetchMethod.get?new URLSearchParams(this.stringFormData):this.formData}get enctype(){var _a;return function formEnctypeFromString(encoding){switch(encoding.toLowerCase()){case FormEnctype.multipart:return FormEnctype.multipart;case FormEnctype.plain:return FormEnctype.plain;default:return FormEnctype.urlEncoded}}((null==(_a=this.submitter)?void 0:_a.getAttribute(“formenctype”))||this.formElement.enctype)}get isSafe(){return this.fetchRequest.isSafe}get stringFormData(){return(…this.formData).reduce((entries,(name,value))=>entries.concat(“string”==typeof value?((name,value)):()),())}start(){return __async$3(this,null,function*(){var{initialized,requesting}=FormSubmissionState,confirmationMessage=getAttribute(“data-turbo-confirm”,this.submitter,this.formElement);if(“string”==typeof confirmationMessage&&!(yield FormSubmission.confirmMethod(confirmationMessage,this.formElement,this.submitter)))return;if(this.state==initialized)return this.state=requesting,this.fetchRequest.perform()})}stop(){var{stopping,stopped}=FormSubmissionState;if(this.state!=stopping&&this.state!=stopped)return this.state=stopping,this.fetchRequest.cancel(),!0}prepareRequest(request){var token;request.isSafe||(token=function getCookieValue(cookieName){{var cookie;return null!=cookieName&&(cookie=(document.cookie?document.cookie.split(“; “):()).find(cookie2=>cookie2.startsWith(cookieName)))&&(cookie=cookie.split(“=”).slice(1).join(“=”))?decodeURIComponent(cookie):void 0}}(getMetaContent(“csrf-param”))||getMetaContent(“csrf-token”))&&(request.headers(“X-CSRF-Token”)=token),this.requestAcceptsTurboStreamResponse(request)&&request.acceptResponseType(StreamMessage.contentType)}requestStarted(_request){var _a;this.state=FormSubmissionState.waiting,null!=(_a=this.submitter)&&_a.setAttribute(“disabled”,””),this.setSubmitsWith(),dispatch(“turbo:submit-start”,{target:this.formElement,detail:{formSubmission:this}}),this.delegate.formSubmissionStarted(this)}requestPreventedHandlingResponse(request,response){this.result={success:response.succeeded,fetchResponse:response}}requestSucceededWithResponse(request,response){response.clientError||response.serverError?this.delegate.formSubmissionFailedWithResponse(this,response):this.requestMustRedirect(request)&&function responseSucceededWithoutRedirect(response){return 200==response.statusCode&&!response.redirected}(response)?(request=new Error(“Form responses must redirect to another location”),this.delegate.formSubmissionErrored(this,request)):(this.state=FormSubmissionState.receiving,this.result={success:!0,fetchResponse:response},this.delegate.formSubmissionSucceededWithResponse(this,response))}requestFailedWithResponse(request,response){this.result={success:!1,fetchResponse:response},this.delegate.formSubmissionFailedWithResponse(this,response)}requestErrored(request,error){this.result={success:!1,error:error},this.delegate.formSubmissionErrored(this,error)}requestFinished(_request){var _a;this.state=FormSubmissionState.stopped,null!=(_a=this.submitter)&&_a.removeAttribute(“disabled”),this.resetSubmitterText(),dispatch(“turbo:submit-end”,{target:this.formElement,detail:Object.assign({formSubmission:this},this.result)}),this.delegate.formSubmissionFinished(this)}setSubmitsWith(){var input;this.submitter&&this.submitsWith&&(this.submitter.matches(“button”)?(this.originalSubmitText=this.submitter.innerHTML,this.submitter.innerHTML=this.submitsWith):this.submitter.matches(“input”)&&(input=this.submitter,this.originalSubmitText=input.value,input.value=this.submitsWith))}resetSubmitterText(){this.submitter&&this.originalSubmitText&&(this.submitter.matches(“button”)?this.submitter.innerHTML=this.originalSubmitText:this.submitter.matches(“input”)&&(this.submitter.value=this.originalSubmitText))}requestMustRedirect(request){return!request.isSafe&&this.mustRedirect}requestAcceptsTurboStreamResponse(request){return!request.isSafe||function hasAttribute(attributeName,…elements){return elements.some(element=>element&&element.hasAttribute(attributeName))}(“data-turbo-stream”,this.submitter,this.formElement)}get submitsWith(){var _a;return null==(_a=this.submitter)?void 0:_a.getAttribute(“data-turbo-submits-with”)}}class Snapshot{constructor(element){this.element=element}get activeElement(){return this.element.ownerDocument.activeElement}get children(){return(…this.element.children)}hasAnchor(anchor){return null!=this.getElementForAnchor(anchor)}getElementForAnchor(anchor){return anchor?this.element.querySelector(`(id=’${anchor}’), a(name=”${anchor}”)`):null}get isConnected(){return this.element.isConnected}get firstAutofocusableElement(){for(const element of this.element.querySelectorAll(“(autofocus)”))if(null==element.closest(“(inert), :disabled, (hidden), details:not((open)), dialog:not((open))”))return element;return null}get permanentElements(){return queryPermanentElementsAll(this.element)}getPermanentElementById(id){return getPermanentElementById(this.element,id)}getPermanentElementMapForSnapshot(snapshot){var permanentElementMap={};for(const currentPermanentElement of this.permanentElements){var id=currentPermanentElement(“id”),newPermanentElement=snapshot.getPermanentElementById(id);newPermanentElement&&(permanentElementMap(id)=(currentPermanentElement,newPermanentElement))}return permanentElementMap}}function getPermanentElementById(node,id){return node.querySelector(`#${id}(data-turbo-permanent)`)}function queryPermanentElementsAll(node){return node.querySelectorAll(“(id)(data-turbo-permanent)”)}class FormSubmitObserver{constructor(delegate,eventTarget){this.started=!1,this.submitCaptured=()=>{this.eventTarget.removeEventListener(“submit”,this.submitBubbled,!1),this.eventTarget.addEventListener(“submit”,this.submitBubbled,!1)},this.submitBubbled=event=>{var form,submitter;event.defaultPrevented||(form=event.target instanceof HTMLFormElement?event.target:void 0,submitter=event.submitter||void 0,form&&function submissionDoesNotDismissDialog(form,submitter){submitter=(null==submitter?void 0:submitter.getAttribute(“formmethod”))||form.getAttribute(“method”);return”dialog”!=submitter}(form,submitter)&&function submissionDoesNotTargetIFrame(form,submitter){{if(null!=submitter&&submitter.hasAttribute(“formtarget”)||form.hasAttribute(“target”)){submitter=(null==submitter?void 0:submitter.getAttribute(“formtarget”))||form.target;for(const element of document.getElementsByName(submitter))if(element instanceof HTMLIFrameElement)return}return 1}}(form,submitter)&&this.delegate.willSubmitForm(form,submitter)&&(event.preventDefault(),event.stopImmediatePropagation(),this.delegate.formSubmitted(form,submitter)))},this.delegate=delegate,this.eventTarget=eventTarget}start(){this.started||(this.eventTarget.addEventListener(“submit”,this.submitCaptured,!0),this.started=!0)}stop(){this.started&&(this.eventTarget.removeEventListener(“submit”,this.submitCaptured,!0),this.started=!1)}}class View{constructor(delegate,element){this.resolveRenderPromise=_value=>{},this.resolveInterceptionPromise=_value=>{},this.delegate=delegate,this.element=element}scrollToAnchor(anchor){anchor=this.snapshot.getElementForAnchor(anchor);anchor?(this.scrollToElement(anchor),this.focusElement(anchor)):this.scrollToPosition({x:0,y:0})}scrollToAnchorFromLocation(location2){this.scrollToAnchor(getAnchor(location2))}scrollToElement(element){element.scrollIntoView()}focusElement(element){element instanceof HTMLElement&&(element.hasAttribute(“tabindex”)?element.focus():(element.setAttribute(“tabindex”,”-1″),element.focus(),element.removeAttribute(“tabindex”)))}scrollToPosition({x,y}){this.scrollRoot.scrollTo(x,y)}scrollToTop(){this.scrollToPosition({x:0,y:0})}get scrollRoot(){return window}render(renderer){return __async$3(this,null,function*(){var{isPreview,shouldRender,newSnapshot:snapshot}=renderer;if(shouldRender)try{this.renderPromise=new Promise(resolve=>this.resolveRenderPromise=resolve),this.renderer=renderer,yield this.prepareToRenderSnapshot(renderer);var renderInterception=new Promise(resolve=>this.resolveInterceptionPromise=resolve),options={resume:this.resolveInterceptionPromise,render:this.renderer.renderElement};this.delegate.allowsImmediateRender(snapshot,options)||(yield renderInterception),yield this.renderSnapshot(renderer),this.delegate.viewRenderedSnapshot(snapshot,isPreview),this.delegate.preloadOnLoadLinksForView(this.element),this.finishRenderingSnapshot(renderer)}finally{delete this.renderer,this.resolveRenderPromise(void 0),delete this.renderPromise}else this.invalidate(renderer.reloadReason)})}invalidate(reason){this.delegate.viewInvalidated(reason)}prepareToRenderSnapshot(renderer){return __async$3(this,null,function*(){this.markAsPreview(renderer.isPreview),yield renderer.prepareToRender()})}markAsPreview(isPreview){isPreview?this.element.setAttribute(“data-turbo-preview”,””):this.element.removeAttribute(“data-turbo-preview”)}renderSnapshot(renderer){return __async$3(this,null,function*(){yield renderer.render()})}finishRenderingSnapshot(renderer){renderer.finishRendering()}}class FrameView extends View{missing(){this.element.innerHTML=’Content missing‘}get snapshot(){return new Snapshot(this.element)}}class LinkInterceptor{constructor(delegate,element){this.clickBubbled=event=>{this.respondsToEventTarget(event.target)?this.clickEvent=event:delete this.clickEvent},this.linkClicked=event=>{this.clickEvent&&this.respondsToEventTarget(event.target)&&event.target instanceof Element&&this.delegate.shouldInterceptLinkClick(event.target,event.detail.url,event.detail.originalEvent)&&(this.clickEvent.preventDefault(),event.preventDefault(),this.delegate.linkClickIntercepted(event.target,event.detail.url,event.detail.originalEvent)),delete this.clickEvent},this.willVisit=_event=>{delete this.clickEvent},this.delegate=delegate,this.element=element}start(){this.element.addEventListener(“click”,this.clickBubbled),document.addEventListener(“turbo:click”,this.linkClicked),document.addEventListener(“turbo:before-visit”,this.willVisit)}stop(){this.element.removeEventListener(“click”,this.clickBubbled),document.removeEventListener(“turbo:click”,this.linkClicked),document.removeEventListener(“turbo:before-visit”,this.willVisit)}respondsToEventTarget(target){target=target instanceof Element?target:target instanceof Node?target.parentElement:null;return target&&target.closest(“turbo-frame, html”)==this.element}}class LinkClickObserver{constructor(delegate,eventTarget){this.started=!1,this.clickCaptured=()=>{this.eventTarget.removeEventListener(“click”,this.clickBubbled,!1),this.eventTarget.addEventListener(“click”,this.clickBubbled,!1)},this.clickBubbled=event=>{var target,location2;event instanceof MouseEvent&&this.clickEventIsSignificant(event)&&(target=event.composedPath&&event.composedPath()(0)||event.target,(target=this.findLinkFromClickTarget(target))&&function doesNotTargetIFrame(anchor){{if(anchor.hasAttribute(“target”))for(const element of document.getElementsByName(anchor.target))if(element instanceof HTMLIFrameElement)return;return 1}}(target)&&(location2=this.getLocationForLink(target),this.delegate.willFollowLinkToLocation(target,location2,event)&&(event.preventDefault(),this.delegate.followedLinkToLocation(target,location2))))},this.delegate=delegate,this.eventTarget=eventTarget}start(){this.started||(this.eventTarget.addEventListener(“click”,this.clickCaptured,!0),this.started=!0)}stop(){this.started&&(this.eventTarget.removeEventListener(“click”,this.clickCaptured,!0),this.started=!1)}clickEventIsSignificant(event){return!(event.target&&event.target.isContentEditable||event.defaultPrevented||1form.remove(),{once:!0}),requestAnimationFrame(()=>form.requestSubmit())}}class Bardo{static preservingPermanentElements(delegate,permanentElementMap,callback){return __async$3(this,null,function*(){var bardo=new this(delegate,permanentElementMap);bardo.enter(),yield callback(),bardo.leave()})}constructor(delegate,permanentElementMap){this.delegate=delegate,this.permanentElementMap=permanentElementMap}enter(){for(const id in this.permanentElementMap){var(currentPermanentElement,newPermanentElement)=this.permanentElementMap(id);this.delegate.enteringBardo(currentPermanentElement,newPermanentElement),this.replaceNewPermanentElementWithPlaceholder(newPermanentElement)}}leave(){for(const id in this.permanentElementMap){var(currentPermanentElement)=this.permanentElementMap(id);this.replaceCurrentPermanentElementWithClone(currentPermanentElement),this.replacePlaceholderWithPermanentElement(currentPermanentElement),this.delegate.leavingBardo(currentPermanentElement)}}replaceNewPermanentElementWithPlaceholder(permanentElement){var placeholder=function createPlaceholderForPermanentElement(permanentElement){var element=document.createElement(“meta”);return element.setAttribute(“name”,”turbo-permanent-placeholder”),element.setAttribute(“content”,permanentElement.id),element}(permanentElement);permanentElement.replaceWith(placeholder)}replaceCurrentPermanentElementWithClone(permanentElement){var clone=permanentElement.cloneNode(!0);permanentElement.replaceWith(clone)}replacePlaceholderWithPermanentElement(permanentElement){var placeholder=this.getPlaceholderById(permanentElement.id);null!=placeholder&&placeholder.replaceWith(permanentElement)}getPlaceholderById(id){return this.placeholders.find(element=>element.content==id)}get placeholders(){return(…document.querySelectorAll(“meta(name=turbo-permanent-placeholder)(content)”))}}class Renderer{constructor(currentSnapshot,newSnapshot,renderElement,isPreview,willRender=!0){this.activeElement=null,this.currentSnapshot=currentSnapshot,this.newSnapshot=newSnapshot,this.isPreview=isPreview,this.willRender=willRender,this.renderElement=renderElement,this.promise=new Promise((resolve,reject)=>this.resolvingFunctions={resolve:resolve,reject:reject})}get shouldRender(){return!0}get reloadReason(){}prepareToRender(){}finishRendering(){this.resolvingFunctions&&(this.resolvingFunctions.resolve(),delete this.resolvingFunctions)}preservingPermanentElements(callback){return __async$3(this,null,function*(){yield Bardo.preservingPermanentElements(this,this.permanentElementMap,callback)})}focusFirstAutofocusableElement(){var element=this.connectedSnapshot.firstAutofocusableElement;!function elementIsFocusable(element){return element&&”function”==typeof element.focus}(element)||element.focus()}enteringBardo(currentPermanentElement){this.activeElement||currentPermanentElement.contains(this.currentSnapshot.activeElement)&&(this.activeElement=this.currentSnapshot.activeElement)}leavingBardo(currentPermanentElement){currentPermanentElement.contains(this.activeElement)&&this.activeElement instanceof HTMLElement&&(this.activeElement.focus(),this.activeElement=null)}get connectedSnapshot(){return this.newSnapshot.isConnected?this.newSnapshot:this.currentSnapshot}get currentElement(){return this.currentSnapshot.element}get newElement(){return this.newSnapshot.element}get permanentElementMap(){return this.currentSnapshot.getPermanentElementMapForSnapshot(this.newSnapshot)}}class FrameRenderer extends Renderer{static renderElement(currentElement,newElement){var destinationRange=document.createRange(),destinationRange=(destinationRange.selectNodeContents(currentElement),destinationRange.deleteContents(),newElement),newElement=null==(newElement=destinationRange.ownerDocument)?void 0:newElement.createRange();newElement&&(newElement.selectNodeContents(destinationRange),currentElement.appendChild(newElement.extractContents()))}constructor(delegate,currentSnapshot,newSnapshot,renderElement,isPreview,willRender=!0){super(currentSnapshot,newSnapshot,renderElement,isPreview,willRender),this.delegate=delegate}get shouldRender(){return!0}render(){return __async$3(this,null,function*(){yield nextAnimationFrame(),this.preservingPermanentElements(()=>{this.loadFrameElement()}),this.scrollFrameIntoView(),yield nextAnimationFrame(),this.focusFirstAutofocusableElement(),yield nextAnimationFrame(),this.activateScriptElements()})}loadFrameElement(){this.delegate.willRenderFrame(this.currentElement,this.newElement),this.renderElement(this.currentElement,this.newElement)}scrollFrameIntoView(){if(this.currentElement.autoscroll||this.newElement.autoscroll){var element=this.currentElement.firstElementChild,block=function readScrollLogicalPosition(value,defaultValue){return”end”==value||”start”==value||”center”==value||”nearest”==value?value:defaultValue}(this.currentElement.getAttribute(“data-autoscroll-block”),”end”),behavior=function readScrollBehavior(value,defaultValue){return”auto”==value||”smooth”==value?value:defaultValue}(this.currentElement.getAttribute(“data-autoscroll-behavior”),”auto”);if(element)return element.scrollIntoView({block:block,behavior:behavior}),!0}return!1}activateScriptElements(){for(const inertScriptElement of this.newScriptElements){var activatedScriptElement=activateScriptElement(inertScriptElement);inertScriptElement.replaceWith(activatedScriptElement)}}get newScriptElements(){return this.currentElement.querySelectorAll(“script”)}}class ProgressBar{static get defaultCSS(){return unindent`
.turbo-progress-bar {
position: fixed;
display: block;
top: 0;
left: 0;
height: 3px;
background: #0076ff;
z-index: 2147483647;
transition:
width ${ProgressBar.animationDuration}ms ease-out,
opacity ${ProgressBar.animationDuration/2}ms ${ProgressBar.animationDuration/2}ms ease-in;
transform: translate3d(0, 0, 0);
}
`}constructor(){this.hiding=!1,this.value=0,this.visible=!1,this.trickle=()=>{this.setValue(this.value+Math.random()/100)},this.stylesheetElement=this.createStylesheetElement(),this.progressElement=this.createProgressElement(),this.installStylesheetElement(),this.setValue(0)}show(){this.visible||(this.visible=!0,this.installProgressElement(),this.startTrickling())}hide(){this.visible&&!this.hiding&&(this.hiding=!0,this.fadeProgressElement(()=>{this.uninstallProgressElement(),this.stopTrickling(),this.visible=!1,this.hiding=!1}))}setValue(value){this.value=value,this.refresh()}installStylesheetElement(){document.head.insertBefore(this.stylesheetElement,document.head.firstChild)}installProgressElement(){this.progressElement.style.width=”0″,this.progressElement.style.opacity=”1″,document.documentElement.insertBefore(this.progressElement,document.body),this.refresh()}fadeProgressElement(callback){this.progressElement.style.opacity=”0″,setTimeout(callback,1.5*ProgressBar.animationDuration)}uninstallProgressElement(){this.progressElement.parentNode&&document.documentElement.removeChild(this.progressElement)}startTrickling(){this.trickleInterval||(this.trickleInterval=window.setInterval(this.trickle,ProgressBar.animationDuration))}stopTrickling(){window.clearInterval(this.trickleInterval),delete this.trickleInterval}refresh(){requestAnimationFrame(()=>{this.progressElement.style.width=10+90*this.value+”%”})}createStylesheetElement(){var element=document.createElement(“style”);return element.type=”text/css”,element.textContent=ProgressBar.defaultCSS,this.cspNonce&&(element.nonce=this.cspNonce),element}createProgressElement(){var element=document.createElement(“div”);return element.className=”turbo-progress-bar”,element}get cspNonce(){return getMetaContent(“csp-nonce”)}}ProgressBar.animationDuration=300;class HeadSnapshot extends Snapshot{constructor(){super(…arguments),this.detailsByOuterHTML=this.children.filter(element=>!function elementIsNoscript(element){element=element.localName;return”noscript”==element}(element)).map(element=>function elementWithoutNonce(element){element.hasAttribute(“nonce”)&&element.setAttribute(“nonce”,””);return element}(element)).reduce((result,element)=>{var outerHTML=element(“outerHTML”),details=outerHTML in result?result(outerHTML):{type:function elementType(element){return function elementIsScript(element){element=element.localName;return”script”==element}(element)?”script”:function elementIsStylesheet(element){var tagName=element.localName;return”style”==tagName||”link”==tagName&&”stylesheet”==element.getAttribute(“rel”)}(element)?”stylesheet”:void 0}(element),tracked:function elementIsTracked(element){return”reload”==element.getAttribute(“data-turbo-track”)}(element),elements:()};return Object.assign(Object.assign({},result),{(outerHTML):Object.assign(Object.assign({},details),{elements:(…details.elements,element)})})},{})}get trackedElementSignature(){return Object.keys(this.detailsByOuterHTML).filter(outerHTML=>this.detailsByOuterHTML(outerHTML).tracked).join(“”)}getScriptElementsNotInSnapshot(snapshot){return this.getElementsMatchingTypeNotInSnapshot(“script”,snapshot)}getStylesheetElementsNotInSnapshot(snapshot){return this.getElementsMatchingTypeNotInSnapshot(“stylesheet”,snapshot)}getElementsMatchingTypeNotInSnapshot(matchedType,snapshot){return Object.keys(this.detailsByOuterHTML).filter(outerHTML=>!(outerHTML in snapshot.detailsByOuterHTML)).map(outerHTML=>this.detailsByOuterHTML(outerHTML)).filter(({type})=>type==matchedType).map(({elements:(element)})=>element)}get provisionalElements(){return Object.keys(this.detailsByOuterHTML).reduce((result,outerHTML)=>{var{type:outerHTML,tracked,elements}=this.detailsByOuterHTML(outerHTML);return null!=outerHTML||tracked?1{var(outerHTML)=this.detailsByOuterHTML(outerHTML)(“elements”);return function elementIsMetaElementWithName(element,name){var tagName=element.localName;return”meta”==tagName&&element.getAttribute(“name”)==name}(outerHTML,name)?outerHTML:result},void 0)}}class PageSnapshot extends Snapshot{static fromHTMLString(html=””){return this.fromDocument(parseHTMLDocument(html))}static fromElement(element){return this.fromDocument(element.ownerDocument)}static fromDocument({head,body}){return new this(body,new HeadSnapshot(head))}constructor(element,headSnapshot){super(element),this.headSnapshot=headSnapshot}clone(){var index,source,clonedElement=this.element.cloneNode(!0),selectElements=this.element.querySelectorAll(“select”),clonedSelectElements=clonedElement.querySelectorAll(“select”);for((index,source)of selectElements.entries()){var clone=clonedSelectElements(index);for(const option of clone.selectedOptions)option.selected=!1;for(const option of source.selectedOptions)clone.options(option.index).selected=!0}for(const clonedPasswordInput of clonedElement.querySelectorAll(‘input(type=”password”)’))clonedPasswordInput.value=””;return new PageSnapshot(clonedElement,this.headSnapshot)}get headElement(){return this.headSnapshot.element}get rootLocation(){var _a;return expandURL(null!=(_a=this.getSetting(“root”))?_a:”/”)}get cacheControlValue(){return this.getSetting(“cache-control”)}get isPreviewable(){return”no-preview”!=this.cacheControlValue}get isCacheable(){return”no-cache”!=this.cacheControlValue}get isVisitable(){return”reload”!=this.getSetting(“visit-control”)}getSetting(name){return this.headSnapshot.getMetaValue(“turbo-“+name)}}(prototype=TimingMetric=TimingMetric||{}).visitStart=”visitStart”,prototype.requestStart=”requestStart”,prototype.requestEnd=”requestEnd”,prototype.visitEnd=”visitEnd”,(prototype=VisitState=VisitState||{}).initialized=”initialized”,prototype.started=”started”,prototype.canceled=”canceled”,prototype.failed=”failed”;const defaultOptions={action:”advance”,historyChanged:!(prototype.completed=”completed”),visitCachedSnapshot:()=>{},willRender:!0,updateHistory:!0,shouldCacheSnapshot:!0,acceptsStreamResponse:!1};(prototype=SystemStatusCode=SystemStatusCode||{})(prototype.networkFailure=0)=”networkFailure”,prototype(prototype.timeoutFailure=-1)=”timeoutFailure”,prototype(prototype.contentTypeMismatch=-2)=”contentTypeMismatch”;class Visit{constructor(delegate,location2,restorationIdentifier,options={}){this.identifier=uuid(),this.timingMetrics={},this.followedRedirect=!1,this.historyChanged=!1,this.scrolled=!1,this.shouldCacheSnapshot=!0,this.acceptsStreamResponse=!1,this.snapshotCached=!1,this.state=VisitState.initialized,this.delegate=delegate,this.location=location2,this.restorationIdentifier=restorationIdentifier||uuid();var{action:delegate,historyChanged:location2,referrer:restorationIdentifier,snapshot:options,snapshotHTML,response,visitCachedSnapshot,willRender,updateHistory,shouldCacheSnapshot,acceptsStreamResponse}=Object.assign(Object.assign({},defaultOptions),options);this.action=delegate,this.historyChanged=location2,this.referrer=restorationIdentifier,this.snapshot=options,this.snapshotHTML=snapshotHTML,this.response=response,this.isSamePage=this.delegate.locationWithActionIsSamePage(this.location,this.action),this.visitCachedSnapshot=visitCachedSnapshot,this.willRender=willRender,this.updateHistory=updateHistory,this.scrolled=!willRender,this.shouldCacheSnapshot=shouldCacheSnapshot,this.acceptsStreamResponse=acceptsStreamResponse}get adapter(){return this.delegate.adapter}get view(){return this.delegate.view}get history(){return this.delegate.history}get restorationData(){return this.history.getRestorationDataForIdentifier(this.restorationIdentifier)}get silent(){return this.isSamePage}start(){this.state==VisitState.initialized&&(this.recordTimingMetric(TimingMetric.visitStart),this.state=VisitState.started,this.adapter.visitStarted(this),this.delegate.visitStarted(this))}cancel(){this.state==VisitState.started&&(this.request&&this.request.cancel(),this.cancelRender(),this.state=VisitState.canceled)}complete(){this.state==VisitState.started&&(this.recordTimingMetric(TimingMetric.visitEnd),this.state=VisitState.completed,this.followRedirect(),this.followedRedirect||(this.adapter.visitCompleted(this),this.delegate.visitCompleted(this)))}fail(){this.state==VisitState.started&&(this.state=VisitState.failed,this.adapter.visitFailed(this))}changeHistory(){var _a;!this.historyChanged&&this.updateHistory&&(_a=getHistoryMethodForAction(this.location.href===(null==(_a=this.referrer)?void 0:_a.href)?”replace”:this.action),this.history.update(_a,this.location,this.restorationIdentifier),this.historyChanged=!0)}issueRequest(){this.hasPreloadedResponse()?this.simulateRequest():this.shouldIssueRequest()&&!this.request&&(this.request=new FetchRequest(this,FetchMethod.get,this.location),this.request.perform())}simulateRequest(){this.response&&(this.startRequest(),this.recordResponse(),this.finishRequest())}startRequest(){this.recordTimingMetric(TimingMetric.requestStart),this.adapter.visitRequestStarted(this)}recordResponse(response=this.response){(this.response=response)&&(response=response(“statusCode”),isSuccessful(response)?this.adapter.visitRequestCompleted(this):this.adapter.visitRequestFailedWithStatusCode(this,response))}finishRequest(){this.recordTimingMetric(TimingMetric.requestEnd),this.adapter.visitRequestFinished(this)}loadResponse(){if(this.response){const{statusCode,responseHTML}=this.response;this.render(()=>__async$3(this,null,function*(){this.shouldCacheSnapshot&&this.cacheSnapshot(),this.view.renderPromise&&(yield this.view.renderPromise),isSuccessful(statusCode)&&null!=responseHTML?(yield this.view.renderPage(PageSnapshot.fromHTMLString(responseHTML),!1,this.willRender,this),this.performScroll(),this.adapter.visitRendered(this),this.complete()):(yield this.view.renderError(PageSnapshot.fromHTMLString(responseHTML),this),this.adapter.visitRendered(this),this.fail())}))}}getCachedSnapshot(){var snapshot=this.view.getCachedSnapshotForLocation(this.location)||this.getPreloadedSnapshot();if(snapshot&&(!getAnchor(this.location)||snapshot.hasAnchor(getAnchor(this.location)))&&(“restore”==this.action||snapshot.isPreviewable))return snapshot}getPreloadedSnapshot(){if(this.snapshotHTML)return PageSnapshot.fromHTMLString(this.snapshotHTML)}hasCachedSnapshot(){return null!=this.getCachedSnapshot()}loadCachedSnapshot(){const snapshot=this.getCachedSnapshot();if(snapshot){const isPreview=this.shouldIssueRequest();this.render(()=>__async$3(this,null,function*(){this.cacheSnapshot(),this.isSamePage?this.adapter.visitRendered(this):(this.view.renderPromise&&(yield this.view.renderPromise),yield this.view.renderPage(snapshot,isPreview,this.willRender,this),this.performScroll(),this.adapter.visitRendered(this),isPreview||this.complete())}))}}followRedirect(){var _a;this.redirectedToLocation&&!this.followedRedirect&&null!=(_a=this.response)&&_a.redirected&&(this.adapter.visitProposedToLocation(this.redirectedToLocation,{action:”replace”,response:this.response,shouldCacheSnapshot:!1,willRender:!1}),this.followedRedirect=!0)}goToSamePageAnchor(){this.isSamePage&&this.render(()=>__async$3(this,null,function*(){this.cacheSnapshot(),this.performScroll(),this.changeHistory(),this.adapter.visitRendered(this)}))}prepareRequest(request){this.acceptsStreamResponse&&request.acceptResponseType(StreamMessage.contentType)}requestStarted(){this.startRequest()}requestPreventedHandlingResponse(_request,_response){}requestSucceededWithResponse(request,response){return __async$3(this,null,function*(){var responseHTML=yield response.responseHTML,{redirected,statusCode}=response;null==responseHTML?this.recordResponse({statusCode:SystemStatusCode.contentTypeMismatch,redirected:redirected}):(this.redirectedToLocation=response.redirected?response.location:void 0,this.recordResponse({statusCode:statusCode,responseHTML:responseHTML,redirected:redirected}))})}requestFailedWithResponse(request,response){return __async$3(this,null,function*(){var responseHTML=yield response.responseHTML,{redirected,statusCode}=response;null==responseHTML?this.recordResponse({statusCode:SystemStatusCode.contentTypeMismatch,redirected:redirected}):this.recordResponse({statusCode:statusCode,responseHTML:responseHTML,redirected:redirected})})}requestErrored(_request,_error){this.recordResponse({statusCode:SystemStatusCode.networkFailure,redirected:!1})}requestFinished(){this.finishRequest()}performScroll(){this.scrolled||this.view.forceReloaded||(“restore”==this.action?this.scrollToRestoredPosition()||this.scrollToAnchor()||this.view.scrollToTop():this.scrollToAnchor()||this.view.scrollToTop(),this.isSamePage&&this.delegate.visitScrolledToSamePageLocation(this.view.lastRenderedLocation,this.location),this.scrolled=!0)}scrollToRestoredPosition(){var scrollPosition=this.restorationData(“scrollPosition”);if(scrollPosition)return this.view.scrollToPosition(scrollPosition),!0}scrollToAnchor(){var anchor=getAnchor(this.location);if(null!=anchor)return this.view.scrollToAnchor(anchor),!0}recordTimingMetric(metric){this.timingMetrics(metric)=(new Date).getTime()}getTimingMetrics(){return Object.assign({},this.timingMetrics)}getHistoryMethodForAction(action){switch(action){case”replace”:return history.replaceState;case”advance”:case”restore”:return history.pushState}}hasPreloadedResponse(){return”object”==typeof this.response}shouldIssueRequest(){return!this.isSamePage&&(“restore”==this.action?!this.hasCachedSnapshot():this.willRender)}cacheSnapshot(){this.snapshotCached||(this.view.cacheSnapshot(this.snapshot).then(snapshot=>snapshot&&this.visitCachedSnapshot(snapshot)),this.snapshotCached=!0)}render(callback){return __async$3(this,null,function*(){this.cancelRender(),yield new Promise(resolve=>{this.frame=requestAnimationFrame(()=>resolve())}),yield callback(),delete this.frame})}cancelRender(){this.frame&&(cancelAnimationFrame(this.frame),delete this.frame)}}function isSuccessful(statusCode){return 200<=statusCode&&statusCode{this.progressBar.show()},this.session=session2}visitProposedToLocation(location2,options){this.navigator.startVisit(location2,(null==options?void 0:options.restorationIdentifier)||uuid(),options)}visitStarted(visit2){this.location=visit2.location,visit2.loadCachedSnapshot(),visit2.issueRequest(),visit2.goToSamePageAnchor()}visitRequestStarted(visit2){this.progressBar.setValue(0),visit2.hasCachedSnapshot()||”restore”!=visit2.action?this.showVisitProgressBarAfterDelay():this.showProgressBar()}visitRequestCompleted(visit2){visit2.loadResponse()}visitRequestFailedWithStatusCode(visit2,statusCode){switch(statusCode){case SystemStatusCode.networkFailure:case SystemStatusCode.timeoutFailure:case SystemStatusCode.contentTypeMismatch:return this.reload({reason:”request_failed”,context:{statusCode:statusCode}});default:return visit2.loadResponse()}}visitRequestFinished(_visit){this.progressBar.setValue(1),this.hideVisitProgressBar()}visitCompleted(_visit){}pageInvalidated(reason){this.reload(reason)}visitFailed(_visit){}visitRendered(_visit){}formSubmissionStarted(_formSubmission){this.progressBar.setValue(0),this.showFormProgressBarAfterDelay()}formSubmissionFinished(_formSubmission){this.progressBar.setValue(1),this.hideFormProgressBar()}showVisitProgressBarAfterDelay(){this.visitProgressBarTimeout=window.setTimeout(this.showProgressBar,this.session.progressBarDelay)}hideVisitProgressBar(){this.progressBar.hide(),null!=this.visitProgressBarTimeout&&(window.clearTimeout(this.visitProgressBarTimeout),delete this.visitProgressBarTimeout)}showFormProgressBarAfterDelay(){null==this.formProgressBarTimeout&&(this.formProgressBarTimeout=window.setTimeout(this.showProgressBar,this.session.progressBarDelay))}hideFormProgressBar(){this.progressBar.hide(),null!=this.formProgressBarTimeout&&(window.clearTimeout(this.formProgressBarTimeout),delete this.formProgressBarTimeout)}reload(reason){dispatch(“turbo:reload”,{detail:reason}),window.location.href=(null==(reason=this.location)?void 0:reason.toString())||window.location.href}get navigator(){return this.session.navigator}}class CacheObserver{constructor(){this.selector=”(data-turbo-temporary)”,this.deprecatedSelector=”(data-turbo-cache=false)”,this.started=!1,this.removeTemporaryElements=_event=>{for(const element of this.temporaryElements)element.remove()}}start(){this.started||(this.started=!0,addEventListener(“turbo:before-cache”,this.removeTemporaryElements,!1))}stop(){this.started&&(this.started=!1,removeEventListener(“turbo:before-cache”,this.removeTemporaryElements,!1))}get temporaryElements(){return(…document.querySelectorAll(this.selector),…this.temporaryElementsWithDeprecation)}get temporaryElementsWithDeprecation(){var elements=document.querySelectorAll(this.deprecatedSelector);return elements.length&&console.warn(`The ${this.deprecatedSelector} selector is deprecated and will be removed in a future version. Use ${this.selector} instead.`),(…elements)}}class FrameRedirector{constructor(session2,element){this.session=session2,this.element=element,this.linkInterceptor=new LinkInterceptor(this,element),this.formSubmitObserver=new FormSubmitObserver(this,element)}start(){this.linkInterceptor.start(),this.formSubmitObserver.start()}stop(){this.linkInterceptor.stop(),this.formSubmitObserver.stop()}shouldInterceptLinkClick(element,_location,_event){return this.shouldRedirect(element)}linkClickIntercepted(element,url,event){var frame=this.findFrameElement(element);frame&&frame.delegate.linkClickIntercepted(element,url,event)}willSubmitForm(element,submitter){return null==element.closest(“turbo-frame”)&&this.shouldSubmit(element,submitter)&&this.shouldRedirect(element,submitter)}formSubmitted(element,submitter){var frame=this.findFrameElement(element,submitter);frame&&frame.delegate.formSubmitted(element,submitter)}shouldSubmit(form,submitter){var action=getAction(form,submitter),meta=this.element.ownerDocument.querySelector(‘meta(name=”turbo-root”)’),meta=expandURL(null!=(meta=null==meta?void 0:meta.content)?meta:”/”);return this.shouldRedirect(form,submitter)&&locationIsVisitable(action,meta)}shouldRedirect(element,submitter){return!!(element instanceof HTMLFormElement?this.session.submissionIsNavigatable(element,submitter):this.session.elementIsNavigatable(element))&&(!!(submitter=this.findFrameElement(element,submitter))&&submitter!=element.closest(“turbo-frame”))}findFrameElement(element,submitter){submitter=(null==submitter?void 0:submitter.getAttribute(“data-turbo-frame”))||element.getAttribute(“data-turbo-frame”);if(submitter&&”_top”!=submitter){element=this.element.querySelector(`#${submitter}:not((disabled))`);if(element instanceof FrameElement)return element}}}class History{constructor(delegate){this.restorationIdentifier=uuid(),this.restorationData={},this.started=!1,this.pageLoaded=!1,this.onPopState=event=>{this.shouldHandlePopState()&&(event=(event.state||{})(“turbo”),event&&(this.location=new URL(window.location.href),event=event(“restorationIdentifier”),this.restorationIdentifier=event,this.delegate.historyPoppedToLocationWithRestorationIdentifier(this.location,event)))},this.onPageLoad=_event=>__async$3(this,null,function*(){yield function nextMicrotask(){return Promise.resolve()}(),this.pageLoaded=!0}),this.delegate=delegate}start(){this.started||(addEventListener(“popstate”,this.onPopState,!1),addEventListener(“load”,this.onPageLoad,!1),this.started=!0,this.replace(new URL(window.location.href)))}stop(){this.started&&(removeEventListener(“popstate”,this.onPopState,!1),removeEventListener(“load”,this.onPageLoad,!1),this.started=!1)}push(location2,restorationIdentifier){this.update(history.pushState,location2,restorationIdentifier)}replace(location2,restorationIdentifier){this.update(history.replaceState,location2,restorationIdentifier)}update(method,location2,restorationIdentifier=uuid()){method.call(history,{turbo:{restorationIdentifier:restorationIdentifier}},””,location2.href),this.location=location2,this.restorationIdentifier=restorationIdentifier}getRestorationDataForIdentifier(restorationIdentifier){return this.restorationData(restorationIdentifier)||{}}updateRestorationData(additionalData){var restorationIdentifier=this(“restorationIdentifier”),restorationData=this.restorationData(restorationIdentifier);this.restorationData(restorationIdentifier)=Object.assign(Object.assign({},restorationData),additionalData)}assumeControlOfScrollRestoration(){var _a;this.previousScrollRestoration||(this.previousScrollRestoration=null!=(_a=history.scrollRestoration)?_a:”auto”,history.scrollRestoration=”manual”)}relinquishControlOfScrollRestoration(){this.previousScrollRestoration&&(history.scrollRestoration=this.previousScrollRestoration,delete this.previousScrollRestoration)}shouldHandlePopState(){return this.pageIsLoaded()}pageIsLoaded(){return this.pageLoaded||”complete”==document.readyState}}class Navigator{constructor(delegate){this.delegate=delegate}proposeVisit(location2,options={}){this.delegate.allowsVisitingLocationWithAction(location2,options.action)&&(locationIsVisitable(location2,this.view.snapshot.rootLocation)?this.delegate.visitProposedToLocation(location2,options):window.location.href=location2.toString())}startVisit(locatable,restorationIdentifier,options={}){this.stop(),this.currentVisit=new Visit(this,expandURL(locatable),restorationIdentifier,Object.assign({referrer:this.location},options)),this.currentVisit.start()}submitForm(form,submitter){this.stop(),this.formSubmission=new FormSubmission(this,form,submitter,!0),this.formSubmission.start()}stop(){this.formSubmission&&(this.formSubmission.stop(),delete this.formSubmission),this.currentVisit&&(this.currentVisit.cancel(),delete this.currentVisit)}get adapter(){return this.delegate.adapter}get view(){return this.delegate.view}get history(){return this.delegate.history}formSubmissionStarted(formSubmission){“function”==typeof this.adapter.formSubmissionStarted&&this.adapter.formSubmissionStarted(formSubmission)}formSubmissionSucceededWithResponse(formSubmission,fetchResponse){return __async$3(this,null,function*(){var responseHTML,shouldCacheSnapshot,statusCode,redirected,action;formSubmission==this.formSubmission&&(responseHTML=yield fetchResponse.responseHTML)&&({statusCode,redirected}=((shouldCacheSnapshot=formSubmission.isSafe)||this.view.clearSnapshotCache(),fetchResponse),action=this.getActionForFormSubmission(formSubmission),this.proposeVisit(fetchResponse.location,{action:action,shouldCacheSnapshot:shouldCacheSnapshot,response:{statusCode:statusCode,responseHTML:responseHTML,redirected:redirected}}))})}formSubmissionFailedWithResponse(formSubmission,fetchResponse){return __async$3(this,null,function*(){var responseHTML=yield fetchResponse.responseHTML;responseHTML&&(responseHTML=PageSnapshot.fromHTMLString(responseHTML),fetchResponse.serverError?yield this.view.renderError(responseHTML,this.currentVisit):yield this.view.renderPage(responseHTML,!1,!0,this.currentVisit),this.view.scrollToTop(),this.view.clearSnapshotCache())})}formSubmissionErrored(formSubmission,error){console.error(error)}formSubmissionFinished(formSubmission){“function”==typeof this.adapter.formSubmissionFinished&&this.adapter.formSubmissionFinished(formSubmission)}visitStarted(visit2){this.delegate.visitStarted(visit2)}visitCompleted(visit2){this.delegate.visitCompleted(visit2)}locationWithActionIsSamePage(location2,action){var anchor=getAnchor(location2),currentAnchor=getAnchor(this.view.lastRenderedLocation),isRestorationToTop=”restore”===action&&void 0===anchor;return”replace”!==action&&getRequestURL(location2)===getRequestURL(this.view.lastRenderedLocation)&&(isRestorationToTop||null!=anchor&&anchor!==currentAnchor)}visitScrolledToSamePageLocation(oldURL,newURL){this.delegate.visitScrolledToSamePageLocation(oldURL,newURL)}get location(){return this.history.location}get restorationIdentifier(){return this.history.restorationIdentifier}getActionForFormSubmission({submitter,formElement}){return getVisitAction(submitter,formElement)||”advance”}}(prototype=PageStage=PageStage||{})(prototype.initial=0)=”initial”,prototype(prototype.loading=1)=”loading”,prototype(prototype.interactive=2)=”interactive”,prototype(prototype.complete=3)=”complete”;class PageObserver{constructor(delegate){this.stage=PageStage.initial,this.started=!1,this.interpretReadyState=()=>{var readyState=this(“readyState”);”interactive”==readyState?this.pageIsInteractive():”complete”==readyState&&this.pageIsComplete()},this.pageWillUnload=()=>{this.delegate.pageWillUnload()},this.delegate=delegate}start(){this.started||(this.stage==PageStage.initial&&(this.stage=PageStage.loading),document.addEventListener(“readystatechange”,this.interpretReadyState,!1),addEventListener(“pagehide”,this.pageWillUnload,!1),this.started=!0)}stop(){this.started&&(document.removeEventListener(“readystatechange”,this.interpretReadyState,!1),removeEventListener(“pagehide”,this.pageWillUnload,!1),this.started=!1)}pageIsInteractive(){this.stage==PageStage.loading&&(this.stage=PageStage.interactive,this.delegate.pageBecameInteractive())}pageIsComplete(){this.pageIsInteractive(),this.stage==PageStage.interactive&&(this.stage=PageStage.complete,this.delegate.pageLoaded())}get readyState(){return document.readyState}}class ScrollObserver{constructor(delegate){this.started=!1,this.onScroll=()=>{this.updatePosition({x:window.pageXOffset,y:window.pageYOffset})},this.delegate=delegate}start(){this.started||(addEventListener(“scroll”,this.onScroll,!1),this.onScroll(),this.started=!0)}stop(){this.started&&(removeEventListener(“scroll”,this.onScroll,!1),this.started=!1)}updatePosition(position){this.delegate.scrollPositionChanged(position)}}class StreamMessageRenderer{render({fragment}){Bardo.preservingPermanentElements(this,function getPermanentElementMapForFragment(fragment){var permanentElementsInDocument=queryPermanentElementsAll(document.documentElement),permanentElementMap={};for(const permanentElementInDocument of permanentElementsInDocument){var id=permanentElementInDocument(“id”);for(const streamElement of fragment.querySelectorAll(“turbo-stream”)){var elementInStream=getPermanentElementById(streamElement.templateElement.content,id);elementInStream&&(permanentElementMap(id)=(permanentElementInDocument,elementInStream))}}return permanentElementMap}(fragment),()=>document.documentElement.appendChild(fragment))}enteringBardo(currentPermanentElement,newPermanentElement){newPermanentElement.replaceWith(currentPermanentElement.cloneNode(!0))}leavingBardo(){}}class StreamObserver{constructor(delegate){this.sources=new Set,this.started=!1,this.inspectFetchResponse=event=>{var response=function fetchResponseFromEvent(event){event=null==(event=event.detail)?void 0:event.fetchResponse;if(event instanceof FetchResponse)return event}(event);response&&function fetchResponseIsStream(response){response=null!=(response=response.contentType)?response:””;return response.startsWith(StreamMessage.contentType)}(response)&&(event.preventDefault(),this.receiveMessageResponse(response))},this.receiveMessageEvent=event=>{this.started&&”string”==typeof event.data&&this.receiveMessageHTML(event.data)},this.delegate=delegate}start(){this.started||(this.started=!0,addEventListener(“turbo:before-fetch-response”,this.inspectFetchResponse,!1))}stop(){this.started&&(this.started=!1,removeEventListener(“turbo:before-fetch-response”,this.inspectFetchResponse,!1))}connectStreamSource(source){this.streamSourceIsConnected(source)||(this.sources.add(source),source.addEventListener(“message”,this.receiveMessageEvent,!1))}disconnectStreamSource(source){this.streamSourceIsConnected(source)&&(this.sources.delete(source),source.removeEventListener(“message”,this.receiveMessageEvent,!1))}streamSourceIsConnected(source){return this.sources.has(source)}receiveMessageResponse(response){return __async$3(this,null,function*(){var html=yield response.responseHTML;html&&this.receiveMessageHTML(html)})}receiveMessageHTML(html){this.delegate.receivedMessageFromStream(StreamMessage.wrap(html))}}class ErrorRenderer extends Renderer{static renderElement(currentElement,newElement){var{documentElement,body}=document;documentElement.replaceChild(newElement,body)}render(){return __async$3(this,null,function*(){this.replaceHeadAndBody(),this.activateScriptElements()})}replaceHeadAndBody(){var{documentElement,head}=document;documentElement.replaceChild(this.newHead,head),this.renderElement(this.currentElement,this.newElement)}activateScriptElements(){for(const replaceableElement of this.scriptElements){var element,parentNode=replaceableElement.parentNode;parentNode&&(element=activateScriptElement(replaceableElement),parentNode.replaceChild(element,replaceableElement))}}get newHead(){return this.newSnapshot.headSnapshot.element}get scriptElements(){return document.documentElement.querySelectorAll(“script”)}}class PageRenderer extends Renderer{static renderElement(currentElement,newElement){document.body&&newElement instanceof HTMLBodyElement?document.body.replaceWith(newElement):document.documentElement.appendChild(newElement)}get shouldRender(){return this.newSnapshot.isVisitable&&this.trackedElementsAreIdentical}get reloadReason(){return this.newSnapshot.isVisitable?this.trackedElementsAreIdentical?void 0:{reason:”tracked_element_mismatch”}:{reason:”turbo_visit_control_is_reload”}}prepareToRender(){return __async$3(this,null,function*(){yield this.mergeHead()})}render(){return __async$3(this,null,function*(){this.willRender&&(yield this.replaceBody())})}finishRendering(){super.finishRendering(),this.isPreview||this.focusFirstAutofocusableElement()}get currentHeadSnapshot(){return this.currentSnapshot.headSnapshot}get newHeadSnapshot(){return this.newSnapshot.headSnapshot}get newElement(){return this.newSnapshot.element}mergeHead(){return __async$3(this,null,function*(){var mergedHeadElements=this.mergeProvisionalElements(),newStylesheetElements=this.copyNewHeadStylesheetElements();this.copyNewHeadScriptElements(),yield mergedHeadElements,yield newStylesheetElements})}replaceBody(){return __async$3(this,null,function*(){yield this.preservingPermanentElements(()=>__async$3(this,null,function*(){this.activateNewBody(),yield this.assignNewBody()}))})}get trackedElementsAreIdentical(){return this.currentHeadSnapshot.trackedElementSignature==this.newHeadSnapshot.trackedElementSignature}copyNewHeadStylesheetElements(){return __async$3(this,null,function*(){var loadingElements=();for(const element of this.newHeadStylesheetElements)loadingElements.push(function waitForLoad(element,timeoutInMilliseconds=2e3){return new Promise(resolve=>{const onComplete=()=>{element.removeEventListener(“error”,onComplete),element.removeEventListener(“load”,onComplete),resolve()};element.addEventListener(“load”,onComplete,{once:!0}),element.addEventListener(“error”,onComplete,{once:!0}),setTimeout(resolve,timeoutInMilliseconds)})}(element)),document.head.appendChild(element);yield Promise.all(loadingElements)})}copyNewHeadScriptElements(){for(const element of this.newHeadScriptElements)document.head.appendChild(activateScriptElement(element))}mergeProvisionalElements(){return __async$3(this,null,function*(){var newHeadElements=(…this.newHeadProvisionalElements);for(const element of this.currentHeadProvisionalElements)this.isCurrentElementInElementList(element,newHeadElements)||document.head.removeChild(element);for(const element of newHeadElements)document.head.appendChild(element)})}isCurrentElementInElementList(element,elementList){for(var(index,newElement)of elementList.entries()){if(“TITLE”==element.tagName){if(“TITLE”!=newElement.tagName)continue;if(element.innerHTML==newElement.innerHTML)return elementList.splice(index,1),!0}if(newElement.isEqualNode(element))return elementList.splice(index,1),!0}return!1}removeCurrentHeadProvisionalElements(){for(const element of this.currentHeadProvisionalElements)document.head.removeChild(element)}copyNewHeadProvisionalElements(){for(const element of this.newHeadProvisionalElements)document.head.appendChild(element)}activateNewBody(){document.adoptNode(this.newElement),this.activateNewBodyScriptElements()}activateNewBodyScriptElements(){for(const inertScriptElement of this.newBodyScriptElements){var activatedScriptElement=activateScriptElement(inertScriptElement);inertScriptElement.replaceWith(activatedScriptElement)}}assignNewBody(){return __async$3(this,null,function*(){yield this.renderElement(this.currentElement,this.newElement)})}get newHeadStylesheetElements(){return this.newHeadSnapshot.getStylesheetElementsNotInSnapshot(this.currentHeadSnapshot)}get newHeadScriptElements(){return this.newHeadSnapshot.getScriptElementsNotInSnapshot(this.currentHeadSnapshot)}get currentHeadProvisionalElements(){return this.currentHeadSnapshot.provisionalElements}get newHeadProvisionalElements(){return this.newHeadSnapshot.provisionalElements}get newBodyScriptElements(){return this.newElement.querySelectorAll(“script”)}}class SnapshotCache{constructor(size){this.keys=(),this.snapshots={},this.size=size}has(location2){return toCacheKey(location2)in this.snapshots}get(location2){var snapshot;if(this.has(location2))return snapshot=this.read(location2),this.touch(location2),snapshot}put(location2,snapshot){return this.write(location2,snapshot),this.touch(location2),snapshot}clear(){this.snapshots={}}read(location2){return this.snapshots(toCacheKey(location2))}write(location2,snapshot){this.snapshots(toCacheKey(location2))=snapshot}touch(location2){var location2=toCacheKey(location2),index=this.keys.indexOf(location2);-1setTimeout(()=>resolve(),0))}(),snapshot=snapshot.clone(),this.snapshotCache.put(location2,snapshot),snapshot})}getCachedSnapshotForLocation(location2){return this.snapshotCache.get(location2)}get snapshot(){return PageSnapshot.fromElement(this.element)}}class Preloader{constructor(delegate){this.selector=”a(data-turbo-preload)”,this.delegate=delegate}get snapshotCache(){return this.delegate.navigator.view.snapshotCache}start(){if(“loading”===document.readyState)return document.addEventListener(“DOMContentLoaded”,()=>{this.preloadOnLoadLinksForView(document.body)});this.preloadOnLoadLinksForView(document.body)}preloadOnLoadLinksForView(element){for(const link of element.querySelectorAll(this.selector))this.preloadURL(link)}preloadURL(link){return __async$3(this,null,function*(){var location2=new URL(link.href);if(!this.snapshotCache.has(location2))try{var responseText=yield(yield fetch(location2.toString(),{headers:{“VND.PREFETCH”:”true”,Accept:”text/html”}})).text(),snapshot=PageSnapshot.fromHTMLString(responseText);this.snapshotCache.put(location2,snapshot)}catch(_){}})}}function extendURLWithDeprecatedProperties(url){Object.defineProperties(url,deprecatedLocationPropertyDescriptors)}const deprecatedLocationPropertyDescriptors={absoluteURL:{get(){return this.toString()}}};const StreamActions={after(){this.targetElements.forEach(e=>{var _a;return null==(_a=e.parentElement)?void 0:_a.insertBefore(this.templateContent,e.nextSibling)})},append(){this.removeDuplicateTargetChildren(),this.targetElements.forEach(e=>e.append(this.templateContent))},before(){this.targetElements.forEach(e=>{var _a;return null==(_a=e.parentElement)?void 0:_a.insertBefore(this.templateContent,e)})},prepend(){this.removeDuplicateTargetChildren(),this.targetElements.forEach(e=>e.prepend(this.templateContent))},remove(){this.targetElements.forEach(e=>e.remove())},replace(){this.targetElements.forEach(e=>e.replaceWith(this.templateContent))},update(){this.targetElements.forEach(targetElement=>{targetElement.innerHTML=””,targetElement.append(this.templateContent)})}},session=new class Session{constructor(){this.navigator=new Navigator(this),this.history=new History(this),this.preloader=new Preloader(this),this.view=new PageView(this,document.documentElement),this.adapter=new BrowserAdapter(this),this.pageObserver=new PageObserver(this),this.cacheObserver=new CacheObserver,this.linkClickObserver=new LinkClickObserver(this,window),this.formSubmitObserver=new FormSubmitObserver(this,document),this.scrollObserver=new ScrollObserver(this),this.streamObserver=new StreamObserver(this),this.formLinkClickObserver=new FormLinkClickObserver(this,document.documentElement),this.frameRedirector=new FrameRedirector(this,document.documentElement),this.streamMessageRenderer=new StreamMessageRenderer,this.drive=!0,this.enabled=!0,this.progressBarDelay=500,this.started=!1,this.formMode=”on”}start(){this.started||(this.pageObserver.start(),this.cacheObserver.start(),this.formLinkClickObserver.start(),this.linkClickObserver.start(),this.formSubmitObserver.start(),this.scrollObserver.start(),this.streamObserver.start(),this.frameRedirector.start(),this.history.start(),this.preloader.start(),this.started=!0,this.enabled=!0)}disable(){this.enabled=!1}stop(){this.started&&(this.pageObserver.stop(),this.cacheObserver.stop(),this.formLinkClickObserver.stop(),this.linkClickObserver.stop(),this.formSubmitObserver.stop(),this.scrollObserver.stop(),this.streamObserver.stop(),this.frameRedirector.stop(),this.history.stop(),this.started=!1)}registerAdapter(adapter){this.adapter=adapter}visit(location2,options={}){var frameElement=options.frame?document.getElementById(options.frame):null;frameElement instanceof FrameElement?(frameElement.src=location2.toString(),frameElement.loaded):this.navigator.proposeVisit(expandURL(location2),options)}connectStreamSource(source){this.streamObserver.connectStreamSource(source)}disconnectStreamSource(source){this.streamObserver.disconnectStreamSource(source)}renderStreamMessage(message){this.streamMessageRenderer.render(StreamMessage.wrap(message))}clearCache(){this.view.clearSnapshotCache()}setProgressBarDelay(delay){this.progressBarDelay=delay}setFormMode(mode){this.formMode=mode}get location(){return this.history.location}get restorationIdentifier(){return this.history.restorationIdentifier}historyPoppedToLocationWithRestorationIdentifier(location2,restorationIdentifier){this.enabled?this.navigator.startVisit(location2,restorationIdentifier,{action:”restore”,historyChanged:!0}):this.adapter.pageInvalidated({reason:”turbo_disabled”})}scrollPositionChanged(position){this.history.updateRestorationData({scrollPosition:position})}willSubmitFormLinkToLocation(link,location2){return this.elementIsNavigatable(link)&&locationIsVisitable(location2,this.snapshot.rootLocation)}submittedFormLinkToLocation(){}willFollowLinkToLocation(link,location2,event){return this.elementIsNavigatable(link)&&locationIsVisitable(location2,this.snapshot.rootLocation)&&this.applicationAllowsFollowingLinkToLocation(link,location2,event)}followedLinkToLocation(link,location2){var action=this.getActionForLink(link),link=link.hasAttribute(“data-turbo-stream”);this.visit(location2.href,{action:action,acceptsStreamResponse:link})}allowsVisitingLocationWithAction(location2,action){return this.locationWithActionIsSamePage(location2,action)||this.applicationAllowsVisitingLocation(location2)}visitProposedToLocation(location2,options){extendURLWithDeprecatedProperties(location2),this.adapter.visitProposedToLocation(location2,options)}visitStarted(visit2){visit2.acceptsStreamResponse||markAsBusy(document.documentElement),extendURLWithDeprecatedProperties(visit2.location),visit2.silent||this.notifyApplicationAfterVisitingLocation(visit2.location,visit2.action)}visitCompleted(visit2){clearBusyState(document.documentElement),this.notifyApplicationAfterPageLoad(visit2.getTimingMetrics())}locationWithActionIsSamePage(location2,action){return this.navigator.locationWithActionIsSamePage(location2,action)}visitScrolledToSamePageLocation(oldURL,newURL){this.notifyApplicationAfterVisitingSamePageLocation(oldURL,newURL)}willSubmitForm(form,submitter){var action=getAction(form,submitter);return this.submissionIsNavigatable(form,submitter)&&locationIsVisitable(expandURL(action),this.snapshot.rootLocation)}formSubmitted(form,submitter){this.navigator.submitForm(form,submitter)}pageBecameInteractive(){this.view.lastRenderedLocation=this.location,this.notifyApplicationAfterPageLoad()}pageLoaded(){this.history.assumeControlOfScrollRestoration()}pageWillUnload(){this.history.relinquishControlOfScrollRestoration()}receivedMessageFromStream(message){this.renderStreamMessage(message)}viewWillCacheSnapshot(){var _a;null!=(_a=this.navigator.currentVisit)&&_a.silent||this.notifyApplicationBeforeCachingSnapshot()}allowsImmediateRender({element},options){var{defaultPrevented:element,detail:{render:options}}=this.notifyApplicationBeforeRender(element,options);return this.view.renderer&&options&&(this.view.renderer.renderElement=options),!element}viewRenderedSnapshot(_snapshot,_isPreview){this.view.lastRenderedLocation=this.history.location,this.notifyApplicationAfterRender()}preloadOnLoadLinksForView(element){this.preloader.preloadOnLoadLinksForView(element)}viewInvalidated(reason){this.adapter.pageInvalidated(reason)}frameLoaded(frame){this.notifyApplicationAfterFrameLoad(frame)}frameRendered(fetchResponse,frame){this.notifyApplicationAfterFrameRender(fetchResponse,frame)}applicationAllowsFollowingLinkToLocation(link,location2,ev){return!this.notifyApplicationAfterClickingLinkToLocation(link,location2,ev).defaultPrevented}applicationAllowsVisitingLocation(location2){return!this.notifyApplicationBeforeVisitingLocation(location2).defaultPrevented}notifyApplicationAfterClickingLinkToLocation(link,location2,event){return dispatch(“turbo:click”,{target:link,detail:{url:location2.href,originalEvent:event},cancelable:!0})}notifyApplicationBeforeVisitingLocation(location2){return dispatch(“turbo:before-visit”,{detail:{url:location2.href},cancelable:!0})}notifyApplicationAfterVisitingLocation(location2,action){return dispatch(“turbo:visit”,{detail:{url:location2.href,action:action}})}notifyApplicationBeforeCachingSnapshot(){return dispatch(“turbo:before-cache”)}notifyApplicationBeforeRender(newBody,options){return dispatch(“turbo:before-render”,{detail:Object.assign({newBody:newBody},options),cancelable:!0})}notifyApplicationAfterRender(){return dispatch(“turbo:render”)}notifyApplicationAfterPageLoad(timing={}){return dispatch(“turbo:load”,{detail:{url:this.location.href,timing:timing}})}notifyApplicationAfterVisitingSamePageLocation(oldURL,newURL){dispatchEvent(new HashChangeEvent(“hashchange”,{oldURL:oldURL.toString(),newURL:newURL.toString()}))}notifyApplicationAfterFrameLoad(frame){return dispatch(“turbo:frame-load”,{target:frame})}notifyApplicationAfterFrameRender(fetchResponse,frame){return dispatch(“turbo:frame-render”,{detail:{fetchResponse:fetchResponse},target:frame,cancelable:!0})}submissionIsNavigatable(form,submitter){return”off”!=this.formMode&&(submitter=!submitter||this.elementIsNavigatable(submitter),”optin”==this.formMode?submitter&&null!=form.closest(‘(data-turbo=”true”)’):submitter&&this.elementIsNavigatable(form))}elementIsNavigatable(element){var container=findClosestRecursively(element,”(data-turbo)”),element=findClosestRecursively(element,”turbo-frame”);return this.drive||element?!container||”false”!=container.getAttribute(“data-turbo”):!!container&&”true”==container.getAttribute(“data-turbo”)}getActionForLink(link){return getVisitAction(link)||”advance”}get snapshot(){return this.view.snapshot}};var prototype=new class Cache{constructor(session2){this.session=session2}clear(){this.session.clearCache()}resetCacheControl(){this.setCacheControl(“”)}exemptPageFromCache(){this.setCacheControl(“no-cache”)}exemptPageFromPreview(){this.setCacheControl(“no-preview”)}setCacheControl(value){!function setMetaContent(name,content){let element=getMetaElement(name);element||((element=document.createElement(“meta”)).setAttribute(“name”,name),document.head.appendChild(element)),element.setAttribute(“content”,content),element}(“turbo-cache-control”,value)}}(session),navigator$1=session(“navigator”);function start(){session.start()}function registerAdapter(adapter){session.registerAdapter(adapter)}function visit(location2,options){session.visit(location2,options)}function connectStreamSource(source){session.connectStreamSource(source)}function disconnectStreamSource(source){session.disconnectStreamSource(source)}function renderStreamMessage(message){session.renderStreamMessage(message)}function clearCache(){console.warn(“Please replace `Turbo.clearCache()` with `Turbo.cache.clear()`. The top-level function is deprecated and will be removed in a future version of Turbo.`”),session.clearCache()}function setProgressBarDelay(delay){session.setProgressBarDelay(delay)}function setConfirmMethod(confirmMethod){FormSubmission.confirmMethod=confirmMethod}function setFormMode(mode){session.setFormMode(mode)}var Turbo=Object.freeze({__proto__:null,navigator:navigator$1,session:session,cache:prototype,PageRenderer:PageRenderer,PageSnapshot:PageSnapshot,FrameRenderer:FrameRenderer,start:start,registerAdapter:registerAdapter,visit:visit,connectStreamSource:connectStreamSource,disconnectStreamSource:disconnectStreamSource,renderStreamMessage:renderStreamMessage,clearCache:clearCache,setProgressBarDelay:setProgressBarDelay,setConfirmMethod:setConfirmMethod,setFormMode:setFormMode,StreamActions:StreamActions});class TurboFrameMissingError extends Error{}function getFrameElementById(id){if(null!=id){id=document.getElementById(id);if(id instanceof FrameElement)return id}}function activateElement(element,currentURL){if(element){var src=element.getAttribute(“src”);if(null!=src&&null!=currentURL&&function urlsAreEqual(left,right){return expandURL(left).href==expandURL(right).href}(src,currentURL))throw new Error(`Matching element has a source URL which references itself`);if((element=element.ownerDocument!==document?document.importNode(element,!0):element)instanceof FrameElement)return element.connectedCallback(),element.disconnectedCallback(),element}}class StreamElement extends HTMLElement{static renderElement(newElement){return __async$3(this,null,function*(){yield newElement.performAction()})}connectedCallback(){return __async$3(this,null,function*(){try{yield this.render()}catch(error){console.error(error)}finally{this.disconnect()}})}render(){return __async$3(this,null,function*(){var _a;return null!=(_a=this.renderPromise)?_a:this.renderPromise=__async$3(this,null,function*(){var event=this.beforeRenderEvent;this.dispatchEvent(event)&&(yield nextAnimationFrame(),yield event.detail.render(this))})})}disconnect(){try{this.remove()}catch(_a){}}removeDuplicateTargetChildren(){this.duplicateChildren.forEach(c=>c.remove())}get duplicateChildren(){var _a,existingChildren=this.targetElements.flatMap(e=>(…e.children)).filter(c=>!!c.id);const newChildrenIds=(…(null==(_a=this.templateContent)?void 0:_a.children)||()).filter(c=>!!c.id).map(c=>c.id);return existingChildren.filter(c=>newChildrenIds.includes(c.id))}get performAction(){if(this.action){var actionFunction=StreamActions(this.action);if(actionFunction)return actionFunction;this.raise(“unknown action”)}this.raise(“action attribute is missing”)}get targetElements(){return this.target?this.targetElementsById:this.targets?this.targetElementsByQuery:void this.raise(“target or targets attribute is missing”)}get templateContent(){return this.templateElement.content.cloneNode(!0)}get templateElement(){var template;return null===this.firstElementChild?(template=this.ownerDocument.createElement(“template”),this.appendChild(template),template):this.firstElementChild instanceof HTMLTemplateElement?this.firstElementChild:void this.raise(“first child element must be a element”)}get action(){return this.getAttribute(“action”)}get target(){return this.getAttribute(“target”)}get targets(){return this.getAttribute(“targets”)}raise(message){throw new Error(this.description+”: “+message)}get description(){var _a;return null!=(_a=(null!=(_a=this.outerHTML.match(/)+>/))?_a:())(0))?_a:””}get beforeRenderEvent(){return new CustomEvent(“turbo:before-stream-render”,{bubbles:!0,cancelable:!0,detail:{newStream:this,render:StreamElement.renderElement}})}get targetElementsById(){var _a=null==(_a=this.ownerDocument)?void 0:_a.getElementById(this.target);return null!==_a?(_a):()}get targetElementsByQuery(){var _a=null==(_a=this.ownerDocument)?void 0:_a.querySelectorAll(this.targets);return 0!==_a.length?Array.prototype.slice.call(_a):()}}class StreamSourceElement extends HTMLElement{constructor(){super(…arguments),this.streamSource=null}connectedCallback(){this.streamSource=new(this.src.match(/^ws{1,2}:/)?WebSocket:EventSource)(this.src),connectStreamSource(this.streamSource)}disconnectedCallback(){this.streamSource&&disconnectStreamSource(this.streamSource)}get src(){return this.getAttribute(“src”)||””}}FrameElement.delegateConstructor=class FrameController{constructor(element){this.fetchResponseLoaded=_fetchResponse=>{},this.currentFetchRequest=null,this.resolveVisitPromise=()=>{},this.connected=!1,this.hasBeenLoaded=!1,this.ignoredAttributes=new Set,this.action=null,this.visitCachedSnapshot=({element:element2})=>{element2=element2.querySelector(“#”+this.element.id);element2&&this.previousFrameElement&&element2.replaceChildren(…this.previousFrameElement.children),delete this.previousFrameElement},this.element=element,this.view=new FrameView(this,this.element),this.appearanceObserver=new AppearanceObserver(this,this.element),this.formLinkClickObserver=new FormLinkClickObserver(this,this.element),this.linkInterceptor=new LinkInterceptor(this,this.element),this.restorationIdentifier=uuid(),this.formSubmitObserver=new FormSubmitObserver(this,this.element)}connect(){this.connected||(this.connected=!0,this.loadingStyle==FrameLoadingStyle.lazy?this.appearanceObserver.start():this.loadSourceURL(),this.formLinkClickObserver.start(),this.linkInterceptor.start(),this.formSubmitObserver.start())}disconnect(){this.connected&&(this.connected=!1,this.appearanceObserver.stop(),this.formLinkClickObserver.stop(),this.linkInterceptor.stop(),this.formSubmitObserver.stop())}disabledChanged(){this.loadingStyle==FrameLoadingStyle.eager&&this.loadSourceURL()}sourceURLChanged(){this.isIgnoringChangesTo(“src”)||(this.element.isConnected&&(this.complete=!1),this.loadingStyle!=FrameLoadingStyle.eager&&!this.hasBeenLoaded||this.loadSourceURL())}sourceURLReloaded(){var src=this.element(“src”);return this.ignoringChangesToAttribute(“complete”,()=>{this.element.removeAttribute(“complete”)}),this.element.src=null,this.element.src=src,this.element.loaded}completeChanged(){this.isIgnoringChangesTo(“complete”)||this.loadSourceURL()}loadingStyleChanged(){this.loadingStyle==FrameLoadingStyle.lazy?this.appearanceObserver.start():(this.appearanceObserver.stop(),this.loadSourceURL())}loadSourceURL(){return __async$3(this,null,function*(){this.enabled&&this.isActive&&!this.complete&&this.sourceURL&&(this.element.loaded=this.visit(expandURL(this.sourceURL)),this.appearanceObserver.stop(),yield this.element.loaded,this.hasBeenLoaded=!0)})}loadResponse(fetchResponse){return __async$3(this,null,function*(){(fetchResponse.redirected||fetchResponse.succeeded&&fetchResponse.isHTML)&&(this.sourceURL=fetchResponse.response.url);try{var document2,html=yield fetchResponse.responseHTML;html&&(document2=parseHTMLDocument(html),PageSnapshot.fromDocument(document2).isVisitable?yield this.loadFrameResponse(fetchResponse,document2):yield this.handleUnvisitableFrameResponse(fetchResponse))}finally{this.fetchResponseLoaded=()=>{}}})}elementAppearedInViewport(element){this.proposeVisitIfNavigatedWithAction(element,element),this.loadSourceURL()}willSubmitFormLinkToLocation(link){return this.shouldInterceptNavigation(link)}submittedFormLinkToLocation(link,_location,form){link=this.findFrameElement(link);link&&form.setAttribute(“data-turbo-frame”,link.id)}shouldInterceptLinkClick(element,_location,_event){return this.shouldInterceptNavigation(element)}linkClickIntercepted(element,location2){this.navigateFrame(element,location2)}willSubmitForm(element,submitter){return element.closest(“turbo-frame”)==this.element&&this.shouldInterceptNavigation(element,submitter)}formSubmitted(element,submitter){this.formSubmission&&this.formSubmission.stop(),this.formSubmission=new FormSubmission(this,element,submitter);element=this.formSubmission.fetchRequest;this.prepareRequest(element),this.formSubmission.start()}prepareRequest(request){var _a;request.headers(“Turbo-Frame”)=this.id,null!=(_a=this.currentNavigationElement)&&_a.hasAttribute(“data-turbo-stream”)&&request.acceptResponseType(StreamMessage.contentType)}requestStarted(_request){markAsBusy(this.element)}requestPreventedHandlingResponse(_request,_response){this.resolveVisitPromise()}requestSucceededWithResponse(request,response){return __async$3(this,null,function*(){yield this.loadResponse(response),this.resolveVisitPromise()})}requestFailedWithResponse(request,response){return __async$3(this,null,function*(){yield this.loadResponse(response),this.resolveVisitPromise()})}requestErrored(request,error){console.error(error),this.resolveVisitPromise()}requestFinished(_request){clearBusyState(this.element)}formSubmissionStarted({formElement}){markAsBusy(formElement,this.findFrameElement(formElement))}formSubmissionSucceededWithResponse(formSubmission,response){var frame=this.findFrameElement(formSubmission.formElement,formSubmission.submitter);frame.delegate.proposeVisitIfNavigatedWithAction(frame,formSubmission.formElement,formSubmission.submitter),frame.delegate.loadResponse(response),formSubmission.isSafe||session.clearCache()}formSubmissionFailedWithResponse(formSubmission,fetchResponse){this.element.delegate.loadResponse(fetchResponse),session.clearCache()}formSubmissionErrored(formSubmission,error){console.error(error)}formSubmissionFinished({formElement}){clearBusyState(formElement,this.findFrameElement(formElement))}allowsImmediateRender({element:newFrame},options){var{defaultPrevented:newFrame,detail:{render:options}}=dispatch(“turbo:before-frame-render”,{target:this.element,detail:Object.assign({newFrame:newFrame},options),cancelable:!0});return this.view.renderer&&options&&(this.view.renderer.renderElement=options),!newFrame}viewRenderedSnapshot(_snapshot,_isPreview){}preloadOnLoadLinksForView(element){session.preloadOnLoadLinksForView(element)}viewInvalidated(){}willRenderFrame(currentElement,_newElement){this.previousFrameElement=currentElement.cloneNode(!0)}loadFrameResponse(fetchResponse,document2){return __async$3(this,null,function*(){var newFrameElement=yield this.extractForeignFrameElement(document2.body);newFrameElement?(newFrameElement=new Snapshot(newFrameElement),newFrameElement=new FrameRenderer(this,this.view.snapshot,newFrameElement,FrameRenderer.renderElement,!1,!1),this.view.renderPromise&&(yield this.view.renderPromise),this.changeHistory(),yield this.view.render(newFrameElement),this.complete=!0,session.frameRendered(fetchResponse,this.element),session.frameLoaded(this.element),this.fetchResponseLoaded(fetchResponse)):this.willHandleFrameMissingFromResponse(fetchResponse)&&this.handleFrameMissingFromResponse(fetchResponse)})}visit(url){return __async$3(this,null,function*(){var _a;const request=new FetchRequest(this,FetchMethod.get,url,new URLSearchParams,this.element);return null!=(_a=this.currentFetchRequest)&&_a.cancel(),this.currentFetchRequest=request,new Promise(resolve=>{this.resolveVisitPromise=()=>{this.resolveVisitPromise=()=>{},this.currentFetchRequest=null,resolve()},request.perform()})})}navigateFrame(element,url,submitter){const frame=this.findFrameElement(element,submitter);frame.delegate.proposeVisitIfNavigatedWithAction(frame,element,submitter),this.withCurrentNavigationElement(element,()=>{frame.src=url})}proposeVisitIfNavigatedWithAction(frame,element,submitter){if(this.action=getVisitAction(submitter,element,frame),this.action){const pageSnapshot=PageSnapshot.fromElement(frame).clone(),visitCachedSnapshot=frame.delegate(“visitCachedSnapshot”);frame.delegate.fetchResponseLoaded=fetchResponse=>{var redirected;frame.src&&({statusCode:fetchResponse,redirected}=fetchResponse,fetchResponse={response:{statusCode:fetchResponse,redirected:redirected,responseHTML:frame.ownerDocument.documentElement.outerHTML},visitCachedSnapshot:visitCachedSnapshot,willRender:!1,updateHistory:!1,restorationIdentifier:this.restorationIdentifier,snapshot:pageSnapshot},this.action&&(fetchResponse.action=this.action),session.visit(frame.src,fetchResponse))}}}changeHistory(){var method;this.action&&(method=getHistoryMethodForAction(this.action),session.history.update(method,expandURL(this.element.src||””),this.restorationIdentifier))}handleUnvisitableFrameResponse(fetchResponse){return __async$3(this,null,function*(){console.warn(`The response (${fetchResponse.statusCode}) from is performing a full page visit due to turbo-visit-control.`),yield this.visitResponse(fetchResponse.response)})}willHandleFrameMissingFromResponse(fetchResponse){this.element.setAttribute(“complete”,””);fetchResponse=fetchResponse.response;return!dispatch(“turbo:frame-missing”,{target:this.element,detail:{response:fetchResponse,visit:(_0,…_1)=>__async$3(this,(_0,…_1),function*(url,options={}){url instanceof Response?this.visitResponse(url):session.visit(url,options)})},cancelable:!0}).defaultPrevented}handleFrameMissingFromResponse(fetchResponse){this.view.missing(),this.throwFrameMissingError(fetchResponse)}throwFrameMissingError(fetchResponse){fetchResponse=`The response (${fetchResponse.statusCode}) did not contain the expected and will be ignored. To perform a full page visit instead, set turbo-visit-control to reload.`;throw new TurboFrameMissingError(fetchResponse)}visitResponse(response){return __async$3(this,null,function*(){var wrapped=new FetchResponse(response),responseHTML=yield wrapped.responseHTML,{location:wrapped,redirected,statusCode}=wrapped;return session.visit(wrapped,{response:{redirected:redirected,statusCode:statusCode,responseHTML:responseHTML}})})}findFrameElement(element,submitter){return null!=(submitter=getFrameElementById(getAttribute(“data-turbo-frame”,submitter,element)||this.element.getAttribute(“target”)))?submitter:this.element}extractForeignFrameElement(container){return __async$3(this,null,function*(){var element,id=CSS.escape(this.id);try{if(element=activateElement(container.querySelector(“turbo-frame#”+id),this.sourceURL))return element;if(element=activateElement(container.querySelector(`turbo-frame(src)(recurse~=${id})`),this.sourceURL))return yield element.loaded,yield this.extractForeignFrameElement(element)}catch(error){return console.error(error),new FrameElement}return null})}formActionIsVisitable(form,submitter){return locationIsVisitable(expandURL(getAction(form,submitter)),this.rootLocation)}shouldInterceptNavigation(element,submitter){var id=getAttribute(“data-turbo-frame”,submitter,element)||this.element.getAttribute(“target”);if(element instanceof HTMLFormElement&&!this.formActionIsVisitable(element,submitter))return!1;if(!this.enabled||”_top”==id)return!1;if(id){id=getFrameElementById(id);if(id)return!id.disabled}return!!session.elementIsNavigatable(element)&&!(submitter&&!session.elementIsNavigatable(submitter))}get id(){return this.element.id}get enabled(){return!this.element.disabled}get sourceURL(){if(this.element.src)return this.element.src}set sourceURL(sourceURL){this.ignoringChangesToAttribute(“src”,()=>{this.element.src=null!=sourceURL?sourceURL:null})}get loadingStyle(){return this.element.loading}get isLoading(){return void 0!==this.formSubmission||void 0!==this.resolveVisitPromise()}get complete(){return this.element.hasAttribute(“complete”)}set complete(value){this.ignoringChangesToAttribute(“complete”,()=>{value?this.element.setAttribute(“complete”,””):this.element.removeAttribute(“complete”)})}get isActive(){return this.element.isActive&&this.connected}get rootLocation(){var meta=this.element.ownerDocument.querySelector(‘meta(name=”turbo-root”)’);return expandURL(null!=(meta=null==meta?void 0:meta.content)?meta:”/”)}isIgnoringChangesTo(attributeName){return this.ignoredAttributes.has(attributeName)}ignoringChangesToAttribute(attributeName,callback){this.ignoredAttributes.add(attributeName),callback(),this.ignoredAttributes.delete(attributeName)}withCurrentNavigationElement(element,callback){this.currentNavigationElement=element,callback(),delete this.currentNavigationElement}},void 0===customElements.get(“turbo-frame”)&&customElements.define(“turbo-frame”,FrameElement),void 0===customElements.get(“turbo-stream”)&&customElements.define(“turbo-stream”,StreamElement),void 0===customElements.get(“turbo-stream-source”)&&customElements.define(“turbo-stream-source”,StreamSourceElement),(()=>{let element=document.currentScript;if(element&&!element.hasAttribute(“data-turbo-suppress-warning”))for(element=element.parentElement;element;){if(element==document.body)return console.warn(unindent`
You are loading Turbo from a element inside the element. This is probably not what you meant to do!
Load your application’s JavaScript bundle inside the element instead. elements in are evaluated with each page change.
For more information, see: https://turbo.hotwired.dev/handbook/building#working-with-script-elements
——
Suppress this warning by adding a “data-turbo-suppress-warning” attribute to: %s
`,element.outerHTML);element=element.parentElement}})(),window.Turbo=Turbo,start();Turbo=Object.freeze({__proto__:null,FrameElement:FrameElement,get FrameLoadingStyle(){return FrameLoadingStyle},FrameRenderer:FrameRenderer,PageRenderer:PageRenderer,PageSnapshot:PageSnapshot,StreamActions:StreamActions,StreamElement:StreamElement,StreamSourceElement:StreamSourceElement,cache:prototype,clearCache:clearCache,connectStreamSource:connectStreamSource,disconnectStreamSource:disconnectStreamSource,navigator:navigator$1,registerAdapter:registerAdapter,renderStreamMessage:renderStreamMessage,session:session,setConfirmMethod:setConfirmMethod,setFormMode:setFormMode,setProgressBarDelay:setProgressBarDelay,start:start,visit:visit});function createSingleton(removeOnTurboVisit=!1){return function(target,name,descriptor){const original=descriptor.value;return descriptor.value=(…args)=>{var _a;window.DFX_SINGLETONS=null!=(_a=window.DFX_SINGLETONS)?_a:{};const instanceId=target.prototype.constructor.name+”:”+name;if(removeOnTurboVisit){const turboCallback=()=>{window.DFX_SINGLETONS(instanceId)&&(window.DFX_SINGLETONS(instanceId)=null),document.removeEventListener(“turbo:visit”,turboCallback)};document.addEventListener(“turbo:visit”,turboCallback)}return window.DFX_SINGLETONS(instanceId)||(_a=original.apply(this,args),Object.defineProperty(window.DFX_SINGLETONS,instanceId,{value:_a,writable:!0}),_a)},descriptor}}class DfxLocalStorageCookieManager{constructor(localStorage){this.localStorage=localStorage,this.localStorage=localStorage;try{this.localStorage.setItem(“test”,”test”),this.localStorage.removeItem(“test”),this.isLocalStorageAvailable=!0}catch(e){this.isLocalStorageAvailable=!1}}getCookie(name){return(name=name&&document.cookie.match(new RegExp(`(?:^|; )${name.replace(/((.$?*|{}()\(\)\\\/+^))/g,”\\$1″)}=((^;)*)`)))?decodeURIComponent(name(1)):void 0}setCookie(name,value,expires,domain,secure=!0){let cookieString=name+”=”+value;”string”==typeof expires&&(cookieString+=”;expires=”+expires),”string”==typeof domain&&(cookieString+=”;domain=”+domain),cookieString+=”; path=/”,secure&&”https:”===location.protocol&&(cookieString+=”; secure”),document.cookie=cookieString}deleteCookie(name){this.setCookie(name,””,”Thu, 01 Jan 1970 00:00:00 UTC”)}getLocalStorageOrCookie(name){var _a;return this.isLocalStorageAvailable&&null!=(_a=this.localStorage.getItem(name))?_a:this.getCookie(name)}setLocalStorageOrCookie(name,value,expires,domain){this.isLocalStorageAvailable?this.localStorage.setItem(name,value):this.setCookie(name,value,expires,domain)}deleteLocalStorageOrCookie(name){this.isLocalStorageAvailable?this.localStorage.removeItem(name):this.deleteCookie(name)}}var __defProp$5=Object.defineProperty,__getOwnPropDesc$5=Object.getOwnPropertyDescriptor;class DfxLocalStorageCookieManagerFactory{static create(){return new DfxLocalStorageCookieManager(window.localStorage)}}((decorators,target,key,kind)=>{for(var decorator,result=1<kind?void 0:kind?__getOwnPropDesc$5(target,key):target,i=decorators.length-1;0=level}normalizeValue(value){let intValue=parseInt(value);return intValue=isNaN(intValue)?3:intValue}}var __defProp$4=Object.defineProperty,__getOwnPropDesc$4=Object.getOwnPropertyDescriptor;class DfxGdprCheckerFactory{static create(){return new DfxGdprChecker(DfxLocalStorageCookieManagerFactory.create())}}((decorators,target,key,kind)=>{for(var decorator,result=1<kind?void 0:kind?__getOwnPropDesc$4(target,key):target,i=decorators.length-1;0new Promise((resolve,reject)=>{var fulfilled=value=>{try{step(generator.next(value))}catch(e){reject(e)}},rejected=value=>{try{step(generator.throw(value))}catch(e){reject(e)}},step=x=>x.done?resolve(x.value):Promise.resolve(x.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())});const COUNTRIES_TO_REPLACE_MAP=new Map(((“GB”,”UK”)));class DfxGeoLocation{constructor(geoJsUrl,dfxLocalStorageCookieManager){this.geoJsUrl=geoJsUrl,this.dfxLocalStorageCookieManager=dfxLocalStorageCookieManager}init(){return __async$2(this,null,function*(){var redirectData=yield this.getRedirectData();COUNTRIES_TO_REPLACE_MAP.has(redirectData.country)&&(redirectData.country=COUNTRIES_TO_REPLACE_MAP.get(redirectData.country)),this.redirectData=redirectData,this.setBodyClasses().setLocationToStorage()})}getRedirectData(){return __async$2(this,null,function*(){var redirectData;return this.redirectData||((redirectData=this.getLocationFromStorage())?(this.redirectData=redirectData,this.redirectData):this.loadRedirectData())})}loadRedirectData(){return new Promise(resolve=>{var script=document.createElement(“script”);script.onload=()=>{this.redirectData=window.redirectData,resolve(this.redirectData)},script.setAttribute(“src”,this.geoJsUrl),document.head.appendChild(script)})}setBodyClasses(){const countryCode=this.redirectData.country.toLowerCase();return document.body?(document.body.classList.remove(“dfx-country-pending”),document.body.classList.add(“dfx-country-“+countryCode)):document.addEventListener(“DOMContentLoaded”,()=>{document.body.classList.remove(“dfx-country-pending”),document.body.classList.add(“dfx-country-“+countryCode)},!1),this}getLocationFromStorage(){var expiresIn=this.dfxLocalStorageCookieManager.getLocalStorageOrCookie(“dfx-redirectData_expiresIn”);return!!(expiresIn&&parseInt(expiresIn)>Date.now())&&JSON.parse(null!=(expiresIn=this.dfxLocalStorageCookieManager.getLocalStorageOrCookie(“dfx-redirectData”))?expiresIn:”false”)}setLocationToStorage(){var date=new Date;return date.setTime(date.getTime()+6048e5),this.dfxLocalStorageCookieManager.setLocalStorageOrCookie(“dfx-redirectData”,JSON.stringify(this.redirectData),date.toUTCString()),this.dfxLocalStorageCookieManager.setLocalStorageOrCookie(“dfx-redirectData_expiresIn”,””+date.getTime(),date.toUTCString()),this}}var __defProp$3=Object.defineProperty,__getOwnPropDesc$3=Object.getOwnPropertyDescriptor;class DfxGeoLocationFactory{static create(){return new DfxGeoLocation(window.DFX_ENDPOINTS.geoJs,DfxLocalStorageCookieManagerFactory.create())}}((decorators,target,key,kind)=>{for(var decorator,result=1<kind?void 0:kind?__getOwnPropDesc$3(target,key):target,i=decorators.length-1;0{this._resetAssetClasses()._resetInstruments()._resetCategories()})}_setDefaultStates(){return this.baiduState=STATES.OFF,this.pixelState=STATES.OFF,this.gptState=STATES.OFF,this.gtmState=STATES.OFF,this.taboolaState=STATES.OFF,this}_resetInstruments(){return this.gptInstrumentPairs=new Set,this}_resetCategories(){return this.gptCategories={category:””,subCategory:””},this}_resetAssetClasses(){return this.gptAssetClasses=new Set,this}createFacebookPixel(){var loadCallback,b,e,n,f;return this.dfxGdprChecker.checkLevel(3)&&this.allowedTrackingsConfig(TRACKINGS.FACEBOOK_PIXEL)&&this.pixelState===STATES.OFF&&(this.pixelState=STATES.LOADING,loadCallback=()=>{this.pixelState=STATES.READY},f=window,b=document,e=”script”,f.fbq||(n=f.fbq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)},f._fbq||(f._fbq=n),(n.push=n).loaded=!0,n.version=”2.0″,n.queue=(),(f=b.createElement(e)).async=!0,f.onload=loadCallback,f.src=”https://connect.facebook.net/en_US/fbevents.js”,(loadCallback=b.getElementsByTagName(e)(0)).parentNode.insertBefore(f,loadCallback)),this.fbq=window.fbq,this.fbq(“init”,this.facebookPixelId)),this}facebookPixelTrack(type){return this.dfxGdprChecker.checkLevel(3)&&this.allowedTrackingsConfig(TRACKINGS.FACEBOOK_PIXEL)&&(this.pixelState===STATES.OFF&&this.createFacebookPixel(),this.fbq(“track”,type)),this}facebookPixelTrackPageView(){return this.dfxGdprChecker.checkLevel(3)&&this.facebookPixelTrack(“PageView”),this}facebookPixelTrackLead(){return this.dfxGdprChecker.checkLevel(3)&&this.facebookPixelTrack(“Lead”),this}createGTM(){if(this.dfxGdprChecker.checkLevel(1)&&this.allowedTrackingsConfig(TRACKINGS.GTM)&&this.gtmState===STATES.OFF){this.gtmState=STATES.LOADING;const scriptOnload=()=>{this.gtmState=STATES.READY};var w=window,d=document,s=”script”,l=”dataLayer”,i=this.tagManagerId,p=this.tagManagerParams;w(l)=w(l)||(),w(l).push({“gtm.start”:(new Date).getTime(),event:”gtm.js”}),w=d.getElementsByTagName(s)(0),(l=d.createElement(s)).async=!0,l.src=”https://www.googletagmanager.com/gtm.js?id=”+i+p,l.onload=scriptOnload,w.parentNode.insertBefore(l,w)}return this}createTwitterPixel(){var n,s,e,t;return this.dfxGdprChecker.checkLevel(3)&&this.allowedTrackingsConfig(TRACKINGS.TWITTER_PIXEL)&&(e=window,t=document,n=”script”,e.twq||((s=e.twq=function(){s.exe?s.exe.apply(s,arguments):s.queue.push(arguments)}).version=”1.1″,s.queue=(),(e=t.createElement(n)).async=!0,e.src=”https://static.ads-twitter.com/uwt.js”,(t=t.getElementsByTagName(n)(0)).parentNode.insertBefore(e,t)),twq(“init”,”o92un”),twq(“track”,”PageView”)),this}createGPT(){if(this.dfxGdprChecker.checkLevel(1)&&this.allowedTrackingsConfig(TRACKINGS.GPT)&&this.gptState===STATES.OFF){this.gptState=STATES.LOADING;const scriptOnload=()=>{this.gptState=STATES.READY};var gads,useSSL,googletag=window.googletag||{cmd:()};(gads=document.createElement(“script”)).async=!0,gads.type=”text/javascript”,useSSL=”https:”===document.location.protocol,gads.src=(useSSL?”https:”:”http:”)+”//www.googletagservices.com/tag/js/gpt.js”,gads.onload=scriptOnload,(useSSL=document.getElementsByTagName(“script”)(0)).parentNode.insertBefore(gads,useSSL),window.googletag=window.googletag||googletag}return this}trackGTMpageLoadEvent(){return this.dfxGdprChecker.checkLevel(1)&&(window.dataLayer=window.dataLayer||(),window.dataLayer.push({event:”turboPageView”,virtualUrl:window.location.pathname})),this}createBaiduTracking(){var s,hm,curProtocol;return this.dfxGdprChecker.checkLevel(2)&&this.allowedTrackingsConfig(TRACKINGS.BAIDU)&&this.baiduState!==STATES.READY&&((hm=document.createElement(“script”)).src=”https://hm.baidu.com/hm.js?961aa7f85d30d676f24a6f928c035b90″,(s=document.getElementsByTagName(“script”)(0)).parentNode.insertBefore(hm,s),hm=document.createElement(“script”),curProtocol=window.location.protocol.split(“:”)(0),hm.src=”https”===curProtocol?”https://zz.bdstatic.com/linksubmit/push.js”:”http://push.zhanzhang.baidu.com/push.js”,(curProtocol=document.getElementsByTagName(“script”)(0)).parentNode.insertBefore(hm,curProtocol),this.baiduState=STATES.READY),this}addGptAssetClasses(assetClasses){if(Array.isArray(assetClasses))return assetClasses.forEach(assetClass=>this.gptAssetClasses.add(assetClass)),this;throw new TypeError(“Param assetClasses must be an Array”)}addGptInstrumentPairs(pairs){if(Array.isArray(pairs))return pairs.forEach(assetClass=>this.gptInstrumentPairs.add(assetClass)),this;throw new TypeError(“Param pairs must be an Array”)}addGptCategories(category=””,subCategory=””){this.gptCategories={category:category,subCategory:subCategory}}getGptAssetClasses(){return this.gptAssetClasses}getGptInstrumentPairs(){return this.gptInstrumentPairs}getGptCategory(){return this.gptCategories.category}getGptSubCategory(){return this.gptCategories.subCategory}createTaboolaPixel(){if(this.dfxGdprChecker.checkLevel(3)&&this.allowedTrackingsConfig(TRACKINGS.TABOOLA_PIXEL)&&this.taboolaState===STATES.OFF){this.taboolaState=STATES.LOADING;const scriptOnload=()=>{this.taboolaState=STATES.READY};var t,f,x;window._tfa=window._tfa||(),window._tfa.push({notify:”event”,name:”page_view”,id:this.taboolaPixelId}),this.tfa=window._tfa,t=document.createElement(“script”),f=document.getElementsByTagName(“script”)(0),x=”tb_tfa_script”,document.getElementById(x)||(t.async=1,t.src=”https://cdn.taboola.com/libtrc/unip/1350268/tfa.js”,t.id=x,t.onload=scriptOnload,f.parentNode.insertBefore(t,f))}return this}taboolaPixelTrack(eventName){return this.dfxGdprChecker.checkLevel(3)&&this.allowedTrackingsConfig(TRACKINGS.TABOOLA_PIXEL)&&(this.pixelState===STATES.OFF&&this.createTaboolaPixel(),this.tfa.push({notify:”event”,name:eventName,id:this.taboolaPixelId})),this}}class DfxConfig{constructor(config){this.config=config}get(key){return this.config.get(key)}set(key,value){this.config.has(key)||this.config.set(key,value)}}var __defProp$2=Object.defineProperty,__getOwnPropDesc$2=Object.getOwnPropertyDescriptor;class DfxConfigFactory{static create(){var mergedConfig=Object.assign({},window.DFX_CONFIG,window.DFX_ENDPOINTS),mergedConfig=new Map(Object.entries(mergedConfig));return new DfxConfig(mergedConfig)}}((decorators,target,key,kind)=>{for(var decorator,result=1<kind?void 0:kind?__getOwnPropDesc$2(target,key):target,i=decorators.length-1;0{for(var decorator,result=1<kind?void 0:kind?__getOwnPropDesc$1(target,key):target,i=decorators.length-1;0{requestAnimationFrame(()=>this.checkCantataLoaded())}),this.removeFontsLoading())}checkCantataLoaded(){document.fonts.check(“16px Cantata One”)?this.document.documentElement.classList.remove(“dfx-cantata-loading”):requestAnimationFrame(()=>this.checkCantataLoaded())}removeFontsLoading(){return __this=this,__arguments=null,generator=function*(){yield this.document.fonts.ready,this.document.documentElement.classList.remove(“dfx-fonts-loading”,”dfx-cantata-loading”)},new Promise((resolve,reject)=>{var fulfilled=value=>{try{step(generator.next(value))}catch(e){reject(e)}},rejected=value=>{try{step(generator.throw(value))}catch(e){reject(e)}},step=x=>x.done?resolve(x.value):Promise.resolve(x.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())});var __this,__arguments,generator}}prototype=Object.defineProperty,navigator$1=Object.getOwnPropertyDescriptor;class DfxFontsFactory{static create(){return new DfxFonts(document)}}for(var decorator,decorators=(createSingleton()),target=DfxFontsFactory,key=”create”,kind=1,result=1<kind?void 0:kind?navigator$1(target,key):target,i=decorators.length-1;0{return __this=window,__arguments=null,generator=function*(){try{var noscript=document.querySelector(“noscript.jsdfx-script”);if(noscript){const imports=yield window.System.import(noscript.getAttribute(“data-src”));Object.keys(imports).forEach(key=>{window(key)=imports(key)}),window.runStacked()}}catch(error){console.error(error)}},new Promise((resolve,reject)=>{var fulfilled=value=>{try{step(generator.next(value))}catch(e){reject(e)}},rejected=value=>{try{step(generator.throw(value))}catch(e){reject(e)}},step=x=>x.done?resolve(x.value):Promise.resolve(x.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())});var __this,__arguments,generator};document.addEventListener(“turbo:load”,()=>loadScripts()),window.turbo=Turbo,start(),DfxGeoLocationFactory.create().init(),exports.DfxGdprChecker=navigator$1,exports.DfxGdprCheckerFactory=DfxGdprCheckerFactory,exports.DfxGeoLocationFactory=DfxGeoLocationFactory,exports.DfxThirdPartyManagerFactory=DfxThirdPartyManagerFactory}(this.window=this.window||{});

The post GBP/USD Testing 1.2700 Ahead of US NFPs first appeared on Investorempires.com.



[ad_2]
Source link

Leave a Reply

Your email address will not be published. Required fields are marked *