PageSourceSearch

https://app.tenzrhealth.com/assets/react-Bxi2xK_7.js

js tenzrhealth.com collected 2026-10-05 21:38:55 UTC 12,017 bytes, 17 lines download raw bytes

1import{o as H}from"./index-D70YXGs-.js";import{M as $}from"./index-B4nclofW.js";const D="https://www.youtube.com/embed",j="https://www.youtube-nocookie.com/embed",Y="https://www.youtube.com/iframe_api",F="YT",G="onYouTubeIframeAPIReady",C=/(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})/,U=/(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/.*?[?&]list=)([\w_-]+)/;function W(i){if(!i)return;const t=i.match(/[?&]t=([\dms]+)/i);if(!t)return;const e=t[1].toLowerCase();let n=0,l=!1;const a=e.match(/(\d+)m/);a&&(n+=parseInt(a[1],10)*60,l=!0);const d=e.match(/(\d+)s?$/);return d&&(n+=parseInt(d[1],10),l=!0),l?n:void 0}function R(i,t={}){var e;const n={src:N(i,t),frameborder:0,width:"100%",height:"100%",allow:"accelerometer; fullscreen; autoplay; encrypted-media; gyroscope; picture-in-picture"};return(e=t.config)!=null&&e.referrerpolicy&&(n.referrerpolicy=t.config.referrerpolicy),t.config&&(n["data-config"]=JSON.stringify(t.config)),`
2    <style>
3      :host {
4        display: inline-block;
5        line-height: 0;
6        position: relative;
7        min-width: 300px;
8        min-height: 150px;
9      }
10      iframe {
11        position: absolute;
12        top: 0;
13        left: 0;
14      }
15    </style>
16    <iframe${q(n)}></iframe>
17  `}function N(i,t){if(!i.src)return;const e=i.src.includes("-nocookie")?j:D,n={controls:i.controls===""?null:0,autoplay:i.autoplay,loop:i.loop,mute:i.muted,playsinline:i.playsinline,preload:i.preload??"metadata",enablejsapi:1,cc_load_policy:1,showinfo:0,rel:0,iv_load_policy:3,modestbranding:1,start:W(i.src),...t.config};if(C.test(i.src)){const p=i.src.match(C),g=p&&p[1];return`${e}/${g}?${I(n)}`}const l=i.src.match(U),d={listType:"playlist",list:l&&l[1],...n};return`${e}?${I(d)}`}class B extends $(globalThis.HTMLElement??class{}){static getTemplateHTML=R;static shadowRootOptions={mode:"open"};static observedAttributes=["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src"];loadComplete=new A;#o;#r;#e=0;#i=!1;#t;isLoaded=!1;#l=null;#a=null;#s=null;#n=1;constructor(){super(),this.#u("config")}get config(){return this.#a}set config(t){this.#a=t}async load(){if(this.#o)return;this.shadowRoot||this.attachShadow({mode:"open"});const t=!this.#r;this.#r&&(this.loadComplete=new A,this.isLoaded=!1),this.#r=!0,await(this.#o=Promise.resolve()),this.#o=null,this.#e=0,this.dispatchEvent(new Event("emptied"));let e=this.api;if(this.api=null,!this.src){e?.destroy();return}this.#s=document.createElement("video"),this.textTracks=this.#s.textTracks,this.textTracks.addEventListener("change",()=>{var s;const u=Array.from(this.textTracks).find(h=>h.mode==="showing");(s=this.api)==null||s.setOption("captions","track",u?{languageCode:u.language}:{})}),this.dispatchEvent(new Event("loadstart"));let n=this.shadowRoot.querySelector("iframe"),l=J(this.attributes);t&&n&&(this.#a=JSON.parse(n.getAttribute("data-config")||"{}")),(!n?.src||n.src!==N(l,this))&&(this.shadowRoot.innerHTML=R(l,this),n=this.shadowRoot.querySelector("iframe"));const a=await K(Y,F,G);this.api=new a.Player(n,{events:{onReady:()=>{var s;this.#e=1,this.dispatchEvent(new Event("loadedmetadata")),this.dispatchEvent(new Event("durationchange")),this.#n!==1&&((s=this.api)==null||s.setVolume(this.#n*100)),this.dispatchEvent(new Event("volumechange")),this.dispatchEvent(new Event("loadcomplete")),this.isLoaded=!0,this.loadComplete.resolve()},onError:s=>{console.error(s),this.#l={code:s.data,message:`YouTube iframe player error #${s.data}; visit https://developers.google.com/youtube/iframe_api_reference#onError for the full error message.`},this.dispatchEvent(new Event("error"))}}});let d=!1;this.api.addEventListener("onStateChange",s=>{var u;const h=s.data;if((h===a.PlayerState.PLAYING||h===a.PlayerState.BUFFERING)&&(d||(d=!0,this.dispatchEvent(new Event("play"))),(this.api.getOption("captions","tracklist")||[]).forEach(f=>{[...this.textTracks].some(E=>E.language===f.languageCode)||this.#s.addTextTrack("subtitles",f.displayName,f.languageCode),this.textTracks=this.#s.textTracks}),this.dispatchEvent(new Event("loadstart"))),h===a.PlayerState.PLAYING)this.seeking&&(this.#i=!1,(u=this.#t)==null||u.resolve(),this.dispatchEvent(new Event("seeked"))),this.#e=3,this.dispatchEvent(new Event("playing"));else if(h===a.PlayerState.PAUSED){const b=Math.abs(this.currentTime-p);!this.seeking&&b>.1&&(this.#i=!0,this.dispatchEvent(new Event("seeking"))),d=!1,this.dispatchEvent(new Event("pause"))}h===a.PlayerState.ENDED&&(d=!1,this.dispatchEvent(new Event("pause")),this.dispatchEvent(new Event("ended")),this.loop&&this.play())}),this.api.addEventListener("onPlaybackRateChange",()=>{this.dispatchEvent(new Event("ratechange"))}),this.api.addEventListener("onVolumeChange",()=>{var s;const u=((s=this.api)==null?void 0:s.getVolume())/100;this.#n=u,this.dispatchEvent(new Event("volumechange"))}),this.api.addEventListener("onVideoProgress",()=>{this.dispatchEvent(new Event("timeupdate"))}),await this.loadComplete;let p=0;setInterval(()=>{var s;const u=Math.abs(this.currentTime-p),h=this.buffered.end(this.buffered.length-1);this.seeking&&h>.1?(this.#i=!1,(s=this.#t)==null||s.resolve(),this.dispatchEvent(new Event("seeked"))):!this.seeking&&u>.1&&(this.#i=!0,this.dispatchEvent(new Event("seeking"))),p=this.currentTime},50);let g;const w=setInterval(()=>{const s=this.buffered.end(this.buffered.length-1);s>=this.duration&&(clearInterval(w),this.#e=4),g!=s&&(g=s,this.dispatchEvent(new Event("progress")))},100)}async attributeChangedCallback(t,e,n){if(e!==n)switch(t){case"src":case"auto
17play":case"controls":case"loop":case"playsinline":this.load()}}async play(){var t;return this.#t=null,await this.loadComplete,(t=this.api)==null||t.playVideo(),Z(this)}async pause(){var t;return await this.loadComplete,(t=this.api)==null?void 0:t.pauseVideo()}get seeking(){return this.#i}get readyState(){return this.#e}get src(){return this.getAttribute("src")}set src(t){this.src!=t&&this.setAttribute("src",t)}get error(){return this.#l}get paused(){var t,e;return this.isLoaded?[-1,0,2,5].includes((e=(t=this.api)==null?void 0:t.getPlayerState)==null?void 0:e.call(t)):!this.autoplay}get duration(){var t,e;return((e=(t=this.api)==null?void 0:t.getDuration)==null?void 0:e.call(t))??NaN}get autoplay(){return this.hasAttribute("autoplay")}set autoplay(t){this.autoplay!=t&&this.toggleAttribute("autoplay",!!t)}get buffered(){var t,e;if(!this.isLoaded)return P();const n=((t=this.api)==null?void 0:t.getVideoLoadedFraction())*((e=this.api)==null?void 0:e.getDuration());return n>0?P(0,n):P()}get controls(){return this.hasAttribute("controls")}set controls(t){this.controls!=t&&this.toggleAttribute("controls",!!t)}get currentTime(){var t,e;return((e=(t=this.api)==null?void 0:t.getCurrentTime)==null?void 0:e.call(t))??0}set currentTime(t){this.currentTime!=t&&(this.#t=new A,this.loadComplete.then(()=>{var e,n;(e=this.api)==null||e.seekTo(t,!0),this.paused&&((n=this.#t)==null||n.then(()=>{var l;this.#t&&((l=this.api)==null||l.pauseVideo())}))}))}set defaultMuted(t){this.defaultMuted!=t&&this.toggleAttribute("muted",!!t)}get defaultMuted(){return this.hasAttribute("muted")}get loop(){return this.hasAttribute("loop")}set loop(t){this.loop!=t&&this.toggleAttribute("loop",!!t)}set muted(t){this.muted!=t&&this.loadComplete.then(()=>{var e,n;t?(e=this.api)==null||e.mute():(n=this.api)==null||n.unMute()})}get muted(){var t,e;return this.isLoaded?(e=(t=this.api)==null?void 0:t.isMuted)==null?void 0:e.call(t):this.defaultMuted}get playbackRate(){var t,e;return((e=(t=this.api)==null?void 0:t.getPlaybackRate)==null?void 0:e.call(t))??1}set playbackRate(t){this.playbackRate!=t&&this.loadComplete.then(()=>{var e;(e=this.api)==null||e.setPlaybackRate(t)})}get playsInline(){return this.hasAttribute("playsinline")}set playsInline(t){this.playsInline!=t&&this.toggleAttribute("playsinline",!!t)}get poster(){return this.getAttribute("poster")}set poster(t){this.poster!=t&&this.setAttribute("poster",`${t}`)}set volume(t){this.volume!=t&&(this.#n=t,this.loadComplete.then(()=>{var e;(e=this.api)==null||e.setVolume(t*100)}))}get volume(){var t;return this.isLoaded?((t=this.api)==null?void 0:t.getVolume())/100:this.#n}#u(t){if(Object.prototype.hasOwnProperty.call(this,t)){const e=this[t];delete this[t],this[t]=e}}}function q(i){let t="";for(const e in i){const n=i[e];n===""?t+=` ${L(e)}`:t+=` ${L(e)}="${L(`${n}`)}"`}return t}function L(i){return i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/`/g,"&#x60;")}function I(i){return String(new URLSearchParams(z(i)))}function z(i){let t={};for(let e in i){let n=i[e];n===!0||n===""?t[e]=1:n===!1?t[e]=0:n!=null&&(t[e]=n)}return t}function J(i){let t={};for(let e of i)t[e.name]=e.value;return t}const k={};async function K(i,t,e){return k[i]?k[i]:self[t]?(await Q(0),self[t]):k[i]=new Promise(function(n,l){const a=document.createElement("script");a.src=i;const d=()=>n(self[t]);self[e]=d,a.onload=()=>!e,a.onerror=l,document.head.append(a)})}const Q=i=>new Promise(t=>setTimeout(t,i));function X(i){return(...t)=>new Promise(e=>{i(...t,(...n)=>{n.length>1?e(n):e(n[0])})})}function Z(i){return X((t,e)=>{let n;i.addEventListener(t,n=()=>{i.removeEventListener(t,n),e()})})("playing")}class A extends Promise{constructor(t=()=>{}){let e,n;super((l,a)=>{t(l,a),e=l,n=a}),this.resolve=e,this.reject=n}}function P(i,t){return Array.isArray(i)?M(i):i==null||t==null||i===0&&t===0?M([[0,0]]):M([[i,t]])}function M(i){return Object.defineProperties(i,{start:{value:t=>i[t][0]},end:{value:t=>i[t][1]}}),i}globalThis.customElements&&!globalThis.customElements.get("youtube-video")&&globalThis.customElements.define("youtube-video",B);var tt=B,et=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),it={className:"class",htmlFor:"for"};function V(i){return i.toLowerCase()}function O(i){if(typeof i=="boolean")return i?"":void 0;if(typeof i!="function"&&!(typeof i=="object"&&i!==null))return i}function nt({react:i,tagName:t,elementClass:e,events:n,displayName:l,defaultProps:a,toAttributeName:d=V,toAttributeValue:p=O}){const g=Number.parseInt(i.version)>=19,w=i.forwardRef((s,u)=>{var h,b;const f=i.useRef(null),E=i.useRef(new Map),T={},S={},m={},_={};for(const[o,r]of Object.entries(s)){if(et.has(o)){m[o]=r;continue}const c=d(it[o]??o);if(e.prototype&&o in e.prototype&&!(o in(((h=globalThis.HTMLElement)==null?void 0:h.prototype)??{}))&&!((b=e.observedAttributes)!=null&&b.some(y=>y===c))){_[o]=r;continue}if(o.startsWith("on")){T[o]=r;continue}const v=p(r);if(c&&v!=null&&(S[c]=String(v),g||(m[c]=v)),c&&g){const y=O(r);
17v!==y?m[c]=v:m[c]=r}}if(typeof window<"u"){for(const o in T){const r=T[o],c=o.endsWith("Capture"),v=(n?.[o]??o.slice(2).toLowerCase()).slice(0,c?-7:void 0);i.useLayoutEffect(()=>{const y=f?.current;if(!(!y||typeof r!="function"))return y.addEventListener(v,r,c),()=>{y.removeEventListener(v,r,c)}},[f?.current,r])}i.useLayoutEffect(()=>{if(f.current===null)return;const o=new Map;for(const r in _)x(f.current,r,_[r]),E.current.delete(r),o.set(r,_[r]);for(const[r,c]of E.current)x(f.current,r,void 0);E.current=o})}if(typeof window>"u"&&e?.getTemplateHTML&&e?.shadowRootOptions){const{mode:o,delegatesFocus:r}=e.shadowRootOptions,c=i.createElement("template",{shadowrootmode:o,shadowrootdelegatesfocus:r,dangerouslySetInnerHTML:{__html:e.getTemplateHTML(S,s)},key:"ce-la-react-ssr-template-shadow-root"});m.children=[c,m.children]}return i.createElement(t,{...a,...m,ref:i.useCallback(o=>{f.current=o,typeof u=="function"?u(o):u!==null&&(u.current=o)},[u])},m.children)});return w.displayName=l??e.name,w}function x(i,t,e){var n;i[t]=e,e==null&&t in(((n=globalThis.HTMLElement)==null?void 0:n.prototype)??{})&&i.removeAttribute(t)}var rt=nt({react:H,tagName:"youtube-video",elementClass:tt,toAttributeName(i){return i==="muted"?"":i==="defaultMuted"?"muted":V(i)}});
17export{rt as default};

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.