@devix-technologies/react-gjirafa-vp-player 1.0.21 → 1.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(O,P){typeof exports=="object"&&typeof module<"u"?P(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],P):(O=typeof globalThis<"u"?globalThis:O||self,P(O.ReactGjirafaVPPlayer={},O.React))})(this,function(O,P){"use strict";function _t(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const ce=_t(P);var _e={exports:{}},ge={};/**
1
+ (function(j,P){typeof exports=="object"&&typeof module<"u"?P(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],P):(j=typeof globalThis<"u"?globalThis:j||self,P(j.ReactGjirafaVPPlayer={},j.React))})(this,function(j,P){"use strict";function _t(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const ce=_t(P);var _e={exports:{}},ge={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -14,12 +14,12 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var He;function Tt(){return He||(He=1,process.env.NODE_ENV!=="production"&&function(){function e(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===N?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case d:return"Fragment";case g:return"Profiler";case y:return"StrictMode";case V:return"Suspense";case $:return"SuspenseList";case _:return"Activity"}if(typeof s=="object")switch(typeof s.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),s.$$typeof){case v:return"Portal";case j:return(s.displayName||"Context")+".Provider";case E:return(s._context.displayName||"Context")+".Consumer";case C:var w=s.render;return s=s.displayName,s||(s=w.displayName||w.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case f:return w=s.displayName||null,w!==null?w:e(s.type)||"Memo";case X:w=s._payload,s=s._init;try{return e(s(w))}catch{}}return null}function t(s){return""+s}function r(s){try{t(s);var w=!1}catch{w=!0}if(w){w=console;var L=w.error,U=typeof Symbol=="function"&&Symbol.toStringTag&&s[Symbol.toStringTag]||s.constructor.name||"Object";return L.call(w,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",U),t(s)}}function n(s){if(s===d)return"<>";if(typeof s=="object"&&s!==null&&s.$$typeof===X)return"<...>";try{var w=e(s);return w?"<"+w+">":"<...>"}catch{return"<...>"}}function a(){var s=G.A;return s===null?null:s.getOwner()}function i(){return Error("react-stack-top-frame")}function o(s){if(M.call(s,"key")){var w=Object.getOwnPropertyDescriptor(s,"key").get;if(w&&w.isReactWarning)return!1}return s.key!==void 0}function l(s,w){function L(){W||(W=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",w))}L.isReactWarning=!0,Object.defineProperty(s,"key",{get:L,configurable:!0})}function u(){var s=e(this.type);return te[s]||(te[s]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),s=this.props.ref,s!==void 0?s:null}function m(s,w,L,U,R,F,re,le){return L=F.ref,s={$$typeof:k,type:s,key:w,props:F,_owner:R},(L!==void 0?L:null)!==null?Object.defineProperty(s,"ref",{enumerable:!1,get:u}):Object.defineProperty(s,"ref",{enumerable:!1,value:null}),s._store={},Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(s,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(s,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:re}),Object.defineProperty(s,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:le}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s}function c(s,w,L,U,R,F,re,le){var h=w.children;if(h!==void 0)if(U)if(Z(h)){for(U=0;U<h.length;U++)p(h[U]);Object.freeze&&Object.freeze(h)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else p(h);if(M.call(w,"key")){h=e(s);var b=Object.keys(w).filter(function(I){return I!=="key"});U=0<b.length?"{key: someKey, "+b.join(": ..., ")+": ...}":"{key: someKey}",ae[h+U]||(b=0<b.length?"{"+b.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var He;function It(){return He||(He=1,process.env.NODE_ENV!=="production"&&function(){function e(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===_?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case d:return"Fragment";case g:return"Profiler";case m:return"StrictMode";case $:return"Suspense";case L:return"SuspenseList";case F:return"Activity"}if(typeof s=="object")switch(typeof s.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),s.$$typeof){case v:return"Portal";case V:return(s.displayName||"Context")+".Provider";case E:return(s._context.displayName||"Context")+".Consumer";case C:var w=s.render;return s=s.displayName,s||(s=w.displayName||w.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case y:return w=s.displayName||null,w!==null?w:e(s.type)||"Memo";case K:w=s._payload,s=s._init;try{return e(s(w))}catch{}}return null}function t(s){return""+s}function r(s){try{t(s);var w=!1}catch{w=!0}if(w){w=console;var N=w.error,B=typeof Symbol=="function"&&Symbol.toStringTag&&s[Symbol.toStringTag]||s.constructor.name||"Object";return N.call(w,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",B),t(s)}}function n(s){if(s===d)return"<>";if(typeof s=="object"&&s!==null&&s.$$typeof===K)return"<...>";try{var w=e(s);return w?"<"+w+">":"<...>"}catch{return"<...>"}}function a(){var s=z.A;return s===null?null:s.getOwner()}function i(){return Error("react-stack-top-frame")}function o(s){if(S.call(s,"key")){var w=Object.getOwnPropertyDescriptor(s,"key").get;if(w&&w.isReactWarning)return!1}return s.key!==void 0}function l(s,w){function N(){G||(G=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",w))}N.isReactWarning=!0,Object.defineProperty(s,"key",{get:N,configurable:!0})}function u(){var s=e(this.type);return te[s]||(te[s]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),s=this.props.ref,s!==void 0?s:null}function h(s,w,N,B,O,D,re,le){return N=D.ref,s={$$typeof:k,type:s,key:w,props:D,_owner:O},(N!==void 0?N:null)!==null?Object.defineProperty(s,"ref",{enumerable:!1,get:u}):Object.defineProperty(s,"ref",{enumerable:!1,value:null}),s._store={},Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(s,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(s,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:re}),Object.defineProperty(s,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:le}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s}function c(s,w,N,B,O,D,re,le){var p=w.children;if(p!==void 0)if(B)if(Y(p)){for(B=0;B<p.length;B++)f(p[B]);Object.freeze&&Object.freeze(p)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else f(p);if(S.call(w,"key")){p=e(s);var b=Object.keys(w).filter(function(R){return R!=="key"});B=0<b.length?"{key: someKey, "+b.join(": ..., ")+": ...}":"{key: someKey}",ae[p+B]||(b=0<b.length?"{"+b.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
18
  let props = %s;
19
19
  <%s {...props} />
20
20
  React keys must be passed directly to JSX without using spread:
21
21
  let props = %s;
22
- <%s key={someKey} {...props} />`,U,h,b,h),ae[h+U]=!0)}if(h=null,L!==void 0&&(r(L),h=""+L),o(w)&&(r(w.key),h=""+w.key),"key"in w){L={};for(var A in w)A!=="key"&&(L[A]=w[A])}else L=w;return h&&l(L,typeof s=="function"?s.displayName||s.name||"Unknown":s),m(s,h,F,R,a(),L,re,le)}function p(s){typeof s=="object"&&s!==null&&s.$$typeof===k&&s._store&&(s._store.validated=1)}var x=P,k=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),g=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),j=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),V=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),_=Symbol.for("react.activity"),N=Symbol.for("react.client.reference"),G=x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=Object.prototype.hasOwnProperty,Z=Array.isArray,D=console.createTask?console.createTask:function(){return null};x={"react-stack-bottom-frame":function(s){return s()}};var W,te={},K=x["react-stack-bottom-frame"].bind(x,i)(),ne=D(n(i)),ae={};ve.Fragment=d,ve.jsx=function(s,w,L,U,R){var F=1e4>G.recentlyCreatedOwnerStacks++;return c(s,w,L,!1,U,R,F?Error("react-stack-top-frame"):K,F?D(n(s)):ne)},ve.jsxs=function(s,w,L,U,R){var F=1e4>G.recentlyCreatedOwnerStacks++;return c(s,w,L,!0,U,R,F?Error("react-stack-top-frame"):K,F?D(n(s)):ne)}}()),ve}var Xe;function Ct(){return Xe||(Xe=1,process.env.NODE_ENV==="production"?_e.exports=St():_e.exports=Tt()),_e.exports}var z=Ct();function $e(){return $e=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$e.apply(null,arguments)}function At(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function It(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var Rt=function(){function e(r){var n=this;this._insertTag=function(a){var i;n.tags.length===0?n.insertionPoint?i=n.insertionPoint.nextSibling:n.prepend?i=n.container.firstChild:i=n.before:i=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(a,i),n.tags.push(a)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(It(this));var a=this.tags[this.tags.length-1];if(this.isSpeedy){var i=At(a);try{i.insertRule(n,i.cssRules.length)}catch{}}else a.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){var a;return(a=n.parentNode)==null?void 0:a.removeChild(n)}),this.tags=[],this.ctr=0},e}(),H="-ms-",Se="-moz-",S="-webkit-",Ke="comm",Le="rule",Ne="decl",Ot="@import",Je="@keyframes",jt="@layer",Vt=Math.abs,Te=String.fromCharCode,$t=Object.assign;function Lt(e,t){return Y(e,0)^45?(((t<<2^Y(e,0))<<2^Y(e,1))<<2^Y(e,2))<<2^Y(e,3):0}function Ze(e){return e.trim()}function Nt(e,t){return(e=t.exec(e))?e[0]:e}function T(e,t,r){return e.replace(t,r)}function Fe(e,t){return e.indexOf(t)}function Y(e,t){return e.charCodeAt(t)|0}function be(e,t,r){return e.slice(t,r)}function ie(e){return e.length}function De(e){return e.length}function Ce(e,t){return t.push(e),e}function Ft(e,t){return e.map(t).join("")}var Ae=1,fe=1,Qe=0,J=0,B=0,pe="";function Ie(e,t,r,n,a,i,o){return{value:e,root:t,parent:r,type:n,props:a,children:i,line:Ae,column:fe,length:o,return:""}}function we(e,t){return $t(Ie("",null,null,"",null,null,0),e,{length:-e.length},t)}function Dt(){return B}function Ut(){return B=J>0?Y(pe,--J):0,fe--,B===10&&(fe=1,Ae--),B}function Q(){return B=J<Qe?Y(pe,J++):0,fe++,B===10&&(fe=1,Ae++),B}function oe(){return Y(pe,J)}function Re(){return J}function xe(e,t){return be(pe,e,t)}function Pe(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function et(e){return Ae=fe=1,Qe=ie(pe=e),J=0,[]}function tt(e){return pe="",e}function Oe(e){return Ze(xe(J-1,Ue(e===91?e+2:e===40?e+1:e)))}function Bt(e){for(;(B=oe())&&B<33;)Q();return Pe(e)>2||Pe(B)>3?"":" "}function Mt(e,t){for(;--t&&Q()&&!(B<48||B>102||B>57&&B<65||B>70&&B<97););return xe(e,Re()+(t<6&&oe()==32&&Q()==32))}function Ue(e){for(;Q();)switch(B){case e:return J;case 34:case 39:e!==34&&e!==39&&Ue(B);break;case 40:e===41&&Ue(e);break;case 92:Q();break}return J}function zt(e,t){for(;Q()&&e+B!==57;)if(e+B===84&&oe()===47)break;return"/*"+xe(t,J-1)+"*"+Te(e===47?e:Q())}function Wt(e){for(;!Pe(oe());)Q();return xe(e,J)}function Yt(e){return tt(je("",null,null,null,[""],e=et(e),0,[0],e))}function je(e,t,r,n,a,i,o,l,u){for(var m=0,c=0,p=o,x=0,k=0,v=0,d=1,y=1,g=1,E=0,j="",C=a,V=i,$=n,f=j;y;)switch(v=E,E=Q()){case 40:if(v!=108&&Y(f,p-1)==58){Fe(f+=T(Oe(E),"&","&\f"),"&\f")!=-1&&(g=-1);break}case 34:case 39:case 91:f+=Oe(E);break;case 9:case 10:case 13:case 32:f+=Bt(v);break;case 92:f+=Mt(Re()-1,7);continue;case 47:switch(oe()){case 42:case 47:Ce(Gt(zt(Q(),Re()),t,r),u);break;default:f+="/"}break;case 123*d:l[m++]=ie(f)*g;case 125*d:case 59:case 0:switch(E){case 0:case 125:y=0;case 59+c:g==-1&&(f=T(f,/\f/g,"")),k>0&&ie(f)-p&&Ce(k>32?nt(f+";",n,r,p-1):nt(T(f," ","")+";",n,r,p-2),u);break;case 59:f+=";";default:if(Ce($=rt(f,t,r,m,c,a,l,j,C=[],V=[],p),i),E===123)if(c===0)je(f,t,$,$,C,i,p,l,V);else switch(x===99&&Y(f,3)===110?100:x){case 100:case 108:case 109:case 115:je(e,$,$,n&&Ce(rt(e,$,$,0,0,a,l,j,a,C=[],p),V),a,V,p,l,n?C:V);break;default:je(f,$,$,$,[""],V,0,l,V)}}m=c=k=0,d=g=1,j=f="",p=o;break;case 58:p=1+ie(f),k=v;default:if(d<1){if(E==123)--d;else if(E==125&&d++==0&&Ut()==125)continue}switch(f+=Te(E),E*d){case 38:g=c>0?1:(f+="\f",-1);break;case 44:l[m++]=(ie(f)-1)*g,g=1;break;case 64:oe()===45&&(f+=Oe(Q())),x=oe(),c=p=ie(j=f+=Wt(Re())),E++;break;case 45:v===45&&ie(f)==2&&(d=0)}}return i}function rt(e,t,r,n,a,i,o,l,u,m,c){for(var p=a-1,x=a===0?i:[""],k=De(x),v=0,d=0,y=0;v<n;++v)for(var g=0,E=be(e,p+1,p=Vt(d=o[v])),j=e;g<k;++g)(j=Ze(d>0?x[g]+" "+E:T(E,/&\f/g,x[g])))&&(u[y++]=j);return Ie(e,t,r,a===0?Le:l,u,m,c)}function Gt(e,t,r){return Ie(e,t,r,Ke,Te(Dt()),be(e,2,-2),0)}function nt(e,t,r,n){return Ie(e,t,r,Ne,be(e,0,n),be(e,n+1,-1),n)}function he(e,t){for(var r="",n=De(e),a=0;a<n;a++)r+=t(e[a],a,e,t)||"";return r}function qt(e,t,r,n){switch(e.type){case jt:if(e.children.length)break;case Ot:case Ne:return e.return=e.return||e.value;case Ke:return"";case Je:return e.return=e.value+"{"+he(e.children,n)+"}";case Le:e.value=e.props.join(",")}return ie(r=he(e.children,n))?e.return=e.value+"{"+r+"}":""}function Ht(e){var t=De(e);return function(r,n,a,i){for(var o="",l=0;l<t;l++)o+=e[l](r,n,a,i)||"";return o}}function Xt(e){return function(t){t.root||(t=t.return)&&e(t)}}function at(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Kt=function(t,r,n){for(var a=0,i=0;a=i,i=oe(),a===38&&i===12&&(r[n]=1),!Pe(i);)Q();return xe(t,J)},Jt=function(t,r){var n=-1,a=44;do switch(Pe(a)){case 0:a===38&&oe()===12&&(r[n]=1),t[n]+=Kt(J-1,r,n);break;case 2:t[n]+=Oe(a);break;case 4:if(a===44){t[++n]=oe()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=Te(a)}while(a=Q());return t},Zt=function(t,r){return tt(Jt(et(t),r))},it=new WeakMap,Qt=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,n=t.parent,a=t.column===n.column&&t.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!it.get(n))&&!a){it.set(t,!0);for(var i=[],o=Zt(r,i),l=n.props,u=0,m=0;u<o.length;u++)for(var c=0;c<l.length;c++,m++)t.props[m]=i[u]?o[u].replace(/&\f/g,l[c]):l[c]+" "+o[u]}}},er=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function ot(e,t){switch(Lt(e,t)){case 5103:return S+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return S+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return S+e+Se+e+H+e+e;case 6828:case 4268:return S+e+H+e+e;case 6165:return S+e+H+"flex-"+e+e;case 5187:return S+e+T(e,/(\w+).+(:[^]+)/,S+"box-$1$2"+H+"flex-$1$2")+e;case 5443:return S+e+H+"flex-item-"+T(e,/flex-|-self/,"")+e;case 4675:return S+e+H+"flex-line-pack"+T(e,/align-content|flex-|-self/,"")+e;case 5548:return S+e+H+T(e,"shrink","negative")+e;case 5292:return S+e+H+T(e,"basis","preferred-size")+e;case 6060:return S+"box-"+T(e,"-grow","")+S+e+H+T(e,"grow","positive")+e;case 4554:return S+T(e,/([^-])(transform)/g,"$1"+S+"$2")+e;case 6187:return T(T(T(e,/(zoom-|grab)/,S+"$1"),/(image-set)/,S+"$1"),e,"")+e;case 5495:case 3959:return T(e,/(image-set\([^]*)/,S+"$1$`$1");case 4968:return T(T(e,/(.+:)(flex-)?(.*)/,S+"box-pack:$3"+H+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+S+e+e;case 4095:case 3583:case 4068:case 2532:return T(e,/(.+)-inline(.+)/,S+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ie(e)-1-t>6)switch(Y(e,t+1)){case 109:if(Y(e,t+4)!==45)break;case 102:return T(e,/(.+:)(.+)-([^]+)/,"$1"+S+"$2-$3$1"+Se+(Y(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Fe(e,"stretch")?ot(T(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Y(e,t+1)!==115)break;case 6444:switch(Y(e,ie(e)-3-(~Fe(e,"!important")&&10))){case 107:return T(e,":",":"+S)+e;case 101:return T(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+S+(Y(e,14)===45?"inline-":"")+"box$3$1"+S+"$2$3$1"+H+"$2box$3")+e}break;case 5936:switch(Y(e,t+11)){case 114:return S+e+H+T(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return S+e+H+T(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return S+e+H+T(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return S+e+H+e+e}return e}var tr=function(t,r,n,a){if(t.length>-1&&!t.return)switch(t.type){case Ne:t.return=ot(t.value,t.length);break;case Je:return he([we(t,{value:T(t.value,"@","@"+S)})],a);case Le:if(t.length)return Ft(t.props,function(i){switch(Nt(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return he([we(t,{props:[T(i,/:(read-\w+)/,":"+Se+"$1")]})],a);case"::placeholder":return he([we(t,{props:[T(i,/:(plac\w+)/,":"+S+"input-$1")]}),we(t,{props:[T(i,/:(plac\w+)/,":"+Se+"$1")]}),we(t,{props:[T(i,/:(plac\w+)/,H+"input-$1")]})],a)}return""})}},rr=[tr],nr=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(d){var y=d.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(d),d.setAttribute("data-s",""))})}var a=t.stylisPlugins||rr,i={},o,l=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(d){for(var y=d.getAttribute("data-emotion").split(" "),g=1;g<y.length;g++)i[y[g]]=!0;l.push(d)});var u,m=[Qt,er];{var c,p=[qt,Xt(function(d){c.insert(d)})],x=Ht(m.concat(a,p)),k=function(y){return he(Yt(y),x)};u=function(y,g,E,j){c=E,k(y?y+"{"+g.styles+"}":g.styles),j&&(v.inserted[g.name]=!0)}}var v={key:r,sheet:new Rt({key:r,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:u};return v.sheet.hydrate(l),v},ar=!0;function ir(e,t,r){var n="";return r.split(" ").forEach(function(a){e[a]!==void 0?t.push(e[a]+";"):a&&(n+=a+" ")}),n}var st=function(t,r,n){var a=t.key+"-"+r.name;(n===!1||ar===!1)&&t.registered[a]===void 0&&(t.registered[a]=r.styles)},or=function(t,r,n){st(t,r,n);var a=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var i=r;do t.insert(r===i?"."+a:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function sr(e){for(var t=0,r,n=0,a=e.length;a>=4;++n,a-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var lr={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},cr=/[A-Z]|^ms/g,ur=/_EMO_([^_]+?)_([^]*?)_EMO_/g,lt=function(t){return t.charCodeAt(1)===45},ct=function(t){return t!=null&&typeof t!="boolean"},Be=at(function(e){return lt(e)?e:e.replace(cr,"-$&").toLowerCase()}),ut=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(ur,function(n,a,i){return se={name:a,styles:i,next:se},a})}return lr[t]!==1&&!lt(t)&&typeof r=="number"&&r!==0?r+"px":r};function ke(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var a=r;if(a.anim===1)return se={name:a.name,styles:a.styles,next:se},a.name;var i=r;if(i.styles!==void 0){var o=i.next;if(o!==void 0)for(;o!==void 0;)se={name:o.name,styles:o.styles,next:se},o=o.next;var l=i.styles+";";return l}return dr(e,t,r)}case"function":{if(e!==void 0){var u=se,m=r(e);return se=u,ke(e,t,m)}break}}var c=r;if(t==null)return c;var p=t[c];return p!==void 0?p:c}function dr(e,t,r){var n="";if(Array.isArray(r))for(var a=0;a<r.length;a++)n+=ke(e,t,r[a])+";";else for(var i in r){var o=r[i];if(typeof o!="object"){var l=o;t!=null&&t[l]!==void 0?n+=i+"{"+t[l]+"}":ct(l)&&(n+=Be(i)+":"+ut(i,l)+";")}else if(Array.isArray(o)&&typeof o[0]=="string"&&(t==null||t[o[0]]===void 0))for(var u=0;u<o.length;u++)ct(o[u])&&(n+=Be(i)+":"+ut(i,o[u])+";");else{var m=ke(e,t,o);switch(i){case"animation":case"animationName":{n+=Be(i)+":"+m+";";break}default:n+=i+"{"+m+"}"}}}return n}var dt=/label:\s*([^\s;{]+)\s*(;|$)/g,se;function fr(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,a="";se=void 0;var i=e[0];if(i==null||i.raw===void 0)n=!1,a+=ke(r,t,i);else{var o=i;a+=o[0]}for(var l=1;l<e.length;l++)if(a+=ke(r,t,e[l]),n){var u=i;a+=u[l]}dt.lastIndex=0;for(var m="",c;(c=dt.exec(a))!==null;)m+="-"+c[1];var p=sr(a)+m;return{name:p,styles:a,next:se}}var pr=function(t){return t()},hr=ce.useInsertionEffect?ce.useInsertionEffect:!1,mr=hr||pr,ft=ce.createContext(typeof HTMLElement<"u"?nr({key:"css"}):null);ft.Provider;var yr=function(t){return P.forwardRef(function(r,n){var a=P.useContext(ft);return t(r,a,n)})},gr=ce.createContext({}),vr=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,br=at(function(e){return vr.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),wr=br,xr=function(t){return t!=="theme"},pt=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?wr:xr},ht=function(t,r,n){var a;if(r){var i=r.shouldForwardProp;a=t.__emotion_forwardProp&&i?function(o){return t.__emotion_forwardProp(o)&&i(o)}:i}return typeof a!="function"&&n&&(a=t.__emotion_forwardProp),a},Pr=function(t){var r=t.cache,n=t.serialized,a=t.isStringTag;return st(r,n,a),mr(function(){return or(r,n,a)}),null},kr=function e(t,r){var n=t.__emotion_real===t,a=n&&t.__emotion_base||t,i,o;r!==void 0&&(i=r.label,o=r.target);var l=ht(t,r,n),u=l||pt(a),m=!u("as");return function(){var c=arguments,p=n&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(i!==void 0&&p.push("label:"+i+";"),c[0]==null||c[0].raw===void 0)p.push.apply(p,c);else{var x=c[0];p.push(x[0]);for(var k=c.length,v=1;v<k;v++)p.push(c[v],x[v])}var d=yr(function(y,g,E){var j=m&&y.as||a,C="",V=[],$=y;if(y.theme==null){$={};for(var f in y)$[f]=y[f];$.theme=ce.useContext(gr)}typeof y.className=="string"?C=ir(g.registered,V,y.className):y.className!=null&&(C=y.className+" ");var X=fr(p.concat(V),g.registered,$);C+=g.key+"-"+X.name,o!==void 0&&(C+=" "+o);var _=m&&l===void 0?pt(j):u,N={};for(var G in y)m&&G==="as"||_(G)&&(N[G]=y[G]);return N.className=C,E&&(N.ref=E),ce.createElement(ce.Fragment,null,ce.createElement(Pr,{cache:g,serialized:X,isStringTag:typeof j=="string"}),ce.createElement(j,N))});return d.displayName=i!==void 0?i:"Styled("+(typeof a=="string"?a:a.displayName||a.name||"Component")+")",d.defaultProps=t.defaultProps,d.__emotion_real=d,d.__emotion_base=a,d.__emotion_styles=p,d.__emotion_forwardProp=l,Object.defineProperty(d,"toString",{value:function(){return"."+o}}),d.withComponent=function(y,g){var E=e(y,$e({},r,g,{shouldForwardProp:ht(d,g,!0)}));return E.apply(void 0,p)},d}},Er=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],me=kr.bind(null);Er.forEach(function(e){me[e]=me(e)});const _r=me.div`
22
+ <%s key={someKey} {...props} />`,B,p,b,p),ae[p+B]=!0)}if(p=null,N!==void 0&&(r(N),p=""+N),o(w)&&(r(w.key),p=""+w.key),"key"in w){N={};for(var A in w)A!=="key"&&(N[A]=w[A])}else N=w;return p&&l(N,typeof s=="function"?s.displayName||s.name||"Unknown":s),h(s,p,D,O,a(),N,re,le)}function f(s){typeof s=="object"&&s!==null&&s.$$typeof===k&&s._store&&(s._store.validated=1)}var x=P,k=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),m=Symbol.for("react.strict_mode"),g=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),V=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),_=Symbol.for("react.client.reference"),z=x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,S=Object.prototype.hasOwnProperty,Y=Array.isArray,U=console.createTask?console.createTask:function(){return null};x={"react-stack-bottom-frame":function(s){return s()}};var G,te={},J=x["react-stack-bottom-frame"].bind(x,i)(),ne=U(n(i)),ae={};ve.Fragment=d,ve.jsx=function(s,w,N,B,O){var D=1e4>z.recentlyCreatedOwnerStacks++;return c(s,w,N,!1,B,O,D?Error("react-stack-top-frame"):J,D?U(n(s)):ne)},ve.jsxs=function(s,w,N,B,O){var D=1e4>z.recentlyCreatedOwnerStacks++;return c(s,w,N,!0,B,O,D?Error("react-stack-top-frame"):J,D?U(n(s)):ne)}}()),ve}var Xe;function Tt(){return Xe||(Xe=1,process.env.NODE_ENV==="production"?_e.exports=St():_e.exports=It()),_e.exports}var W=Tt();function $e(){return $e=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$e.apply(null,arguments)}function Ct(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function At(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var Rt=function(){function e(r){var n=this;this._insertTag=function(a){var i;n.tags.length===0?n.insertionPoint?i=n.insertionPoint.nextSibling:n.prepend?i=n.container.firstChild:i=n.before:i=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(a,i),n.tags.push(a)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(At(this));var a=this.tags[this.tags.length-1];if(this.isSpeedy){var i=Ct(a);try{i.insertRule(n,i.cssRules.length)}catch{}}else a.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){var a;return(a=n.parentNode)==null?void 0:a.removeChild(n)}),this.tags=[],this.ctr=0},e}(),X="-ms-",Se="-moz-",I="-webkit-",Ke="comm",Le="rule",Ne="decl",Ot="@import",Je="@keyframes",jt="@layer",Vt=Math.abs,Ie=String.fromCharCode,$t=Object.assign;function Lt(e,t){return q(e,0)^45?(((t<<2^q(e,0))<<2^q(e,1))<<2^q(e,2))<<2^q(e,3):0}function Ze(e){return e.trim()}function Nt(e,t){return(e=t.exec(e))?e[0]:e}function T(e,t,r){return e.replace(t,r)}function Fe(e,t){return e.indexOf(t)}function q(e,t){return e.charCodeAt(t)|0}function be(e,t,r){return e.slice(t,r)}function ie(e){return e.length}function De(e){return e.length}function Te(e,t){return t.push(e),e}function Ft(e,t){return e.map(t).join("")}var Ce=1,fe=1,Qe=0,Z=0,M=0,pe="";function Ae(e,t,r,n,a,i,o){return{value:e,root:t,parent:r,type:n,props:a,children:i,line:Ce,column:fe,length:o,return:""}}function we(e,t){return $t(Ae("",null,null,"",null,null,0),e,{length:-e.length},t)}function Dt(){return M}function Ut(){return M=Z>0?q(pe,--Z):0,fe--,M===10&&(fe=1,Ce--),M}function Q(){return M=Z<Qe?q(pe,Z++):0,fe++,M===10&&(fe=1,Ce++),M}function oe(){return q(pe,Z)}function Re(){return Z}function xe(e,t){return be(pe,e,t)}function Pe(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function et(e){return Ce=fe=1,Qe=ie(pe=e),Z=0,[]}function tt(e){return pe="",e}function Oe(e){return Ze(xe(Z-1,Ue(e===91?e+2:e===40?e+1:e)))}function Bt(e){for(;(M=oe())&&M<33;)Q();return Pe(e)>2||Pe(M)>3?"":" "}function Mt(e,t){for(;--t&&Q()&&!(M<48||M>102||M>57&&M<65||M>70&&M<97););return xe(e,Re()+(t<6&&oe()==32&&Q()==32))}function Ue(e){for(;Q();)switch(M){case e:return Z;case 34:case 39:e!==34&&e!==39&&Ue(M);break;case 40:e===41&&Ue(e);break;case 92:Q();break}return Z}function zt(e,t){for(;Q()&&e+M!==57;)if(e+M===84&&oe()===47)break;return"/*"+xe(t,Z-1)+"*"+Ie(e===47?e:Q())}function Wt(e){for(;!Pe(oe());)Q();return xe(e,Z)}function Yt(e){return tt(je("",null,null,null,[""],e=et(e),0,[0],e))}function je(e,t,r,n,a,i,o,l,u){for(var h=0,c=0,f=o,x=0,k=0,v=0,d=1,m=1,g=1,E=0,V="",C=a,$=i,L=n,y=V;m;)switch(v=E,E=Q()){case 40:if(v!=108&&q(y,f-1)==58){Fe(y+=T(Oe(E),"&","&\f"),"&\f")!=-1&&(g=-1);break}case 34:case 39:case 91:y+=Oe(E);break;case 9:case 10:case 13:case 32:y+=Bt(v);break;case 92:y+=Mt(Re()-1,7);continue;case 47:switch(oe()){case 42:case 47:Te(Gt(zt(Q(),Re()),t,r),u);break;default:y+="/"}break;case 123*d:l[h++]=ie(y)*g;case 125*d:case 59:case 0:switch(E){case 0:case 125:m=0;case 59+c:g==-1&&(y=T(y,/\f/g,"")),k>0&&ie(y)-f&&Te(k>32?nt(y+";",n,r,f-1):nt(T(y," ","")+";",n,r,f-2),u);break;case 59:y+=";";default:if(Te(L=rt(y,t,r,h,c,a,l,V,C=[],$=[],f),i),E===123)if(c===0)je(y,t,L,L,C,i,f,l,$);else switch(x===99&&q(y,3)===110?100:x){case 100:case 108:case 109:case 115:je(e,L,L,n&&Te(rt(e,L,L,0,0,a,l,V,a,C=[],f),$),a,$,f,l,n?C:$);break;default:je(y,L,L,L,[""],$,0,l,$)}}h=c=k=0,d=g=1,V=y="",f=o;break;case 58:f=1+ie(y),k=v;default:if(d<1){if(E==123)--d;else if(E==125&&d++==0&&Ut()==125)continue}switch(y+=Ie(E),E*d){case 38:g=c>0?1:(y+="\f",-1);break;case 44:l[h++]=(ie(y)-1)*g,g=1;break;case 64:oe()===45&&(y+=Oe(Q())),x=oe(),c=f=ie(V=y+=Wt(Re())),E++;break;case 45:v===45&&ie(y)==2&&(d=0)}}return i}function rt(e,t,r,n,a,i,o,l,u,h,c){for(var f=a-1,x=a===0?i:[""],k=De(x),v=0,d=0,m=0;v<n;++v)for(var g=0,E=be(e,f+1,f=Vt(d=o[v])),V=e;g<k;++g)(V=Ze(d>0?x[g]+" "+E:T(E,/&\f/g,x[g])))&&(u[m++]=V);return Ae(e,t,r,a===0?Le:l,u,h,c)}function Gt(e,t,r){return Ae(e,t,r,Ke,Ie(Dt()),be(e,2,-2),0)}function nt(e,t,r,n){return Ae(e,t,r,Ne,be(e,0,n),be(e,n+1,-1),n)}function he(e,t){for(var r="",n=De(e),a=0;a<n;a++)r+=t(e[a],a,e,t)||"";return r}function qt(e,t,r,n){switch(e.type){case jt:if(e.children.length)break;case Ot:case Ne:return e.return=e.return||e.value;case Ke:return"";case Je:return e.return=e.value+"{"+he(e.children,n)+"}";case Le:e.value=e.props.join(",")}return ie(r=he(e.children,n))?e.return=e.value+"{"+r+"}":""}function Ht(e){var t=De(e);return function(r,n,a,i){for(var o="",l=0;l<t;l++)o+=e[l](r,n,a,i)||"";return o}}function Xt(e){return function(t){t.root||(t=t.return)&&e(t)}}function at(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Kt=function(t,r,n){for(var a=0,i=0;a=i,i=oe(),a===38&&i===12&&(r[n]=1),!Pe(i);)Q();return xe(t,Z)},Jt=function(t,r){var n=-1,a=44;do switch(Pe(a)){case 0:a===38&&oe()===12&&(r[n]=1),t[n]+=Kt(Z-1,r,n);break;case 2:t[n]+=Oe(a);break;case 4:if(a===44){t[++n]=oe()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=Ie(a)}while(a=Q());return t},Zt=function(t,r){return tt(Jt(et(t),r))},it=new WeakMap,Qt=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,n=t.parent,a=t.column===n.column&&t.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!it.get(n))&&!a){it.set(t,!0);for(var i=[],o=Zt(r,i),l=n.props,u=0,h=0;u<o.length;u++)for(var c=0;c<l.length;c++,h++)t.props[h]=i[u]?o[u].replace(/&\f/g,l[c]):l[c]+" "+o[u]}}},er=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function ot(e,t){switch(Lt(e,t)){case 5103:return I+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return I+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return I+e+Se+e+X+e+e;case 6828:case 4268:return I+e+X+e+e;case 6165:return I+e+X+"flex-"+e+e;case 5187:return I+e+T(e,/(\w+).+(:[^]+)/,I+"box-$1$2"+X+"flex-$1$2")+e;case 5443:return I+e+X+"flex-item-"+T(e,/flex-|-self/,"")+e;case 4675:return I+e+X+"flex-line-pack"+T(e,/align-content|flex-|-self/,"")+e;case 5548:return I+e+X+T(e,"shrink","negative")+e;case 5292:return I+e+X+T(e,"basis","preferred-size")+e;case 6060:return I+"box-"+T(e,"-grow","")+I+e+X+T(e,"grow","positive")+e;case 4554:return I+T(e,/([^-])(transform)/g,"$1"+I+"$2")+e;case 6187:return T(T(T(e,/(zoom-|grab)/,I+"$1"),/(image-set)/,I+"$1"),e,"")+e;case 5495:case 3959:return T(e,/(image-set\([^]*)/,I+"$1$`$1");case 4968:return T(T(e,/(.+:)(flex-)?(.*)/,I+"box-pack:$3"+X+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+I+e+e;case 4095:case 3583:case 4068:case 2532:return T(e,/(.+)-inline(.+)/,I+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ie(e)-1-t>6)switch(q(e,t+1)){case 109:if(q(e,t+4)!==45)break;case 102:return T(e,/(.+:)(.+)-([^]+)/,"$1"+I+"$2-$3$1"+Se+(q(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Fe(e,"stretch")?ot(T(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(q(e,t+1)!==115)break;case 6444:switch(q(e,ie(e)-3-(~Fe(e,"!important")&&10))){case 107:return T(e,":",":"+I)+e;case 101:return T(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+I+(q(e,14)===45?"inline-":"")+"box$3$1"+I+"$2$3$1"+X+"$2box$3")+e}break;case 5936:switch(q(e,t+11)){case 114:return I+e+X+T(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return I+e+X+T(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return I+e+X+T(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return I+e+X+e+e}return e}var tr=function(t,r,n,a){if(t.length>-1&&!t.return)switch(t.type){case Ne:t.return=ot(t.value,t.length);break;case Je:return he([we(t,{value:T(t.value,"@","@"+I)})],a);case Le:if(t.length)return Ft(t.props,function(i){switch(Nt(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return he([we(t,{props:[T(i,/:(read-\w+)/,":"+Se+"$1")]})],a);case"::placeholder":return he([we(t,{props:[T(i,/:(plac\w+)/,":"+I+"input-$1")]}),we(t,{props:[T(i,/:(plac\w+)/,":"+Se+"$1")]}),we(t,{props:[T(i,/:(plac\w+)/,X+"input-$1")]})],a)}return""})}},rr=[tr],nr=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(d){var m=d.getAttribute("data-emotion");m.indexOf(" ")!==-1&&(document.head.appendChild(d),d.setAttribute("data-s",""))})}var a=t.stylisPlugins||rr,i={},o,l=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(d){for(var m=d.getAttribute("data-emotion").split(" "),g=1;g<m.length;g++)i[m[g]]=!0;l.push(d)});var u,h=[Qt,er];{var c,f=[qt,Xt(function(d){c.insert(d)})],x=Ht(h.concat(a,f)),k=function(m){return he(Yt(m),x)};u=function(m,g,E,V){c=E,k(m?m+"{"+g.styles+"}":g.styles),V&&(v.inserted[g.name]=!0)}}var v={key:r,sheet:new Rt({key:r,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:u};return v.sheet.hydrate(l),v},ar=!0;function ir(e,t,r){var n="";return r.split(" ").forEach(function(a){e[a]!==void 0?t.push(e[a]+";"):a&&(n+=a+" ")}),n}var st=function(t,r,n){var a=t.key+"-"+r.name;(n===!1||ar===!1)&&t.registered[a]===void 0&&(t.registered[a]=r.styles)},or=function(t,r,n){st(t,r,n);var a=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var i=r;do t.insert(r===i?"."+a:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function sr(e){for(var t=0,r,n=0,a=e.length;a>=4;++n,a-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var lr={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},cr=/[A-Z]|^ms/g,ur=/_EMO_([^_]+?)_([^]*?)_EMO_/g,lt=function(t){return t.charCodeAt(1)===45},ct=function(t){return t!=null&&typeof t!="boolean"},Be=at(function(e){return lt(e)?e:e.replace(cr,"-$&").toLowerCase()}),ut=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(ur,function(n,a,i){return se={name:a,styles:i,next:se},a})}return lr[t]!==1&&!lt(t)&&typeof r=="number"&&r!==0?r+"px":r};function ke(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var a=r;if(a.anim===1)return se={name:a.name,styles:a.styles,next:se},a.name;var i=r;if(i.styles!==void 0){var o=i.next;if(o!==void 0)for(;o!==void 0;)se={name:o.name,styles:o.styles,next:se},o=o.next;var l=i.styles+";";return l}return dr(e,t,r)}case"function":{if(e!==void 0){var u=se,h=r(e);return se=u,ke(e,t,h)}break}}var c=r;if(t==null)return c;var f=t[c];return f!==void 0?f:c}function dr(e,t,r){var n="";if(Array.isArray(r))for(var a=0;a<r.length;a++)n+=ke(e,t,r[a])+";";else for(var i in r){var o=r[i];if(typeof o!="object"){var l=o;t!=null&&t[l]!==void 0?n+=i+"{"+t[l]+"}":ct(l)&&(n+=Be(i)+":"+ut(i,l)+";")}else if(Array.isArray(o)&&typeof o[0]=="string"&&(t==null||t[o[0]]===void 0))for(var u=0;u<o.length;u++)ct(o[u])&&(n+=Be(i)+":"+ut(i,o[u])+";");else{var h=ke(e,t,o);switch(i){case"animation":case"animationName":{n+=Be(i)+":"+h+";";break}default:n+=i+"{"+h+"}"}}}return n}var dt=/label:\s*([^\s;{]+)\s*(;|$)/g,se;function fr(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,a="";se=void 0;var i=e[0];if(i==null||i.raw===void 0)n=!1,a+=ke(r,t,i);else{var o=i;a+=o[0]}for(var l=1;l<e.length;l++)if(a+=ke(r,t,e[l]),n){var u=i;a+=u[l]}dt.lastIndex=0;for(var h="",c;(c=dt.exec(a))!==null;)h+="-"+c[1];var f=sr(a)+h;return{name:f,styles:a,next:se}}var pr=function(t){return t()},hr=ce.useInsertionEffect?ce.useInsertionEffect:!1,mr=hr||pr,ft=ce.createContext(typeof HTMLElement<"u"?nr({key:"css"}):null);ft.Provider;var yr=function(t){return P.forwardRef(function(r,n){var a=P.useContext(ft);return t(r,a,n)})},gr=ce.createContext({}),vr=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,br=at(function(e){return vr.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),wr=br,xr=function(t){return t!=="theme"},pt=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?wr:xr},ht=function(t,r,n){var a;if(r){var i=r.shouldForwardProp;a=t.__emotion_forwardProp&&i?function(o){return t.__emotion_forwardProp(o)&&i(o)}:i}return typeof a!="function"&&n&&(a=t.__emotion_forwardProp),a},Pr=function(t){var r=t.cache,n=t.serialized,a=t.isStringTag;return st(r,n,a),mr(function(){return or(r,n,a)}),null},kr=function e(t,r){var n=t.__emotion_real===t,a=n&&t.__emotion_base||t,i,o;r!==void 0&&(i=r.label,o=r.target);var l=ht(t,r,n),u=l||pt(a),h=!u("as");return function(){var c=arguments,f=n&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(i!==void 0&&f.push("label:"+i+";"),c[0]==null||c[0].raw===void 0)f.push.apply(f,c);else{var x=c[0];f.push(x[0]);for(var k=c.length,v=1;v<k;v++)f.push(c[v],x[v])}var d=yr(function(m,g,E){var V=h&&m.as||a,C="",$=[],L=m;if(m.theme==null){L={};for(var y in m)L[y]=m[y];L.theme=ce.useContext(gr)}typeof m.className=="string"?C=ir(g.registered,$,m.className):m.className!=null&&(C=m.className+" ");var K=fr(f.concat($),g.registered,L);C+=g.key+"-"+K.name,o!==void 0&&(C+=" "+o);var F=h&&l===void 0?pt(V):u,_={};for(var z in m)h&&z==="as"||F(z)&&(_[z]=m[z]);return _.className=C,E&&(_.ref=E),ce.createElement(ce.Fragment,null,ce.createElement(Pr,{cache:g,serialized:K,isStringTag:typeof V=="string"}),ce.createElement(V,_))});return d.displayName=i!==void 0?i:"Styled("+(typeof a=="string"?a:a.displayName||a.name||"Component")+")",d.defaultProps=t.defaultProps,d.__emotion_real=d,d.__emotion_base=a,d.__emotion_styles=f,d.__emotion_forwardProp=l,Object.defineProperty(d,"toString",{value:function(){return"."+o}}),d.withComponent=function(m,g){var E=e(m,$e({},r,g,{shouldForwardProp:ht(d,g,!0)}));return E.apply(void 0,f)},d}},Er=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],me=kr.bind(null);Er.forEach(function(e){me[e]=me(e)});const _r=me.div`
23
23
  display: flex;
24
24
  align-items: center;
25
25
  justify-content: center;
@@ -47,7 +47,7 @@ React keys must be passed directly to JSX without using spread:
47
47
  background-color: rgba(255, 165, 0, 0.1);
48
48
  border: 1px solid orange;
49
49
  `;default:return""}}}
50
- `,Me=({type:e,children:t,className:r,icon:n,action:a})=>z.jsxs(_r,{type:e,className:r,children:[n&&z.jsx("span",{children:n}),z.jsx("span",{children:t}),a&&z.jsx("span",{children:a})]}),ze=me.div`
50
+ `,Me=({type:e,children:t,className:r,icon:n,action:a})=>W.jsxs(_r,{type:e,className:r,children:[n&&W.jsx("span",{children:n}),W.jsx("span",{children:t}),a&&W.jsx("span",{children:a})]}),ze=me.div`
51
51
  width: ${({width:e})=>e||"100%"};
52
52
  height: ${({height:e})=>e||"100%"};
53
53
  border-radius: 0px !important; /* Force remove rounded corners on container */
@@ -78,4 +78,4 @@ React keys must be passed directly to JSX without using spread:
78
78
  height: auto;
79
79
  z-index: 1001;
80
80
  max-height: 100vh;
81
- `,Sr=(e,t)=>`https://vp-api.gjirafa.tech/api/v2/projects/${e}/videos?search=${t}`,gt=(e,t)=>`https://vp-api.gjirafa.tech/api/projects/${e}/playlists/${t}/videos`,Tr=(e,t)=>`https://vp-api.gjirafa.tech/api/projects/${e}/playlists/${t}`,Cr=e=>`https://host.vpplayer.tech/player/${e}/vpplayer.js`,We=(e,t)=>`vp-player-${e||"default"}-${t||""}`,Ye=new Map,vt=(e,t)=>{const[r,n]=P.useState(!1),[a,i]=P.useState(null);return P.useEffect(()=>{let o=null,l,u=0;const m=3;let c;try{c=t||Cr(e||"latest")}catch(k){const v=k instanceof Error?k.message:String(k);i(`Failed to resolve script URL: ${v}`),n(!1);return}if(Ye.get(c)){n(!0),i(null);return}if(document.querySelector(`script[src="${c}"]`)){Ye.set(c,!0),n(!0),i(null);return}const x=()=>{o=document.createElement("script"),o.src=c,o.async=!0,l=window.setTimeout(()=>{n(!1),i(`Loading script timed out: ${c}`)},1e4),o.onload=()=>{clearTimeout(l),Ye.set(c,!0),n(!0),i(null)},o.onerror=()=>{clearTimeout(l),u++,u<m?setTimeout(x,1e3*u):(n(!1),i(`Failed to load VP Player script after ${m} attempts: ${c}`))},document.body.appendChild(o)};return x(),()=>{clearTimeout(l),o&&document.body.contains(o)&&document.body.removeChild(o)}},[e,t]),{isLoaded:r,error:a}},Ar={},Ee=new Map,Ir=3e4,Ge=5,bt=({projectId:e,videoId:t,playlistId:r,videoUrl:n,apiKey:a})=>{const[i,o]=P.useState(null),[l,u]=P.useState(null),[m,c]=P.useState(!1),[p,x]=P.useState(null),k=a||(typeof Ar<"u"?"1CFC4B619E9342B6BAC4879BA8C30CF216C4BA9D3F084B11825F4AB2D5CF845E":void 0);return P.useEffect(()=>{const v=t?`video:${t}`:r?`playlist:${r}`:null;if(!e||n||!t&&!r){o(n||null),u(null),c(!1),x(null);return}if(!k){c(!1),x("No API key provided");return}if(v&&Ee.has(v)){const C=Ee.get(v);o(C.url),u(C.playlist),c(!1),x(null);return}let d=!0;const y=new AbortController,g=y.signal,j=setTimeout(async()=>{var V,$,f,X;if(!d)return;c(!0),x(null);let C=0;for(;C<Ge&&d;)try{const _=t&&!r?Sr(e,t):gt(e,r),N=setTimeout(()=>y.abort(),Ir),G=await fetch(_,{method:"GET",headers:{"api-key":k,Accept:"application/json","Cache-Control":"no-cache"},signal:g});if(clearTimeout(N),!G.ok)throw new Error(`Fetch failed with status ${G.status}`);const M=await G.json();if(!d)return;if(t&&!r){const Z=($=(V=M.result)==null?void 0:V.items)==null?void 0:$.find(D=>D.mediaId===t);if(!(Z!=null&&Z.playbackUrl))throw new Error("Invalid video data");o(Z.playbackUrl),u(null),v&&Ee.set(v,{url:Z.playbackUrl,playlist:null})}else{if(!Array.isArray(M.result))throw new Error("Invalid playlist format");const Z=Tr(e,r),D=await fetch(Z,{method:"GET",headers:{"api-key":k,Accept:"application/json","Cache-Control":"no-cache"},signal:g});if(D.ok){const W=await D.json();let te=[...M.result];if((f=W.result)!=null&&f.playlistBackupState&&((X=W.result)!=null&&X.playlistBackupId)){const K=gt(e,W.result.playlistBackupId),ne=await fetch(K,{method:"GET",headers:{"api-key":k,Accept:"application/json","Cache-Control":"no-cache"},signal:g});if(ne.ok){const ae=await ne.json();if(Array.isArray(ae.result)){const s=ae.result.map(w=>({...w,isBackupPlaylist:!0}));te=[...te,...s]}}}u(te),o(null),v&&Ee.set(v,{url:null,playlist:te})}else u(M.result),o(null),v&&Ee.set(v,{url:null,playlist:M.result})}break}catch(_){if(g.aborted){d&&x("Request timed out");break}if(C++,C>=Ge){const N=_ instanceof Error?_.message:String(_);d&&x(`Failed after ${Ge} attempts: ${N}`)}else await new Promise(N=>setTimeout(N,2e3))}d&&c(!1)},100);return()=>{d=!1,clearTimeout(j),y.abort()}},[k,e,t,r,n]),{fetchedPlaybackUrl:i,fetchedPlaylist:l,isLoading:m,error:p}},Rr={projectId:"vp-player-projectId",video:{file:"",playlist:{state:!0,playlistVideoIndex:0,videos:[]}},config:{autoplay:!0,muted:!0,loop:!1,size:{width:"100%",height:"30vh"},controls:{settingsButton:!0,chromecastButton:!1,nextButton:!0,fullscreenButton:!0,airplayButton:!1,bigPlayButton:!1,autopausePlayButton:!0,pictureInPictureButton:!1,relatedButton:!1,volumeButton:!0,shareButton:!0}}},wt=({videoUrl:e,fetchedPlaybackUrl:t,fetchedPlaylist:r,projectId:n,config:a={},isVerticalPlayer:i})=>{var c,p,x,k,v,d,y,g,E,j,C,V,$;const o={...Rr,...a},l={...o.config,...a.config};if(e)return{...o,video:{...o.video,file:e,playlist:void 0},config:l};if(t)return{...o,video:{...o.video,file:t,playlist:void 0},config:l};if(r&&r.length>0){const f=((p=(c=a==null?void 0:a.video)==null?void 0:c.playlist)==null?void 0:p.playlistVideoIndex)??((x=a==null?void 0:a.config)==null?void 0:x.playlistVideoIndex)??0;return i?{...o,projectId:n||"vp-player-projectId",video:{...o.video,file:(k=r[0])==null?void 0:k.hlsUrl,title:(v=r[0])==null?void 0:v.title,playlist:{state:!0,playlistId:"",playlistVideoIndex:Number(f),videos:r.slice(1).map((_,N)=>({videoId:String(N+1),title:_.title,file:_.hlsUrl,thumbnailUrl:_.thumbnailUrl,duration:_.duration}))}},config:l}:{...o,projectId:n||"vp-player-projectId",video:{...o.video,file:((d=r[Number(f)])==null?void 0:d.hlsUrl)||((y=r[0])==null?void 0:y.hlsUrl)||"",title:((g=r[Number(f)])==null?void 0:g.title)||((E=r[0])==null?void 0:E.title),thumbnail:((j=r[Number(f)])==null?void 0:j.thumbnailUrl)||((C=r[0])==null?void 0:C.thumbnailUrl),playlist:{state:!0,playlistVideoIndex:Number(f),videos:r.map((_,N)=>({videoId:String(N),title:_.title,file:_.hlsUrl,thumbnailUrl:_.thumbnailUrl,duration:_.duration}))}},config:l}}const u=((V=a==null?void 0:a.video)==null?void 0:V.playlist)||o.video.playlist,m=($=a==null?void 0:a.video)==null?void 0:$.file;if(m)return{...o,video:{...o.video,file:m,playlist:void 0},config:l};if(u!=null&&u.videos&&u.videos.length>0){const f=u.videos[Number(u.playlistVideoIndex)||0];return{...o,video:{...o.video,file:(f==null?void 0:f.file)||"",playlist:{...u,state:u.state??!0,playlistVideoIndex:Number(u.playlistVideoIndex||0),videos:u.videos}},config:{...o.config,...a==null?void 0:a.config}}}throw new Error("No valid video source found. Provide videoUrl, videoId, playlistId, or config with video.file or playlist.")},xt=e=>{if(!e)return;const t=/https:\/\/host\.vpplayer\.tech\/player\/([^/]+)\/([^/]+)(?:\/[^/]+)?\.js/,r=e.match(t);return r?r[2]:void 0},Pt=({playerId:e,videoId:t,version:r,videoUrl:n,projectId:a,playlistId:i,scriptUrl:o,config:l={},apiKey:u,isReels:m=!1,onPlaylistData:c,onVideoStarted:p})=>{const x=P.useRef(null),k=P.useRef(null),v=P.useRef(!1),d=P.useRef(""),y=P.useRef([]),g=P.useRef([]),E=P.useRef(null),{isLoaded:j,error:C}=vt(r,o),V=t||xt(o),[$,f]=P.useState(null),{fetchedPlaybackUrl:X,fetchedPlaylist:_,isLoading:N,error:G}=bt({projectId:a,videoId:V,playlistId:i,videoUrl:n,apiKey:u}),M=We(e,V);P.useEffect(()=>{_&&c&&c(_)},[_,c]);const Z=P.useMemo(()=>{const D=l.config||{},W=m&&!D.size?{sizeType:"RESPONSIVE",aspectRatio:"9:16"}:D.size||{sizeType:"FIXED",width:"100%"};return{...l,config:{...D,size:W}}},[l,m]);return P.useEffect(()=>{if(C){f(C);return}if(!j||N&&!n)return;let D=!0;const te=setTimeout(async()=>{try{y.current.forEach(F=>clearInterval(F)),y.current=[],g.current.forEach(F=>clearTimeout(F)),g.current=[],E.current=null;const K=(_==null?void 0:_.length)??0,ne=JSON.stringify({playerId:M,videoId:t||V,playlistId:i,videoUrl:n,fetchedPlaybackUrl:X,scriptUrl:o,isReels:m,projectId:a,playlistLength:K});if(v.current&&k.current&&d.current===ne)return;d.current!==ne&&(v.current=!1,d.current=ne);const ae=o==null?void 0:o.includes("vertical-player");if(document.querySelectorAll('[id*="player"]').forEach(F=>{var le,h;const re=F.id;if(re!==M)try{const b=ae?(le=window.vpVerticalPlayer)==null?void 0:le.call(window,re):(h=window.vpPlayer)==null?void 0:h.call(window,re);b!=null&&b.destroy&&b.destroy()}catch(b){console.warn(`Failed to destroy existing player ${re}:`,b)}}),await new Promise(F=>setTimeout(F,100)),!D||!x.current)return;if(!document.getElementById(M)){f("DOM element not found after cleanup.");return}if(!window.vpPlayer&&!window.vpVerticalPlayer){f("VP Player script not loaded.");return}const L=ae?window.vpVerticalPlayer:window.vpPlayer;if(!L){f(`VP ${ae?"Vertical ":""}Player script not loaded.`);return}const U=wt({videoUrl:n,fetchedPlaybackUrl:X??void 0,fetchedPlaylist:_??void 0,projectId:a,config:Z,isVerticalPlayer:ae}),R=L(M);if(!R){f(`Failed to create VP ${ae?"Vertical ":""}Player instance.`);return}if(D&&x.current&&(R.setup(U),k.current=R,v.current=!0,f(null),p&&R.on)){const F=()=>{var b;const h={};if(_&&_.length>0){const A=R.videoIndex??((b=R.playlist)==null?void 0:b.playlistVideoIndex)??0,I=_[A];I&&(h.title=I.title,h.hlsUrl=I.hlsUrl,h.file=I.hlsUrl,h.thumbnailUrl=I.thumbnailUrl,h.duration=I.duration,h.videoIndex=A,h.playlistVideoIndex=A,h.isBackupPlaylist=I.isBackupPlaylist,h.mediaId=I.mediaId,h.videoId=I.mediaId||I.videoId)}else U.video&&(h.title=U.video.title,h.file=U.video.file,h.hlsUrl=U.video.file,h.thumbnailUrl=U.video.thumbnail,h.videoId=t||V,h.videoIndex=0,h.playlistVideoIndex=0,R.getDuration&&(h.duration=R.getDuration()));return h};let re=null;const le=async()=>{var h;try{re&&clearTimeout(re),await new Promise(I=>setTimeout(I,100));let b=F();const A=b.videoId||b.mediaId;if(A&&A===E.current)return;if(re=window.setTimeout(()=>{E.current=null},500),m&&A)try{const ue=`https://host.vpplayer.tech/player/ptkzurnx/${A}.json`,de=await fetch(ue);if(de.ok){const q=await de.json();q&&q.video&&(b={...b,title:q.video.title||b.title,description:q.video.description,publishDate:q.video.publishDate,projectId:q.projectId||b.projectId,premium:((h=q.video.videoLocking)==null?void 0:h.isEnabled)||!1,author:q.video.author,tags:q.video.tags||[]})}}catch{}E.current=A||null,p(b)}catch(b){console.warn("Error in video-started handler:",b)}};if(m){let h=!1,b=-1;const A=()=>{if(!h){h=!0;try{R.on&&R.on("vp-video-started",le),setTimeout(()=>{le(),b=R.videoIndex??0},500)}catch(q){console.error("Error setting up event listeners:",q)}}};let I=0;const ue=15,de=setInterval(()=>{try{const q=R.videoIndex!==void 0||R.playlist;if(!h)I++,(q||I>=ue)&&A();else{const ye=R.videoIndex??0;ye!==b&&b!==-1&&(b=ye,le())}}catch{}},200);y.current.push(de);try{R.on&&R.on("vp-listen-ready",A)}catch{}}else{const h=async b=>{var A,I;try{const ue=o==null?void 0:o.match(/player\/([^/.]+)/),de=ue==null?void 0:ue[1];if(!de||!b)return F();const q=`https://host.vpplayer.tech/player/${de}/${b}.json`,ye=await fetch(q);if(!ye.ok)return console.warn("Failed to fetch full video config:",ye.status),F();const ee=await ye.json();return!ee||!ee.video?F():{videoId:b,title:ee.video.title,description:ee.video.description,file:ee.video.file,hlsUrl:ee.video.file,thumbnailUrl:ee.video.thumbnail,duration:ee.video.duration,publishDate:ee.video.publishDate,projectId:ee.projectId,premium:((A=ee.video.videoLocking)==null?void 0:A.isEnabled)||!1,author:ee.video.author,tags:ee.video.tags||[],videoIndex:R.videoIndex??0,playlistVideoIndex:((I=R.playlist)==null?void 0:I.playlistVideoIndex)??0}}catch(ue){return console.warn("Error fetching full video data:",ue),F()}};R.on("ready",async b=>{try{const A=(b==null?void 0:b.id)||t||V;if(A){const I=await h(A);p(I)}else{const I=F();(I.title||I.file)&&p(I)}}catch(A){console.warn("Error in ready handler:",A)}}),R.on("playlistItem",async b=>{try{const A=b==null?void 0:b.id;if(A){const I=await h(A);p(I)}}catch(A){console.warn("Error in playlistItem handler:",A)}})}}}catch(K){if(D){const ne=K instanceof Error?K.message:String(K);f(ne),console.error("VP Player initialization error:",K)}}},150);return()=>{D=!1,clearTimeout(te),y.current.forEach(K=>clearInterval(K)),y.current=[],g.current.forEach(K=>clearTimeout(K)),g.current=[],v.current=!1}},[j,N,M,C,o]),P.useEffect(()=>()=>{if(k.current){try{k.current.destroy&&k.current.destroy()}catch(W){console.warn(`Failed to destroy player ${M}:`,W)}k.current=null}v.current=!1;const D=document.getElementById(M);D&&(D.innerHTML="")},[M]),{playerRef:x,playerInstanceRef:k,isScriptLoaded:j,isLoading:N,error:G||$||C}},kt=({playerId:e,videoId:t,version:r,videoUrl:n,projectId:a,playlistId:i,scriptUrl:o,config:l={},apiKey:u,isReels:m=!1,hiddenClasses:c=[],onClose:p,className:x,onPlaylistData:k,onVideoStarted:v})=>{var G,M,Z,D;const{playerRef:d,playerInstanceRef:y,isScriptLoaded:g,isLoading:E,error:j}=Pt({playerId:e,videoId:t,version:r,videoUrl:n,projectId:a,playlistId:i,scriptUrl:o,config:l,apiKey:u,isReels:m,onPlaylistData:k,onVideoStarted:v}),[C,V]=P.useState(!0),$=()=>m&&V(!0),f=()=>{var W,te;V(!1),(te=(W=y.current)==null?void 0:W.play)==null||te.call(W),p==null||p()},X=(M=(G=l==null?void 0:l.config)==null?void 0:G.size)!=null&&M.width?typeof l.config.size.width=="number"?`${l.config.size.width}px`:l.config.size.width:void 0,_=(D=(Z=l==null?void 0:l.config)==null?void 0:Z.size)!=null&&D.height?typeof l.config.size.height=="number"?`${l.config.size.height}px`:l.config.size.height:void 0,N=We(e,t);return j?z.jsxs(Me,{type:"error",children:["An error occurred: ",j]}):E||!g?z.jsx(Me,{type:"loading",children:"Loading..."}):z.jsxs(z.Fragment,{children:[m&&!C?z.jsx("div",{onClick:$}):null,!m&&z.jsx("div",{children:z.jsx(ze,{id:N,ref:d,width:X||"100%",height:_||"auto",$hiddenClasses:c,className:x})},N),m&&C&&z.jsx(mt,{onClick:f,className:x,children:z.jsx(yt,{className:x,onClick:W=>W.stopPropagation(),children:z.jsx("div",{children:z.jsx(ze,{id:N,ref:d,width:"100%",height:"auto",$hiddenClasses:c,className:x})},N)})})]})},Et=P.createContext(void 0),Or=({children:e})=>{const[t,r]=P.useState(!1),[n,a]=P.useState(null),[i,o]=P.useState(null),l=P.useCallback(c=>{try{const p=We(c.playerId,c.videoId);a({...c,playerId:p}),r(!0),o(null)}catch{o("Failed to show player.")}},[]),u=P.useCallback(()=>{r(!1),a(null),o(null)},[]),m=P.useMemo(()=>({showPlayer:l,hidePlayer:u,isPlayerVisible:t,playerParams:n}),[l,u,t,n]);return z.jsxs(Et.Provider,{value:m,children:[e,i&&z.jsx(Me,{type:"error",children:i}),t&&(n==null?void 0:n.playerId)&&z.jsx(kt,{playerId:n.playerId,videoId:n.videoId,projectId:n.projectId,videoUrl:n.videoUrl,version:n.version,playlistId:n.playlistId,scriptUrl:n.scriptUrl,config:n.config,isReels:n.isReels,thumbnailUrl:n.thumbnailUrl,onClose:u,hiddenClasses:n.hiddenClasses||[],apiKey:n.apiKey,className:n.className})]})},jr=()=>{const e=P.useContext(Et);if(!e)throw new Error("useVPPlayer must be used within a VPPlayerProvider");return e},Vr={projectId:"vp-player-projectId",video:{file:"",playlist:{state:!0,playlistVideoIndex:0,videos:[]}},config:{autoplay:!0,pauseOtherVideos:!0,focusOnAutostart:!1,muted:!0,loop:!1,size:{width:"100%"},controls:{settingsButton:!0,chromecastButton:!1,nextButton:!1,fullscreenButton:!0,airplayButton:!1,bigPlayButton:!1,autopausePlayButton:!0,pictureInPictureButton:!1,relatedButton:!1,volumeButton:!0,shareButton:!0}}},$r={config:{autostartOnLoad:{state:!0,onMobile:!0,onData:!0},muted:!0}},Lr={config:{autoplay:!0,muted:!0}},Ve={video:{advertising:!0,ads:{skipAd:{state:!0,skipFrom:5}}},config:{adAnnouncement:{state:!0,timeBeforeAd:5},adsRequireInteraction:!1}},Nr=(e,t,r="time",n=0)=>{var a;return{...Ve,video:{...Ve.video,ads:{...(a=Ve.video)==null?void 0:a.ads,adBreaks:[{adTagUrl:t,breakType:e,breakTimingType:r,breakTimingValue:n}]}}}},Fr="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",Dr="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4",Ur="https://videos.pexels.com/video-files/4678261/4678261-hd_1080_1920_25fps.mp4",Br="https://images.pexels.com/videos/4678261/pexels-photo-4678261.jpeg?auto=compress&cs=tinysrgb&w=600",Mr="https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dlinear&correlator=",zr="https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dskippablelinear&correlator=";O.AD_TAG_LINEAR_URL=Mr,O.AD_TAG_SKIPPABLE_LINEAR_URL=zr,O.BIG_BUCK_BUNNY_URL=Fr,O.ELEPHANTS_DREAM_URL=Dr,O.Overlay=mt,O.PEXELS_THUMBNAIL_URL=Br,O.PEXELS_VERTICAL_VIDEO_URL=Ur,O.PlayerContainer=ze,O.PlayerWrapper=yt,O.VPPlayer=kt,O.VPPlayerProvider=Or,O.baseConfig=$r,O.baseConfigWithAds=Ve,O.baseConfigWithAutoplay=Lr,O.buildVPPlayerConfig=wt,O.defaultVPPlayerConfig=Vr,O.extractVideoId=xt,O.getAdConfig=Nr,O.useVPPlayer=jr,O.useVPPlayerLogic=Pt,O.useVPPlayerScript=vt,O.useVideoData=bt,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})});
81
+ `,Sr=(e,t)=>`https://vp-api.gjirafa.tech/api/v2/projects/${e}/videos?search=${t}`,gt=(e,t)=>`https://vp-api.gjirafa.tech/api/projects/${e}/playlists/${t}/videos`,Ir=(e,t)=>`https://vp-api.gjirafa.tech/api/projects/${e}/playlists/${t}`,Tr=e=>`https://host.vpplayer.tech/player/${e}/vpplayer.js`,We=(e,t)=>`vp-player-${e||"default"}-${t||""}`,Ye=new Map,vt=(e,t)=>{const[r,n]=P.useState(!1),[a,i]=P.useState(null);return P.useEffect(()=>{let o=null,l,u=0;const h=3;let c;try{c=t||Tr(e||"latest")}catch(k){const v=k instanceof Error?k.message:String(k);i(`Failed to resolve script URL: ${v}`),n(!1);return}if(Ye.get(c)){n(!0),i(null);return}if(document.querySelector(`script[src="${c}"]`)){Ye.set(c,!0),n(!0),i(null);return}const x=()=>{o=document.createElement("script"),o.src=c,o.async=!0,l=window.setTimeout(()=>{n(!1),i(`Loading script timed out: ${c}`)},1e4),o.onload=()=>{clearTimeout(l),Ye.set(c,!0),n(!0),i(null)},o.onerror=()=>{clearTimeout(l),u++,u<h?setTimeout(x,1e3*u):(n(!1),i(`Failed to load VP Player script after ${h} attempts: ${c}`))},document.body.appendChild(o)};return x(),()=>{clearTimeout(l),o&&document.body.contains(o)&&document.body.removeChild(o)}},[e,t]),{isLoaded:r,error:a}},Cr={},Ee=new Map,Ar=3e4,Ge=5,bt=({projectId:e,videoId:t,playlistId:r,videoUrl:n,apiKey:a})=>{const[i,o]=P.useState(null),[l,u]=P.useState(null),[h,c]=P.useState(!1),[f,x]=P.useState(null),k=a||(typeof Cr<"u"?"1CFC4B619E9342B6BAC4879BA8C30CF216C4BA9D3F084B11825F4AB2D5CF845E":void 0);return P.useEffect(()=>{const v=t?`video:${t}`:r?`playlist:${r}`:null;if(!e||n||!t&&!r){o(n||null),u(null),c(!1),x(null);return}if(!k){c(!1),x("No API key provided");return}if(v&&Ee.has(v)){const C=Ee.get(v);o(C.url),u(C.playlist),c(!1),x(null);return}let d=!0;const m=new AbortController,g=m.signal,V=setTimeout(async()=>{var $,L,y,K;if(!d)return;c(!0),x(null);let C=0;for(;C<Ge&&d;)try{const F=t&&!r?Sr(e,t):gt(e,r),_=setTimeout(()=>m.abort(),Ar),z=await fetch(F,{method:"GET",headers:{"api-key":k,Accept:"application/json","Cache-Control":"no-cache"},signal:g});if(clearTimeout(_),!z.ok)throw new Error(`Fetch failed with status ${z.status}`);const S=await z.json();if(!d)return;if(t&&!r){const Y=(L=($=S.result)==null?void 0:$.items)==null?void 0:L.find(U=>U.mediaId===t);if(!(Y!=null&&Y.playbackUrl))throw new Error("Invalid video data");o(Y.playbackUrl),u(null),v&&Ee.set(v,{url:Y.playbackUrl,playlist:null})}else{if(!Array.isArray(S.result))throw new Error("Invalid playlist format");const Y=Ir(e,r),U=await fetch(Y,{method:"GET",headers:{"api-key":k,Accept:"application/json","Cache-Control":"no-cache"},signal:g});if(U.ok){const G=await U.json();let te=[...S.result];if((y=G.result)!=null&&y.playlistBackupState&&((K=G.result)!=null&&K.playlistBackupId)){const J=gt(e,G.result.playlistBackupId),ne=await fetch(J,{method:"GET",headers:{"api-key":k,Accept:"application/json","Cache-Control":"no-cache"},signal:g});if(ne.ok){const ae=await ne.json();if(Array.isArray(ae.result)){const s=ae.result.map(w=>({...w,isBackupPlaylist:!0}));te=[...te,...s]}}}u(te),o(null),v&&Ee.set(v,{url:null,playlist:te})}else u(S.result),o(null),v&&Ee.set(v,{url:null,playlist:S.result})}break}catch(F){if(g.aborted){d&&x("Request timed out");break}if(C++,C>=Ge){const _=F instanceof Error?F.message:String(F);d&&x(`Failed after ${Ge} attempts: ${_}`)}else await new Promise(_=>setTimeout(_,2e3))}d&&c(!1)},100);return()=>{d=!1,clearTimeout(V),m.abort()}},[k,e,t,r,n]),{fetchedPlaybackUrl:i,fetchedPlaylist:l,isLoading:h,error:f}},Rr={projectId:"vp-player-projectId",video:{file:"",playlist:{state:!0,playlistVideoIndex:0,videos:[]}},config:{autoplay:!0,muted:!0,loop:!1,size:{width:"100%",height:"30vh"},controls:{settingsButton:!0,chromecastButton:!1,nextButton:!0,fullscreenButton:!0,airplayButton:!1,bigPlayButton:!1,autopausePlayButton:!0,pictureInPictureButton:!1,relatedButton:!1,volumeButton:!0,shareButton:!0}}},wt=({videoUrl:e,fetchedPlaybackUrl:t,fetchedPlaylist:r,projectId:n,config:a={},isVerticalPlayer:i})=>{var c,f,x,k,v,d,m,g,E,V,C,$,L,y,K,F;const o={...Rr,...a},l={...o.config,...a.config};if(e)return{...o,video:{...o.video,file:e,playlist:void 0},config:l};if(t)return{...o,video:{...o.video,file:t,playlist:void 0},config:l};if(r&&r.length>0){const _=((f=(c=a==null?void 0:a.video)==null?void 0:c.playlist)==null?void 0:f.playlistVideoIndex)??((x=a==null?void 0:a.config)==null?void 0:x.playlistVideoIndex)??0;return i?{...o,projectId:n||"vp-player-projectId",video:{...o.video,videoId:(k=r[0])==null?void 0:k.mediaId,file:(v=r[0])==null?void 0:v.hlsUrl,title:(d=r[0])==null?void 0:d.title,playlist:{state:!0,playlistId:"",playlistVideoIndex:Number(_),videos:r.slice(1).map((S,Y)=>({videoId:S.mediaId||String(Y+1),title:S.title,file:S.hlsUrl,thumbnailUrl:S.thumbnailUrl,duration:S.duration}))}},config:l}:{...o,projectId:n||"vp-player-projectId",video:{...o.video,videoId:((m=r[Number(_)])==null?void 0:m.mediaId)||((g=r[0])==null?void 0:g.mediaId),file:((E=r[Number(_)])==null?void 0:E.hlsUrl)||((V=r[0])==null?void 0:V.hlsUrl)||"",title:((C=r[Number(_)])==null?void 0:C.title)||(($=r[0])==null?void 0:$.title),thumbnail:((L=r[Number(_)])==null?void 0:L.thumbnailUrl)||((y=r[0])==null?void 0:y.thumbnailUrl),playlist:{state:!0,playlistVideoIndex:Number(_),videos:r.map((S,Y)=>({videoId:S.mediaId||String(Y),title:S.title,file:S.hlsUrl,thumbnailUrl:S.thumbnailUrl,duration:S.duration}))}},config:l}}const u=((K=a==null?void 0:a.video)==null?void 0:K.playlist)||o.video.playlist,h=(F=a==null?void 0:a.video)==null?void 0:F.file;if(h)return{...o,video:{...o.video,file:h,playlist:void 0},config:l};if(u!=null&&u.videos&&u.videos.length>0){const _=u.videos[Number(u.playlistVideoIndex)||0];return{...o,video:{...o.video,file:(_==null?void 0:_.file)||"",playlist:{...u,state:u.state??!0,playlistVideoIndex:Number(u.playlistVideoIndex||0),videos:u.videos}},config:{...o.config,...a==null?void 0:a.config}}}throw new Error("No valid video source found. Provide videoUrl, videoId, playlistId, or config with video.file or playlist.")},xt=e=>{if(!e)return;const t=/https:\/\/host\.vpplayer\.tech\/player\/([^/]+)\/([^/]+)(?:\/[^/]+)?\.js/,r=e.match(t);return r?r[2]:void 0},Pt=({playerId:e,videoId:t,version:r,videoUrl:n,projectId:a,playlistId:i,scriptUrl:o,config:l={},apiKey:u,isReels:h=!1,onPlaylistData:c,onVideoStarted:f})=>{const x=P.useRef(null),k=P.useRef(null),v=P.useRef(!1),d=P.useRef(""),m=P.useRef([]),g=P.useRef([]),E=P.useRef(null),{isLoaded:V,error:C}=vt(r,o),$=t||xt(o),[L,y]=P.useState(null),{fetchedPlaybackUrl:K,fetchedPlaylist:F,isLoading:_,error:z}=bt({projectId:a,videoId:$,playlistId:i,videoUrl:n,apiKey:u}),S=We(e,$);P.useEffect(()=>{F&&c&&c(F)},[F,c]);const Y=P.useMemo(()=>{const U=l.config||{},G=h&&!U.size?{sizeType:"RESPONSIVE",aspectRatio:"9:16"}:U.size||{sizeType:"FIXED",width:"100%"};return{...l,config:{...U,size:G}}},[l,h]);return P.useEffect(()=>{if(C){y(C);return}if(!V||_&&!n)return;let U=!0;const te=setTimeout(async()=>{try{m.current.forEach(D=>clearInterval(D)),m.current=[],g.current.forEach(D=>clearTimeout(D)),g.current=[],E.current=null;const J=(F==null?void 0:F.length)??0,ne=JSON.stringify({playerId:S,videoId:t||$,playlistId:i,videoUrl:n,fetchedPlaybackUrl:K,scriptUrl:o,isReels:h,projectId:a,playlistLength:J});if(v.current&&k.current&&d.current===ne)return;d.current!==ne&&(v.current=!1,d.current=ne);const ae=o==null?void 0:o.includes("vertical-player");if(document.querySelectorAll('[id*="player"]').forEach(D=>{var le,p;const re=D.id;if(re!==S)try{const b=ae?(le=window.vpVerticalPlayer)==null?void 0:le.call(window,re):(p=window.vpPlayer)==null?void 0:p.call(window,re);b!=null&&b.destroy&&b.destroy()}catch(b){console.warn(`Failed to destroy existing player ${re}:`,b)}}),await new Promise(D=>setTimeout(D,100)),!U||!x.current)return;if(!document.getElementById(S)){y("DOM element not found after cleanup.");return}if(!window.vpPlayer&&!window.vpVerticalPlayer){y("VP Player script not loaded.");return}const N=ae?window.vpVerticalPlayer:window.vpPlayer;if(!N){y(`VP ${ae?"Vertical ":""}Player script not loaded.`);return}const B=wt({videoUrl:n,fetchedPlaybackUrl:K??void 0,fetchedPlaylist:F??void 0,projectId:a,config:Y,isVerticalPlayer:ae}),O=N(S);if(!O){y(`Failed to create VP ${ae?"Vertical ":""}Player instance.`);return}if(U&&x.current&&(O.setup(B),k.current=O,v.current=!0,y(null),f&&O.on)){const D=()=>{var b;const p={};if(F&&F.length>0){const A=O.videoIndex??((b=O.playlist)==null?void 0:b.playlistVideoIndex)??0,R=F[A];R&&(p.title=R.title,p.hlsUrl=R.hlsUrl,p.file=R.hlsUrl,p.thumbnailUrl=R.thumbnailUrl,p.duration=R.duration,p.videoIndex=A,p.playlistVideoIndex=A,p.isBackupPlaylist=R.isBackupPlaylist,p.mediaId=R.mediaId,p.videoId=R.mediaId||R.videoId)}else B.video&&(p.title=B.video.title,p.file=B.video.file,p.hlsUrl=B.video.file,p.thumbnailUrl=B.video.thumbnail,p.videoId=t||$,p.videoIndex=0,p.playlistVideoIndex=0,O.getDuration&&(p.duration=O.getDuration()));return p};let re=null;const le=async()=>{var p;try{re&&clearTimeout(re),await new Promise(R=>setTimeout(R,100));let b=D();const A=b.videoId||b.mediaId;if(A&&A===E.current)return;if(re=window.setTimeout(()=>{E.current=null},500),h&&A)try{const ue=`https://host.vpplayer.tech/player/ptkzurnx/${A}.json`,de=await fetch(ue);if(de.ok){const H=await de.json();H&&H.video&&(b={...b,title:H.video.title||b.title,description:H.video.description,publishDate:H.video.publishDate,projectId:H.projectId||b.projectId,premium:((p=H.video.videoLocking)==null?void 0:p.isEnabled)||!1,author:H.video.author,tags:H.video.tags||[]})}}catch{}E.current=A||null,f(b)}catch(b){console.warn("Error in video-started handler:",b)}};if(h){let p=!1,b=-1;const A=()=>{if(!p){p=!0;try{O.on&&O.on("vp-video-started",le),setTimeout(()=>{le(),b=O.videoIndex??0},500)}catch(H){console.error("Error setting up event listeners:",H)}}};let R=0;const ue=15,de=setInterval(()=>{try{const H=O.videoIndex!==void 0||O.playlist;if(!p)R++,(H||R>=ue)&&A();else{const ye=O.videoIndex??0;ye!==b&&b!==-1&&(b=ye,le())}}catch{}},200);m.current.push(de);try{O.on&&O.on("vp-listen-ready",A)}catch{}}else{const p=async b=>{var A,R;try{const ue=o==null?void 0:o.match(/player\/([^/.]+)/),de=ue==null?void 0:ue[1];if(!de||!b)return D();const H=`https://host.vpplayer.tech/player/${de}/${b}.json`,ye=await fetch(H);if(!ye.ok)return console.warn("Failed to fetch full video config:",ye.status),D();const ee=await ye.json();return!ee||!ee.video?D():{videoId:b,title:ee.video.title,description:ee.video.description,file:ee.video.file,hlsUrl:ee.video.file,thumbnailUrl:ee.video.thumbnail,duration:ee.video.duration,publishDate:ee.video.publishDate,projectId:ee.projectId,premium:((A=ee.video.videoLocking)==null?void 0:A.isEnabled)||!1,author:ee.video.author,tags:ee.video.tags||[],videoIndex:O.videoIndex??0,playlistVideoIndex:((R=O.playlist)==null?void 0:R.playlistVideoIndex)??0}}catch(ue){return console.warn("Error fetching full video data:",ue),D()}};O.on("ready",async b=>{try{const A=(b==null?void 0:b.id)||t||$;if(A){const R=await p(A);f(R)}else{const R=D();(R.title||R.file)&&f(R)}}catch(A){console.warn("Error in ready handler:",A)}}),O.on("playlistItem",async b=>{try{const A=b==null?void 0:b.id;if(A){const R=await p(A);f(R)}}catch(A){console.warn("Error in playlistItem handler:",A)}})}}}catch(J){if(U){const ne=J instanceof Error?J.message:String(J);y(ne),console.error("VP Player initialization error:",J)}}},150);return()=>{U=!1,clearTimeout(te),m.current.forEach(J=>clearInterval(J)),m.current=[],g.current.forEach(J=>clearTimeout(J)),g.current=[],v.current=!1}},[V,_,S,C,o]),P.useEffect(()=>()=>{if(k.current){try{k.current.destroy&&k.current.destroy()}catch(G){console.warn(`Failed to destroy player ${S}:`,G)}k.current=null}v.current=!1;const U=document.getElementById(S);U&&(U.innerHTML="")},[S]),{playerRef:x,playerInstanceRef:k,isScriptLoaded:V,isLoading:_,error:z||L||C}},kt=({playerId:e,videoId:t,version:r,videoUrl:n,projectId:a,playlistId:i,scriptUrl:o,config:l={},apiKey:u,isReels:h=!1,hiddenClasses:c=[],onClose:f,className:x,onPlaylistData:k,onVideoStarted:v})=>{var z,S,Y,U;const{playerRef:d,playerInstanceRef:m,isScriptLoaded:g,isLoading:E,error:V}=Pt({playerId:e,videoId:t,version:r,videoUrl:n,projectId:a,playlistId:i,scriptUrl:o,config:l,apiKey:u,isReels:h,onPlaylistData:k,onVideoStarted:v}),[C,$]=P.useState(!0),L=()=>h&&$(!0),y=()=>{var G,te;$(!1),(te=(G=m.current)==null?void 0:G.play)==null||te.call(G),f==null||f()},K=(S=(z=l==null?void 0:l.config)==null?void 0:z.size)!=null&&S.width?typeof l.config.size.width=="number"?`${l.config.size.width}px`:l.config.size.width:void 0,F=(U=(Y=l==null?void 0:l.config)==null?void 0:Y.size)!=null&&U.height?typeof l.config.size.height=="number"?`${l.config.size.height}px`:l.config.size.height:void 0,_=We(e,t);return V?W.jsxs(Me,{type:"error",children:["An error occurred: ",V]}):E||!g?W.jsx(Me,{type:"loading",children:"Loading..."}):W.jsxs(W.Fragment,{children:[h&&!C?W.jsx("div",{onClick:L}):null,!h&&W.jsx("div",{children:W.jsx(ze,{id:_,ref:d,width:K||"100%",height:F||"auto",$hiddenClasses:c,className:x})},_),h&&C&&W.jsx(mt,{onClick:y,className:x,children:W.jsx(yt,{className:x,onClick:G=>G.stopPropagation(),children:W.jsx("div",{children:W.jsx(ze,{id:_,ref:d,width:"100%",height:"auto",$hiddenClasses:c,className:x})},_)})})]})},Et=P.createContext(void 0),Or=({children:e})=>{const[t,r]=P.useState(!1),[n,a]=P.useState(null),[i,o]=P.useState(null),l=P.useCallback(c=>{try{const f=We(c.playerId,c.videoId);a({...c,playerId:f}),r(!0),o(null)}catch{o("Failed to show player.")}},[]),u=P.useCallback(()=>{r(!1),a(null),o(null)},[]),h=P.useMemo(()=>({showPlayer:l,hidePlayer:u,isPlayerVisible:t,playerParams:n}),[l,u,t,n]);return W.jsxs(Et.Provider,{value:h,children:[e,i&&W.jsx(Me,{type:"error",children:i}),t&&(n==null?void 0:n.playerId)&&W.jsx(kt,{playerId:n.playerId,videoId:n.videoId,projectId:n.projectId,videoUrl:n.videoUrl,version:n.version,playlistId:n.playlistId,scriptUrl:n.scriptUrl,config:n.config,isReels:n.isReels,thumbnailUrl:n.thumbnailUrl,onClose:u,hiddenClasses:n.hiddenClasses||[],apiKey:n.apiKey,className:n.className})]})},jr=()=>{const e=P.useContext(Et);if(!e)throw new Error("useVPPlayer must be used within a VPPlayerProvider");return e},Vr={projectId:"vp-player-projectId",video:{file:"",playlist:{state:!0,playlistVideoIndex:0,videos:[]}},config:{autoplay:!0,pauseOtherVideos:!0,focusOnAutostart:!1,muted:!0,loop:!1,size:{width:"100%"},controls:{settingsButton:!0,chromecastButton:!1,nextButton:!1,fullscreenButton:!0,airplayButton:!1,bigPlayButton:!1,autopausePlayButton:!0,pictureInPictureButton:!1,relatedButton:!1,volumeButton:!0,shareButton:!0}}},$r={config:{autostartOnLoad:{state:!0,onMobile:!0,onData:!0},muted:!0}},Lr={config:{autoplay:!0,muted:!0}},Ve={video:{advertising:!0,ads:{skipAd:{state:!0,skipFrom:5}}},config:{adAnnouncement:{state:!0,timeBeforeAd:5},adsRequireInteraction:!1}},Nr=(e,t,r="time",n=0)=>{var a;return{...Ve,video:{...Ve.video,ads:{...(a=Ve.video)==null?void 0:a.ads,adBreaks:[{adTagUrl:t,breakType:e,breakTimingType:r,breakTimingValue:n}]}}}},Fr="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",Dr="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4",Ur="https://videos.pexels.com/video-files/4678261/4678261-hd_1080_1920_25fps.mp4",Br="https://images.pexels.com/videos/4678261/pexels-photo-4678261.jpeg?auto=compress&cs=tinysrgb&w=600",Mr="https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dlinear&correlator=",zr="https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dskippablelinear&correlator=";j.AD_TAG_LINEAR_URL=Mr,j.AD_TAG_SKIPPABLE_LINEAR_URL=zr,j.BIG_BUCK_BUNNY_URL=Fr,j.ELEPHANTS_DREAM_URL=Dr,j.Overlay=mt,j.PEXELS_THUMBNAIL_URL=Br,j.PEXELS_VERTICAL_VIDEO_URL=Ur,j.PlayerContainer=ze,j.PlayerWrapper=yt,j.VPPlayer=kt,j.VPPlayerProvider=Or,j.baseConfig=$r,j.baseConfigWithAds=Ve,j.baseConfigWithAutoplay=Lr,j.buildVPPlayerConfig=wt,j.defaultVPPlayerConfig=Vr,j.extractVideoId=xt,j.getAdConfig=Nr,j.useVPPlayer=jr,j.useVPPlayerLogic=Pt,j.useVPPlayerScript=vt,j.useVideoData=bt,Object.defineProperty(j,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devix-technologies/react-gjirafa-vp-player",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "type": "module",
5
5
  "main": "./dist/react-gjirafa-vp-player.umd.js",
6
6
  "module": "./dist/react-gjirafa-vp-player.es.js",