US EQUITIES TALKING POINTS:
FORECAST: NEUTRAL
- US Equities Enjoyed a Strong Week with Fridays Losses Proving the only Blip. Can the Rally Continue?
- Nasdaq 100 Looks Ripe for a Retracement Supported by the 14-day RSI now in Overbought Territory.
- US Debt Ceiling Developments Key to Further Upside in US Equities.
Recommended by Zain Vawda
Get Your Free Equities Forecast
READ MORE: Debt Ceiling Blues, Part 79. What Happens if the US Defaults?
US INDICES WEEK IN REVIEW
US indices finished with somewhat of a whimper on Friday given the impressive rally this week. Markets opened the week with a wee bit of caution as the US debt ceiling shadow kept market participants on edge.
The S&P 500, Nasdaq 100 and Dow Jones benefitted however, as positive news around the debt ceiling and a potential deal began to circulate. This helped overall sentiment and risk assets in particular as a deal looked possible by Sunday evening as mentioned by Republican House Rep. Kevin McCarthy. As Fridays US Session kicked into gear however, we heard from GOP debt limit negotiator Graves who said talks are at a pause as the “White House is being unreasonable”. These comments could explain the lackluster end to the week which saw all three US indexes closed in negative for the day, leaving the door open to some uncertainty heading into next week.
SOURCE: SYZ Group
Many analysts have been cautious about the recent moves in US indices. A lot of this stems from the uneven gains being seen with large cap Tech stocks seen driving the rally. Taking a quick look at Meta and Nvidia, who are up over a 100% this year and being part of the top 8 largest stocks in the SP500. A sign once more that megacap tech has been the main source of strength during the recent rally. These companies amongst others who provide software and hardware components to the burgeoning field of artificial intelligence have been the biggest gainers so far and the reason for a cautious outlook.
S&P 500, NASDAQ 100 AND DOW JONES FORECAST FOR THE WEEK AHEAD
Stock indices face an interesting week as the US debt ceiling talks are likely to reached fever pitch while we also have some interesting risk events which could come into play as well. Mixed messaging toward the end of the week also threatens to spillover, with US Indices likely to feel the strain. Comments from Treasury Secretary Janet Yellen on Friday hinted that the banking sector turmoil may not be over as she stated that more bank mergers may be necessary. These comments dovetailed with Fed Chair Jerome Powell who struck a rather dovish tone in his comments on Friday which saw rate hike expectations for June decline from around the 40% mark down to 22% in what should be seen as a positive for the stock market. We do have the FOMC minutes in the week ahead and this could provide us with more clarity on the Federal Reserve’s rationale moving forward.
However, the debt ceiling impasse seems to be the main driver of markets at the moment. Everything from the US dollar to Bond yields and commodities are feeling strain in some form or another. Given that the GOP negotiator walked out on Friday, markets will no doubt start the new week on a cautious note looking at how talks and negotiations unfold and their resulting impact on overall market sentiment. I still believe a deal on the US debt ceiling will be reached before the deadline as has been the case in the past.
Trade Smarter – Sign up for the DailyFX Newsletter
Receive timely and compelling market commentary from the DailyFX team
Subscribe to Newsletter
ECONOMIC CALENDAR FOR THE WEEK AHEAD
The week ahead on the calendar looks productive from a US perspective with four ‘high’ rated data releases, and a host of ‘medium’ rated data releases (including a bunch of Fed Speakers).
Here are the four high ‘rated’ risk events for the week ahead on the economic calendar:
- On Tuesday, May 24, we have the FOMC Minutes Release due at 18h00 GMT.
- On Thursday, May 25, we have the GDP Growth Rate QoQ (2nd Estimate) data due at 12h30 GMT.
- On Friday, May 26, we also have the Feds preferred gauge of inflation the Core PCE Price Index data due at 12h30 GMT.
- On Friday, March 31, we close out the week with the Michigan Consumer Sentiment (final) at 14h00 GMT.
For all market-moving economic releases and events, see the DailyFX Calendar
Quite a busy week for the economic calendar from a US perspective with inflation data in the form of the PCE price index likely to be the biggest event. Given the amount of Fed speak over the past week and the week ahead I do not expect the FOMC minutes to provide any notable shocks. Earnings season continues on Monday with a host of US companies reporting next week. The biggest names however will be Zoom video on Monday and of course Nvidia on Wednesday with both earnings releases expected after market close.
TECHNICAL OUTLOOK
S&P 500 Daily Chart
Source: TradingView, prepared by Zain Vawda
From a technical perspective the S&P has finally reached the top of the range between 3800 and 4200 before retreating slightly ahead of the weekend. The 4200 handle has proven a particularly tough nut to crack over the past 18 months. A deal on the US debt ceiling could facilitate a sustained break higher with immediate resistance around the 4250 and 4320 handles coming into play. There is a possibility given the uncertainty heading into the new week which could facilitate a pullback before the bull’s return, which would bring immediate support at 4135 into focus. Any further downside and 4100 and the and the 100-day MA at 4043 become areas of focus.
NASDAQ 100 Daily Chart
Source: TradingView, prepared by Zain Vawda
The Nasdaq 100 as mentioned earlier continues to be standout performer of late since printing a low around the 11686 mark on March 13 (which was also the swing high on January 18). Around that time, we had a golden cross with the 50-day MA crossing above the 200-day MA and the daily candle bouncing of the 100-day MA all hinting at the recent upside rally from a technical perspective.
This past week did see us print a fresh YTD high just shy of the psychological 14000 handle with Friday seeing the Nasdaq record its first bearish close this week. The Nasdaq may also be in need of a catalyst to clear the psychological 14000 level while the 14-day RSI is also in overbought territory. I do think that similar to the SP500 Nasdaq may be in for an early week retracement ahead of any potential deal on the US debt ceiling.
Key Levels to Keep an Eye On:
Support Levels:
- 13700
- 13450
- 13021 (50-day MA)
Resistance Levels:
Foundational Trading Knowledge
Understanding the Stock Market
Recommended by Zain Vawda
— Written by Zain Vawda for DailyFX.com
Contact and follow Zain on Twitter: @zvawda
`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=!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()stopTrickling()window.clearInterval(this.trickleInterval),delete this.trickleIntervalrefresh()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),elementcreateProgressElement()var element=document.createElement("div");return element.className="turbo-progress-bar",elementget 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)"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)=>,[])getMetaValue(name)name=this.findMetaElementByName(name);return name?name.getAttribute("content"):nullfindMetaElementByName(name)return Object.keys(this.detailsByOuterHTML).reduce((result,outerHTML)=>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 Snapshotstatic 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=headSnapshotclone()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=!0for(const clonedPasswordInput of clonedElement.querySelectorAll('input[type="password"]'))clonedPasswordInput.value="";return new PageSnapshot(clonedElement,this.headSnapshot)get headElement()return this.headSnapshot.elementget rootLocation()var _a;return expandURL(null!=(_a=this.getSetting("root"))?_a:"/")get cacheControlValue()return this.getSetting("cache-control")get isPreviewable()return"no-preview"!=this.cacheControlValueget isCacheable()return"no-cache"!=this.cacheControlValueget 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 Visitconstructor(delegate,location2,restorationIdentifier,options=)uuid();varaction: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=acceptsStreamResponseget adapter()return this.delegate.adapterget view()return this.delegate.viewget history()return this.delegate.historyget restorationData()return this.history.getRestorationDataForIdentifier(this.restorationIdentifier)get silent()return this.isSamePagestart()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.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)conststatusCode,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()snapshot.hasAnchor(getAnchor(this.location)))&&("restore"==this.actiongetPreloadedSnapshot()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*()))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()scrollToRestoredPosition()var scrollPosition=this.restorationData["scrollPosition"];if(scrollPosition)return this.view.scrollToPosition(scrollPosition),!0scrollToAnchor()var anchor=getAnchor(this.location);if(null!=anchor)return this.view.scrollToAnchor(anchor),!0recordTimingMetric(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.pushStatehasPreloadedResponse()return"object"==typeof this.responseshouldIssueRequest()return!this.isSamePage&&("restore"==this.action?!this.hasCachedSnapshot():this.willRender)cacheSnapshot()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<300class BrowserAdapter{constructor(session2)this.progressBar=new ProgressBar,this.showProgressBar=()=>this.progressBar.show(),this.session=session2visitProposedToLocation(location2,options)this.navigator.startVisit(location2,(null==options?void 0:options.restorationIdentifier)visitStarted(visit2)this.location=visit2.location,visit2.loadCachedSnapshot(),visit2.issueRequest(),visit2.goToSamePageAnchor()visitRequestStarted(visit2)"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())get navigator()return this.session.navigator}class CacheObserverconstructor()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.startedstop()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 FrameRedirectorconstructor(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"))class Historyconstructor(delegate)this.restorationIdentifier=uuid(),this.restorationData=,this.started=!1,this.pageLoaded=!1,this.onPopState=event=>,this.onPageLoad=_event=>__async$3(this,null,function*()yield function nextMicrotask()return Promise.resolve()(),this.pageLoaded=!0),this.delegate=delegatestart()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=restorationIdentifiergetRestorationDataForIdentifier(restorationIdentifier)updateRestorationData(additionalData)var restorationIdentifier=this["restorationIdentifier"],restorationData=this.restorationData[restorationIdentifier];this.restorationData[restorationIdentifier]=Object.assign(Object.assign(,restorationData),additionalData)assumeControlOfScrollRestoration()relinquishControlOfScrollRestoration()this.previousScrollRestoration&&(history.scrollRestoration=this.previousScrollRestoration,delete this.previousScrollRestoration)shouldHandlePopState()return this.pageIsLoaded()pageIsLoaded()return this.pageLoadedclass Navigator{constructor(delegate)this.delegate=delegateproposeVisit(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.adapterget view()return this.delegate.viewget history()return this.delegate.historyformSubmissionStarted(formSubmission)"function"==typeof this.adapter.formSubmissionStarted&&this.adapter.formSubmissionStarted(formSubmission)formSubmissionSucceededWithResponse(formSubmission,fetchResponse)return __async$3(this,null,function*()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)&&(isRestorationToTopvisitScrolledToSamePageLocation(oldURL,newURL)this.delegate.visitScrolledToSamePageLocation(oldURL,newURL)get location()return this.history.locationget restorationIdentifier()return this.history.restorationIdentifiergetActionForFormSubmission(submitter,formElement)}(prototype=PageStage=PageStage||)[prototype.initial=0]="initial",prototype[prototype.loading=1]="loading",prototype[prototype.interactive=2]="interactive",prototype[prototype.complete=3]="complete";class PageObserverconstructor(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=delegatestart()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.readyStateclass ScrollObserverconstructor(delegate)this.started=!1,this.onScroll=()=>this.updatePosition(x:window.pageXOffset,y:window.pageYOffset),this.delegate=delegatestart()this.startedstop()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 StreamObserverconstructor(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=delegatestart()(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)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 Rendererstatic renderElement(currentElement,newElement)vardocumentElement,body=document;documentElement.replaceChild(newElement,body)render()return __async$3(this,null,function*()this.replaceHeadAndBody(),this.activateScriptElements())replaceHeadAndBody()vardocumentElement,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.elementget 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.trackedElementsAreIdenticalget 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.isPreviewget currentHeadSnapshot()return this.currentSnapshot.headSnapshotget newHeadSnapshot()return this.newSnapshot.headSnapshotget newElement()return this.newSnapshot.elementmergeHead()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.trackedElementSignaturecopyNewHeadStylesheetElements(){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))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),!0if(newElement.isEqualNode(element))return elementList.splice(index,1),!0return!1removeCurrentHeadProvisionalElements()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.provisionalElementsget newHeadProvisionalElements()return this.newHeadSnapshot.provisionalElementsget newBodyScriptElements()return this.newElement.querySelectorAll("script")}class SnapshotCacheconstructor(size)this.keys=[],this.snapshots=,this.size=sizehas(location2)return toCacheKey(location2)in this.snapshotsget(location2)var snapshot;if(this.has(location2))return snapshot=this.read(location2),this.touch(location2),snapshotput(location2,snapshot)return this.write(location2,snapshot),this.touch(location2),snapshotclear()this.snapshots=read(location2)return this.snapshots[toCacheKey(location2)]write(location2,snapshot)this.snapshots[toCacheKey(location2)]=snapshottouch(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=delegateget snapshotCache()return this.delegate.navigator.view.snapshotCachestart()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))tryvar 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 Sessionconstructor()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()disable()this.enabled=!1stop()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=adaptervisit(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=delaysetFormMode(mode)this.formMode=modeget location()return this.history.locationget restorationIdentifier()return this.history.restorationIdentifierhistoryPoppedToLocationWithRestorationIdentifier(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)visitProposedToLocation(location2,options)extendURLWithDeprecatedProperties(location2),this.adapter.visitProposedToLocation(location2,options)visitStarted(visit2)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()allowsImmediateRender(element,options)vardefaultPrevented:element,detail:render:options=this.notifyApplicationBeforeRender(element,options);return this.view.renderer&&options&&(this.view.renderer.renderElement=options),!elementviewRenderedSnapshot(_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).defaultPreventedapplicationAllowsVisitingLocation(location2)return!this.notifyApplicationBeforeVisitingLocation(location2).defaultPreventednotifyApplicationAfterClickingLinkToLocation(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)elementIsNavigatable(element)var container=findClosestRecursively(element,"[data-turbo]"),element=findClosestRecursively(element,"turbo-frame");return this.drivegetActionForLink(link)"advance"get snapshot()return this.view.snapshot;var prototype=new class Cacheconstructor(session2)this.session=session2clear()this.session.clearCache()resetCacheControl()this.setCacheControl("")exemptPageFromCache()this.setCacheControl("no-cache")exemptPageFromPreview()this.setCacheControl("no-preview")setCacheControl(value)!function setMetaContent(name,content)("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=confirmMethodfunction 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 Errorfunction getFrameElementById(id)if(null!=id)id=document.getElementById(id);if(id instanceof FrameElement)return idfunction 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(),elementclass StreamElement extends HTMLElementstatic renderElement(newElement)return __async$3(this,null,function*()yield newElement.performAction())connectedCallback()return __async$3(this,null,function*()tryyield this.render()catch(error)console.error(error)finallythis.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()trythis.remove()catch(_a)removeDuplicateTargetChildren()this.duplicateChildren.forEach(c=>c.remove())get duplicateChildren()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
