liveroom-client-element 0.0.21 → 0.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.
|
@@ -11,4 +11,4 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
|
11
11
|
|
|
12
12
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
13
13
|
and limitations under the License.
|
|
14
|
-
***************************************************************************** */var se;(function(s){(function(n){var t=typeof ee=="object"?ee:typeof self=="object"?self:typeof this=="object"?this:Function("return this;")(),e=r(s);typeof t.Reflect>"u"?t.Reflect=s:e=r(t.Reflect,e),n(e);function r(i,o){return function(h,p){typeof i[h]!="function"&&Object.defineProperty(i,h,{configurable:!0,writable:!0,value:p}),o&&o(h,p)}}})(function(n){var t=Object.prototype.hasOwnProperty,e=typeof Symbol=="function",r=e&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",i=e&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",o=typeof Object.create=="function",h={__proto__:[]}instanceof Array,p=!o&&!h,d={create:o?function(){return Ot(Object.create(null))}:h?function(){return Ot({__proto__:null})}:function(){return Ot({})},has:p?function(a,c){return t.call(a,c)}:function(a,c){return c in a},get:p?function(a,c){return t.call(a,c)?a[c]:void 0}:function(a,c){return a[c]}},b=Object.getPrototypeOf(Function),_=typeof process=="object"&&process.env&&process.env.REFLECT_METADATA_USE_MAP_POLYFILL==="true",A=!_&&typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:Te(),T=!_&&typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:Oe(),j=!_&&typeof WeakMap=="function"?WeakMap:je(),R=new j;function M(a,c,l,u){if(L(l)){if(!Wt(a))throw new TypeError;if(!Gt(c))throw new TypeError;return K(a,c)}else{if(!Wt(a))throw new TypeError;if(!N(c))throw new TypeError;if(!N(u)&&!L(u)&&!tt(u))throw new TypeError;return tt(u)&&(u=void 0),l=F(l),ve(a,c,l,u)}}n("decorate",M);function X(a,c){function l(u,g){if(!N(u))throw new TypeError;if(!L(g)&&!Ee(g))throw new TypeError;Vt(a,c,u,g)}return l}n("metadata",X);function q(a,c,l,u){if(!N(l))throw new TypeError;return L(u)||(u=F(u)),Vt(a,c,l,u)}n("defineMetadata",q);function k(a,c,l){if(!N(c))throw new TypeError;return L(l)||(l=F(l)),Dt(a,c,l)}n("hasMetadata",k);function z(a,c,l){if(!N(c))throw new TypeError;return L(l)||(l=F(l)),At(a,c,l)}n("hasOwnMetadata",z);function J(a,c,l){if(!N(c))throw new TypeError;return L(l)||(l=F(l)),Ut(a,c,l)}n("getMetadata",J);function Y(a,c,l){if(!N(c))throw new TypeError;return L(l)||(l=F(l)),Jt(a,c,l)}n("getOwnMetadata",Y);function x(a,c){if(!N(a))throw new TypeError;return L(c)||(c=F(c)),Bt(a,c)}n("getMetadataKeys",x);function P(a,c){if(!N(a))throw new TypeError;return L(c)||(c=F(c)),zt(a,c)}n("getOwnMetadataKeys",P);function V(a,c,l){if(!N(c))throw new TypeError;L(l)||(l=F(l));var u=ot(c,l,!1);if(L(u)||!u.delete(a))return!1;if(u.size>0)return!0;var g=R.get(c);return g.delete(l),g.size>0||R.delete(c),!0}n("deleteMetadata",V);function K(a,c){for(var l=a.length-1;l>=0;--l){var u=a[l],g=u(c);if(!L(g)&&!tt(g)){if(!Gt(g))throw new TypeError;c=g}}return c}function ve(a,c,l,u){for(var g=a.length-1;g>=0;--g){var H=a[g],y=H(c,l,u);if(!L(y)&&!tt(y)){if(!N(y))throw new TypeError;u=y}}return u}function ot(a,c,l){var u=R.get(a);if(L(u)){if(!l)return;u=new A,R.set(a,u)}var g=u.get(c);if(L(g)){if(!l)return;g=new A,u.set(c,g)}return g}function Dt(a,c,l){var u=At(a,c,l);if(u)return!0;var g=Tt(c);return tt(g)?!1:Dt(a,g,l)}function At(a,c,l){var u=ot(c,l,!1);return L(u)?!1:_e(u.has(a))}function Ut(a,c,l){var u=At(a,c,l);if(u)return Jt(a,c,l);var g=Tt(c);if(!tt(g))return Ut(a,g,l)}function Jt(a,c,l){var u=ot(c,l,!1);if(!L(u))return u.get(a)}function Vt(a,c,l,u){var g=ot(l,u,!0);g.set(a,c)}function Bt(a,c){var l=zt(a,c),u=Tt(a);if(u===null)return l;var g=Bt(u,c);if(g.length<=0)return l;if(l.length<=0)return g;for(var H=new T,y=[],m=0,v=l;m<v.length;m++){var E=v[m],$=H.has(E);$||(H.add(E),y.push(E))}for(var Z=0,qt=g;Z<qt.length;Z++){var E=qt[Z],$=H.has(E);$||(H.add(E),y.push(E))}return y}function zt(a,c){var l=[],u=ot(a,c,!1);if(L(u))return l;for(var g=u.keys(),H=$e(g),y=0;;){var m=ke(H);if(!m)return l.length=y,l;var v=Ce(m);try{l[y]=v}catch(E){try{Ae(H)}finally{throw E}}y++}}function Ft(a){if(a===null)return 1;switch(typeof a){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return a===null?1:6;default:return 6}}function L(a){return a===void 0}function tt(a){return a===null}function ye(a){return typeof a=="symbol"}function N(a){return typeof a=="object"?a!==null:typeof a=="function"}function me(a,c){switch(Ft(a)){case 0:return a;case 1:return a;case 2:return a;case 3:return a;case 4:return a;case 5:return a}var l=c===3?"string":c===5?"number":"default",u=Xt(a,r);if(u!==void 0){var g=u.call(a,l);if(N(g))throw new TypeError;return g}return we(a,l==="default"?"number":l)}function we(a,c){if(c==="string"){var l=a.toString;if(et(l)){var u=l.call(a);if(!N(u))return u}var g=a.valueOf;if(et(g)){var u=g.call(a);if(!N(u))return u}}else{var g=a.valueOf;if(et(g)){var u=g.call(a);if(!N(u))return u}var H=a.toString;if(et(H)){var u=H.call(a);if(!N(u))return u}}throw new TypeError}function _e(a){return!!a}function be(a){return""+a}function F(a){var c=me(a,3);return ye(c)?c:be(c)}function Wt(a){return Array.isArray?Array.isArray(a):a instanceof Object?a instanceof Array:Object.prototype.toString.call(a)==="[object Array]"}function et(a){return typeof a=="function"}function Gt(a){return typeof a=="function"}function Ee(a){switch(Ft(a)){case 3:return!0;case 4:return!0;default:return!1}}function Xt(a,c){var l=a[c];if(l!=null){if(!et(l))throw new TypeError;return l}}function $e(a){var c=Xt(a,i);if(!et(c))throw new TypeError;var l=c.call(a);if(!N(l))throw new TypeError;return l}function Ce(a){return a.value}function ke(a){var c=a.next();return c.done?!1:c}function Ae(a){var c=a.return;c&&c.call(a)}function Tt(a){var c=Object.getPrototypeOf(a);if(typeof a!="function"||a===b||c!==b)return c;var l=a.prototype,u=l&&Object.getPrototypeOf(l);if(u==null||u===Object.prototype)return c;var g=u.constructor;return typeof g!="function"||g===a?c:g}function Te(){var a={},c=[],l=function(){function y(m,v,E){this._index=0,this._keys=m,this._values=v,this._selector=E}return y.prototype["@@iterator"]=function(){return this},y.prototype[i]=function(){return this},y.prototype.next=function(){var m=this._index;if(m>=0&&m<this._keys.length){var v=this._selector(this._keys[m],this._values[m]);return m+1>=this._keys.length?(this._index=-1,this._keys=c,this._values=c):this._index++,{value:v,done:!1}}return{value:void 0,done:!0}},y.prototype.throw=function(m){throw this._index>=0&&(this._index=-1,this._keys=c,this._values=c),m},y.prototype.return=function(m){return this._index>=0&&(this._index=-1,this._keys=c,this._values=c),{value:m,done:!0}},y}();return function(){function y(){this._keys=[],this._values=[],this._cacheKey=a,this._cacheIndex=-2}return Object.defineProperty(y.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),y.prototype.has=function(m){return this._find(m,!1)>=0},y.prototype.get=function(m){var v=this._find(m,!1);return v>=0?this._values[v]:void 0},y.prototype.set=function(m,v){var E=this._find(m,!0);return this._values[E]=v,this},y.prototype.delete=function(m){var v=this._find(m,!1);if(v>=0){for(var E=this._keys.length,$=v+1;$<E;$++)this._keys[$-1]=this._keys[$],this._values[$-1]=this._values[$];return this._keys.length--,this._values.length--,m===this._cacheKey&&(this._cacheKey=a,this._cacheIndex=-2),!0}return!1},y.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=a,this._cacheIndex=-2},y.prototype.keys=function(){return new l(this._keys,this._values,u)},y.prototype.values=function(){return new l(this._keys,this._values,g)},y.prototype.entries=function(){return new l(this._keys,this._values,H)},y.prototype["@@iterator"]=function(){return this.entries()},y.prototype[i]=function(){return this.entries()},y.prototype._find=function(m,v){return this._cacheKey!==m&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=m)),this._cacheIndex<0&&v&&(this._cacheIndex=this._keys.length,this._keys.push(m),this._values.push(void 0)),this._cacheIndex},y}();function u(y,m){return y}function g(y,m){return m}function H(y,m){return[y,m]}}function Oe(){return function(){function a(){this._map=new A}return Object.defineProperty(a.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),a.prototype.has=function(c){return this._map.has(c)},a.prototype.add=function(c){return this._map.set(c,c),this},a.prototype.delete=function(c){return this._map.delete(c)},a.prototype.clear=function(){this._map.clear()},a.prototype.keys=function(){return this._map.keys()},a.prototype.values=function(){return this._map.values()},a.prototype.entries=function(){return this._map.entries()},a.prototype["@@iterator"]=function(){return this.keys()},a.prototype[i]=function(){return this.keys()},a}()}function je(){var a=16,c=d.create(),l=u();return function(){function v(){this._key=u()}return v.prototype.has=function(E){var $=g(E,!1);return $!==void 0?d.has($,this._key):!1},v.prototype.get=function(E){var $=g(E,!1);return $!==void 0?d.get($,this._key):void 0},v.prototype.set=function(E,$){var Z=g(E,!0);return Z[this._key]=$,this},v.prototype.delete=function(E){var $=g(E,!1);return $!==void 0?delete $[this._key]:!1},v.prototype.clear=function(){this._key=u()},v}();function u(){var v;do v="@@WeakMap@@"+m();while(d.has(c,v));return c[v]=!0,v}function g(v,E){if(!t.call(v,l)){if(!E)return;Object.defineProperty(v,l,{value:d.create()})}return v[l]}function H(v,E){for(var $=0;$<E;++$)v[$]=Math.random()*255|0;return v}function y(v){return typeof Uint8Array=="function"?typeof crypto<"u"?crypto.getRandomValues(new Uint8Array(v)):typeof msCrypto<"u"?msCrypto.getRandomValues(new Uint8Array(v)):H(new Uint8Array(v),v):H(new Array(v),v)}function m(){var v=y(a);v[6]=v[6]&79|64,v[8]=v[8]&191|128;for(var E="",$=0;$<a;++$){var Z=v[$];($===4||$===6||$===8)&&(E+="-"),Z<16&&(E+="0"),E+=Z.toString(16).toLowerCase()}return E}}function Ot(a){return a.__=void 0,delete a.__,a}})})(se||(se={}));function sn(s){Ne(s,"svelte-1tmn7wo",'#liveroom-client-element.svelte-1tmn7wo.svelte-1tmn7wo{font-family:Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;line-height:1.5;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}#users-container.svelte-1tmn7wo.svelte-1tmn7wo{z-index:99999;position:fixed;inset:0;overflow:hidden;pointer-events:none}.user.svelte-1tmn7wo.svelte-1tmn7wo{z-index:10;position:absolute;top:0;left:0;user-select:none;transform:translate(var(--x), var(--y))}.user.svelte-1tmn7wo .cursor.svelte-1tmn7wo{position:absolute;top:0;left:0;color:var(--color);transform-origin:top left;transform:rotate(6deg)}.user[data-isself="true"].svelte-1tmn7wo .cursor.svelte-1tmn7wo{display:none}.user-name.svelte-1tmn7wo.svelte-1tmn7wo{padding:4px 10px;font-size:14px;line-height:20px;font-weight:600;color:black;background-color:var(--color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:9999px;box-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05)}.user.svelte-1tmn7wo .user-name.svelte-1tmn7wo{position:absolute;top:20px;left:16px}.user[data-isself="true"].svelte-1tmn7wo .user-name.svelte-1tmn7wo{display:none}.user.svelte-1tmn7wo .halo.svelte-1tmn7wo{transform:scale(0);z-index:-1;position:absolute;top:-60px;left:-60px;width:120px;height:120px;border-radius:9999px;background-color:var(--color);opacity:0.25;transition:transform 100ms ease-out;box-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05)}.user.svelte-1tmn7wo .halo[data-show="true"].svelte-1tmn7wo{transform:scale(1)}')}function ne(s,n,t){const e=s.slice();return e[16]=n[t],e}function re(s){let n,t=[],e=new Map,r=te(Object.values(s[0]));const i=o=>o[16].id;for(let o=0;o<r.length;o+=1){let h=ne(s,r,o),p=i(h);e.set(p,t[o]=ie(p,h))}return{c(){n=Q("div");for(let o=0;o<t.length;o+=1)t[o].c();S(n,"id","users-container"),S(n,"class","svelte-1tmn7wo")},m(o,h){Ct(o,n,h);for(let p=0;p<t.length;p+=1)t[p]&&t[p].m(n,null)},p(o,h){h&7&&(r=te(Object.values(o[0])),t=Xe(t,h,i,1,o,r,e,n,Ge,ie,null,ne))},d(o){o&&vt(n);for(let h=0;h<t.length;h+=1)t[h].d()}}}function ie(s,n){let t,e,r,i,o,h=n[16].name+"",p,d,b,_,A,T,j;return{key:s,first:null,c(){t=Q("div"),e=Zt("svg"),r=Zt("path"),i=jt(),o=Q("span"),p=he(h),d=jt(),b=Q("div"),A=jt(),S(r,"d","M2.2706 0.0593359L25.4277 8.05957H25.45926C25.65896 8.13153 25.83096 8.25952 25.95221 8.42653C26.07357 8.59354 26.13851 8.79166 26.13851 8.99459C26.13851 9.19751 26.07357 9.39564 25.95221 9.56265C25.83096 9.72966 25.65896 9.85765 25.45926 9.92962L15.3543 13.7698L11.3124 23.37C11.2344 23.5561 11.0994 23.7156 10.9248 23.828C10.7503 23.9402 10.5443 24.0002 10.3335 24C10.1172 24 9.9061 23.9365 9.7291 23.8184C9.552 23.7004 9.4176 23.5332 9.344 23.34L0.9233 1.33937C0.8555 1.16076 0.8426 0.967504 0.8861 0.782189C0.9297 0.596873 1.0278 0.427163 1.1691 0.292901C1.3105 0.158639 1.4891 0.0653762 1.6841 0.0240151C1.8792 -0.0173461 2.0826 -0.00509504 2.2706 0.0593359Z"),S(e,"width","23"),S(e,"viewBox","0 0 27 24"),S(e,"fill","currentColor"),S(e,"aria-hidden","true"),S(e,"xmlns","http://www.w3.org/2000/svg"),S(e,"class","cursor svelte-1tmn7wo"),S(o,"class","user-name svelte-1tmn7wo"),S(b,"class","halo svelte-1tmn7wo"),S(b,"data-show",_=(n[16].id==n[1].id&&n[16].is_shift_key_down||n[16].id!=n[1].id&&(n[16].is_shift_key_down||n[16].is_mouse_down))&&n[2]>1),S(t,"id",T="user-"+n[16].id),S(t,"class","user svelte-1tmn7wo"),S(t,"data-isself",j=n[16].id==n[1].id),st(t,"--color",n[16].color),st(t,"--x",parseFloat(n[16].x)+"vw"),st(t,"--y",parseFloat(n[16].y)+"vh"),this.first=t},m(R,M){Ct(R,t,M),W(t,e),W(e,r),W(t,i),W(t,o),W(o,p),W(t,d),W(t,b),W(t,A)},p(R,M){n=R,M&1&&h!==(h=n[16].name+"")&&Ie(p,h),M&7&&_!==(_=(n[16].id==n[1].id&&n[16].is_shift_key_down||n[16].id!=n[1].id&&(n[16].is_shift_key_down||n[16].is_mouse_down))&&n[2]>1)&&S(b,"data-show",_),M&1&&T!==(T="user-"+n[16].id)&&S(t,"id",T),M&3&&j!==(j=n[16].id==n[1].id)&&S(t,"data-isself",j),M&1&&st(t,"--color",n[16].color),M&1&&st(t,"--x",parseFloat(n[16].x)+"vw"),M&1&&st(t,"--y",parseFloat(n[16].y)+"vh")},d(R){R&&vt(t)}}}function nn(s){let n,t=s[1]&&s[0]&&re(s);return{c(){n=Q("div"),t&&t.c(),S(n,"id","liveroom-client-element"),S(n,"class","svelte-1tmn7wo")},m(e,r){Ct(e,n,r),t&&t.m(n,null)},p(e,[r]){e[1]&&e[0]?t?t.p(e,r):(t=re(e),t.c(),t.m(n,null)):t&&(t.d(1),t=null)},i:pt,o:pt,d(e){e&&vt(n),t&&t.d()}}}function rn(s,n,t){let{url:e}=n,{room_id:r}=n,{user_name:i}=n,o,h,p,d;Ue(async()=>{const k=new URLSearchParams(window.location.search),z=k.get("_liveroom"),J=z==null?void 0:z.split("https://meet.google.com/");let Y=J==null?void 0:J[0];!!(J!=null&&J[1])&&(Y=J[1].split("?")[0]),t(3,r=Y||r);const P=k.get("_liveroom_user_name");P&&t(4,i=P),b()}),Je(()=>{_()});function b(){o=new en({url:e,topic:`liveroom-livestate:${r}`,params:{room_id:r,user_name:i,referrer:document.referrer,current_url:window.location.href,inner_width:window.innerWidth,inner_height:window.innerHeight,language:window.navigator.language,user_agent:window.navigator.userAgent},socketOptions:{logger:null}}),o.connect(),o.addEventListener("livestate-change",({detail:{state:k}})=>{t(3,r=k.room_id),t(1,h=k.me),t(0,p=k.users)}),window.addEventListener("mousemove",A),window.addEventListener("mousedown",T),window.addEventListener("mouseup",j),window.addEventListener("keydown",M),window.addEventListener("keyup",X),window.addEventListener("resize",q)}function _(){window.removeEventListener("resize",q),window.removeEventListener("keyup",X),window.removeEventListener("keydown",M),window.removeEventListener("mouseup",j),window.removeEventListener("mousedown",T),window.removeEventListener("mousemove",A),o==null||o.disconnect()}function A(k){o&&(h!=null&&h.id)&&o.dispatchEvent(new CustomEvent("mouse_move",{detail:{user_id:h.id,x:Number(k.clientX/window.innerWidth*100).toFixed(2),y:Number(k.clientY/window.innerHeight*100).toFixed(2)}}))}function T(){o&&(h!=null&&h.id)&&o.dispatchEvent(new CustomEvent("mouse_down",{detail:{user_id:h.id}}))}function j(){o&&(h!=null&&h.id)&&o.dispatchEvent(new CustomEvent("mouse_up",{detail:{user_id:h.id}}))}const R=["Shift"];function M(k){!k.repeat&&R.includes(k.key)&&o&&(h!=null&&h.id)&&o.dispatchEvent(new CustomEvent("key_down",{detail:{key:k.key,user_id:h.id}}))}function X(k){R.includes(k.key)&&o&&(h!=null&&h.id)&&o.dispatchEvent(new CustomEvent("key_up",{detail:{key:k.key,user_id:h.id}}))}function q(){o&&(h!=null&&h.id)&&o.dispatchEvent(new CustomEvent("window_resize",{detail:{inner_width:window.innerWidth,inner_height:window.innerHeight,user_id:h.id}}))}return s.$$set=k=>{"url"in k&&t(5,e=k.url),"room_id"in k&&t(3,r=k.room_id),"user_name"in k&&t(4,i=k.user_name)},s.$$.update=()=>{s.$$.dirty&1&&t(2,d=Object.keys(p||{}).length)},[p,h,d,r,i,e]}class ge extends ts{constructor(n){super(),Qe(this,n,rn,nn,Me,{url:5,room_id:3,user_name:4},sn)}get url(){return this.$$.ctx[5]}set url(n){this.$$set({url:n}),ct()}get room_id(){return this.$$.ctx[3]}set room_id(n){this.$$set({room_id:n}),ct()}get user_name(){return this.$$.ctx[4]}set user_name(n){this.$$set({user_name:n}),ct()}}customElements.define("liveroom-client-element",Ke(ge,{url:{},room_id:{},user_name:{}},[],[],!0));module.exports=ge;
|
|
14
|
+
***************************************************************************** */var se;(function(s){(function(n){var t=typeof ee=="object"?ee:typeof self=="object"?self:typeof this=="object"?this:Function("return this;")(),e=r(s);typeof t.Reflect>"u"?t.Reflect=s:e=r(t.Reflect,e),n(e);function r(i,o){return function(h,p){typeof i[h]!="function"&&Object.defineProperty(i,h,{configurable:!0,writable:!0,value:p}),o&&o(h,p)}}})(function(n){var t=Object.prototype.hasOwnProperty,e=typeof Symbol=="function",r=e&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",i=e&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",o=typeof Object.create=="function",h={__proto__:[]}instanceof Array,p=!o&&!h,d={create:o?function(){return Ot(Object.create(null))}:h?function(){return Ot({__proto__:null})}:function(){return Ot({})},has:p?function(a,c){return t.call(a,c)}:function(a,c){return c in a},get:p?function(a,c){return t.call(a,c)?a[c]:void 0}:function(a,c){return a[c]}},b=Object.getPrototypeOf(Function),_=typeof process=="object"&&process.env&&process.env.REFLECT_METADATA_USE_MAP_POLYFILL==="true",A=!_&&typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:Te(),T=!_&&typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:Oe(),j=!_&&typeof WeakMap=="function"?WeakMap:je(),R=new j;function M(a,c,l,u){if(L(l)){if(!Wt(a))throw new TypeError;if(!Gt(c))throw new TypeError;return K(a,c)}else{if(!Wt(a))throw new TypeError;if(!N(c))throw new TypeError;if(!N(u)&&!L(u)&&!tt(u))throw new TypeError;return tt(u)&&(u=void 0),l=F(l),ve(a,c,l,u)}}n("decorate",M);function X(a,c){function l(u,g){if(!N(u))throw new TypeError;if(!L(g)&&!Ee(g))throw new TypeError;Vt(a,c,u,g)}return l}n("metadata",X);function q(a,c,l,u){if(!N(l))throw new TypeError;return L(u)||(u=F(u)),Vt(a,c,l,u)}n("defineMetadata",q);function k(a,c,l){if(!N(c))throw new TypeError;return L(l)||(l=F(l)),Dt(a,c,l)}n("hasMetadata",k);function z(a,c,l){if(!N(c))throw new TypeError;return L(l)||(l=F(l)),At(a,c,l)}n("hasOwnMetadata",z);function J(a,c,l){if(!N(c))throw new TypeError;return L(l)||(l=F(l)),Ut(a,c,l)}n("getMetadata",J);function Y(a,c,l){if(!N(c))throw new TypeError;return L(l)||(l=F(l)),Jt(a,c,l)}n("getOwnMetadata",Y);function x(a,c){if(!N(a))throw new TypeError;return L(c)||(c=F(c)),Bt(a,c)}n("getMetadataKeys",x);function P(a,c){if(!N(a))throw new TypeError;return L(c)||(c=F(c)),zt(a,c)}n("getOwnMetadataKeys",P);function V(a,c,l){if(!N(c))throw new TypeError;L(l)||(l=F(l));var u=ot(c,l,!1);if(L(u)||!u.delete(a))return!1;if(u.size>0)return!0;var g=R.get(c);return g.delete(l),g.size>0||R.delete(c),!0}n("deleteMetadata",V);function K(a,c){for(var l=a.length-1;l>=0;--l){var u=a[l],g=u(c);if(!L(g)&&!tt(g)){if(!Gt(g))throw new TypeError;c=g}}return c}function ve(a,c,l,u){for(var g=a.length-1;g>=0;--g){var H=a[g],y=H(c,l,u);if(!L(y)&&!tt(y)){if(!N(y))throw new TypeError;u=y}}return u}function ot(a,c,l){var u=R.get(a);if(L(u)){if(!l)return;u=new A,R.set(a,u)}var g=u.get(c);if(L(g)){if(!l)return;g=new A,u.set(c,g)}return g}function Dt(a,c,l){var u=At(a,c,l);if(u)return!0;var g=Tt(c);return tt(g)?!1:Dt(a,g,l)}function At(a,c,l){var u=ot(c,l,!1);return L(u)?!1:_e(u.has(a))}function Ut(a,c,l){var u=At(a,c,l);if(u)return Jt(a,c,l);var g=Tt(c);if(!tt(g))return Ut(a,g,l)}function Jt(a,c,l){var u=ot(c,l,!1);if(!L(u))return u.get(a)}function Vt(a,c,l,u){var g=ot(l,u,!0);g.set(a,c)}function Bt(a,c){var l=zt(a,c),u=Tt(a);if(u===null)return l;var g=Bt(u,c);if(g.length<=0)return l;if(l.length<=0)return g;for(var H=new T,y=[],m=0,v=l;m<v.length;m++){var E=v[m],$=H.has(E);$||(H.add(E),y.push(E))}for(var Z=0,qt=g;Z<qt.length;Z++){var E=qt[Z],$=H.has(E);$||(H.add(E),y.push(E))}return y}function zt(a,c){var l=[],u=ot(a,c,!1);if(L(u))return l;for(var g=u.keys(),H=$e(g),y=0;;){var m=ke(H);if(!m)return l.length=y,l;var v=Ce(m);try{l[y]=v}catch(E){try{Ae(H)}finally{throw E}}y++}}function Ft(a){if(a===null)return 1;switch(typeof a){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return a===null?1:6;default:return 6}}function L(a){return a===void 0}function tt(a){return a===null}function ye(a){return typeof a=="symbol"}function N(a){return typeof a=="object"?a!==null:typeof a=="function"}function me(a,c){switch(Ft(a)){case 0:return a;case 1:return a;case 2:return a;case 3:return a;case 4:return a;case 5:return a}var l=c===3?"string":c===5?"number":"default",u=Xt(a,r);if(u!==void 0){var g=u.call(a,l);if(N(g))throw new TypeError;return g}return we(a,l==="default"?"number":l)}function we(a,c){if(c==="string"){var l=a.toString;if(et(l)){var u=l.call(a);if(!N(u))return u}var g=a.valueOf;if(et(g)){var u=g.call(a);if(!N(u))return u}}else{var g=a.valueOf;if(et(g)){var u=g.call(a);if(!N(u))return u}var H=a.toString;if(et(H)){var u=H.call(a);if(!N(u))return u}}throw new TypeError}function _e(a){return!!a}function be(a){return""+a}function F(a){var c=me(a,3);return ye(c)?c:be(c)}function Wt(a){return Array.isArray?Array.isArray(a):a instanceof Object?a instanceof Array:Object.prototype.toString.call(a)==="[object Array]"}function et(a){return typeof a=="function"}function Gt(a){return typeof a=="function"}function Ee(a){switch(Ft(a)){case 3:return!0;case 4:return!0;default:return!1}}function Xt(a,c){var l=a[c];if(l!=null){if(!et(l))throw new TypeError;return l}}function $e(a){var c=Xt(a,i);if(!et(c))throw new TypeError;var l=c.call(a);if(!N(l))throw new TypeError;return l}function Ce(a){return a.value}function ke(a){var c=a.next();return c.done?!1:c}function Ae(a){var c=a.return;c&&c.call(a)}function Tt(a){var c=Object.getPrototypeOf(a);if(typeof a!="function"||a===b||c!==b)return c;var l=a.prototype,u=l&&Object.getPrototypeOf(l);if(u==null||u===Object.prototype)return c;var g=u.constructor;return typeof g!="function"||g===a?c:g}function Te(){var a={},c=[],l=function(){function y(m,v,E){this._index=0,this._keys=m,this._values=v,this._selector=E}return y.prototype["@@iterator"]=function(){return this},y.prototype[i]=function(){return this},y.prototype.next=function(){var m=this._index;if(m>=0&&m<this._keys.length){var v=this._selector(this._keys[m],this._values[m]);return m+1>=this._keys.length?(this._index=-1,this._keys=c,this._values=c):this._index++,{value:v,done:!1}}return{value:void 0,done:!0}},y.prototype.throw=function(m){throw this._index>=0&&(this._index=-1,this._keys=c,this._values=c),m},y.prototype.return=function(m){return this._index>=0&&(this._index=-1,this._keys=c,this._values=c),{value:m,done:!0}},y}();return function(){function y(){this._keys=[],this._values=[],this._cacheKey=a,this._cacheIndex=-2}return Object.defineProperty(y.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),y.prototype.has=function(m){return this._find(m,!1)>=0},y.prototype.get=function(m){var v=this._find(m,!1);return v>=0?this._values[v]:void 0},y.prototype.set=function(m,v){var E=this._find(m,!0);return this._values[E]=v,this},y.prototype.delete=function(m){var v=this._find(m,!1);if(v>=0){for(var E=this._keys.length,$=v+1;$<E;$++)this._keys[$-1]=this._keys[$],this._values[$-1]=this._values[$];return this._keys.length--,this._values.length--,m===this._cacheKey&&(this._cacheKey=a,this._cacheIndex=-2),!0}return!1},y.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=a,this._cacheIndex=-2},y.prototype.keys=function(){return new l(this._keys,this._values,u)},y.prototype.values=function(){return new l(this._keys,this._values,g)},y.prototype.entries=function(){return new l(this._keys,this._values,H)},y.prototype["@@iterator"]=function(){return this.entries()},y.prototype[i]=function(){return this.entries()},y.prototype._find=function(m,v){return this._cacheKey!==m&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=m)),this._cacheIndex<0&&v&&(this._cacheIndex=this._keys.length,this._keys.push(m),this._values.push(void 0)),this._cacheIndex},y}();function u(y,m){return y}function g(y,m){return m}function H(y,m){return[y,m]}}function Oe(){return function(){function a(){this._map=new A}return Object.defineProperty(a.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),a.prototype.has=function(c){return this._map.has(c)},a.prototype.add=function(c){return this._map.set(c,c),this},a.prototype.delete=function(c){return this._map.delete(c)},a.prototype.clear=function(){this._map.clear()},a.prototype.keys=function(){return this._map.keys()},a.prototype.values=function(){return this._map.values()},a.prototype.entries=function(){return this._map.entries()},a.prototype["@@iterator"]=function(){return this.keys()},a.prototype[i]=function(){return this.keys()},a}()}function je(){var a=16,c=d.create(),l=u();return function(){function v(){this._key=u()}return v.prototype.has=function(E){var $=g(E,!1);return $!==void 0?d.has($,this._key):!1},v.prototype.get=function(E){var $=g(E,!1);return $!==void 0?d.get($,this._key):void 0},v.prototype.set=function(E,$){var Z=g(E,!0);return Z[this._key]=$,this},v.prototype.delete=function(E){var $=g(E,!1);return $!==void 0?delete $[this._key]:!1},v.prototype.clear=function(){this._key=u()},v}();function u(){var v;do v="@@WeakMap@@"+m();while(d.has(c,v));return c[v]=!0,v}function g(v,E){if(!t.call(v,l)){if(!E)return;Object.defineProperty(v,l,{value:d.create()})}return v[l]}function H(v,E){for(var $=0;$<E;++$)v[$]=Math.random()*255|0;return v}function y(v){return typeof Uint8Array=="function"?typeof crypto<"u"?crypto.getRandomValues(new Uint8Array(v)):typeof msCrypto<"u"?msCrypto.getRandomValues(new Uint8Array(v)):H(new Uint8Array(v),v):H(new Array(v),v)}function m(){var v=y(a);v[6]=v[6]&79|64,v[8]=v[8]&191|128;for(var E="",$=0;$<a;++$){var Z=v[$];($===4||$===6||$===8)&&(E+="-"),Z<16&&(E+="0"),E+=Z.toString(16).toLowerCase()}return E}}function Ot(a){return a.__=void 0,delete a.__,a}})})(se||(se={}));function sn(s){Ne(s,"svelte-18hw81g",'#liveroom-client-element.svelte-18hw81g.svelte-18hw81g{font-family:Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;line-height:1.5;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}#users-container.svelte-18hw81g.svelte-18hw81g{z-index:99999;position:fixed;inset:0;overflow:hidden;pointer-events:none}.user.svelte-18hw81g.svelte-18hw81g{z-index:10;position:absolute;top:0;left:0;user-select:none;transform:translate(var(--x), var(--y));transition:transform 100ms linear}.user.svelte-18hw81g .cursor.svelte-18hw81g{position:absolute;top:0;left:0;color:var(--color);transform-origin:top left;transform:rotate(6deg)}.user[data-isself="true"].svelte-18hw81g .cursor.svelte-18hw81g{display:none}.user-name.svelte-18hw81g.svelte-18hw81g{padding:4px 10px;font-size:14px;line-height:20px;font-weight:600;color:black;background-color:var(--color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:9999px;box-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05)}.user.svelte-18hw81g .user-name.svelte-18hw81g{position:absolute;top:20px;left:16px}.user[data-isself="true"].svelte-18hw81g .user-name.svelte-18hw81g{display:none}.user.svelte-18hw81g .halo.svelte-18hw81g{transform:scale(0);z-index:-1;position:absolute;top:-60px;left:-60px;width:120px;height:120px;border-radius:9999px;background-color:var(--color);opacity:0.25;transition:transform 100ms ease-out;box-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05)}.user.svelte-18hw81g .halo[data-show="true"].svelte-18hw81g{transform:scale(1)}')}function ne(s,n,t){const e=s.slice();return e[16]=n[t],e}function re(s){let n,t=[],e=new Map,r=te(Object.values(s[0]));const i=o=>o[16].id;for(let o=0;o<r.length;o+=1){let h=ne(s,r,o),p=i(h);e.set(p,t[o]=ie(p,h))}return{c(){n=Q("div");for(let o=0;o<t.length;o+=1)t[o].c();S(n,"id","users-container"),S(n,"class","svelte-18hw81g")},m(o,h){Ct(o,n,h);for(let p=0;p<t.length;p+=1)t[p]&&t[p].m(n,null)},p(o,h){h&7&&(r=te(Object.values(o[0])),t=Xe(t,h,i,1,o,r,e,n,Ge,ie,null,ne))},d(o){o&&vt(n);for(let h=0;h<t.length;h+=1)t[h].d()}}}function ie(s,n){let t,e,r,i,o,h=n[16].name+"",p,d,b,_,A,T,j;return{key:s,first:null,c(){t=Q("div"),e=Zt("svg"),r=Zt("path"),i=jt(),o=Q("span"),p=he(h),d=jt(),b=Q("div"),A=jt(),S(r,"d","M2.2706 0.0593359L25.4277 8.05957H25.45926C25.65896 8.13153 25.83096 8.25952 25.95221 8.42653C26.07357 8.59354 26.13851 8.79166 26.13851 8.99459C26.13851 9.19751 26.07357 9.39564 25.95221 9.56265C25.83096 9.72966 25.65896 9.85765 25.45926 9.92962L15.3543 13.7698L11.3124 23.37C11.2344 23.5561 11.0994 23.7156 10.9248 23.828C10.7503 23.9402 10.5443 24.0002 10.3335 24C10.1172 24 9.9061 23.9365 9.7291 23.8184C9.552 23.7004 9.4176 23.5332 9.344 23.34L0.9233 1.33937C0.8555 1.16076 0.8426 0.967504 0.8861 0.782189C0.9297 0.596873 1.0278 0.427163 1.1691 0.292901C1.3105 0.158639 1.4891 0.0653762 1.6841 0.0240151C1.8792 -0.0173461 2.0826 -0.00509504 2.2706 0.0593359Z"),S(e,"width","23"),S(e,"viewBox","0 0 27 24"),S(e,"fill","currentColor"),S(e,"aria-hidden","true"),S(e,"xmlns","http://www.w3.org/2000/svg"),S(e,"class","cursor svelte-18hw81g"),S(o,"class","user-name svelte-18hw81g"),S(b,"class","halo svelte-18hw81g"),S(b,"data-show",_=(n[16].id==n[1].id&&n[16].is_shift_key_down||n[16].id!=n[1].id&&(n[16].is_shift_key_down||n[16].is_mouse_down))&&n[2]>1),S(t,"id",T="user-"+n[16].id),S(t,"class","user svelte-18hw81g"),S(t,"data-isself",j=n[16].id==n[1].id),st(t,"--color",n[16].color),st(t,"--x",parseFloat(n[16].x)+"vw"),st(t,"--y",parseFloat(n[16].y)+"vh"),this.first=t},m(R,M){Ct(R,t,M),W(t,e),W(e,r),W(t,i),W(t,o),W(o,p),W(t,d),W(t,b),W(t,A)},p(R,M){n=R,M&1&&h!==(h=n[16].name+"")&&Ie(p,h),M&7&&_!==(_=(n[16].id==n[1].id&&n[16].is_shift_key_down||n[16].id!=n[1].id&&(n[16].is_shift_key_down||n[16].is_mouse_down))&&n[2]>1)&&S(b,"data-show",_),M&1&&T!==(T="user-"+n[16].id)&&S(t,"id",T),M&3&&j!==(j=n[16].id==n[1].id)&&S(t,"data-isself",j),M&1&&st(t,"--color",n[16].color),M&1&&st(t,"--x",parseFloat(n[16].x)+"vw"),M&1&&st(t,"--y",parseFloat(n[16].y)+"vh")},d(R){R&&vt(t)}}}function nn(s){let n,t=s[1]&&s[0]&&re(s);return{c(){n=Q("div"),t&&t.c(),S(n,"id","liveroom-client-element"),S(n,"class","svelte-18hw81g")},m(e,r){Ct(e,n,r),t&&t.m(n,null)},p(e,[r]){e[1]&&e[0]?t?t.p(e,r):(t=re(e),t.c(),t.m(n,null)):t&&(t.d(1),t=null)},i:pt,o:pt,d(e){e&&vt(n),t&&t.d()}}}function rn(s,n,t){let{url:e}=n,{room_id:r}=n,{user_name:i}=n,o,h,p,d;Ue(async()=>{const k=new URLSearchParams(window.location.search),z=k.get("_liveroom"),J=z==null?void 0:z.split("https://meet.google.com/");let Y=J==null?void 0:J[0];!!(J!=null&&J[1])&&(Y=J[1].split("?")[0]),t(3,r=Y||r);const P=k.get("_liveroom_user_name");P&&t(4,i=P),b()}),Je(()=>{_()});function b(){o=new en({url:e,topic:`liveroom-livestate:${r}`,params:{room_id:r,user_name:i,referrer:document.referrer,current_url:window.location.href,inner_width:window.innerWidth,inner_height:window.innerHeight,language:window.navigator.language,user_agent:window.navigator.userAgent},socketOptions:{logger:null}}),o.connect(),o.addEventListener("livestate-change",({detail:{state:k}})=>{t(3,r=k.room_id),t(1,h=k.me),t(0,p=k.users)}),window.addEventListener("mousemove",A),window.addEventListener("mousedown",T),window.addEventListener("mouseup",j),window.addEventListener("keydown",M),window.addEventListener("keyup",X),window.addEventListener("resize",q)}function _(){window.removeEventListener("resize",q),window.removeEventListener("keyup",X),window.removeEventListener("keydown",M),window.removeEventListener("mouseup",j),window.removeEventListener("mousedown",T),window.removeEventListener("mousemove",A),o==null||o.disconnect()}function A(k){o&&(h!=null&&h.id)&&o.dispatchEvent(new CustomEvent("mouse_move",{detail:{user_id:h.id,x:Number(k.clientX/window.innerWidth*100).toFixed(2),y:Number(k.clientY/window.innerHeight*100).toFixed(2)}}))}function T(){o&&(h!=null&&h.id)&&o.dispatchEvent(new CustomEvent("mouse_down",{detail:{user_id:h.id}}))}function j(){o&&(h!=null&&h.id)&&o.dispatchEvent(new CustomEvent("mouse_up",{detail:{user_id:h.id}}))}const R=["Shift"];function M(k){!k.repeat&&R.includes(k.key)&&o&&(h!=null&&h.id)&&o.dispatchEvent(new CustomEvent("key_down",{detail:{key:k.key,user_id:h.id}}))}function X(k){R.includes(k.key)&&o&&(h!=null&&h.id)&&o.dispatchEvent(new CustomEvent("key_up",{detail:{key:k.key,user_id:h.id}}))}function q(){o&&(h!=null&&h.id)&&o.dispatchEvent(new CustomEvent("window_resize",{detail:{inner_width:window.innerWidth,inner_height:window.innerHeight,user_id:h.id}}))}return s.$$set=k=>{"url"in k&&t(5,e=k.url),"room_id"in k&&t(3,r=k.room_id),"user_name"in k&&t(4,i=k.user_name)},s.$$.update=()=>{s.$$.dirty&1&&t(2,d=Object.keys(p||{}).length)},[p,h,d,r,i,e]}class ge extends ts{constructor(n){super(),Qe(this,n,rn,nn,Me,{url:5,room_id:3,user_name:4},sn)}get url(){return this.$$.ctx[5]}set url(n){this.$$set({url:n}),ct()}get room_id(){return this.$$.ctx[3]}set room_id(n){this.$$set({room_id:n}),ct()}get user_name(){return this.$$.ctx[4]}set user_name(n){this.$$set({user_name:n}),ct()}}customElements.define("liveroom-client-element",Ke(ge,{url:{},room_id:{},user_name:{}},[],[],!0));module.exports=ge;
|
|
@@ -3005,7 +3005,7 @@ var se;
|
|
|
3005
3005
|
});
|
|
3006
3006
|
})(se || (se = {}));
|
|
3007
3007
|
function en(s) {
|
|
3008
|
-
Le(s, "svelte-
|
|
3008
|
+
Le(s, "svelte-18hw81g", '#liveroom-client-element.svelte-18hw81g.svelte-18hw81g{font-family:Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;line-height:1.5;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}#users-container.svelte-18hw81g.svelte-18hw81g{z-index:99999;position:fixed;inset:0;overflow:hidden;pointer-events:none}.user.svelte-18hw81g.svelte-18hw81g{z-index:10;position:absolute;top:0;left:0;user-select:none;transform:translate(var(--x), var(--y));transition:transform 100ms linear}.user.svelte-18hw81g .cursor.svelte-18hw81g{position:absolute;top:0;left:0;color:var(--color);transform-origin:top left;transform:rotate(6deg)}.user[data-isself="true"].svelte-18hw81g .cursor.svelte-18hw81g{display:none}.user-name.svelte-18hw81g.svelte-18hw81g{padding:4px 10px;font-size:14px;line-height:20px;font-weight:600;color:black;background-color:var(--color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:9999px;box-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05)}.user.svelte-18hw81g .user-name.svelte-18hw81g{position:absolute;top:20px;left:16px}.user[data-isself="true"].svelte-18hw81g .user-name.svelte-18hw81g{display:none}.user.svelte-18hw81g .halo.svelte-18hw81g{transform:scale(0);z-index:-1;position:absolute;top:-60px;left:-60px;width:120px;height:120px;border-radius:9999px;background-color:var(--color);opacity:0.25;transition:transform 100ms ease-out;box-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05)}.user.svelte-18hw81g .halo[data-show="true"].svelte-18hw81g{transform:scale(1)}');
|
|
3009
3009
|
}
|
|
3010
3010
|
function ne(s, n, t) {
|
|
3011
3011
|
const e = s.slice();
|
|
@@ -3029,7 +3029,7 @@ function re(s) {
|
|
|
3029
3029
|
n = Q("div");
|
|
3030
3030
|
for (let o = 0; o < t.length; o += 1)
|
|
3031
3031
|
t[o].c();
|
|
3032
|
-
S(n, "id", "users-container"), S(n, "class", "svelte-
|
|
3032
|
+
S(n, "id", "users-container"), S(n, "class", "svelte-18hw81g");
|
|
3033
3033
|
},
|
|
3034
3034
|
m(o, h) {
|
|
3035
3035
|
Ct(o, n, h);
|
|
@@ -3059,7 +3059,7 @@ function ie(s, n) {
|
|
|
3059
3059
|
key: s,
|
|
3060
3060
|
first: null,
|
|
3061
3061
|
c() {
|
|
3062
|
-
t = Q("div"), e = Zt("svg"), r = Zt("path"), i = jt(), o = Q("span"), p = he(h), d = jt(), b = Q("div"), A = jt(), S(r, "d", "M2.2706 0.0593359L25.4277 8.05957H25.45926C25.65896 8.13153 25.83096 8.25952 25.95221 8.42653C26.07357 8.59354 26.13851 8.79166 26.13851 8.99459C26.13851 9.19751 26.07357 9.39564 25.95221 9.56265C25.83096 9.72966 25.65896 9.85765 25.45926 9.92962L15.3543 13.7698L11.3124 23.37C11.2344 23.5561 11.0994 23.7156 10.9248 23.828C10.7503 23.9402 10.5443 24.0002 10.3335 24C10.1172 24 9.9061 23.9365 9.7291 23.8184C9.552 23.7004 9.4176 23.5332 9.344 23.34L0.9233 1.33937C0.8555 1.16076 0.8426 0.967504 0.8861 0.782189C0.9297 0.596873 1.0278 0.427163 1.1691 0.292901C1.3105 0.158639 1.4891 0.0653762 1.6841 0.0240151C1.8792 -0.0173461 2.0826 -0.00509504 2.2706 0.0593359Z"), S(e, "width", "23"), S(e, "viewBox", "0 0 27 24"), S(e, "fill", "currentColor"), S(e, "aria-hidden", "true"), S(e, "xmlns", "http://www.w3.org/2000/svg"), S(e, "class", "cursor svelte-
|
|
3062
|
+
t = Q("div"), e = Zt("svg"), r = Zt("path"), i = jt(), o = Q("span"), p = he(h), d = jt(), b = Q("div"), A = jt(), S(r, "d", "M2.2706 0.0593359L25.4277 8.05957H25.45926C25.65896 8.13153 25.83096 8.25952 25.95221 8.42653C26.07357 8.59354 26.13851 8.79166 26.13851 8.99459C26.13851 9.19751 26.07357 9.39564 25.95221 9.56265C25.83096 9.72966 25.65896 9.85765 25.45926 9.92962L15.3543 13.7698L11.3124 23.37C11.2344 23.5561 11.0994 23.7156 10.9248 23.828C10.7503 23.9402 10.5443 24.0002 10.3335 24C10.1172 24 9.9061 23.9365 9.7291 23.8184C9.552 23.7004 9.4176 23.5332 9.344 23.34L0.9233 1.33937C0.8555 1.16076 0.8426 0.967504 0.8861 0.782189C0.9297 0.596873 1.0278 0.427163 1.1691 0.292901C1.3105 0.158639 1.4891 0.0653762 1.6841 0.0240151C1.8792 -0.0173461 2.0826 -0.00509504 2.2706 0.0593359Z"), S(e, "width", "23"), S(e, "viewBox", "0 0 27 24"), S(e, "fill", "currentColor"), S(e, "aria-hidden", "true"), S(e, "xmlns", "http://www.w3.org/2000/svg"), S(e, "class", "cursor svelte-18hw81g"), S(o, "class", "user-name svelte-18hw81g"), S(b, "class", "halo svelte-18hw81g"), S(b, "data-show", _ = /*user*/
|
|
3063
3063
|
(n[16].id == /*me*/
|
|
3064
3064
|
n[1].id && /*user*/
|
|
3065
3065
|
n[16].is_shift_key_down || /*user*/
|
|
@@ -3068,7 +3068,7 @@ function ie(s, n) {
|
|
|
3068
3068
|
(n[16].is_shift_key_down || /*user*/
|
|
3069
3069
|
n[16].is_mouse_down)) && /*users_count*/
|
|
3070
3070
|
n[2] > 1), S(t, "id", T = "user-" + /*user*/
|
|
3071
|
-
n[16].id), S(t, "class", "user svelte-
|
|
3071
|
+
n[16].id), S(t, "class", "user svelte-18hw81g"), S(t, "data-isself", j = /*user*/
|
|
3072
3072
|
n[16].id == /*me*/
|
|
3073
3073
|
n[1].id), st(
|
|
3074
3074
|
t,
|
|
@@ -3132,7 +3132,7 @@ function sn(s) {
|
|
|
3132
3132
|
);
|
|
3133
3133
|
return {
|
|
3134
3134
|
c() {
|
|
3135
|
-
n = Q("div"), t && t.c(), S(n, "id", "liveroom-client-element"), S(n, "class", "svelte-
|
|
3135
|
+
n = Q("div"), t && t.c(), S(n, "id", "liveroom-client-element"), S(n, "class", "svelte-18hw81g");
|
|
3136
3136
|
},
|
|
3137
3137
|
m(e, r) {
|
|
3138
3138
|
Ct(e, n, r), t && t.m(n, null);
|
package/dist/main.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=o=>Object.freeze(Object.defineProperty({__proto__:null,default:o},Symbol.toStringTag,{value:"Module"})),d="liveroom-client-element",u="0.0.
|
|
1
|
+
"use strict";const a=o=>Object.freeze(Object.defineProperty({__proto__:null,default:o},Symbol.toStringTag,{value:"Module"})),d="liveroom-client-element",u="0.0.22",v="module",p="./dist/main.js",f="./dist/main.cjs",_=["dist","!dist/vite.svg"],y={".":{import:"./dist/main.js",require:"./dist/main.cjs"},"./liveroom-client-element":{import:"./dist/liveroom-client-element.js",require:"./dist/liveroom-client-element.cjs"}},b={dev:"vite",build:"vite build",preview:"vite preview",format:"prettier --write .","check-format":"prettier . --check",check:"svelte-check --tsconfig ./tsconfig.json",lint:"npm run check-format && npm run check"},g={"phx-live-state":"0.10.1"},j={"@sveltejs/vite-plugin-svelte":"2.4.5","@tsconfig/svelte":"5.0.2",prettier:"3.0.3",svelte:"4.2.0","svelte-check":"3.5.1",tslib:"2.6.2",typescript:"5.2.2",vite:"4.4.9"},h={name:d,private:!1,version:u,type:v,module:p,main:f,files:_,exports:y,scripts:b,dependencies:g,devDependencies:j};let s,e,t=null;c();k();const w="liveroom-client-element",r=h.version;async function c(){const n=new URLSearchParams(window.location.search).get("_liveroom");t=document.querySelector("script[src*='/liveroom-client-element']");const l=(t==null?void 0:t.getAttribute("data-url"))||"wss://liveroom.app/client_socket",m=(t==null?void 0:t.getAttribute("data-roomid"))||null,i=n||m;i&&i!=s&&(s=i,e&&(e.remove(),e=void 0),await E(l,s))}function k(){window.addEventListener("popstate",c)}async function E(o,n){return n?(await Promise.resolve().then(()=>a(require("./liveroom-client-element.cjs"))),console.log(`[Liveroom] Installed successfully (v${r})`),e=document.createElement(w),e.setAttribute("url",o),e.setAttribute("version",r),n&&e.setAttribute("room_id",n),document.body.appendChild(e),console.log("[Liveroom] Injected successfully"),!0):!1}
|
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const a = "liveroom-client-element", d = "0.0.
|
|
1
|
+
const a = "liveroom-client-element", d = "0.0.22", v = "module", u = "./dist/main.js", p = "./dist/main.cjs", f = [
|
|
2
2
|
"dist",
|
|
3
3
|
"!dist/vite.svg"
|
|
4
4
|
], _ = {
|