@myinterview/widget-react 1.1.64 → 1.1.65-development-e68c11b
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.
- package/dist/cjs/config/index.d.ts +0 -1
- package/dist/cjs/config/local.env.d.ts +0 -1
- package/dist/cjs/config/prod.env.d.ts +0 -1
- package/dist/cjs/config/staging.env.d.ts +0 -1
- package/dist/cjs/index.js +21 -472
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/interfaces/configInterface.d.ts +0 -1
- package/dist/esm/config/index.d.ts +0 -1
- package/dist/esm/config/local.env.d.ts +0 -1
- package/dist/esm/config/prod.env.d.ts +0 -1
- package/dist/esm/config/staging.env.d.ts +0 -1
- package/dist/esm/index.js +21 -472
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interfaces/configInterface.d.ts +0 -1
- package/dist/index.d.ts +0 -1
- package/package.json +1 -2
package/dist/esm/index.js
CHANGED
|
@@ -1298,435 +1298,6 @@ object-assign
|
|
|
1298
1298
|
@license MIT
|
|
1299
1299
|
*/function Ea(){if(pa)return fa;pa=1;return fa="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Sa(){return $a?ya:($a=1,ya=Function.call.bind(Object.prototype.hasOwnProperty))}if("production"!==process.env.NODE_ENV){var Oa=Pa();oa.exports=function(){if(va)return ga;va=1;var e=Pa(),t=function(){if(sa)return ua;sa=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}return ua=function(){try{if(!Object.assign)return !1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return !1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return !1;var r={};return "abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e;})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return !1}}()?Object.assign:function(d,o){for(var a,i,l=r(d),c=1;c<arguments.length;c++){for(var u in a=Object(arguments[c]))t.call(a,u)&&(l[u]=a[u]);if(e){i=e(a);for(var s=0;s<i.length;s++)n.call(a,i[s])&&(l[i[s]]=a[i[s]]);}}return l},ua}(),n=Ea(),r=Sa(),d=function(){if(ma)return ha;ma=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=Ea(),n={},r=Sa();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}};}function d(d,o,a,i,l){if("production"!==process.env.NODE_ENV)for(var c in d)if(r(d,c)){var u;try{if("function"!=typeof d[c]){var s=Error((i||"React class")+": "+a+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof d[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw s.name="Invariant Violation",s}u=d[c](o,c,i,a,null,t);}catch(e){u=e;}if(!u||u instanceof Error||e((i||"React class")+": type specification of "+a+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in n)){n[u.message]=!0;var f=l?l():"";e("Failed "+a+" type: "+u.message+(null!=f?f:""));}}}return d.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={});},ha=d}(),o=function(){};function a(){return null}return "production"!==process.env.NODE_ENV&&(o=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),ga=function(i,l){var c="function"==typeof Symbol&&Symbol.iterator,u="<<anonymous>>",s={array:$("array"),bigint:$("bigint"),bool:$("boolean"),func:$("function"),number:$("number"),object:$("object"),string:$("string"),symbol:$("symbol"),any:y(a),arrayOf:function(e){return y((function(t,r,d,o,a){if("function"!=typeof e)return new p("Property `"+a+"` of component `"+d+"` has invalid PropType notation inside arrayOf.");var i=t[r];if(!Array.isArray(i))return new p("Invalid "+o+" `"+a+"` of type `"+g(i)+"` supplied to `"+d+"`, expected an array.");for(var l=0;l<i.length;l++){var c=e(i,l,d,o,a+"["+l+"]",n);if(c instanceof Error)return c}return null}))},element:y((function(e,t,n,r,d){var o=e[t];return i(o)?null:new p("Invalid "+r+" `"+d+"` of type `"+g(o)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:y((function(t,n,r,d,o){var a=t[n];return e.isValidElementType(a)?null:new p("Invalid "+d+" `"+o+"` of type `"+g(a)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return y((function(t,n,r,d,o){if(!(t[n]instanceof e)){var a=e.name||u;return new p("Invalid "+d+" `"+o+"` of type `"+((i=t[n]).constructor&&i.constructor.name?i.constructor.name:u)+"` supplied to `"+r+"`, expected instance of `"+a+"`.")}var i;return null}))},node:y((function(e,t,n,r,d){return m(e[t])?null:new p("Invalid "+r+" `"+d+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return y((function(t,d,o,a,i){if("function"!=typeof e)return new p("Property `"+i+"` of component `"+o+"` has invalid PropType notation inside objectOf.");var l=t[d],c=g(l);if("object"!==c)return new p("Invalid "+a+" `"+i+"` of type `"+c+"` supplied to `"+o+"`, expected an object.");for(var u in l)if(r(l,u)){var s=e(l,u,o,a,i+"."+u,n);if(s instanceof Error)return s}return null}))},oneOf:function(e){if(!Array.isArray(e))return "production"!==process.env.NODE_ENV&&o(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),a;function t(t,n,r,d,o){for(var a=t[n],i=0;i<e.length;i++)if(f(a,e[i]))return null;var l=JSON.stringify(e,(function(e,t){return "symbol"===v(t)?String(t):t}));return new p("Invalid "+d+" `"+o+"` of value `"+String(a)+"` supplied to `"+r+"`, expected one of "+l+".")}return y(t)},oneOfType:function(e){if(!Array.isArray(e))return "production"!==process.env.NODE_ENV&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var t=0;t<e.length;t++){var d=e[t];if("function"!=typeof d)return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+b(d)+" at index "+t+"."),a}return y((function(t,d,o,a,i){for(var l=[],c=0;c<e.length;c++){var u=(0, e[c])(t,d,o,a,i,n);if(null==u)return null;u.data&&r(u.data,"expectedType")&&l.push(u.data.expectedType);}return new p("Invalid "+a+" `"+i+"` supplied to `"+o+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")}))},shape:function(e){return y((function(t,r,d,o,a){var i=t[r],l=g(i);if("object"!==l)return new p("Invalid "+o+" `"+a+"` of type `"+l+"` supplied to `"+d+"`, expected `object`.");for(var c in e){var u=e[c];if("function"!=typeof u)return h(d,o,a,c,v(u));var s=u(i,c,d,o,a+"."+c,n);if(s)return s}return null}))},exact:function(e){return y((function(d,o,a,i,l){var c=d[o],u=g(c);if("object"!==u)return new p("Invalid "+i+" `"+l+"` of type `"+u+"` supplied to `"+a+"`, expected `object`.");var s=t({},d[o],e);for(var f in s){var y=e[f];if(r(e,f)&&"function"!=typeof y)return h(a,i,l,f,v(y));if(!y)return new p("Invalid "+i+" `"+l+"` key `"+f+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(d[o],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var $=y(c,f,a,i,l+"."+f,n);if($)return $}return null}))}};function f(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function p(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack="";}function y(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function d(d,a,i,c,s,f,y){if(c=c||u,f=f||i,y!==n){if(l){var $=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw $.name="Invariant Violation",$}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var h=c+":"+i;!t[h]&&r<3&&(o("You are manually calling a React.PropTypes validation function for the `"+f+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[h]=!0,r++);}}return null==a[i]?d?null===a[i]?new p("The "+s+" `"+f+"` is marked as required in `"+c+"`, but its value is `null`."):new p("The "+s+" `"+f+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(a,i,c,s,f)}var a=d.bind(null,!1);return a.isRequired=d.bind(null,!0),a}function $(e){return y((function(t,n,r,d,o,a){var i=t[n];return g(i)!==e?new p("Invalid "+d+" `"+o+"` of type `"+v(i)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function h(e,t,n,r,d){return new p((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+d+"`.")}function m(e){switch(typeof e){case"number":case"string":case"undefined":return !0;case"boolean":return !e;case"object":if(Array.isArray(e))return e.every(m);if(null===e||i(e))return !0;var t=function(e){var t=e&&(c&&e[c]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return !1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!m(n.value))return !1}else for(;!(n=r.next()).done;){var d=n.value;if(d&&!m(d[1]))return !1}return !0;default:return !1}}function g(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return "symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function v(e){if(null==e)return ""+e;var t=g(e);if("object"===t){if(e instanceof Date)return "date";if(e instanceof RegExp)return "regexp"}return t}function b(e){var t=v(e);switch(t){case"array":case"object":return "an "+t;case"boolean":case"date":case"regexp":return "a "+t;default:return t}}return p.prototype=Error.prototype,s.checkPropTypes=d,s.resetWarningCache=d.resetWarningCache,s.PropTypes=s,s},ga}()(Oa.isElement,!0);}else oa.exports=function(){if(wa)return ba;wa=1;var e=Ea();function t(){}function n(){}return n.resetWarningCache=t,ba=function(){function r(t,n,r,d,o,a){if(a!==e){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function d(){return r}r.isRequired=r;var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:d,element:r,elementType:r,instanceOf:d,node:r,objectOf:d,oneOf:d,oneOfType:d,shape:d,exact:d,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o}}()();Object.defineProperty(da,"__esModule",{value:!0}),da.defaultProps=da.propTypes=void 0;var Aa,ka=(Aa=oa.exports)&&Aa.__esModule?Aa:{default:Aa};var Ma=ka.default.string,ja=ka.default.bool,_a$2=ka.default.number,xa=ka.default.array,Ta=ka.default.oneOfType,Ra=ka.default.shape,La=ka.default.object,Da=ka.default.func,Na=ka.default.node,Ia={url:Ta([Ma,xa,La]),playing:ja,loop:ja,controls:ja,volume:_a$2,muted:ja,playbackRate:_a$2,width:Ta([Ma,_a$2]),height:Ta([Ma,_a$2]),style:La,progressInterval:_a$2,playsinline:ja,pip:ja,stopOnUnmount:ja,light:Ta([ja,Ma,La]),playIcon:Na,previewTabIndex:_a$2,fallback:Na,oEmbedUrl:Ma,wrapper:Ta([Ma,Da,Ra({render:Da.isRequired})]),config:Ra({soundcloud:Ra({options:La}),youtube:Ra({playerVars:La,embedOptions:La,onUnstarted:Da}),facebook:Ra({appId:Ma,version:Ma,playerId:Ma,attributes:La}),dailymotion:Ra({params:La}),vimeo:Ra({playerOptions:La,title:Ma}),file:Ra({attributes:La,tracks:xa,forceVideo:ja,forceAudio:ja,forceHLS:ja,forceSafariHLS:ja,forceDisableHls:ja,forceDASH:ja,forceFLV:ja,hlsOptions:La,hlsVersion:Ma,dashVersion:Ma,flvVersion:Ma}),wistia:Ra({options:La,playerId:Ma,customControls:xa}),mixcloud:Ra({options:La}),twitch:Ra({options:La,playerId:Ma}),vidyard:Ra({options:La})}),onReady:Da,onStart:Da,onPlay:Da,onPause:Da,onBuffer:Da,onBufferEnd:Da,onEnded:Da,onError:Da,onDuration:Da,onSeek:Da,onPlaybackRateChange:Da,onPlaybackQualityChange:Da,onProgress:Da,onClickPreview:Da,onEnablePIP:Da,onDisablePIP:Da};da.propTypes=Ia;var Ba=function(){},Va={playing:!1,loop:!1,controls:!1,volume:null,muted:!1,playbackRate:1,width:"640px",height:"360px",style:{},progressInterval:1e3,playsinline:!1,pip:!1,stopOnUnmount:!0,light:!1,fallback:null,wrapper:"div",previewTabIndex:0,oEmbedUrl:"https://noembed.com/embed?url={url}",config:{soundcloud:{options:{visual:!0,buying:!1,liking:!1,download:!1,sharing:!1,show_comments:!1,show_playcount:!1}},youtube:{playerVars:{playsinline:1,showinfo:0,rel:0,iv_load_policy:3,modestbranding:1},embedOptions:{},onUnstarted:Ba},facebook:{appId:"1309697205772819",version:"v3.3",playerId:null,attributes:{}},dailymotion:{params:{api:1,"endscreen-enable":!1}},vimeo:{playerOptions:{autopause:!1,byline:!1,portrait:!1,title:!1},title:null},file:{attributes:{},tracks:[],forceVideo:!1,forceAudio:!1,forceHLS:!1,forceDASH:!1,forceFLV:!1,hlsOptions:{},hlsVersion:"1.1.4",dashVersion:"3.1.3",flvVersion:"1.5.0",forceDisableHls:!1},wistia:{options:{},playerId:null,customControls:null},mixcloud:{options:{hide_cover:1}},twitch:{options:{},playerId:null},vidyard:{options:{}}},onReady:Ba,onStart:Ba,onPlay:Ba,onPause:Ba,onBuffer:Ba,onBufferEnd:Ba,onEnded:Ba,onError:Ba,onDuration:Ba,onSeek:Ba,onPlaybackRateChange:Ba,onPlaybackQualityChange:Ba,onProgress:Ba,onClickPreview:Ba,onEnablePIP:Ba,onDisablePIP:Ba};da.defaultProps=Va;var Ha={};!function(t){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return {default:e};var t=i();if(t&&t.has(e))return t.get(e);var r={},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var a=d?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o];}r.default=e,t&&t.set(e,r);return r}(React__default),d=function(e){return e&&e.__esModule?e:{default:e}}(ra),o=da,a=hd;function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function l(){return l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},l.apply(this,arguments)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r);}}function s(e,t){return s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},s(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return !1;if(Reflect.construct.sham)return !1;if("function"==typeof Proxy)return !0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return !1}}();return function(){var n,r=$(e);if(t){var d=$(this).constructor;n=Reflect.construct(r,arguments,d);}else n=r.apply(this,arguments);return p(this,n)}}function p(e,t){return !t||"object"!==n(t)&&"function"!=typeof t?y(e):t}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $(e){return $=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},$(e)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t);}(p,e);var t,n,i=f(p);function p(){var e;c(this,p);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return h(y(e=i.call.apply(i,[this].concat(n))),"mounted",!1),h(y(e),"isReady",!1),h(y(e),"isPlaying",!1),h(y(e),"isLoading",!0),h(y(e),"loadOnReady",null),h(y(e),"startOnPlay",!0),h(y(e),"seekOnPlay",null),h(y(e),"onDurationCalled",!1),h(y(e),"handlePlayerMount",(function(t){e.player||(e.player=t,e.player.load(e.props.url)),e.progress();})),h(y(e),"getInternalPlayer",(function(t){return e.player?e.player[t]:null})),h(y(e),"progress",(function(){if(e.props.url&&e.player&&e.isReady){var t=e.getCurrentTime()||0,n=e.getSecondsLoaded(),r=e.getDuration();if(r){var d={playedSeconds:t,played:t/r};null!==n&&(d.loadedSeconds=n,d.loaded=n/r),d.playedSeconds===e.prevPlayed&&d.loadedSeconds===e.prevLoaded||e.props.onProgress(d),e.prevPlayed=d.playedSeconds,e.prevLoaded=d.loadedSeconds;}}e.progressTimeout=setTimeout(e.progress,e.props.progressFrequency||e.props.progressInterval);})),h(y(e),"handleReady",(function(){if(e.mounted){e.isReady=!0,e.isLoading=!1;var t=e.props,n=t.onReady,r=t.playing,d=t.volume,o=t.muted;n(),o||null===d||e.player.setVolume(d),e.loadOnReady?(e.player.load(e.loadOnReady,!0),e.loadOnReady=null):r&&e.player.play(),e.handleDurationCheck();}})),h(y(e),"handlePlay",(function(){e.isPlaying=!0,e.isLoading=!1;var t=e.props,n=t.onStart,r=t.onPlay,d=t.playbackRate;e.startOnPlay&&(e.player.setPlaybackRate&&1!==d&&e.player.setPlaybackRate(d),n(),e.startOnPlay=!1),r(),e.seekOnPlay&&(e.seekTo(e.seekOnPlay),e.seekOnPlay=null),e.handleDurationCheck();})),h(y(e),"handlePause",(function(t){e.isPlaying=!1,e.isLoading||e.props.onPause(t);})),h(y(e),"handleEnded",(function(){var t=e.props,n=t.activePlayer,r=t.loop,d=t.onEnded;n.loopOnEnded&&r&&e.seekTo(0),r||(e.isPlaying=!1,d());})),h(y(e),"handleError",(function(){var t;e.isLoading=!1,(t=e.props).onError.apply(t,arguments);})),h(y(e),"handleDurationCheck",(function(){clearTimeout(e.durationCheckTimeout);var t=e.getDuration();t?e.onDurationCalled||(e.props.onDuration(t),e.onDurationCalled=!0):e.durationCheckTimeout=setTimeout(e.handleDurationCheck,100);})),h(y(e),"handleLoaded",(function(){e.isLoading=!1;})),e}return t=p,n=[{key:"componentDidMount",value:function(){this.mounted=!0;}},{key:"componentWillUnmount",value:function(){clearTimeout(this.progressTimeout),clearTimeout(this.durationCheckTimeout),this.isReady&&this.props.stopOnUnmount&&(this.player.stop(),this.player.disablePIP&&this.player.disablePIP()),this.mounted=!1;}},{key:"componentDidUpdate",value:function(e){var t=this;if(this.player){var n=this.props,r=n.url,o=n.playing,i=n.volume,l=n.muted,c=n.playbackRate,u=n.pip,s=n.loop,f=n.activePlayer,p=n.disableDeferredLoading;if(!(0, d.default)(e.url,r)){if(this.isLoading&&!f.forceLoad&&!p&&!(0, a.isMediaStream)(r))return console.warn("ReactPlayer: the attempt to load ".concat(r," is being deferred until the player has loaded")),void(this.loadOnReady=r);this.isLoading=!0,this.startOnPlay=!0,this.onDurationCalled=!1,this.player.load(r,this.isReady);}e.playing||!o||this.isPlaying||this.player.play(),e.playing&&!o&&this.isPlaying&&this.player.pause(),!e.pip&&u&&this.player.enablePIP&&this.player.enablePIP(),e.pip&&!u&&this.player.disablePIP&&this.player.disablePIP(),e.volume!==i&&null!==i&&this.player.setVolume(i),e.muted!==l&&(l?this.player.mute():(this.player.unmute(),null!==i&&setTimeout((function(){return t.player.setVolume(i)})))),e.playbackRate!==c&&this.player.setPlaybackRate&&this.player.setPlaybackRate(c),e.loop!==s&&this.player.setLoop&&this.player.setLoop(s);}}},{key:"getDuration",value:function(){return this.isReady?this.player.getDuration():null}},{key:"getCurrentTime",value:function(){return this.isReady?this.player.getCurrentTime():null}},{key:"getSecondsLoaded",value:function(){return this.isReady?this.player.getSecondsLoaded():null}},{key:"seekTo",value:function(e,t,n){var r=this;if(this.isReady){if(t?"fraction"===t:e>0&&e<1){var d=this.player.getDuration();return d?void this.player.seekTo(d*e,n):void console.warn("ReactPlayer: could not seek using fraction – duration not yet available")}this.player.seekTo(e,n);}else 0!==e&&(this.seekOnPlay=e,setTimeout((function(){r.seekOnPlay=null;}),5e3));}},{key:"render",value:function(){var e=this.props.activePlayer;return e?r.default.createElement(e,l({},this.props,{onMount:this.handlePlayerMount,onReady:this.handleReady,onPlay:this.handlePlay,onPause:this.handlePause,onEnded:this.handleEnded,onLoaded:this.handleLoaded,onError:this.handleError})):null}}],n&&u(t.prototype,n),p}(r.Component);t.default=m,h(m,"displayName","Player"),h(m,"propTypes",o.propTypes),h(m,"defaultProps",o.defaultProps);}(Ha);var Ua,za={};function Ga(){return Ua||(Ua=1,function(t){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return {default:e};var t=d();if(t&&t.has(e))return t.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(r,a,i):r[a]=e[a];}r.default=e,t&&t.set(e,r);return r}(React__default);function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r);}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){y(e,t,n[t]);})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t));}));}return e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r);}}function c(e,t){return c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},c(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return !1;if(Reflect.construct.sham)return !1;if("function"==typeof Proxy)return !0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return !1}}();return function(){var n,r=p(e);if(t){var d=p(this).constructor;n=Reflect.construct(r,arguments,d);}else n=r.apply(this,arguments);return s(this,n)}}function s(e,t){return !t||"object"!==n(t)&&"function"!=typeof t?f(e):t}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var $="64px",h={},m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t);}(s,e);var t,n,o=u(s);function s(){var e;i(this,s);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return y(f(e=o.call.apply(o,[this].concat(n))),"mounted",!1),y(f(e),"state",{image:null}),y(f(e),"handleKeyPress",(function(t){"Enter"!==t.key&&" "!==t.key||e.props.onClick();})),e}return t=s,n=[{key:"componentDidMount",value:function(){this.mounted=!0,this.fetchImage(this.props);}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.url,r=t.light;e.url===n&&e.light===r||this.fetchImage(this.props);}},{key:"componentWillUnmount",value:function(){this.mounted=!1;}},{key:"fetchImage",value:function(e){var t=this,n=e.url,d=e.light,o=e.oEmbedUrl;if(!r.default.isValidElement(d))if("string"!=typeof d){if(!h[n])return this.setState({image:null}),window.fetch(o.replace("{url}",n)).then((function(e){return e.json()})).then((function(e){if(e.thumbnail_url&&t.mounted){var r=e.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");t.setState({image:r}),h[n]=r;}}));this.setState({image:h[n]});}else this.setState({image:d});}},{key:"render",value:function(){var e=this.props,t=e.light,n=e.onClick,d=e.playIcon,o=e.previewTabIndex,i=this.state.image,l=r.default.isValidElement(t),c={display:"flex",alignItems:"center",justifyContent:"center"},u={preview:a({width:"100%",height:"100%",backgroundImage:i&&!l?"url(".concat(i,")"):void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer"},c),shadow:a({background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:$,width:$,height:$,position:l?"absolute":void 0},c),playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},s=r.default.createElement("div",{style:u.shadow,className:"react-player__shadow"},r.default.createElement("div",{style:u.playIcon,className:"react-player__play-icon"}));return r.default.createElement("div",{style:u.preview,className:"react-player__preview",onClick:n,tabIndex:o,onKeyPress:this.handleKeyPress},l?t:null,d||s)}}],n&&l(t.prototype,n),s}(r.Component);t.default=m;}(za)),za}Object.defineProperty(Zo,"__esModule",{value:!0}),Zo.createReactPlayer=void 0;var Fa=yi(React__default),Za=qa(Ad),Qa=qa(Yo),Ka=qa(ra),Wa=da,Ya=hd,Ja=qa(Ha);function qa(e){return e&&e.__esModule?e:{default:e}}function Xa(e){return Xa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xa(e)}function ei(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r);}return n}function ti(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ei(Object(n),!0).forEach((function(t){fi(e,t,n[t]);})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ei(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t));}));}return e}function ni(){return ni=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},ni.apply(this,arguments)}function ri(e){return function(e){if(Array.isArray(e))return di(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return di(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return di(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function di(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function oi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ai(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r);}}function ii(e,t){return ii=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ii(e,t)}function li(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return !1;if(Reflect.construct.sham)return !1;if("function"==typeof Proxy)return !0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return !1}}();return function(){var n,r=si(e);if(t){var d=si(this).constructor;n=Reflect.construct(r,arguments,d);}else n=r.apply(this,arguments);return ci(this,n)}}function ci(e,t){return !t||"object"!==Xa(t)&&"function"!=typeof t?ui(e):t}function ui(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function si(e){return si=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},si(e)}function fi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pi(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return pi=function(){return e},e}function yi(e){if(e&&e.__esModule)return e;if(null===e||"object"!==Xa(e)&&"function"!=typeof e)return {default:e};var t=pi();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var d in e)if(Object.prototype.hasOwnProperty.call(e,d)){var o=r?Object.getOwnPropertyDescriptor(e,d):null;o&&(o.get||o.set)?Object.defineProperty(n,d,o):n[d]=e[d];}return n.default=e,t&&t.set(e,n),n}var $i=(0, Fa.lazy)((function(){return Promise.resolve().then((function(){return yi(Ga())}))})),hi="undefined"!=typeof window&&window.document,mi=void 0!==m&&m.window&&m.window.document,gi=Object.keys(Wa.propTypes),vi=hi||mi?Fa.Suspense:function(){return null},bi=[];Zo.createReactPlayer=function(e,t){var n,r;return r=n=function(n){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ii(e,t);}(i,Fa.Component);var r,d,a=li(i);function i(){var n;oi(this,i);for(var r=arguments.length,d=new Array(r),o=0;o<r;o++)d[o]=arguments[o];return fi(ui(n=a.call.apply(a,[this].concat(d))),"state",{showPreview:!!n.props.light}),fi(ui(n),"references",{wrapper:function(e){n.wrapper=e;},player:function(e){n.player=e;}}),fi(ui(n),"handleClickPreview",(function(e){n.setState({showPreview:!1}),n.props.onClickPreview(e);})),fi(ui(n),"showPreview",(function(){n.setState({showPreview:!0});})),fi(ui(n),"getDuration",(function(){return n.player?n.player.getDuration():null})),fi(ui(n),"getCurrentTime",(function(){return n.player?n.player.getCurrentTime():null})),fi(ui(n),"getSecondsLoaded",(function(){return n.player?n.player.getSecondsLoaded():null})),fi(ui(n),"getInternalPlayer",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"player";return n.player?n.player.getInternalPlayer(e):null})),fi(ui(n),"seekTo",(function(e,t,r){if(!n.player)return null;n.player.seekTo(e,t,r);})),fi(ui(n),"handleReady",(function(){n.props.onReady(ui(n));})),fi(ui(n),"getActivePlayer",(0, Qa.default)((function(n){for(var r=0,d=[].concat(bi,ri(e));r<d.length;r++){var o=d[r];if(o.canPlay(n))return o}return t||null}))),fi(ui(n),"getConfig",(0, Qa.default)((function(e,t){var r=n.props.config;return Za.default.all([Wa.defaultProps.config,Wa.defaultProps.config[t]||{},r,r[t]||{}])}))),fi(ui(n),"getAttributes",(0, Qa.default)((function(e){return (0, Ya.omit)(n.props,gi)}))),fi(ui(n),"renderActivePlayer",(function(e){if(!e)return null;var t=n.getActivePlayer(e);if(!t)return null;var r=n.getConfig(e,t.key);return Fa.default.createElement(Ja.default,ni({},n.props,{key:t.key,ref:n.references.player,config:r,activePlayer:t.lazyPlayer||t,onReady:n.handleReady}))})),n}return r=i,d=[{key:"shouldComponentUpdate",value:function(e,t){return !(0, Ka.default)(this.props,e)||!(0, Ka.default)(this.state,t)}},{key:"componentDidUpdate",value:function(e){var t=this.props.light;!e.light&&t&&this.setState({showPreview:!0}),e.light&&!t&&this.setState({showPreview:!1});}},{key:"renderPreview",value:function(e){if(!e)return null;var t=this.props,n=t.light,r=t.playIcon,d=t.previewTabIndex,o=t.oEmbedUrl;return Fa.default.createElement($i,{url:e,light:n,playIcon:r,previewTabIndex:d,oEmbedUrl:o,onClick:this.handleClickPreview})}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.style,r=e.width,d=e.height,o=e.fallback,a=e.wrapper,i=this.state.showPreview,l=this.getAttributes(t),c="string"==typeof a?this.references.wrapper:void 0;return Fa.default.createElement(a,ni({ref:c,style:ti(ti({},n),{},{width:r,height:d})},l),Fa.default.createElement(vi,{fallback:o},i?this.renderPreview(t):this.renderActivePlayer(t)))}}],d&&ai(r.prototype,d),i}(),fi(n,"displayName","ReactPlayer"),fi(n,"propTypes",Wa.propTypes),fi(n,"defaultProps",Wa.defaultProps),fi(n,"addCustomPlayer",(function(e){bi.push(e);})),fi(n,"removeCustomPlayers",(function(){bi.length=0;})),fi(n,"canPlay",(function(t){for(var n=0,r=[].concat(bi,ri(e));n<r.length;n++){if(r[n].canPlay(t))return !0}return !1})),fi(n,"canEnablePIP",(function(t){for(var n=0,r=[].concat(bi,ri(e));n<r.length;n++){var d=r[n];if(d.canEnablePIP&&d.canEnablePIP(t))return !0}return !1})),r},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=function(e){return e&&e.__esModule?e:{default:e}}($d),n=Zo;var r=t.default[t.default.length-1],d=(0, n.createReactPlayer)(t.default,r);e.default=d;}(yd);g(yd);const Ri=()=>React__default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",version:"1.1",id:"Logo",x:"0px",y:"0px",viewBox:"0 0 900.2 269.3",xmlSpace:"preserve"},React__default.createElement("g",null,React__default.createElement("g",null,React__default.createElement("g",null,React__default.createElement("path",{fill:"currentColor",d:"M116.6,30.4v79.3h79.3V30.4H116.6z M163.9,97.4c0-19.7-16.1-35.8-35.8-35.8V44c20.1,0,37.7,11.2,46.8,27.7 c4.2,7.6,6.6,16.4,6.6,25.7H163.9z"}),React__default.createElement("path",{fill:"currentColor",d:"M26.9,109.8h79.3V30.5H26.9V109.8z M40,44l53.4,0v17.6H57.6v35.7H40V44z"}),React__default.createElement("path",{fill:"currentColor",d:"M26.9,199.6h79.3v-79.3H26.9V199.6z M40,133.5h17.6v53.4H40V133.5z"}),React__default.createElement("path",{fill:"currentColor",d:"M116.6,199.6h79.3v-79.3h-79.3V199.6z M145.7,133.5c0,19.7,16,35.8,35.8,35.8v17.6 c-29.4,0-53.4-23.9-53.4-53.4H145.7z"})),React__default.createElement("g",null,React__default.createElement("g",null,React__default.createElement("path",{fill:"currentColor",d:"M725,185.4c-6.5,0-12.7-2.5-17.3-7.2c-4.6-4.6-7.2-10.8-7.2-17.3h0v-2.4l0,0h0c0-6.5,2.5-12.7,7.2-17.3 c4.6-4.6,10.8-7.2,17.3-7.2c6.5,0,12.7,2.5,17.3,7.2l11.4-11.4c-7.7-7.7-17.9-11.9-28.7-11.9c-10.9,0-21.1,4.2-28.7,11.9 c-7.7,7.7-11.9,17.9-11.9,28.7h0l0,0v2.4h0c0,10.9,4.2,21.1,11.9,28.7c7.7,7.7,17.9,11.9,28.7,11.9c10.9,0,21.1-4.2,28.7-11.9 l-11.4-11.4C737.7,182.8,731.5,185.4,725,185.4z"}),React__default.createElement("path",{fill:"currentColor",d:"M463.2,160.8L463.2,160.8c0,13.5-11,24.5-24.5,24.5c-13.5,0-24.5-11-24.5-24.5h0l0,0 c0-13.5,11-24.5,24.5-24.5h9.3v-16.1h-9.3c-22.4,0-40.6,18.2-40.6,40.6l0,0h0c0,22.4,18.2,40.6,40.6,40.6 c9.2,0,17.7-3.1,24.5-8.2v6.5h16.1V91h-16.1V160.8z"}),React__default.createElement("path",{fill:"currentColor",d:"M343,120.2c-22.4,0-40.6,18.2-40.6,40.6l0,0h0c0,22.4,18.2,40.6,40.6,40.6v0l0,0h3.9v-16.1H343l0,0 c-13.5,0-24.5-11-24.5-24.5h0l0,0c0-13.5,11-24.5,24.5-24.5h23.3v63.4h16.1v-79.5L343,120.2z"}),React__default.createElement("path",{fill:"currentColor",d:"M632,117.8c-22.4,0-40.6,18.2-40.6,40.6h0l0,0v41.2h16.1v-41.2l0,0h0c0-13.5,11-24.5,24.5-24.5 c13.5,0,24.5,11,24.5,24.5v41.1h16.1v-41.1C672.6,136.1,654.4,117.8,632,117.8z"}),React__default.createElement("polygon",{fill:"currentColor",points:"246.6,199.6 262.8,199.6 262.8,136.4 295.8,136.4 295.8,120.2 246.6,120.2 "}),React__default.createElement("path",{fill:"currentColor",d:"M535.9,120.2c-22.4,0-40.6,18.2-40.6,40.6l0,0h0c0,22.4,18.2,40.6,40.6,40.6v0l0,0h3.9v-16.1h-3.9l0,0 c-13.5,0-24.5-11-24.5-24.5l0,0c0-13.5,11-24.5,24.5-24.5h23.3v63.4h16.1v-79.5L535.9,120.2z"}),React__default.createElement("path",{fill:"currentColor",d:"M826.9,120.2v77.1c0,14.1-11.5,25.6-25.6,25.6v15.9c22.9,0,41.8-18.6,41.8-41.6v-77.1H826.9z"}),React__default.createElement("path",{fill:"currentColor",d:"M809,201.4v-16.1l-5.2,0c-13.5,0-24.5-11-24.5-24.5h0v-40.6h-16.1v40.6l0,0c0,22.4,18.2,40.6,40.6,40.6 L809,201.4z"})))),React__default.createElement("g",null,React__default.createElement("path",{fill:"currentColor",d:"M873.3,128.3c0,4.4-3.6,7.7-7.9,7.7c-4.3,0-7.9-3.3-7.9-7.7c0-4.4,3.6-7.7,7.9-7.7 C869.7,120.7,873.3,124,873.3,128.3z M871.8,128.3c0-3.5-2.9-6.3-6.4-6.3c-3.4,0-6.4,2.7-6.4,6.3c0,3.5,2.9,6.3,6.4,6.3 C868.9,134.6,871.8,131.9,871.8,128.3z M866.7,129.3l2.1,2.6h-1.5l-2-2.5h-1.5v2.5h-1.1v-7.4h3.1c1.6,0,2.7,1,2.7,2.5 C868.6,128.2,867.9,129,866.7,129.3z M863.9,128.3h1.9c0.9,0,1.6-0.5,1.6-1.4c0-0.8-0.7-1.4-1.6-1.4h-1.9V128.3z"}))));
|
|
1300
1300
|
|
|
1301
|
-
function _extends$1() {
|
|
1302
|
-
_extends$1 = Object.assign || function (target) {
|
|
1303
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
1304
|
-
var source = arguments[i];
|
|
1305
|
-
|
|
1306
|
-
for (var key in source) {
|
|
1307
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
1308
|
-
target[key] = source[key];
|
|
1309
|
-
}
|
|
1310
|
-
}
|
|
1311
|
-
}
|
|
1312
|
-
|
|
1313
|
-
return target;
|
|
1314
|
-
};
|
|
1315
|
-
|
|
1316
|
-
return _extends$1.apply(this, arguments);
|
|
1317
|
-
}
|
|
1318
|
-
|
|
1319
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
1320
|
-
if (source == null) return {};
|
|
1321
|
-
var target = {};
|
|
1322
|
-
var sourceKeys = Object.keys(source);
|
|
1323
|
-
var key, i;
|
|
1324
|
-
|
|
1325
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
1326
|
-
key = sourceKeys[i];
|
|
1327
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
1328
|
-
target[key] = source[key];
|
|
1329
|
-
}
|
|
1330
|
-
|
|
1331
|
-
return target;
|
|
1332
|
-
}
|
|
1333
|
-
|
|
1334
|
-
/**
|
|
1335
|
-
* Logs messages in the console with a corresponding urgency
|
|
1336
|
-
*
|
|
1337
|
-
* @param level the urgency of the message
|
|
1338
|
-
* @param message the message to log in the console
|
|
1339
|
-
*/
|
|
1340
|
-
var log$3 = function log(level, message) {
|
|
1341
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1342
|
-
var packageName = '[react-use-intercom]';
|
|
1343
|
-
|
|
1344
|
-
switch (level) {
|
|
1345
|
-
case 'info':
|
|
1346
|
-
console.log(packageName + " " + message);
|
|
1347
|
-
break;
|
|
1348
|
-
|
|
1349
|
-
case 'warn':
|
|
1350
|
-
console.warn(packageName + " " + message);
|
|
1351
|
-
break;
|
|
1352
|
-
|
|
1353
|
-
case 'error':
|
|
1354
|
-
console.error(packageName + " " + message);
|
|
1355
|
-
break;
|
|
1356
|
-
|
|
1357
|
-
default:
|
|
1358
|
-
console.log(packageName + " " + message);
|
|
1359
|
-
}
|
|
1360
|
-
}
|
|
1361
|
-
};
|
|
1362
|
-
|
|
1363
|
-
var isSSR = typeof window === 'undefined';
|
|
1364
|
-
/**
|
|
1365
|
-
* Removes object entries where the value equals to `undefined`
|
|
1366
|
-
*
|
|
1367
|
-
* @param obj
|
|
1368
|
-
*/
|
|
1369
|
-
|
|
1370
|
-
var removeUndefined = function removeUndefined(obj) {
|
|
1371
|
-
Object.keys(obj).forEach(function (key) {
|
|
1372
|
-
if (obj[key] && typeof obj[key] === 'object') removeUndefined(obj[key]);else if (obj[key] === undefined) delete obj[key];
|
|
1373
|
-
});
|
|
1374
|
-
return obj;
|
|
1375
|
-
};
|
|
1376
|
-
|
|
1377
|
-
/**
|
|
1378
|
-
* Safely exposes `window.Intercom` and passes the arguments to the instance
|
|
1379
|
-
*
|
|
1380
|
-
* @param method method passed to the `window.Intercom` instance
|
|
1381
|
-
* @param args arguments passed to the `window.Intercom` instance
|
|
1382
|
-
*
|
|
1383
|
-
* @see {@link https://developers.intercom.com/installing-intercom/docs/intercom-javascript}
|
|
1384
|
-
*/
|
|
1385
|
-
|
|
1386
|
-
var IntercomAPI = function IntercomAPI(method) {
|
|
1387
|
-
if (!isSSR && window.Intercom) {
|
|
1388
|
-
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
1389
|
-
args[_key - 1] = arguments[_key];
|
|
1390
|
-
}
|
|
1391
|
-
|
|
1392
|
-
return window.Intercom.apply(null, [method].concat(args));
|
|
1393
|
-
} else {
|
|
1394
|
-
log$3('error', method + " Intercom instance is not initalized yet");
|
|
1395
|
-
}
|
|
1396
|
-
};
|
|
1397
|
-
|
|
1398
|
-
var IntercomContext = /*#__PURE__*/createContext(undefined);
|
|
1399
|
-
|
|
1400
|
-
// @ts-nocheck
|
|
1401
|
-
|
|
1402
|
-
/**
|
|
1403
|
-
* Snippet to initialize the Intercom instance
|
|
1404
|
-
*
|
|
1405
|
-
* @param appId - Intercom app id
|
|
1406
|
-
* @param [timeout=0] - Amount of milliseconds that the initialization should be delayed, defaults to 0
|
|
1407
|
-
*
|
|
1408
|
-
* @see {@link https://developers.intercom.com/installing-intercom/docs/basic-javascript}
|
|
1409
|
-
*/
|
|
1410
|
-
var initialize = function initialize(appId, timeout) {
|
|
1411
|
-
if (timeout === void 0) {
|
|
1412
|
-
timeout = 0;
|
|
1413
|
-
}
|
|
1414
|
-
|
|
1415
|
-
var w = window;
|
|
1416
|
-
var ic = w.Intercom;
|
|
1417
|
-
|
|
1418
|
-
if (typeof ic === 'function') {
|
|
1419
|
-
ic('reattach_activator');
|
|
1420
|
-
ic('update', w.intercomSettings);
|
|
1421
|
-
} else {
|
|
1422
|
-
var d = document;
|
|
1423
|
-
|
|
1424
|
-
var i = function i() {
|
|
1425
|
-
i.c(arguments);
|
|
1426
|
-
};
|
|
1427
|
-
|
|
1428
|
-
i.q = [];
|
|
1429
|
-
|
|
1430
|
-
i.c = function (args) {
|
|
1431
|
-
i.q.push(args);
|
|
1432
|
-
};
|
|
1433
|
-
|
|
1434
|
-
w.Intercom = i;
|
|
1435
|
-
|
|
1436
|
-
var l = function l() {
|
|
1437
|
-
setTimeout(function () {
|
|
1438
|
-
var s = d.createElement('script');
|
|
1439
|
-
s.type = 'text/javascript';
|
|
1440
|
-
s.async = true;
|
|
1441
|
-
s.src = 'https://widget.intercom.io/widget/' + appId;
|
|
1442
|
-
var x = d.getElementsByTagName('script')[0];
|
|
1443
|
-
x.parentNode.insertBefore(s, x);
|
|
1444
|
-
}, timeout);
|
|
1445
|
-
};
|
|
1446
|
-
|
|
1447
|
-
if (document.readyState === 'complete') {
|
|
1448
|
-
l();
|
|
1449
|
-
} else if (w.attachEvent) {
|
|
1450
|
-
w.attachEvent('onload', l);
|
|
1451
|
-
} else {
|
|
1452
|
-
w.addEventListener('load', l, false);
|
|
1453
|
-
}
|
|
1454
|
-
}
|
|
1455
|
-
};
|
|
1456
|
-
|
|
1457
|
-
var mapMessengerAttributesToRawMessengerAttributes = function mapMessengerAttributesToRawMessengerAttributes(attributes) {
|
|
1458
|
-
return {
|
|
1459
|
-
custom_launcher_selector: attributes.customLauncherSelector,
|
|
1460
|
-
alignment: attributes.alignment,
|
|
1461
|
-
vertical_padding: attributes.verticalPadding,
|
|
1462
|
-
horizontal_padding: attributes.horizontalPadding,
|
|
1463
|
-
hide_default_launcher: attributes.hideDefaultLauncher,
|
|
1464
|
-
session_duration: attributes.sessionDuration,
|
|
1465
|
-
action_color: attributes.actionColor,
|
|
1466
|
-
background_color: attributes.backgroundColor
|
|
1467
|
-
};
|
|
1468
|
-
};
|
|
1469
|
-
|
|
1470
|
-
var mapDataAttributesCompanyToRawDataAttributesCompany = function mapDataAttributesCompanyToRawDataAttributesCompany(attributes) {
|
|
1471
|
-
return _extends$1({
|
|
1472
|
-
company_id: attributes.companyId,
|
|
1473
|
-
name: attributes.name,
|
|
1474
|
-
created_at: attributes.createdAt,
|
|
1475
|
-
plan: attributes.plan,
|
|
1476
|
-
monthly_spend: attributes.monthlySpend,
|
|
1477
|
-
user_count: attributes.userCount,
|
|
1478
|
-
size: attributes.size,
|
|
1479
|
-
website: attributes.website,
|
|
1480
|
-
industry: attributes.industry
|
|
1481
|
-
}, attributes.customAttributes);
|
|
1482
|
-
};
|
|
1483
|
-
|
|
1484
|
-
var mapDataAttributesAvatarToRawDataAttributesAvatar = function mapDataAttributesAvatarToRawDataAttributesAvatar(attributes) {
|
|
1485
|
-
return {
|
|
1486
|
-
type: attributes.type,
|
|
1487
|
-
image_url: attributes.imageUrl
|
|
1488
|
-
};
|
|
1489
|
-
};
|
|
1490
|
-
|
|
1491
|
-
var mapDataAttributesToRawDataAttributes = function mapDataAttributesToRawDataAttributes(attributes) {
|
|
1492
|
-
var _attributes$companies;
|
|
1493
|
-
|
|
1494
|
-
return _extends$1({
|
|
1495
|
-
email: attributes.email,
|
|
1496
|
-
user_id: attributes.userId,
|
|
1497
|
-
created_at: attributes.createdAt,
|
|
1498
|
-
name: attributes.name,
|
|
1499
|
-
phone: attributes.phone,
|
|
1500
|
-
last_request_at: attributes.lastRequestAt,
|
|
1501
|
-
unsubscribed_from_emails: attributes.unsubscribedFromEmails,
|
|
1502
|
-
language_override: attributes.languageOverride,
|
|
1503
|
-
utm_campaign: attributes.utmCampaign,
|
|
1504
|
-
utm_content: attributes.utmContent,
|
|
1505
|
-
utm_medium: attributes.utmMedium,
|
|
1506
|
-
utm_source: attributes.utmSource,
|
|
1507
|
-
utm_term: attributes.utmTerm,
|
|
1508
|
-
avatar: attributes.avatar && mapDataAttributesAvatarToRawDataAttributesAvatar(attributes.avatar),
|
|
1509
|
-
user_hash: attributes.userHash,
|
|
1510
|
-
company: attributes.company && mapDataAttributesCompanyToRawDataAttributesCompany(attributes.company),
|
|
1511
|
-
companies: (_attributes$companies = attributes.companies) == null ? void 0 : _attributes$companies.map(mapDataAttributesCompanyToRawDataAttributesCompany)
|
|
1512
|
-
}, attributes.customAttributes);
|
|
1513
|
-
};
|
|
1514
|
-
var mapIntercomPropsToRawIntercomProps = function mapIntercomPropsToRawIntercomProps(props) {
|
|
1515
|
-
return removeUndefined(_extends$1({}, mapMessengerAttributesToRawMessengerAttributes(props), mapDataAttributesToRawDataAttributes(props)));
|
|
1516
|
-
};
|
|
1517
|
-
|
|
1518
|
-
var IntercomProvider = function IntercomProvider(_ref) {
|
|
1519
|
-
var appId = _ref.appId,
|
|
1520
|
-
_ref$autoBoot = _ref.autoBoot,
|
|
1521
|
-
autoBoot = _ref$autoBoot === void 0 ? false : _ref$autoBoot,
|
|
1522
|
-
autoBootProps = _ref.autoBootProps,
|
|
1523
|
-
children = _ref.children,
|
|
1524
|
-
onHide = _ref.onHide,
|
|
1525
|
-
onShow = _ref.onShow,
|
|
1526
|
-
onUnreadCountChange = _ref.onUnreadCountChange,
|
|
1527
|
-
_ref$shouldInitialize = _ref.shouldInitialize,
|
|
1528
|
-
shouldInitialize = _ref$shouldInitialize === void 0 ? !isSSR : _ref$shouldInitialize,
|
|
1529
|
-
apiBase = _ref.apiBase,
|
|
1530
|
-
initializeDelay = _ref.initializeDelay,
|
|
1531
|
-
rest = _objectWithoutPropertiesLoose(_ref, ["appId", "autoBoot", "autoBootProps", "children", "onHide", "onShow", "onUnreadCountChange", "shouldInitialize", "apiBase", "initializeDelay"]);
|
|
1532
|
-
|
|
1533
|
-
var isBooted = useRef(false);
|
|
1534
|
-
var isInitialized = useRef(false);
|
|
1535
|
-
|
|
1536
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1537
|
-
// Allow data-x attributes, see https://github.com/devrnt/react-use-intercom/issues/478
|
|
1538
|
-
var invalidPropKeys = Object.keys(rest).filter(function (key) {
|
|
1539
|
-
return !key.startsWith('data-');
|
|
1540
|
-
});
|
|
1541
|
-
|
|
1542
|
-
if (invalidPropKeys.length > 0) {
|
|
1543
|
-
log$3('warn', ['some invalid props were passed to IntercomProvider. ', "Please check following props: " + invalidPropKeys.join(', ') + "."].join(''));
|
|
1544
|
-
}
|
|
1545
|
-
}
|
|
1546
|
-
|
|
1547
|
-
var boot = useCallback(function (props) {
|
|
1548
|
-
if (!window.Intercom && !shouldInitialize) {
|
|
1549
|
-
log$3('warn', 'Intercom instance is not initialized because `shouldInitialize` is set to `false` in `IntercomProvider`');
|
|
1550
|
-
return;
|
|
1551
|
-
}
|
|
1552
|
-
|
|
1553
|
-
if (isBooted.current) {
|
|
1554
|
-
return;
|
|
1555
|
-
}
|
|
1556
|
-
|
|
1557
|
-
var metaData = _extends$1({
|
|
1558
|
-
app_id: appId
|
|
1559
|
-
}, apiBase && {
|
|
1560
|
-
api_base: apiBase
|
|
1561
|
-
}, props && mapIntercomPropsToRawIntercomProps(props));
|
|
1562
|
-
|
|
1563
|
-
window.intercomSettings = metaData;
|
|
1564
|
-
IntercomAPI('boot', metaData);
|
|
1565
|
-
isBooted.current = true;
|
|
1566
|
-
}, [apiBase, appId, shouldInitialize]);
|
|
1567
|
-
|
|
1568
|
-
var _React$useState = useState(false),
|
|
1569
|
-
isOpen = _React$useState[0],
|
|
1570
|
-
setIsOpen = _React$useState[1];
|
|
1571
|
-
|
|
1572
|
-
var onHideWrapper = useCallback(function () {
|
|
1573
|
-
setIsOpen(false);
|
|
1574
|
-
if (onHide) onHide();
|
|
1575
|
-
}, [onHide, setIsOpen]);
|
|
1576
|
-
var onShowWrapper = useCallback(function () {
|
|
1577
|
-
setIsOpen(true);
|
|
1578
|
-
if (onShow) onShow();
|
|
1579
|
-
}, [onShow, setIsOpen]);
|
|
1580
|
-
|
|
1581
|
-
if (!isSSR && shouldInitialize && !isInitialized.current) {
|
|
1582
|
-
initialize(appId, initializeDelay); // attach listeners
|
|
1583
|
-
|
|
1584
|
-
IntercomAPI('onHide', onHideWrapper);
|
|
1585
|
-
IntercomAPI('onShow', onShowWrapper);
|
|
1586
|
-
if (onUnreadCountChange) IntercomAPI('onUnreadCountChange', onUnreadCountChange);
|
|
1587
|
-
|
|
1588
|
-
if (autoBoot) {
|
|
1589
|
-
boot(autoBootProps);
|
|
1590
|
-
}
|
|
1591
|
-
|
|
1592
|
-
isInitialized.current = true;
|
|
1593
|
-
}
|
|
1594
|
-
|
|
1595
|
-
var ensureIntercom = useCallback(function (functionName, callback) {
|
|
1596
|
-
if (functionName === void 0) {
|
|
1597
|
-
functionName = 'A function';
|
|
1598
|
-
}
|
|
1599
|
-
|
|
1600
|
-
if (!window.Intercom && !shouldInitialize) {
|
|
1601
|
-
log$3('warn', 'Intercom instance is not initialized because `shouldInitialize` is set to `false` in `IntercomProvider`');
|
|
1602
|
-
return;
|
|
1603
|
-
}
|
|
1604
|
-
|
|
1605
|
-
if (!isBooted.current) {
|
|
1606
|
-
log$3('warn', ["'" + functionName + "' was called but Intercom has not booted yet. ", "Please call 'boot' before calling '" + functionName + "' or ", "set 'autoBoot' to true in the IntercomProvider."].join(''));
|
|
1607
|
-
return;
|
|
1608
|
-
}
|
|
1609
|
-
|
|
1610
|
-
return callback();
|
|
1611
|
-
}, [shouldInitialize]);
|
|
1612
|
-
var shutdown = useCallback(function () {
|
|
1613
|
-
if (!isBooted.current) return;
|
|
1614
|
-
IntercomAPI('shutdown');
|
|
1615
|
-
delete window.intercomSettings;
|
|
1616
|
-
isBooted.current = false;
|
|
1617
|
-
}, []);
|
|
1618
|
-
var hardShutdown = useCallback(function () {
|
|
1619
|
-
if (!isBooted.current) return;
|
|
1620
|
-
IntercomAPI('shutdown');
|
|
1621
|
-
delete window.Intercom;
|
|
1622
|
-
delete window.intercomSettings;
|
|
1623
|
-
isBooted.current = false;
|
|
1624
|
-
}, []);
|
|
1625
|
-
var refresh = useCallback(function () {
|
|
1626
|
-
ensureIntercom('update', function () {
|
|
1627
|
-
var lastRequestedAt = new Date().getTime();
|
|
1628
|
-
IntercomAPI('update', {
|
|
1629
|
-
last_requested_at: lastRequestedAt
|
|
1630
|
-
});
|
|
1631
|
-
});
|
|
1632
|
-
}, [ensureIntercom]);
|
|
1633
|
-
var update = useCallback(function (props) {
|
|
1634
|
-
ensureIntercom('update', function () {
|
|
1635
|
-
if (!props) {
|
|
1636
|
-
refresh();
|
|
1637
|
-
return;
|
|
1638
|
-
}
|
|
1639
|
-
|
|
1640
|
-
var rawProps = mapIntercomPropsToRawIntercomProps(props);
|
|
1641
|
-
window.intercomSettings = _extends$1({}, window.intercomSettings, rawProps);
|
|
1642
|
-
IntercomAPI('update', rawProps);
|
|
1643
|
-
});
|
|
1644
|
-
}, [ensureIntercom, refresh]);
|
|
1645
|
-
var hide = useCallback(function () {
|
|
1646
|
-
ensureIntercom('hide', function () {
|
|
1647
|
-
IntercomAPI('hide');
|
|
1648
|
-
});
|
|
1649
|
-
}, [ensureIntercom]);
|
|
1650
|
-
var show = useCallback(function () {
|
|
1651
|
-
ensureIntercom('show', function () {
|
|
1652
|
-
return IntercomAPI('show');
|
|
1653
|
-
});
|
|
1654
|
-
}, [ensureIntercom]);
|
|
1655
|
-
var showMessages = useCallback(function () {
|
|
1656
|
-
ensureIntercom('showMessages', function () {
|
|
1657
|
-
IntercomAPI('showMessages');
|
|
1658
|
-
});
|
|
1659
|
-
}, [ensureIntercom]);
|
|
1660
|
-
var showNewMessages = useCallback(function (message) {
|
|
1661
|
-
ensureIntercom('showNewMessage', function () {
|
|
1662
|
-
if (!message) {
|
|
1663
|
-
IntercomAPI('showNewMessage');
|
|
1664
|
-
} else {
|
|
1665
|
-
IntercomAPI('showNewMessage', message);
|
|
1666
|
-
}
|
|
1667
|
-
});
|
|
1668
|
-
}, [ensureIntercom]);
|
|
1669
|
-
var getVisitorId = useCallback(function () {
|
|
1670
|
-
return ensureIntercom('getVisitorId', function () {
|
|
1671
|
-
return IntercomAPI('getVisitorId');
|
|
1672
|
-
});
|
|
1673
|
-
}, [ensureIntercom]);
|
|
1674
|
-
var startTour = useCallback(function (tourId) {
|
|
1675
|
-
ensureIntercom('startTour', function () {
|
|
1676
|
-
IntercomAPI('startTour', tourId);
|
|
1677
|
-
});
|
|
1678
|
-
}, [ensureIntercom]);
|
|
1679
|
-
var trackEvent = useCallback(function (event, metaData) {
|
|
1680
|
-
ensureIntercom('trackEvent', function () {
|
|
1681
|
-
if (metaData) {
|
|
1682
|
-
IntercomAPI('trackEvent', event, metaData);
|
|
1683
|
-
} else {
|
|
1684
|
-
IntercomAPI('trackEvent', event);
|
|
1685
|
-
}
|
|
1686
|
-
});
|
|
1687
|
-
}, [ensureIntercom]);
|
|
1688
|
-
var showArticle = useCallback(function (articleId) {
|
|
1689
|
-
return ensureIntercom('showArticle', function () {
|
|
1690
|
-
IntercomAPI('showArticle', articleId);
|
|
1691
|
-
});
|
|
1692
|
-
}, [ensureIntercom]);
|
|
1693
|
-
var providerValue = useMemo(function () {
|
|
1694
|
-
return {
|
|
1695
|
-
boot: boot,
|
|
1696
|
-
shutdown: shutdown,
|
|
1697
|
-
hardShutdown: hardShutdown,
|
|
1698
|
-
update: update,
|
|
1699
|
-
hide: hide,
|
|
1700
|
-
show: show,
|
|
1701
|
-
isOpen: isOpen,
|
|
1702
|
-
showMessages: showMessages,
|
|
1703
|
-
showNewMessages: showNewMessages,
|
|
1704
|
-
getVisitorId: getVisitorId,
|
|
1705
|
-
startTour: startTour,
|
|
1706
|
-
trackEvent: trackEvent,
|
|
1707
|
-
showArticle: showArticle
|
|
1708
|
-
};
|
|
1709
|
-
}, [boot, shutdown, hardShutdown, update, hide, show, isOpen, showMessages, showNewMessages, getVisitorId, startTour, trackEvent, showArticle]);
|
|
1710
|
-
return createElement(IntercomContext.Provider, {
|
|
1711
|
-
value: providerValue
|
|
1712
|
-
}, children);
|
|
1713
|
-
};
|
|
1714
|
-
var useIntercomContext = function useIntercomContext() {
|
|
1715
|
-
var context = useContext(IntercomContext);
|
|
1716
|
-
|
|
1717
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1718
|
-
if (context === undefined) {
|
|
1719
|
-
throw new Error('`useIntercom` must be used within `IntercomProvider`.');
|
|
1720
|
-
}
|
|
1721
|
-
}
|
|
1722
|
-
|
|
1723
|
-
return context;
|
|
1724
|
-
};
|
|
1725
|
-
|
|
1726
|
-
var useIntercom = function useIntercom() {
|
|
1727
|
-
return useIntercomContext();
|
|
1728
|
-
};
|
|
1729
|
-
|
|
1730
1301
|
/**
|
|
1731
1302
|
*
|
|
1732
1303
|
* detectIncognito v1.0.0 - (c) 2022 Joe Rutkowski <Joe@dreggle.com> (https://github.com/Joe12387/detectIncognito)
|
|
@@ -35422,19 +34993,16 @@ function getActiveTransaction(hub = getCurrentHub()) {
|
|
|
35422
34993
|
const local_config = {
|
|
35423
34994
|
// serverUrl: 'https://api-video-staging.myinterview.com',
|
|
35424
34995
|
serverUrl: 'https://api-video-dev.myinterview.com',
|
|
35425
|
-
INTERCOM_APP_ID: 'w75vea5o',
|
|
35426
34996
|
SENTRY_DSN: 'https://a49d1d55605640f4890f9534766f0ea8@o79324.ingest.sentry.io/6579209',
|
|
35427
34997
|
};
|
|
35428
34998
|
|
|
35429
34999
|
const staging_config = {
|
|
35430
35000
|
serverUrl: 'https://api-video-staging.myinterview.com',
|
|
35431
|
-
INTERCOM_APP_ID: 'pzs0slby',
|
|
35432
35001
|
SENTRY_DSN: 'https://a49d1d55605640f4890f9534766f0ea8@o79324.ingest.sentry.io/6579209',
|
|
35433
35002
|
};
|
|
35434
35003
|
|
|
35435
35004
|
const prod_config = {
|
|
35436
35005
|
serverUrl: 'https://api-video.myinterview.com',
|
|
35437
|
-
INTERCOM_APP_ID: 'pzs0slby',
|
|
35438
35006
|
SENTRY_DSN: 'https://a49d1d55605640f4890f9534766f0ea8@o79324.ingest.sentry.io/6579209',
|
|
35439
35007
|
};
|
|
35440
35008
|
|
|
@@ -35442,7 +35010,7 @@ const prod_config = {
|
|
|
35442
35010
|
const config$1 = (configEnv) => {
|
|
35443
35011
|
let env = configEnv;
|
|
35444
35012
|
try {
|
|
35445
|
-
env !== null && env !== void 0 ? env : (env = "
|
|
35013
|
+
env !== null && env !== void 0 ? env : (env = "staging");
|
|
35446
35014
|
}
|
|
35447
35015
|
catch (_a) { }
|
|
35448
35016
|
switch (env) {
|
|
@@ -35461,8 +35029,8 @@ const configGenerator = () => {
|
|
|
35461
35029
|
let environment;
|
|
35462
35030
|
let release;
|
|
35463
35031
|
try {
|
|
35464
|
-
environment !== null && environment !== void 0 ? environment : (environment = "
|
|
35465
|
-
release !== null && release !== void 0 ? release : (release = "1.1.
|
|
35032
|
+
environment !== null && environment !== void 0 ? environment : (environment = "staging");
|
|
35033
|
+
release !== null && release !== void 0 ? release : (release = "1.1.65");
|
|
35466
35034
|
}
|
|
35467
35035
|
catch (_a) {
|
|
35468
35036
|
console.error('sentry configGenerator error');
|
|
@@ -55688,7 +55256,6 @@ const MinimizeButton = ({ onClick }) => (React__default.createElement("button",
|
|
|
55688
55256
|
const isRtl = (language = 'en') => ['he', 'ar'].includes(language);
|
|
55689
55257
|
|
|
55690
55258
|
const Main = ({ widgetConfig, setShouldShowWaterMark, myinterviewRef, isWidgetMinimized, onMinimize }) => {
|
|
55691
|
-
const { boot, shutdown, update } = useIntercom();
|
|
55692
55259
|
const viewsRef = useRef(null);
|
|
55693
55260
|
const videoRef = useRef(null);
|
|
55694
55261
|
const [machine, send] = useMachine(() => accWidgetMachine.withContext(Object.assign(Object.assign({}, accWidgetMachine.context), { widgetConfig, videoRef })));
|
|
@@ -55716,17 +55283,11 @@ const Main = ({ widgetConfig, setShouldShowWaterMark, myinterviewRef, isWidgetMi
|
|
|
55716
55283
|
(_a = myinterviewRef === null || myinterviewRef === void 0 ? void 0 : myinterviewRef.current) === null || _a === void 0 ? void 0 : _a.style.setProperty('--myinterview-widget-background-height', 'calc(40vh - 100px)');
|
|
55717
55284
|
window.addEventListener('beforeunload', handleReload);
|
|
55718
55285
|
window.addEventListener('keydown', handleEscape);
|
|
55719
|
-
if (config.hideIntercom === false) {
|
|
55720
|
-
boot({
|
|
55721
|
-
customAttributes: { is_new_widget: true },
|
|
55722
|
-
});
|
|
55723
|
-
}
|
|
55724
55286
|
window.addEventListener('touchstart', () => false, { passive: false });
|
|
55725
55287
|
return () => {
|
|
55726
55288
|
window.removeEventListener('beforeunload', handleReload);
|
|
55727
55289
|
window.removeEventListener('touchstart', () => false);
|
|
55728
55290
|
window.removeEventListener('keydown', handleEscape);
|
|
55729
|
-
shutdown();
|
|
55730
55291
|
};
|
|
55731
55292
|
}, []);
|
|
55732
55293
|
useEffect(() => {
|
|
@@ -55757,17 +55318,6 @@ const Main = ({ widgetConfig, setShouldShowWaterMark, myinterviewRef, isWidgetMi
|
|
|
55757
55318
|
}
|
|
55758
55319
|
}, [machine.done]);
|
|
55759
55320
|
useEffect(() => {
|
|
55760
|
-
if (config.hideIntercom === false) {
|
|
55761
|
-
update({
|
|
55762
|
-
customAttributes: {
|
|
55763
|
-
apiKey: candidate === null || candidate === void 0 ? void 0 : candidate.apiKey,
|
|
55764
|
-
company_id: candidate === null || candidate === void 0 ? void 0 : candidate.company_id,
|
|
55765
|
-
name: candidate === null || candidate === void 0 ? void 0 : candidate.username,
|
|
55766
|
-
email: candidate === null || candidate === void 0 ? void 0 : candidate.email,
|
|
55767
|
-
},
|
|
55768
|
-
alignment: isRtl(job === null || job === void 0 ? void 0 : job.language) ? 'left' : 'right',
|
|
55769
|
-
});
|
|
55770
|
-
}
|
|
55771
55321
|
SentryHub.configureScope((scope) => {
|
|
55772
55322
|
scope.setTags(Object.assign({ company_id: candidate === null || candidate === void 0 ? void 0 : candidate.company_id, email: candidate.email }, (isIphone && { iphoneModel: getIPhoneModel() })));
|
|
55773
55323
|
});
|
|
@@ -55935,7 +55485,7 @@ const FOCUSABLE_SELECTORS = Object.freeze([
|
|
|
55935
55485
|
'a[href]', 'button:not([disabled]):not([tabindex="-1"])', 'textarea', 'input', 'select', '[tabindex]:not([tabindex="-1"])',
|
|
55936
55486
|
]);
|
|
55937
55487
|
const Widget = forwardRef(({ candidate, job, video, config, disabled = false, buttonText = 'START INTERVIEW', buttonStyle = {}, children, styleUrls = [], fontsUrls = [], }, clientRef) => {
|
|
55938
|
-
const widget_version = "1.1.
|
|
55488
|
+
const widget_version = "1.1.65";
|
|
55939
55489
|
const [isWidgetOpen, setIsWidgetOpen] = useState(false);
|
|
55940
55490
|
const [isWidgetMinimized, setIsWidgetMinimized] = useState(false);
|
|
55941
55491
|
const [isIncognitoMode, setIsIncognitoMode] = useState(false);
|
|
@@ -56096,24 +55646,23 @@ const Widget = forwardRef(({ candidate, job, video, config, disabled = false, bu
|
|
|
56096
55646
|
isCustomStyleProvided && children,
|
|
56097
55647
|
customStyleUrls,
|
|
56098
55648
|
React__default.createElement(ErrorBoundary, null,
|
|
56099
|
-
React__default.createElement(
|
|
56100
|
-
React__default.createElement(
|
|
56101
|
-
|
|
56102
|
-
|
|
56103
|
-
React__default.createElement("div", { className: "myinterview-
|
|
56104
|
-
|
|
56105
|
-
|
|
56106
|
-
|
|
56107
|
-
|
|
56108
|
-
|
|
56109
|
-
|
|
56110
|
-
|
|
56111
|
-
|
|
56112
|
-
|
|
56113
|
-
|
|
56114
|
-
|
|
56115
|
-
|
|
56116
|
-
}, setShouldShowWaterMark: setShouldShowWaterMark, isWidgetMinimized: isWidgetMinimized, onMinimize: onMinimize }))))))))));
|
|
55649
|
+
React__default.createElement("div", { className: "myinterview-widget", ref: mainRef },
|
|
55650
|
+
React__default.createElement(P, { ref: buttonRef, className: "myinterview-widget__button myinterview-text--P1-S", onClick: openWidget, disabled: disabled, style: buttonStyle, "aria-label": "Open interview widget" }, buttonText),
|
|
55651
|
+
isWidgetOpen && (React__default.createElement("div", { className: layoutClassNames, role: "dialog", "aria-modal": "true", "aria-labelledby": "myinterview-widget-main-content" },
|
|
55652
|
+
React__default.createElement("div", { className: "myinterview-widget__background full" },
|
|
55653
|
+
shouldShowWaterMark && (React__default.createElement("div", { className: "myinterview-widget__watermark color--white" },
|
|
55654
|
+
React__default.createElement("span", null, "Powered By"),
|
|
55655
|
+
React__default.createElement(Ri, null))),
|
|
55656
|
+
React__default.createElement("div", { className: "myinterview-widget__background-dots" })),
|
|
55657
|
+
isMobile && React__default.createElement(RotateScreen, null),
|
|
55658
|
+
(!isSupportedDevice || isIncognitoMode) && React__default.createElement(UnsupportedModal, { messageType: !isSupportedIosDevice ? 'IOS' : !isSupportedDevice ? 'BROWSER' : 'INCOGNITO' }),
|
|
55659
|
+
isSupportedDevice && (React__default.createElement("main", { className: wrapperClassNames, id: "myinterview-widget-main-content", role: "main", tabIndex: -1 },
|
|
55660
|
+
React__default.createElement(Main, { myinterviewRef: myinterviewRef, widgetConfig: {
|
|
55661
|
+
config: Object.assign(Object.assign({}, config), { onFinish: onInterviewCompleted, onError, practiceQuestions: convertQuestions(config.practiceQuestions) }),
|
|
55662
|
+
job: Object.assign(Object.assign({}, job), { questions: convertQuestions(job.questions) }),
|
|
55663
|
+
video: Object.assign(Object.assign({}, video), { referrer: (video === null || video === void 0 ? void 0 : video.referrer) || window.location.href, widget_version }),
|
|
55664
|
+
candidate,
|
|
55665
|
+
}, setShouldShowWaterMark: setShouldShowWaterMark, isWidgetMinimized: isWidgetMinimized, onMinimize: onMinimize })))))))));
|
|
56117
55666
|
});
|
|
56118
55667
|
|
|
56119
55668
|
export { Widget };
|