This repository was archived by the owner on May 11, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
3 lines (3 loc) · 67.7 KB
/
Copy pathindex.js
File metadata and controls
3 lines (3 loc) · 67.7 KB
1
2
3
/*! For license information please see index.js.LICENSE.txt */
(()=>{"use strict";var t='<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M23.8333 13V9.75002C23.8333 4.33335 21.6667 2.16669 16.25 2.16669H9.75C4.33334 2.16669 2.16667 4.33335 2.16667 9.75002V16.25C2.16667 21.6667 4.33334 23.8334 9.75 23.8334H13" stroke="#5150AE" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M22.7067 19.3267L20.9408 19.9225C20.4533 20.085 20.0633 20.4642 19.9008 20.9625L19.305 22.7283C18.7958 24.2558 16.6508 24.2233 16.1742 22.6958L14.17 16.25C13.78 14.9717 14.9608 13.78 16.2283 14.1808L22.685 16.185C24.2017 16.6617 24.2233 18.8175 22.7067 19.3267Z" stroke="#5150AE" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>';function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function r(){r=function(){return t};var t={},n=Object.prototype,o=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof d?e:d,i=Object.create(o.prototype),a=new C(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=E(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=f(t,e,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===h)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(t,r,a),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var h={};function d(){}function p(){}function y(){}var v={};s(v,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(S([])));g&&g!==n&&o.call(g,a)&&(v=g);var w=y.prototype=d.prototype=Object.create(v);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,r){function n(i,a,c,l){var s=f(t[i],t,a);if("throw"!==s.type){var u=s.arg,h=u.value;return h&&"object"==e(h)&&o.call(h,"__await")?r.resolve(h.__await).then((function(t){n("next",t,c,l)}),(function(t){n("throw",t,c,l)})):r.resolve(h).then((function(t){u.value=t,c(u)}),(function(t){return n("throw",t,c,l)}))}l(s.arg)}var i;this._invoke=function(t,e){function o(){return new r((function(r,o){n(t,e,r,o)}))}return i=i?i.then(o,o):o()}}function E(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=f(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function S(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(o.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:P}}function P(){return{value:void 0,done:!0}}return p.prototype=y,s(w,"constructor",y),s(y,"constructor",p),p.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,s(t,l,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},b(x.prototype),s(x.prototype,c,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(w),s(w,l,"Generator"),s(w,a,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=S,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function n(t,e,r,n,o,i,a){try{var c=t[i](a),l=c.value}catch(t){return void r(t)}c.done?e(l):Promise.resolve(l).then(n,o)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var a=t.apply(e,r);function c(t){n(a,o,i,c,l,"next",t)}function l(t){n(a,o,i,c,l,"throw",t)}c(void 0)}))}}var i,a=document.createElement("div"),c=document.createElement("div"),l=document.createElement("span"),s=document.createElement("span"),u=document.createElement("div"),f=document.createElement("span"),h=document.createElement("span"),d=document.createElement("div"),p=document.createElement("span"),y=document.createElement("span"),v=document.createElement("div"),m=document.createElement("span"),g=document.createElement("span"),w=document.createElement("span"),b=function(){s.style.visibility="visible",s.style.opacity="1"},x=function(){s.style.visibility="hidden",s.style.opacity="0"},E=function(){var e=o(r().mark((function e(){var n,o,i,E,L,k,C,S,P,j,O,_,N,A,T;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new Promise((function(t){a.style.position="fixed",a.style.left="25px",a.style.bottom="25px",a.style.height="55px",a.style.backgroundColor="rgba(256, 256, 256, 1)",a.style.border="1px solid #8685E0",a.style.borderRadius="6px",a.style.padding="10px 20px",a.style.display="flex",a.style.alignItems="center",a.style.color="black",a.style.fontFamily='"Roboto mono",monospace',a.style.fontSize="20px",a.style.direction="ltr",a.addEventListener("mouseover",b),a.addEventListener("mouseout",x),t(a)})),o=new Promise((function(t){c.setAttribute("id","rs-timer-wrapper"),c.style.margin="0 20px 0 0",c.style.display="flex",c.style.alignItems="center",c.style.lineHeight="1.2",c.style.position="relative",a.appendChild(c),t(!0)})),i=new Promise((function(t){l.setAttribute("id","rs-timer"),l.style.fontSize="20px",l.innerText="00:00",c.appendChild(l),t(l)})),E=new Promise((function(t){m.setAttribute("id","rs-recording"),m.style.opacity="0",m.style.transition="all .3s ease",m.style.position="absolute",m.style.right="-20px",m.style.lineHeight="1",m.innerHTML='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g filter="url(#filter0_d_2_1040)"><circle cx="12" cy="12" r="5" fill="#FF5158"/></g><defs><filter id="filter0_d_2_1040" x="0" y="0" width="24" height="24" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset/><feGaussianBlur stdDeviation="3.5"/><feComposite in2="hardAlpha" operator="out"/><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 0.154167 0 0 0 0 0.154167 0 0 0 0.3 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_2_1040"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_2_1040" result="shape"/></filter></defs></svg>',c.appendChild(m),t(!0)})),L=new Promise((function(t){v.setAttribute("id","rs-record-wrapper"),v.style.marginLeft="15px",v.style.display="flex",v.style.alignItems="center",v.style.justifyContent="center",a.appendChild(v),t(!0)})),k=new Promise((function(t){g.setAttribute("id","rs-start-record"),g.innerHTML='<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12.8131" cy="12.8131" r="12.1616" stroke="#FF5158" stroke-width="1.30303"/><circle cx="12.8131" cy="12.813" r="9.7727" fill="#FF5158"/></svg>',g.style.cursor="pointer",g.style.lineHeight="1",v.appendChild(g),t(!0)})),C=new Promise((function(t){w.setAttribute("id","rs-stop-record"),w.innerHTML='<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12.8131" cy="12.8131" r="12.1616" stroke="#FF5158" stroke-width="1.30303"/><rect x="8" y="8" width="10" height="10" rx="2" fill="#FF5158"/></svg>',w.style.cursor="pointer",w.style.lineHeight="1",t(!0)})),S=new Promise((function(t){u.setAttribute("id","rs-mute-wrapper"),u.style.margin="0 15px",u.style.display="flex",u.style.alignItems="center",u.style.justifyContent="center",a.appendChild(u),t(!0)})),P=new Promise((function(t){f.setAttribute("id","rs-mute-start"),f.innerHTML='<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14 18.0833C16.5783 18.0833 18.6667 15.995 18.6667 13.4166V6.99998C18.6667 4.42165 16.5783 2.33331 14 2.33331C11.4217 2.33331 9.33334 4.42165 9.33334 6.99998V13.4166C9.33334 15.995 11.4217 18.0833 14 18.0833Z" stroke="#5150AE" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M5.075 11.2583V13.2416C5.075 18.165 9.07666 22.1666 14 22.1666M14 22.1666C18.9233 22.1666 22.925 18.165 22.925 13.2416V11.2583M14 22.1666V25.6666M12.3783 7.50164C13.4283 7.11664 14.5717 7.11664 15.6217 7.50164M13.0667 9.97497C13.685 9.81164 14.3267 9.81164 14.945 9.97497" stroke="#5150AE" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',f.style.cursor="not-allowed",f.style.lineHeight="1",u.appendChild(f),t(!0)})),j=new Promise((function(t){h.setAttribute("id","rs-mute-stop"),h.innerHTML='<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M18.6667 7.34998V6.99998C18.6667 4.42165 16.5783 2.33331 14 2.33331C11.4217 2.33331 9.33334 4.42165 9.33334 6.99998V12.8333M10.5467 16.555C11.3983 17.5 12.635 18.0833 14 18.0833C16.5783 18.0833 18.6667 15.995 18.6667 13.4166V12.8333" stroke="#5B626E" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M7.91 19.775C9.18297 20.959 10.7738 21.7457 12.4873 22.0387C14.2009 22.3318 15.9627 22.1184 17.5568 21.4248C19.1508 20.7312 20.5078 19.5875 21.4614 18.1339C22.415 16.6804 22.9236 14.9801 22.925 13.2417V11.2584M5.075 11.2584V13.2417C5.075 14.4784 5.32 15.645 5.775 16.7184M23.415 3.31335L4.585 22.155M12.8333 3.50002V7.00002M14 22.1667V25.6667" stroke="#5B626E" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',h.style.cursor="not-allowed",h.style.lineHeight="1",t(!0)})),O=new Promise((function(t){d.setAttribute("id","rs-mask"),d.style.display="flex",d.style.alignItems="center",d.style.paddingLeft="15px",d.style.borderLeft="1px solid #C9C9C9",a.appendChild(d),t(!0)})),_=new Promise((function(e){p.setAttribute("id","rs-mask-start"),p.innerHTML=t,p.style.cursor="pointer",p.style.lineHeight="1",d.appendChild(p),e(!0)})),N=new Promise((function(e){y.setAttribute("id","rs-mask-stop"),y.innerHTML=t,y.style.cursor="pointer",y.style.lineHeight="1",e(!0)})),A=new Promise((function(t){s.setAttribute("id","rs-close"),s.style.height="16px",s.style.width="16px",s.style.cursor="pointer",s.style.position="absolute",s.style.right="0",s.style.top="0",s.style.transform="translate(6px, -6px)",s.style.border="1px solid black",s.style.backgroundColor="white",s.style.borderRadius="50%",s.style.color="black",s.style.fontSize="8px",s.style.display="flex",s.style.alignItems="center",s.style.justifyContent="center",s.style.transition="all .3s ease",s.style.visibility="hidden",s.style.opacity="0",s.innerText="✖",a.appendChild(s),t(!0)})),T=new Promise((function(t){document.body.appendChild(a),t(!0)})),e.abrupt("return",Promise.all([n,o,i,E,L,k,C,S,P,j,O,_,N,A,T]));case 16:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),L=function(){var t=o(r().mark((function t(e,n,o,a,c){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return p.onclick=function(){a(!0),p.remove(),d.appendChild(y)},y.onclick=function(){c(!0),y.remove(),d.appendChild(p)},s.onclick=function(){return e(!0)},g.onclick=function(){n(!0),g.remove(),v.appendChild(w),i=setInterval((function(){var t=getComputedStyle(m).opacity;m.style.opacity="1"===t?"0":"1"}),500)},w.onclick=function(){o(!0),w.remove(),v.appendChild(g),clearInterval(i)},t.abrupt("return",new Promise((function(t){return E().then((function(e){return t(e[2])}))})));case 6:case"end":return t.stop()}}),t)})));return function(e,r,n,o,i){return t.apply(this,arguments)}}();function k(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}const C=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.observers=[]}var e,r;return e=t,(r=[{key:"subscribe",value:function(t){this.observers.push(t)}},{key:"unsubscribe",value:function(t){this.observers=this.observers.filter((function(e){return e!==t}))}},{key:"fire",value:function(t){this.observers.forEach((function(e){return e(t)}))}}])&&k(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());function S(t){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},S(t)}function P(){P=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new L(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=b(a,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(t,e,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var u={};function f(){}function h(){}function d(){}var p={};c(p,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(k([])));v&&v!==e&&r.call(v,o)&&(p=v);var m=d.prototype=f.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(o,i,a,c){var l=s(t[o],t,i);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==S(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(l.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return u;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,u;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,u):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,u)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function k(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return h.prototype=d,c(m,"constructor",d),c(d,"constructor",h),h.displayName=c(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},g(w.prototype),c(w.prototype,i,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=k,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),u},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),u}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},t}function j(t,e,r,n,o,i,a){try{var c=t[i](a),l=c.value}catch(t){return void r(t)}c.done?e(l):Promise.resolve(l).then(n,o)}function O(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){j(i,n,o,a,c,"next",t)}function c(t){j(i,n,o,a,c,"throw",t)}a(void 0)}))}}var _=document.createElement("div"),N=document.createElement("div"),A=document.createElement("div"),T=document.createElement("span"),F=document.createElement("div"),M=document.querySelector("body"),B=function(){var t=O(P().mark((function t(){var e,r,n,o,i,a;return P().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new Promise((function(t){return t(((e=document.createElement("link")).setAttribute("rel","stylesheet"),e.setAttribute("type","text/css"),e.setAttribute("href","https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css"),document.head.appendChild(e),!0));var e})),r=new Promise((function(t){return t((_.style.position="fixed",_.style.inset="0 0 0 0",_.style.backgroundColor="rgba(0, 0, 0, .75)",_.style.zIndex="1",_.style.display="none",M.appendChild(_),_))})),n=new Promise((function(t){return t((N.style.fontFamily="Vazirmatn, sans-serif",N.style.position="absolute",N.style.borderRadius="24px",N.style.width="600px",N.style.height="auto",N.style.inset="50% 0 auto 0",N.style.marginRight="auto",N.style.marginLeft="auto",N.style.transform="translateY(-50%)",N.style.backgroundColor="rgba(255, 255, 255, 1)",N.style.zIndex="2",_.appendChild(N),N))})),o=new Promise((function(t){return t((A.style.padding="26px 30px",A.style.display="flex",A.style.justifyContent="space-between",N.appendChild(A),A))})),i=new Promise((function(t){return t((T.setAttribute("id","rs-close"),T.style.height="12px",T.style.width="12px",T.style.display="inline-flex",T.style.alignItems="center",T.style.justifyContent="center",T.style.cursor="pointer",T.innerHTML="<svg viewBox='0 0 12 12' xmlns='http://www.w3.org/2000/svg'><line x1='1' y1='11' x2='11' y2='1' stroke='black' stroke-width='2' /><line x1='1' y1='1' x2='11' y2='11' stroke='black' stroke-width='2' /></svg>",T.onclick=function(){return G()},A.appendChild(T),T))})),a=new Promise((function(t){return t((F.setAttribute("id","rs-modal-content"),F.style.padding="26px 30px",N.appendChild(F),F))})),t.abrupt("return",Promise.all([a,e,o,r,n,i]));case 7:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),G=function(){M.removeAttribute("overflow"),_.remove(),N.remove(),A.innerHTML="",A.remove(),T.remove(),F.innerHTML="",F.remove()};const I=function(){var t=O(P().mark((function t(){return P().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){return B().then((function(e){return t(e[0])}))})));case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();function R(t){return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},R(t)}function z(){z=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new L(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=b(a,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(t,e,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var u={};function f(){}function h(){}function d(){}var p={};c(p,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(k([])));v&&v!==e&&r.call(v,o)&&(p=v);var m=d.prototype=f.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(o,i,a,c){var l=s(t[o],t,i);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==R(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(l.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return u;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,u;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,u):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,u)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function k(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return h.prototype=d,c(m,"constructor",d),c(d,"constructor",h),h.displayName=c(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},g(w.prototype),c(w.prototype,i,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=k,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),u},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),u}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},t}function H(t,e,r,n,o,i,a){try{var c=t[i](a),l=c.value}catch(t){return void r(t)}c.done?e(l):Promise.resolve(l).then(n,o)}function D(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var V={},Y=function(t){var e=t.target,r=e.name,n=e.value;V[r]=n,console.log({name:r,value:n})},q=function(){var t,e=(t=z().mark((function t(e,r,n){var o,i,a,c,l,s,u,f;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=e.fullName,i=e.email,a=e.avatar,c=r.fileSize,l=r.fileName,s=new Promise((function(t){return t(U({fullName:o,email:i,avatar:a}))})),u=new Promise((function(t){return t(W())})),f=new Promise((function(t){return t(Z({fileSize:c,fileName:l},n))})),t.abrupt("return",Promise.all([s,u,f]));case 6:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){H(i,n,o,a,c,"next",t)}function c(t){H(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(t,r,n){return e.apply(this,arguments)}}(),U=function(t){var e=t.fullName,r=t.email,n=t.avatar,o=document.createElement("div");return o.appendChild(J({fullName:e,email:r,avatar:n})),o},W=function(){var t=document.createElement("h1");return t.style.fontSize="20px",t.innerText="ارسال بازخورد",t},Z=function(t,e){var r=t.fileSize,n=t.fileName,o=document.createElement("div");o.style.display="flex",o.style.justifyContent="space-between",o.style.alignItems="center";var i=document.createElement("div");i.style.display="flex",i.style.alignItems="center";var a=document.createElement("span");a.innerHTML='<svg width="15" height="16" viewBox="0 0 15 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.4 7.99999L8.2592 14.1408C7.40677 14.9713 6.26151 15.4327 5.0714 15.4249C3.88129 15.4172 2.74213 14.941 1.90058 14.0994C1.05903 13.2579 0.582822 12.1187 0.575078 10.9286C0.567333 9.73849 1.02867 8.59322 1.8592 7.74079L8.18347 1.41652C8.74926 0.850728 9.51665 0.532867 10.3168 0.532867C11.117 0.532867 11.8843 0.850728 12.4501 1.41652C13.0159 1.98232 13.3338 2.7497 13.3338 3.54986C13.3338 4.35001 13.0159 5.11739 12.4501 5.68319L6.30827 11.8251C6.02537 12.108 5.64168 12.2669 5.2416 12.2669C4.84152 12.2669 4.45783 12.108 4.17493 11.8251C3.89204 11.5422 3.73311 11.1585 3.73311 10.7584C3.73311 10.3583 3.89204 9.97462 4.17493 9.69172L10.1333 3.73332" stroke="#888E95"/></svg>',i.appendChild(a);var c=document.createElement("span");c.style.marginRight=".5rem",c.style.direction="ltr",c.style.fontSize=".75rem",c.innerText="".concat(n,".mp4"),i.appendChild(c);var l=document.createElement("span");l.style.marginRight=".5rem",l.style.direction="ltr",l.style.fontSize=".75rem",l.style.color="#646464",l.innerText=r,i.appendChild(l),o.appendChild(i);var s=document.createElement("button");s.style.textAlign="center",s.style.whiteSpace="nowrap",s.style.padding="0.375rem 0.75rem",s.style.color="#FFF";var u=s.cloneNode(!0),f=document.createElement("span"),h=document.createElement("span");return f.innerText="ارسال بازخورد",h.innerHTML='<svg width="25" height="17" viewBox="0 0 25 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10.0597 3.044L5.71304 7.39067C5.19971 7.904 5.19971 8.744 5.71304 9.25734L10.0597 13.604" stroke="white" stroke-width="1.18667" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/><path d="M18.7416 3.044L14.3949 7.39067C13.8816 7.904 13.8816 8.744 14.3949 9.25734L18.7416 13.604" stroke="white" stroke-opacity="0.7" stroke-width="1.18667" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/></svg>',u.appendChild(f),u.appendChild(h),u.style.backgroundColor="#3A86F2",u.style.border="1px solid #3A86F2",u.style.borderRadius="10px",u.onclick=function(){return e(V)},o.appendChild(u),o},X=function(t,e,r,n,o,i){var a=document.createElement("span"),c=a.cloneNode(!0);c.innerText="".concat(o,":"),c.style.display="inline-block",c.style.marginLeft="10px";var l=document.createElement("input");l.setAttribute("type","radio"),l.setAttribute("name",i),l.style.visibility="hidden",l.style.position="absolute";var s=document.createElement("label");s.style.marginLeft="10px",s.style.height="24px",s.style.border="1px solid #D0D0D0",s.style.padding="0 8px",s.style.lineHeight="24px",s.style.borderRadius="6px",s.style.fontSize="80%",s.style.display="inline-flex",s.style.alignItems="center";var u=a.cloneNode(!0);u.style.display="inline-block",u.style.height="8px",u.style.width="8px",u.style.borderRadius="50%";var f=document.createElement("div");f.style.display="flex",f.style.alignItems="center",f.style.position="relative",f.appendChild(c),r.forEach((function(t,e){var o,c=l.cloneNode(!0);c.value=t.value,c.setAttribute("id","id-".concat(i,"-").concat(t.value));var h=s.cloneNode(!0);if(t.color){var d=u.cloneNode(!0);d.style.backgroundColor=t.color,d.style.marginLeft="5px",h.appendChild(d)}null!==(o=e===n)&&void 0!==o&&o&&(c.setAttribute("checked","checked"),h.style.borderColor="#5150AE");var p=a.cloneNode(!0);p.innerText=t.label,h.appendChild(p),h.setAttribute("for","id-".concat(i,"-").concat(t.value)),f.appendChild(c),f.appendChild(h),c.onclick=function(){r.forEach((function(t){document.querySelector('label[for="id-'.concat(i,"-").concat(t.value,'"]')).style.borderColor="#D0D0D0"})),function(t,e){t.checked?e.style.borderColor="#5150AE":e.style.borderColor="#D0D0D0"}(c,h)}})),e.appendChild(f),t.appendChild(e)},J=function(t){var e=t.fullName,r=t.email,n=t.avatar,o=document.createElement("div");o.style.width="100%",o.style.paddingRight="15px",o.style.paddingLeft="15px",o.style.marginRight="auto",o.style.marginLeft="auto";var i=document.createElement("div");i.style.display="flex",i.style.flexWrap="wrap",i.style.marginRight="-30px",i.style.marginLeft="-30px",i.style.marginBottom="1rem",o.appendChild(i);var a=document.createElement("div");a.style.position="relative",a.style.width="100%",a.style.paddingRight="15px",a.style.paddingLeft="15px",a.style.maxWidth="100%",a.style.flexGrow="1",a.style.flexBasis="0",a.style.marginBottom="1rem";var c=document.createElement("div");c.style.width="100%";var l=document.createElement("label");return l.style.marginBottom=".5rem",function(t,e,r,n){var o=n.fullName,i=n.avatar,a=n.email,c=document.createElement("div");c.style.marginBottom="1rem",c.style.display="flex",c.style.alignItems="center";var l=document.createElement("span"),s=l.cloneNode(!0);s.innerText="فرستنده:",s.style.display="inline-block",s.style.marginLeft="15px";var u=document.createElement("img");u.setAttribute("alt","avatar"),u.setAttribute("width","36"),u.setAttribute("height","36"),u.setAttribute("src",null!=i?i:"data:image/svg+xml;base64,"+btoa('<svg height="800px" width="800px" id="Capa_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 480 480" xml:space="preserve"><g>\t<g>\t\t<circle style="fill:#B8BAC0;" cx="240" cy="240" r="240"/>\t</g>\t<g>\t\t<g>\t\t\t<path style="fill:#FFFFFF;" d="M240,360.07c-27.944,0-53.297-11.991-72.003-31.372c-0.014,11.615-0.436,28.379-3.516,40.611\t\t\t\tc2.02,1.235,3.588,3.262,3.894,5.784c3.992,32.484,34.781,56.977,71.625,56.977c36.836,0,67.625-24.496,71.625-56.977\t\t\t\tc0.31-2.525,1.844-4.549,3.895-5.78c-3.08-12.233-3.503-28.999-3.517-40.615C293.297,348.079,267.944,360.07,240,360.07z"/>\t\t</g>\t</g>\t<g>\t\t<g>\t\t\t<path style="fill:#D7DBE0;" d="M310.44,330.174c-18.549,18.477-43.242,29.896-70.44,29.896\t\t\t\tc-27.944,0-53.297-11.991-72.003-31.372c-0.014,11.615-0.436,28.379-3.516,40.611c2.02,1.235,3.588,3.262,3.894,5.784\t\t\t\tc1.765,14.359,8.778,27.144,19.223,36.954C235.766,405.265,290.437,357.702,310.44,330.174z"/>\t\t</g>\t</g>\t<g>\t\t<g>\t\t\t<path style="fill:#FFFFFF;" d="M312,160.07H176c-22.055,0-40,17.945-40,40v48c0,61.758,46.656,112,104,112s104-50.242,104-112\t\t\t\tv-56C344,174.426,329.648,160.07,312,160.07z"/>\t\t</g>\t</g>\t<g>\t\t<g>\t\t\t<path style="fill:#5C546A;" d="M296,72.07H192c-15.047,0-27.695,10.438-31.102,24.449C133.359,100.02,112,123.598,112,152.07v40\t\t\t\tc0,20.617,8.752,39.851,24,53.52v-45.52c0-22.055,17.945-40,40-40h136c17.648,0,32,14.355,32,32v53.511\t\t\t\tc15.251-13.667,24-32.899,24-53.511v-48C368,104.371,335.703,72.07,296,72.07z"/>\t\t</g>\t</g>\t<g>\t\t<path style="fill:#5C546A;" d="M61.632,400.544C105.562,449.319,169.191,480,240,480s134.438-30.681,178.368-79.456\t\t\tc-7.66-10.356-18.462-18.77-32.352-22.659c-0.32-0.09-0.641-0.16-0.969-0.207l-63.859-9.582c-0.391-0.059-1.227-0.09-1.625-0.09\t\t\tc-4.039,0-7.445,3.012-7.938,7.023c-4,32.48-34.789,56.977-71.625,56.977c-36.844,0-67.633-24.492-71.625-56.977\t\t\tc-0.5-4.129-4.219-7.234-8.141-7.02c-0.469-0.027-0.93,0.012-1.422,0.086l-63.859,9.582c-0.328,0.047-0.648,0.117-0.969,0.207\t\t\tC80.094,381.775,69.292,390.188,61.632,400.544z"/>\t</g></g></svg>')),u.style.borderRadius="50%",u.style.marginLeft="15px";var f=l.cloneNode(!0);f.style.display="inline-flex",f.style.flexDirection="column";var h=l.cloneNode(!0);h.style.fontSize="11px",h.style.color="#7B7B7B",h.innerText=o;var d=l.cloneNode(!0);d.innerText=a,d.style.fontSize="12px",f.appendChild(d),f.appendChild(h),c.appendChild(s),c.appendChild(u),c.appendChild(f),e.appendChild(c),t.appendChild(e)}(i,a.cloneNode(!0),0,{fullName:e,avatar:n,email:r}),i.appendChild(c.cloneNode(!0)),function(t,e){var r=document.createElement("div"),n=r.cloneNode(!0),o=r.cloneNode(!0);o.style.display="flex",o.style.alignItems="center",o.style.justifyContent="space-between";var i=r.cloneNode(!0);X(o,i.cloneNode(!0),[{label:"باگ",value:"1",color:"#EF0303"},{label:"گزارش",value:"2",color:"#0FE800"}],0,"نوع بازخورد","kind"),X(o,i.cloneNode(!0),[{label:"کم",value:"4",color:"#F79008"},{label:"متوسط",value:"3",color:"#2A70FE"},{label:"زیاد",value:"2",color:"#E14EB6"}],1,"اولویت","priority"),n.appendChild(o),e.appendChild(n),t.appendChild(e)}(i,a.cloneNode(!0)),i.appendChild(c.cloneNode(!0)),function(t,e,r,n,o,i,a){var c=document.createElement("input");c.style.width="100%",c.style.height="2rem",c.setAttribute("id",o),c.setAttribute("name",o),c.setAttribute("type","text"),c.style.border="1px solid #E1E1E1",c.style.borderRadius="6px",c.style.outline="none",c.style.height="36px",c.style.lineHeight="36px",c.style.on="36px",c.onchange=Y,c.addEventListener("focus",(function(){this.style.borderColor="#5150AE"})),r.innerText=n,r.setAttribute("for",o),e.appendChild(r),e.appendChild(c),t.appendChild(e)}(i,a.cloneNode(!0),l.cloneNode(!0),"موضوع","subject"),i.appendChild(c.cloneNode(!0)),function(t,e,r,n,o,i){var a=document.createElement("textarea");a.style.width="100%",a.setAttribute("id",o),a.setAttribute("name",o),a.setAttribute("rows","6"),a.style.border="1px solid #E1E1E1",a.style.borderRadius="6px",a.style.outline="none",a.onchange=Y,a.addEventListener("focus",(function(){this.style.borderColor="#5150AE"})),r.innerText=n,r.setAttribute("for",o),e.appendChild(r),e.appendChild(a),t.appendChild(e)}(i,a.cloneNode(!0),l.cloneNode(!0),"توضیحات","description"),o};const K=function(t,e,r){var n=t.fullName,o=t.email,i=t.avatar,a=e.fileSize,c=e.fileName;I().then((function(t){q({fullName:n,email:o,avatar:i},{fileSize:a,fileName:c},r).then((function(e){var r,n,o=(n=3,function(t){if(Array.isArray(t))return t}(r=e)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}}(r,n)||function(t,e){if(t){if("string"==typeof t)return D(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?D(t,e):void 0}}(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=o[0],a=o[1],c=o[2];t.appendChild(i).appendChild(c),function(t){A.insertBefore(t,T)}(a),M.style.overflow="hidden",_.style.display="block"}))}))};function $(t){return $="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$(t)}function Q(){Q=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new L(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=b(a,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(t,e,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var u={};function f(){}function h(){}function d(){}var p={};c(p,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(k([])));v&&v!==e&&r.call(v,o)&&(p=v);var m=d.prototype=f.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(o,i,a,c){var l=s(t[o],t,i);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==$(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(l.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return u;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,u;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,u):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,u)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function k(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return h.prototype=d,c(m,"constructor",d),c(d,"constructor",h),h.displayName=c(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},g(w.prototype),c(w.prototype,i,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=k,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),u},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),u}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},t}function tt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function et(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?tt(Object(r),!0).forEach((function(e){rt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):tt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function rt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function nt(t,e,r,n,o,i,a){try{var c=t[i](a),l=c.value}catch(t){return void r(t)}c.done?e(l):Promise.resolve(l).then(n,o)}var ot,it,at,ct,lt,st,ut,ft={store:{fullName:null,email:null,avatar:null,requestUrl:null},get info(){return this.store},set info(t){this.store=null!=t?t:{fullName:void 0,email:void 0,avatar:void 0,requestUrl:void 0}}},ht=(it=(ot=new Date).getFullYear(),at=ot.getMonth()+1,ct=ot.getDate(),lt=ot.getHours(),st=ot.getMinutes(),ut=ot.getSeconds(),ct<10&&(ct="0".concat(ct)),at<10&&(at="0".concat(at)),lt<10&&(lt="0".concat(lt)),st<10&&(st="0".concat(st)),ut<10&&(ut="0".concat(ut)),"".concat(it,"-").concat(at,"-").concat(ct,"_-_").concat(lt,":").concat(st,":").concat(ut)),dt=function(){var t,e=(t=Q().mark((function t(e,r){var n,o,i;return Q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=new File([e],ht),(o=new FormData).append("file",n,"".concat(ht,".webm")),o.append("fullName",ft.info.fullName),o.append("fullName",ft.info.email),o.append("subject",r.subject),o.append("description",r.description),o.append("priority",r.priority),i=et(et({},r),{},{file:"".concat(ht,".mp4")}),console.log({recordedBlob:e}),console.log({requestBody:i}),t.next=13,fetch(ft.info.requestUrl,{method:"POST",body:{}});case 13:t.sent.json().then((function(t){console.log({response:t})})),G();case 16:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){nt(i,n,o,a,c,"next",t)}function c(t){nt(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(t,r){return e.apply(this,arguments)}}();var pt,yt;function vt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function mt(t,e,r){return e&&vt(t.prototype,e),r&&vt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function gt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const wt=mt((function t(){var e=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),gt(this,"moved",void 0),gt(this,"clicked",void 0),gt(this,"startPosition",void 0),gt(this,"element",void 0),gt(this,"createElement",(function(){var t=document.createElement("div"),r=document.createElement("div");return r.innerText="✖",r.setAttribute("class","close"),t.setAttribute("id","mask-element-".concat(Math.random().toString(16).slice(2))),r.addEventListener("click",(function(){return e.removeElement(t)})),t.appendChild(r),document.body.appendChild(t),t})),gt(this,"removeElement",(function(t){return t.remove()})),gt(this,"removeAllElements",(function(){document.querySelectorAll("[id^='mask-element-']").forEach((function(t){return t.remove()}))})),gt(this,"mousedownListener",(function(t){var r=t.pageX,n=t.pageY;e.startPosition={x:r,y:n},e.clicked=!0})),gt(this,"mousemoveListener",(function(t){var r=t.pageX,n=t.pageY,o=window.innerWidth,i=window.innerHeight;if(e.clicked){if(t.preventDefault(),e.moved||(e.element=e.createElement()),!e.element)return;e.element.style.backgroundColor="black",e.element.style.position="absolute";var a=e.startPosition.x<r?e.startPosition.x:r>o?o-5:r,c=r<5?5:r<e.startPosition.x?r:e.startPosition.x;"rtl"===getComputedStyle(document.querySelector("body")).direction&&(a=r<e.startPosition.x?o-e.startPosition.x:r<o?o-r:0,c=r<e.startPosition.x?o-r:o-e.startPosition.x),e.element.style.top="".concat(e.startPosition.y<n?e.startPosition.y:n<5?5:n,"px"),e.element.style.bottom="".concat(n<e.startPosition.y?e.startPosition.y:n>i?i-5:n,"px"),e.element.style.right="".concat(a,"px"),e.element.style.left="".concat(c,"px"),e.element.style.width="".concat(e.startPosition.x>r?r<0?e.startPosition.x-5:e.startPosition.x-r:r>o?o-e.startPosition.x-5:r-e.startPosition.x,"px"),e.element.style.height="".concat(e.startPosition.y>n?n<0?e.startPosition.y-5:e.startPosition.y-n:n>i?i-e.startPosition.y-5:n-e.startPosition.y,"px"),e.moved=!0}})),gt(this,"mouseupListener",(function(){e.moved=!1,e.clicked=!1})),gt(this,"addMouseEvents",(function(){document.addEventListener("mousedown",e.mousedownListener),document.addEventListener("mousemove",e.mousemoveListener),document.addEventListener("mouseup",e.mouseupListener)})),gt(this,"removeMouseEvents",(function(){document.removeEventListener("mousedown",e.mousedownListener),document.removeEventListener("mousemove",e.mousemoveListener),document.removeEventListener("mouseup",e.mouseupListener)})),gt(this,"init",(function(t){t?e.addMouseEvents():e.removeMouseEvents()}))}));function bt(t){return bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bt(t)}function xt(){xt=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new L(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=b(a,r);if(c){if(c===u)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(t,e,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var u={};function f(){}function h(){}function d(){}var p={};c(p,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(k([])));v&&v!==e&&r.call(v,o)&&(p=v);var m=d.prototype=f.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(o,i,a,c){var l=s(t[o],t,i);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==bt(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(l.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return u;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,u;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,u):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,u)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function k(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return h.prototype=d,c(m,"constructor",d),c(d,"constructor",h),h.displayName=c(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},g(w.prototype),c(w.prototype,i,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=k,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),u},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),u}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},t}function Et(t,e,r,n,o,i,a){try{var c=t[i](a),l=c.value}catch(t){return void r(t)}c.done?e(l):Promise.resolve(l).then(n,o)}function Lt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Et(i,n,o,a,c,"next",t)}function c(t){Et(i,n,o,a,c,"throw",t)}a(void 0)}))}}function kt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ct(t,e,r){return e&&kt(t.prototype,e),r&&kt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function St(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Pt=Ct((function t(e){var r,n,o,i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),St(this,"videoStreamState",void 0),St(this,"audioStreamState",void 0),St(this,"startRecording",(function(t){var e=new MediaRecorder(t),r=[];e.ondataavailable=function(t){return r.push(t.data)},e.start();var n=new Promise((function(t,r){e.onstop=t,e.onerror=function(t){return r(t.name)}}));return Promise.all([n]).then((function(){return r}))})),St(this,"renderStream",(function(t){t.getVideoTracks()[0].onended=function(){return i.stopRecording()},i.startRecording(t).then((function(t){var e=i.mimeType,r=new Blob(t,{type:e});C.fire("stopped"),function(t){var e=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(!+t)return"0 Bytes";var r=1024,n=e<0?0:e,o=["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],i=Math.floor(Math.log(t)/Math.log(r));return"".concat(parseFloat((t/Math.pow(r,i)).toFixed(n))," ").concat(o[i])}(t.size,2);K(ft.info,{fileSize:e,fileName:ht},(function(e){return e&&dt(t,e)}))}(r),console.info("[avm-js] Successfully recorded ".concat(r.size," bytes of ").concat(r.type," media."))}))})),St(this,"stopRecording",(function(){[i.videoStreamState,i.audioStreamState].forEach((function(t){return t.getTracks().forEach((function(t){return t.stop()}))}))})),St(this,"createStream",Lt(xt().mark((function t(){var e;return xt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,navigator.mediaDevices.getDisplayMedia(i.displayMediaConstraints);case 2:return i.videoStreamState=t.sent,t.next=5,navigator.mediaDevices.getUserMedia(i.userMediaConstraints);case 5:return i.audioStreamState=t.sent,e=i.audioStreamState.getAudioTracks()[0],i.videoStreamState.addTrack(e),t.abrupt("return",i.videoStreamState);case 9:case"end":return t.stop()}}),t)})))),St(this,"start",Lt(xt().mark((function t(){return xt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.createStream().then((function(t){return i.renderStream(t),!0})).catch((function(t){"NotFoundError"===t.name?console.error("Camera or microphone not found. Can't record."):console.error(t)}));case 2:case"end":return t.stop()}}),t)})))),this.displayMediaConstraints=null!==(r=null==e?void 0:e.displayMediaConstraints)&&void 0!==r?r:{audio:!0,video:!0},this.userMediaConstraints=null!==(n=null==e?void 0:e.userMediaConstraints)&&void 0!==n?n:{audio:{sampleSize:100,frameRate:{max:30},channelCount:2}},this.mimeType=null!==(o=null==e?void 0:e.mimeType)&&void 0!==o?o:"video/webm"}));function jt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=null,this.startButton=null,this.screenRecorder=new Pt,this.screenMask=new wt,this.timerWrapper=null}var e,r;return e=t,(r=[{key:"initialize",value:function(t){var e=t.options,r=t.startButtonId;e?r?(console.info("[avm-js] Package is initialized!"),this.options=e,this.startButton=document.getElementById(r),ft.info={fullName:this.options.fullName,email:this.options.email,avatar:this.options.avatar,requestUrl:this.options.requestUrl},this.startButton?this.startButton.addEventListener("click",this.createElement.bind(this)):console.error("Element with ID '".concat(r,"' not found."))):console.error("Start button not set."):console.error("Options not set.")}},{key:"startRecording",value:function(){var t=this;C.subscribe(this.clearElements.bind(this)),this.screenRecorder.start().then((function(){console.info("[avm-js] Record is started"),function(t,e){yt=t;var r=0,n=0,o=0,i=0;pt&&clearInterval(pt),pt=setInterval((function(){var t,a,c;1e3===(r+=10)&&(r=0,n++,e({seconds:n,minutes:o,hours:i}),60===n&&(n=0,60==++o&&(o=0,i++))),t=i<10?"0"+i:i,a=o<10?"0"+o:o,c=n<10?"0"+n:n,yt.innerText="".concat(t<1?"":t+":").concat(a,":").concat(c)}),10)}(t.timerWrapper,t.observeTime.bind(t))}))}},{key:"stopRecording",value:function(){console.info("[avm-js] Record is stopped!"),this.screenRecorder.stopRecording()}},{key:"closeElement",value:function(){this.screenRecorder.stopRecording()}},{key:"clearElements",value:function(){clearInterval(pt),clearInterval(i),a.remove(),c.remove(),l.remove(),s.remove(),u.remove(),f.remove(),h.remove(),d.remove(),p.remove(),y.remove(),v.remove(),m.remove(),g.remove(),w.remove(),this.screenMask.removeAllElements(),C.unsubscribe(this.clearElements.bind(this))}},{key:"startMask",value:function(){this.screenMask.init(!0)}},{key:"stopMask",value:function(){this.screenMask.init(!1)}},{key:"observeTime",value:function(t){1===t.minutes&&this.stopRecording()}},{key:"createElement",value:function(){var t=this;L(this.closeElement.bind(this),this.startRecording.bind(this),this.stopRecording.bind(this),this.startMask.bind(this),this.stopMask.bind(this)).then((function(e){t.timerWrapper=e}))}}])&&jt(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}())).initialize({options:{fullName:"John Doe",email:"n.kaviyani@asax.ir",avatar:null,requestUrl:""},startButtonId:"startButton"})})();
//# sourceMappingURL=index.js.map