PageSourceSearch

https://guks001-nse-retracement-bot-history.hf.space/static/js/1780.48f96d0e.chunk.js

js guks001-nse-retracement-bot-history.hf.space collected 2026-10-03 16:54:25 UTC 14,598 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[1780],{85850:(e,t,r)=>{r.d(t,{K:()=>y,A:()=>b});r(58878);var n=r(8151),i=r(12274),o=r(63186),a=r(34914),l=r(997),s=r(36459),d=r(84720),c=r(64611),u=r(89653),g=r(58144);const p="-2.4rem",h=(0,u.A)("div",{target:"e2wxzia1"})((e=>{let{theme:t,locked:r,target:n}=e;return{padding:`${t.spacing.sm} 0 ${t.spacing.sm} ${t.spacing.sm}`,position:"absolute",top:r?p:"-1rem",right:t.spacing.none,transition:"none",...!r&&{opacity:0,"&:active, &:focus-visible, &:hover":{transition:"opacity 150ms 100ms, top 100ms 100ms",opacity:1,top:p},...n&&{[`${n}:hover &, ${n}:active &, ${n}:focus-visible &`]:{transition:"opacity 150ms 100ms, top 100ms 100ms",opacity:1,top:p}}}}}),""),f=(0,u.A)("div",{target:"e2wxzia0"})((e=>{let{theme:t}=e;return{color:(0,g.iq)(t)?t.colors.fadedText60:t.colors.bodyText,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-end",boxShadow:"1px 2px 8px rgba(0, 0, 0, 0.08)",borderRadius:t.radii.default,backgroundColor:t.colors.lightenedBg05,width:"fit-content",zIndex:t.zIndices.sidebar+1}}),"");var m=r(90782);function y(e){let{label:t,show_label:r,icon:i,onClick:o}=e;const u=(0,n.u)(),g=r?t:"";return(0,m.jsx)("div",{"data-testid":"stElementToolbarButton",children:(0,m.jsx)(l.A,{content:(0,m.jsx)(a.Ay,{source:t,allowHTML:!1,style:{fontSize:u.fontSizes.sm}}),placement:l.W.TOP,onMouseEnterDelay:1e3,inline:!0,children:(0,m.jsxs)(s.Ay,{onClick:e=>{o&&o(),e.stopPropagation()},kind:d.KX.ELEMENT_TOOLBAR,"aria-label":t,children:[i&&(0,m.jsx)(c.A,{content:i,size:"md",testid:"stElementToolbarButtonIcon"}),g&&(0,m.jsx)("span",{children:g})]})})})}const b=e=>{let{onExpand:t,onCollapse:r,isFullScreen:n,locked:a,children:l,target:s,disableFullscreenMode:d}=e;return(0,m.jsx)(h,{className:"stElementToolbar","data-testid":"stElementToolbar",locked:a||n,target:s,children:(0,m.jsxs)(f,{children:[l,t&&!d&&!n&&(0,m.jsx)(y,{label:"Fullscreen",icon:i.g,onClick:()=>t()}),r&&!d&&n&&(0,m.jsx)(y,{label:"Close fullscreen",icon:o.Q,onClick:()=>r()})]})})}},81780:(e,t,r)=>{r.r(t),r.d(t,{default:()=>pe});var n=r(58878),i=r(8151),o=r(19613),a=r(56146),l=r(95241),s=r(71034),d=r.n(s),c=r(34752),u=r(85850),g=r(25571),p=r(58144),h=r(50609),f=r.n(h),m=r(29669),y=r(67253);var b=r(93480),x=r(997),v=r(70474),C=r(35526);const w=e=>{var t;let{widgetMgr:r,id:i,key:o,defaultValue:a}=e;(0,n.useEffect)((()=>{const e=r.getElementState(i,o);(0,g.hX)(e)&&(0,g.se)(a)&&r.setElementState(i,o,a)}),[r,i,o,a]);const[l,s]=(0,n.useState)(null!==(t=r.getElementState(i,o))&&void 0!==t?t:a);return[l,(0,n.useCallback)((e=>{r.setElementState(i,o,e),s(e)}),[r,i,o])]};var j=r(89653),k=r(37888);const A=(0,j.A)("div",{target:"e12wn80j15"})(""),S=(0,j.A)("div",{target:"e12wn80j14"})((e=>{let{theme:t}=e;return{height:t.sizes.largestElementHeight,width:"100%",background:t.genericColors.secondaryBg,borderRadius:t.radii.default,marginBottom:t.spacing.twoXS,display:"flex",alignItems:"center",position:"relative",paddingLeft:t.spacing.xs,paddingRight:t.spacing.sm}}),""),I=(0,j.A)("div",{target:"e12wn80j13"})({name:"82a6rk",styles:"flex:1"}),U=(0,j.A)("div",{target:"e12wn80j12"})((e=>{let{show:t}=e;return{display:t?"block":"none"}}),""),R=(0,j.A)("span",{target:"e12wn80j11"})((e=>{let{theme:t,isPlayingOrRecording:r}=e;return{margin:t.spacing.sm,fontFamily:t.fonts.monospace,color:r?t.genericColors.bodyText:t.colors.fadedText60,backgroundColor:t.genericColors.secondaryBg,fontSize:t.fontSizes.sm}}),""),L=(0,j.A)("div",{target:"e12wn80j10"})((()=>({width:"100%",textAlign:"center",overflow:"hidden"})),""),E=(0,j.A)("span",{target:"e12wn80j9"})((e=>{let{theme:t}=e;return{color:t.colors.bodyText}}),""),F=(0,j.A)("a",{target:"e12wn80j8"})(""),T=(0,j.A)("div",{target:"e12wn80j7"})((e=>{let{theme:t}=e;return{height:t.sizes.largestElementHeight,display:"flex",justifyContent:"center",alignItems:"center"}}),""),M=(0,j.A)("div",{target:"e12wn80j6"})((e=>{let{theme:t}=e;return{height:10,opacity:.2,width:"100%",backgroundImage:`radial-gradient(${t.colors.fadedText10} 40%, transparent 40%)`,backgroundSize:"10px 10px",backgroundRepeat:"repeat"}}),""),P=(0,j.A)("span",{target:"e12wn80j5"})((e=>{let{theme:t}=e;return{"& > button":{color:t.colors.primary,padding:t.spacing.threeXS},"& > button:hover, & > button:focus":{color:t.colors.red}}}),""),W=(0,j.A)("span",{target:"e12wn80j4"})((e=>{let{theme:t}=e;return{"& >
1 button":{padding:t.spacing.threeXS,color:t.colors.fadedText40},"& > button:hover, & > button:focus":{color:t.colors.primary}}}),""),z=(0,j.A)("span",{target:"e12wn80j3"})((e=>{let{theme:t}=e;return{"& > button":{padding:t.spacing.threeXS,color:t.colors.fadedText60},"& > button:hover, & > button:focus":{color:t.colors.bodyText}}}),""),B=(0,j.A)("div",{target:"e12wn80j2"})((e=>{let{theme:t}=e;return{display:"flex",justifyContent:"center",alignItems:"center",flexGrow:0,flexShrink:1,padding:t.spacing.xs,gap:t.spacing.twoXS,marginRight:t.spacing.twoXS}}),""),O=(0,j.A)("div",{target:"e12wn80j1"})((e=>{let{theme:t}=e;return{marginLeft:t.spacing.sm}}),""),X=(0,j.A)(k.x,{target:"e12wn80j0"})((e=>{let{theme:t}=e;return{fontSize:t.fontSizes.sm,width:"1.375rem",height:"1.375rem",borderWidth:"3px",radius:t.radii.md,justifyContents:"center",padding:t.spacing.none,margin:t.spacing.none,borderColor:t.colors.borderColor,borderTopColor:t.colors.primary,flexGrow:0,flexShrink:0}}),"");var D=r(39095),V=r(90782);const $=()=>(0,V.jsxs)(L,{children:[(0,V.jsx)(E,{children:"This app would like to use your microphone."})," ",(0,V.jsx)(F,{href:D.ML,children:"Learn how to allow access."})]}),_=()=>(0,V.jsx)(T,{children:(0,V.jsx)(M,{})}),H="00:00",N=e=>new Date(e).toLocaleTimeString(void 0,{minute:"2-digit",second:"2-digit"});var G=r(96626),K=r(34783),q=r(37789),Z=r(14757),Q=r(88685),Y=r(36459),J=r(84720),ee=r(64611);const te=e=>{let{onClick:t,disabled:r,ariaLabel:n,iconContent:i}=e;return(0,V.jsx)(Y.Ay,{kind:J.KX.BORDERLESS_ICON,onClick:t,disabled:r,"aria-label":n,fluidWidth:!0,"data-testid":"stAudioInputActionButton",children:(0,V.jsx)(ee.A,{content:i,size:"lg",color:"inherit"})})},re=e=>{let{disabled:t,stopRecording:r}=e;return(0,V.jsx)(P,{children:(0,V.jsx)(te,{onClick:r,disabled:t,ariaLabel:"Stop recording",iconContent:K.X})})},ne=e=>{let{disabled:t,isPlaying:r,onClickPlayPause:n}=e;return(0,V.jsx)(z,{children:r?(0,V.jsx)(te,{onClick:n,disabled:t,ariaLabel:"Pause",iconContent:q.v}):(0,V.jsx)(te,{onClick:n,disabled:t,ariaLabel:"Play",iconContent:Z.S})})},ie=e=>{let{disabled:t,startRecording:r}=e;return(0,V.jsx)(W,{children:(0,V.jsx)(te,{onClick:r,disabled:t,ariaLabel:"Record",iconContent:G.G})})},oe=e=>{let{onClick:t}=e;return(0,V.jsx)(z,{children:(0,V.jsx)(te,{disabled:!1,onClick:t,ariaLabel:"Reset",iconContent:Q.C})})},ae=e=>{let{disabled:t,isRecording:r,isPlaying:n,isUploading:i,isError:o,recordingUrlExists:a,startRecording:l,stopRecording:s,onClickPlayPause:d,onClear:c}=e;return o?(0,V.jsx)(B,{children:(0,V.jsx)(oe,{onClick:c})}):i?(0,V.jsx)(B,{children:(0,V.jsx)(X,{"aria-label":"Uploading"})}):(0,V.jsxs)(B,{children:[r?(0,V.jsx)(re,{disabled:t,stopRecording:s}):(0,V.jsx)(ie,{disabled:t,startRecording:l}),a&&(0,V.jsx)(ne,{disabled:t,isPlaying:n,onClickPlayPause:d})]})},le=(0,n.memo)(ae);var se=r(84996);function de(e,t,r){for(let n=0;n<r.length;n++,t+=2){const i=Math.max(-1,Math.min(1,r[n]));e.setInt16(t,i<0?32768*i:32767*i,!0)}}const ce=async function(e){const t=new window.AudioContext,r=await e.arrayBuffer();let n;try{n=await t.decodeAudioData(r)}catch(u){return void(0,se.vV)(u)}const i=n.numberOfChannels,o=n.sampleRate,a=n.length*i*2+44,l=new ArrayBuffer(a),s=new DataView(l),d={0:{type:"string",value:"RIFF"},4:{type:"uint32",value:36+2*n.length*i},8:{type:"string",value:"WAVE"},12:{type:"string",value:"fmt "},16:{type:"uint32",value:16},20:{type:"uint16",value:1},22:{type:"uint16",value:i},24:{type:"uint32",value:o},28:{type:"uint32",value:o*i*2},32:{type:"uint16",value:2*i},34:{type:"uint16",value:16},36:{type:"string",value:"data"},40:{type:"uint32",value:n.length*i*2}};Object.entries(d).forEach((e=>{let[t,{type:r,value:n}]=e;const i=parseInt(t,10);"string"===r?function(e,t,r){for(let n=0;n<r.length;n++)e.setUint8(t+n,r.charCodeAt(n))}(s,i,n):"uint32"===r?s.setUint32(i,n,!0):"uint16"===r&&s.setUint16(i,n,!0)}));for(let g=0;g<i;g++)de(s,44+g*n.length*2,n.getChannelData(g));const c=new Uint8Array(l);return new Blob([c],{type:"audio/wav"})},ue=()=>(0,V.jsx)(L,{children:(0,V.jsx)(E,{children:"An error has occurred, please try again."})}),ge=e=>{var t;let{element:r,uploadClient:s,widgetMgr:h,fragmentId:j,disabled:k}=e;
vendor: 5,752 bytes, line 1
1const L=(0,i.u)(),E=(0,C.Z)(L),[F,T]=(0,n.useState)(null),M=n.useRef(null),[P,W]=w({widgetMgr:h,id:r.id,key:"deleteFileUrl"}),[z,B]=(0,n.useState)(null),[X,D]=(0,n.useState)([]),[G,K]=(0,n.useState)(null),[q,Z]=w({widgetMgr:h,id:r.id,key:"recordingUrl"}),[,Q]=(0,n.useState)(0),Y=()=>{Q((e=>e+1))},[J,ee]=(0,n.useState)(H),[te,re]=w({widgetMgr:h,id:r.id,key:"recordingTime",defaultValue:H}),[ne,ie]=(0,n.useState)(!1),[oe,ae]=(0,n.useState)(!1),[se,de]=(0,n.useState)(!1),[ge,pe]=(0,n.useState)(!1),[he,fe]=(0,n.useState)(!1),me=r.id,ye=r.formId,be=(0,n.useCallback)((async e=>{let t;if(pe(!0),(0,g.se)(ye)&&h.setFormsWithUploadsInProgress(new Set([ye])),t="audio/wav"===e.type?e:await ce(e),!t)return void fe(!0);const r=URL.createObjectURL(t),n=new File([t],"audio.wav",{type:t.type});Z(r),(async e=>{let{files:t,uploadClient:r,widgetMgr:n,widgetInfo:i,fragmentId:o}=e,a=[];try{a=await r.fetchFileURLs(t)}catch(c){return{successfulUploads:[],failedUploads:t.map((e=>({file:e,error:(0,y.$)(c)})))}}const l=f()(t,a),s=[],d=[];return await Promise.all(l.map((async e=>{let[t,n]=e;if(!t||!n||!n.uploadUrl||!n.fileId)return{file:t,fileUrl:n,error:new Error("No upload URL found")};try{await r.uploadFile({id:n.fileId,formId:i.formId||""},n.uploadUrl,t),s.push({fileUrl:n,file:t})}catch(c){const r=(0,y.$)(c);d.push({file:t,error:r})}}))),n.setFileUploaderStateValue(i,new m.qX({uploadedFileInfo:s.map((e=>{let{file:t,fileUrl:r}=e;return new m.HY({fileId:r.fileId,fileUrls:r,name:t.name,size:t.size})}))}),{fromUi:!0},o),{successfulUploads:s,failedUploads:d}})({files:[n],uploadClient:s,widgetMgr:h,widgetInfo:{id:me,formId:ye},fragmentId:j}).then((e=>{let{successfulUploads:t,failedUploads:r}=e;if(r.length>0)return void fe(!0);const n=t[0];n&&n.fileUrl.deleteUrl&&W(n.fileUrl.deleteUrl)})).finally((()=>{(0,g.se)(ye)&&h.setFormsWithUploadsInProgress(new Set),pe(!1)}))}),[Z,s,h,me,ye,j,W]),xe=(0,n.useCallback)((e=>{let{updateWidgetManager:t}=e;(0,g.hX)(F)||(0,g.hX)(P)||(Z(null),F.empty(),s.deleteFile(P),ee(H),re(H),W(null),t&&h.setFileUploaderStateValue(r,{},{fromUi:!0},j),ie(!1),(0,g.se)(q)&&URL.revokeObjectURL(q))}),[P,q,s,F,r,h,j,re,Z,W]);(0,n.useEffect)((()=>{if((0,g.hX)(ye))return;const e=new c.o;return e.manageFormClearListener(h,ye,(()=>{xe({updateWidgetManager:!0})})),()=>e.disconnect()}),[ye,xe,h]);const ve=(0,n.useCallback)((()=>{if(null===M.current)return;const e=o.A.create({container:M.current,waveColor:q?(0,p.au)(L.colors.fadedText40,L.genericColors.secondaryBg):L.colors.primary,progressColor:L.colors.bodyText,height:parseFloat(getComputedStyle(document.documentElement).fontSize)*parseFloat(L.sizes.largestElementHeight.replace("rem",""))-8,barWidth:4,barGap:4,barRadius:8,cursorWidth:0,url:null!==q&&void 0!==q?q:void 0});e.on("timeupdate",(e=>{ee(N(1e3*e))})),e.on("pause",(()=>{Y()}));const t=e.registerPlugin(a.A.create({scrollingWaveform:!1,renderRecordedAudio:!0}));return t.on("record-end",(async e=>{be(e)})),t.on("record-progress",(e=>{re(N(e))})),T(e),B(t),()=>{e&&e.destroy(),t&&t.destroy()}}),[be]);(0,n.useEffect)((()=>ve()),[ve]),(0,n.useEffect)((()=>{d()(E,L)||null===F||void 0===F||F.setOptions({waveColor:q?(0,p.au)(L.colors.fadedText40,L.genericColors.secondaryBg):L.colors.primary,progressColor:L.colors.bodyText})}),[L,E,q,F]);const Ce=(0,n.useCallback)((()=>{F&&(F.playPause(),ie(!0),Y())}),[F]),we=(0,n.useCallback)((async()=>{let e=G;se||(await navigator.mediaDevices.getUserMedia({audio:!0}).then((()=>a.A.getAvailableAudioDevices().then((t=>{if(D(t),t.length>0){const{deviceId:r}=t[0];K(r),e=r}})))).catch((e=>{ae(!0)})),de(!0)),z&&e&&F&&(F.setOptions({waveColor:L.colors.primary}),q&&xe({updateWidgetManager:!1}),z.startRecording({deviceId:e}).then((()=>{Y()})))}),[G,z,L,F,q,xe,se]),je=(0,n.useCallback)((()=>{z&&(z.stopRecording(),null===F||void 0===F||F.setOptions({waveColor:(0,p.au)(L.colors.fadedText40,L.genericColors.secondaryBg)}))}),[z,F,L]),ke=Boolean(null===z||void 0===z?void 0:z.isRecording()),Ae=Boolean(null===F||void 0===F?void 0:F.isPlaying()),Se=ke||Ae,Ie=!ke&&!q&&!oe,Ue=oe||Ie||he,Re=k||oe;return(0,V.jsxs)(A,{className:"stAudioInput","data-testid":"stAudioInput",children:[(0,V.jsx)(v.L,{label:r.label,disabled:Re,labelVisibility:(0,g.yv)(null===(t=r.labelVisibility)||void 0===t?void 0:t.value),children:r.help&&(0,V.jsx)(O,{children:(0,V.jsx)(b.A,{content:r.help,placement:x.W.TOP})})}),(0,V.jsxs)(S,{children:[(0,V.jsx)(u.A,{isFullScreen:!1,disableFullscreenMode:!0,target:S,children:P&&(0,V.jsx)(u.K,{label:"Clear recording",icon:l.e,onClick:()=>xe({updateWidgetManager:!0}),"data-testid":"stAudioInputClearRecordingButton"})}),(0,V.jsx)(le,{isRecording:ke,isPlaying:Ae,isUploading:ge,isError:he,recordingUrlExists:Boolean(q),startRecording:we,stopRecording:je,onClickPlayPause:Ce,onClear:()=>{xe({updateWidgetManager:!1}),fe(!1)},disabled:Re}),(0,V.jsxs)(I,{children:[he&&(0,V.jsx)(ue,{}),Ie&&(0,V.jsx)(_,{}),oe&&(0,V.jsx)($,{}),(0,V.jsx)(U,{"data-testid":"stAudioInputWaveSurfer",ref:M,show:!Ue})]}),(0,V.jsx)(R,{isPlayingOrRecording:Se,"data-testid":"stAudioInputWaveformTimeCode",children:ne?J:te})]})]})},pe=(0,n.memo)(ge)},34752:(e,t,r)=>{r.d(t,{X:()=>a,o:()=>o});var n=r(58878),i=r(25571);class o{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,t,r){(0,i.se)(this.formClearListener)&&this.lastWidgetMgr===e&&this.lastFormId===t||(this.disconnect(),(0,i._L)(t)&&(this.formClearListener=e.addFormClearedListener(t,r),this.lastWidgetMgr=e,this.lastFormId=t))}disconnect(){var e;null===(e=this.formClearListener)||void 0===e||e.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}function a(e){let{element:t,widgetMgr:r,onFormCleared:o}=e;(0,n.useEffect)((()=>
vendor: 261 bytes, line 1
1{if(!(0,i._L)(t.formId))return;const e=r.addFormClearedListener(t.formId,o);return()=>{e.disconnect()}}),[t,r,o])}},35526:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(58878);const i=e=>{const t=(0,n.useRef)();return(0,n.useEffect)((()=>{t.current=e}),[e]),t.current}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.