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AmB,aACnB,EAAa,YAAY,GACxB,IACL,CAAE,MAAO,GACP,QAAQ,MAAM,qBAAsB,GACpC,EAAmB,UACnB,EAAa,QACf,IACC,IAUD,YATiB,EAAI,aAAa,cAAa,KAC/C,EAAmB,gBACnB,EAAa,QACb,EAAe,MACf,EAAgB,MAChB,QAAQ,IAAI,eAAe,GAC1B,IAID,cACA,eACA,kBACA,YAEJ,CAGA,IAAI,cAAgB,QAAQ,SACxB,mBAAqB,QAAQ,qBAC7B,eAAgB,EAAI,cAAc,eAAe,MACjD,cAAgB,CAClB,WAAY,CACV,CAAE,KAAM,iCAEV,UAAW,CACT,IAAK,wBAGT,SAAS,gBAAe,SAAE,EAAQ,OAAE,EAAS,gBAC3C,OAAuB,EAAI,mBAAmB,KAAK,cAAc,SAAU,CAAE,MAAO,CAAE,UAAU,YAClG,CAGA,IAAI,QAAU","file":"/npm/webrtc2-client@1.0.0/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/webrtc2-client@1.0.0/dist/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n  for (var name in all)\n    __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n  if (from && typeof from === \"object\" || typeof from === \"function\") {\n    for (let key of __getOwnPropNames(from))\n      if (!__hasOwnProp.call(to, key) && key !== except)\n        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n  }\n  return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n  AudioCall: () => AudioCall,\n  ScreenShare: () => ScreenShare,\n  VERSION: () => VERSION,\n  VideoCall: () => VideoCall,\n  WebRTCProvider: () => WebRTCProvider,\n  useWebRTC: () => useWebRTC\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/components/AudioCall.tsx\nfunction AudioCall() {\n  return null;\n}\n\n// src/components/ScreenShare.tsx\nfunction ScreenShare() {\n  return null;\n}\n\n// src/components/VideoCall.tsx\nfunction VideoCall() {\n  return null;\n}\n\n// src/hooks/useWebRTC.ts\nvar import_react = require(\"react\");\nfunction useWebRTC() {\n  const [localStream, setLocalStream] = (0, import_react.useState)(null);\n  const [remoteStream, setRemoteStream] = (0, import_react.useState)(null);\n  const [connectionState, setConnectionState] = (0, import_react.useState)(\"disconnected\");\n  const [callState, setCallState] = (0, import_react.useState)(\"idle\");\n  const connect = (0, import_react.useCallback)(async (roomId) => {\n    try {\n      setConnectionState(\"connecting\");\n      setCallState(\"calling\");\n      console.log(\"Connecting to room:\", roomId);\n      setTimeout(() => {\n        setConnectionState(\"connected\");\n        setCallState(\"connected\");\n      }, 1e3);\n    } catch (error) {\n      console.error(\"Failed to connect:\", error);\n      setConnectionState(\"failed\");\n      setCallState(\"ended\");\n    }\n  }, []);\n  const disconnect = (0, import_react.useCallback)(() => {\n    setConnectionState(\"disconnected\");\n    setCallState(\"idle\");\n    setLocalStream(null);\n    setRemoteStream(null);\n    console.log(\"Disconnected\");\n  }, []);\n  return {\n    connect,\n    disconnect,\n    localStream,\n    remoteStream,\n    connectionState,\n    callState\n  };\n}\n\n// src/providers/WebRTCProvider.tsx\nvar import_react2 = require(\"react\");\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar WebRTCContext = (0, import_react2.createContext)(null);\nvar defaultConfig = {\n  iceServers: [\n    { urls: \"stun:stun.l.google.com:19302\" }\n  ],\n  signaling: {\n    url: \"ws://localhost:3001\"\n  }\n};\nfunction WebRTCProvider({ children, config = defaultConfig }) {\n  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(WebRTCContext.Provider, { value: { config }, children });\n}\n\n// src/index.ts\nvar VERSION = \"1.0.0\";\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n  AudioCall,\n  ScreenShare,\n  VERSION,\n  VideoCall,\n  WebRTCProvider,\n  useWebRTC\n});\n"]}