PageSourceSearch

https://assets.avochato.com/packs/js/6431-aae94154b83e7a19.js

js avochato.com collected 2026-10-01 12:12:38 UTC 45,482 bytes, 2 lines download raw bytes

1"use strict";(self.rspackChunk=self.rspackChunk||[]).push([[6431],{70031:function(t,e,r){r.d(e,{l:function(){return E}});var n=r(84058),i=r.n(n),o=r(4124),a=r.n(o),s=r(69752),c=r.n(s),u=r(23805),l=r.n(u),f=r(74692),h=["limit","userId","includeMessages","signal"],d=["limit","signal"];function p(){p=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var a,s,c,u,l=Object.create((r&&r.prototype instanceof g?r:g).prototype);return i(l,"_invoke",{value:(a=e,s=n,c=new _(o||[]),u=h,function(e,r){if(u===d)throw Error("Generator is already running");if(u===v){if("throw"===e)throw r;return{value:t,done:!0}}for(c.method=e,c.arg=r;;){var n=c.delegate;if(n){var i=function e(r,n){var i=n.method,o=r.iterator[i];if(o===t)return n.delegate=null,"throw"===i&&r.iterator.return&&(n.method="return",n.arg=t,e(r,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=TypeError("The iterator does not provide a '"+i+"' method")),m;var a=f(o,r.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,m;var s=a.arg;return s?s.done?(n[r.resultName]=s.value,n.next=r.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):s:(n.method="throw",n.arg=TypeError("iterator result is not an object"),n.delegate=null,m)}(n,c);if(i){if(i===m)continue;return i}}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if(u===h)throw u=v,c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);u=d;var o=f(a,s,c);if("normal"===o.type){if(u=c.done?v:"suspendedYield",o.arg===m)continue;return{value:o.arg,done:c.done}}"throw"===o.type&&(u=v,c.method="throw",c.arg=o.arg)}})}),l}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",d="executing",v="completed",m={};function g(){}function y(){}function w(){}var b={};u(b,a,function(){return this});var E=Object.getPrototypeOf,L=E&&E(E(k([])));L&&L!==r&&n.call(L,a)&&(b=L);var x=w.prototype=g.prototype=Object.create(b);function O(t){["next","throw","return"].forEach(function(e){u(t,e,function(t){return this._invoke(e,t)})})}function j(t,e){var r;i(this,"_invoke",{value:function(i,o){function a(){return new e(function(r,a){!function r(i,o,a,s){var c=f(t[i],t,o);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then(function(t){r("next",t,a,s)},function(t){r("throw",t,a,s)}):e.resolve(l).then(function(t){u.value=t,a(u)},function(t){return r("throw",t,a,s)})}s(c.arg)}(i,o,r,a)})}return r=r?r.then(a,a):a()}})}function I(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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function k(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw TypeError(typeof e+" is not iterable")}return y.prototype=w,i(x,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:y,configurable:!0}),y.displayName=u(w,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,u(t,c,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},O(j.prototype),u(j.prototype,s,function(){return this}),e.AsyncIterator=j,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var a=new j(l(t,r,n,i),o);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},O(x),u(x,c,"Generator"),u(x,a,function(){return this}),u(x,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=k,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEac
1h(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return s.type="throw",s.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):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),m},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),T(r),m}},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 i=n.arg;T(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:k(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function v(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r,n,i={},o=Object.keys(t);for(n=0;n<o.length;n++)r=o[n],e.indexOf(r)>=0||(i[r]=t[r]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n<o.length;n++)r=o[n],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}function m(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){r(t);return}s.done?e(c):Promise.resolve(c).then(n,i)}function g(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function a(t){m(o,n,i,a,s,"next",t)}function s(t){m(o,n,i,a,s,"throw",t)}a(void 0)})}}function y(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 w(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?y(Object(r),!0).forEach(function(e){var n,i,o;n=t,i=e,o=r[e],(i=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function b(t,e){return c()(t,(t,r,n)=>{t["string"==typeof n?e(n):n]=l()(r)?b(r,e):r})}var E=new class{constructor(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=e,this.whitelist=[400,401,403,404,409,410,422],null!=(t=this.config).defaultLimit||(t.defaultLimit=50),this.init()}init(){f.ajaxSetup({headers:{"X-CSRF-Token":f('meta[name="csrf-token"]').attr("content")}})}ajax(t){var e=t.route,r=t.params,n=t.payload,i=t.method,o=void 0===i?"GET":i,a=t.renderFlash,s=t.signal,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=c.retries,l=void 0===u?2:u;return new Promise((t,i)=>{var c,u="GET"===o?r:n,h=0,d=()=>{var r;c=f.ajax({url:"".concat(null!=(r=this.config.baseUrl)?r:"").concat(e),method:o,data:w({enrich:this.config.enrichResponses},u),success:(e,r,n)=>{var o,s,c=n.getResponseHeader("Content-Type")||"";if("string"==typeof e&&e.length>0&&/\bhtml\b/i.test(c)){var u={status:n.status,statusText:n.statusText,message:"Expected a JSON response but received HTML (likely a redirect to the sign-in page — session expired)",response:e,xhr:n};null==(s=(o=this.config).onError)||s.call(o,u),i(Object.assign(Error(u.message),u));return}var l=n.getResponseHeader("X-Flash-Type");if(l){var f=n.getResponseHeader("X-Flash-Message");a&&window.renderFlash(f,l),t(w(w({},e),{},{flash:{type:l,message:f}}))}else t(e)},error:t=>{var e,r,n,o,s,c,u=t.getResponseHeader("X-Flash-Type");if("error"===u){var f=t.getResponseHeader("X-Flash-Message");t.flash={type:u,message:f},a&&window.renderFlash(f,u)}(h+=1)<=l&&0>this.whitelist.indexOf(t.status)?setTimeout(()=>null==d?void 0:d(),1e3*Math.pow(2,h)):(null==(r=(e=this.config).onError)||r.call(e,{status:t.status,statusText:t.statusText,message:(null==(s=null==(o=null==(n=t.responseJSON)?void 0:n.errors)?void 0:o.join)?void 0:s.call(o,", "))||t.responseText||t.statusText,response:null!=(c=t.responseJSON)?c:t.responseText,xhr:t}),i(t))}})};null==s||s.addEventListener("abort",()=>{d=null,null==c||c.abort(),i({message:"aborted"})}),null==d||d()})}tickets(t){var e=this;return g((p()).mark(function r(){var n,i,o,a,s,c,u,l,f,d,m,g;return p().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return n=t.limit,i=t.userId,o=t.includeMessages,a=t.signal,s=v(t,h),u={route:"/v1/tickets",params:w(w({limit:null==(c=null==n?void 0:n.toString)?void 0:c.call(n),user_id:i},s.query&&o?{include_messages:"true"}:{}),s),signal:a},r.next=4,e.ajax(u);case 4:return d=(f=(l=r.sent).data).tickets,m=f.last_key,g={data:d,lastKey:m,totalCount:f.total_count,flash:l.flash},r.abrupt("return",g);case 12:case"end":return r.stop()}},r)}))()}broadcasts(t){var e=this;return g((p()).mark(function r(){var n,i,o,a,s,c,u,l;return p().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return n=t.limit,i=t.signal,o=v(t,d),s={route:"/v1/broadcasts",params:w({limit:null==(a=null==n?void 0:n.toString)?void 0:a.call(n)},o),signal:i},r.next=4,e.ajax(s);case 4:return u=(c=r.sent).data.broadcasts,c.flash,l={data:u},r.abrupt("return",l);case 9:case"end":return r.stop()}},r)}))()}events(t){var e=this;return g((p()).mark(function r(){var n,i,o,a,s,c,u,l,f,h,d,v,m,g,y,w,b,E,L,x,O,j,I;return p().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return n=t.subdomain,i=t.ticket,o=t.after,a=t.upto,s=t.around,c=t.limit,u=t.signal,y={route:"/v1/tickets/".concat(i,"/events"),params:{subdomain:n,limit:null==(l=null==c?void 0:c.toString)?void 0:l.call(c),after:o,upto:a,around:s},signal:u},r.next=4,e.ajax(y);
1case 4:return E={data:b=(w=r.sent).data.events,flash:w.flash},e.config.enrichResponses&&(L=null==(d=null==(h=null==(f=b[b.length-1])?void 0:f.sent_at)?void 0:h.toString)?void 0:d.call(h),x=null==(g=null==(m=null==(v=b[0])?void 0:v.sent_at)?void 0:m.toString)?void 0:g.call(m),a||c&&!(b.length>=c)||Object.assign(E,{lastKey:L}),o||c&&!(b.length>=c)||Object.assign(E,{firstKey:x}),s&&b.length<c&&(((O=b.findIndex(t=>t.sent_at<Number(s)))>=(j=Math.ceil(c/2))||O<0&&b.length>=j)&&Object.assign(E,{firstKey:x}),I=Math.floor(c/2),O>0&&b.length-O>=I&&Object.assign(E,{lastKey:L}))),r.abrupt("return",E);case 10:case"end":return r.stop()}},r)}))()}bulk(t,e){var r=this;return g((p()).mark(function n(){var o,s;return p().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return o={method:"PUT",route:"/v1/bulk",payload:Object.assign(b(t,a()),{subdomain:e})},n.next=3,r.ajax(o);case 3:return s=n.sent.data,n.abrupt("return",b(s,i()));case 6:case"end":return n.stop()}},n)}))()}}({enrichResponses:!0})},40516:function(t,e,r){var n,i,o,a=r(6373);function s(){s=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(e,r,n,o){var a,s,c,u,l=Object.create((r&&r.prototype instanceof g?r:g).prototype);return i(l,"_invoke",{value:(a=e,s=n,c=new _(o||[]),u=d,function(e,r){if(u===p)throw Error("Generator is already running");if(u===v){if("throw"===e)throw r;return{value:t,done:!0}}for(c.method=e,c.arg=r;;){var n=c.delegate;if(n){var i=function e(r,n){var i=n.method,o=r.iterator[i];if(o===t)return n.delegate=null,"throw"===i&&r.iterator.return&&(n.method="return",n.arg=t,e(r,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=TypeError("The iterator does not provide a '"+i+"' method")),m;var a=h(o,r.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,m;var s=a.arg;return s?s.done?(n[r.resultName]=s.value,n.next=r.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):s:(n.method="throw",n.arg=TypeError("iterator result is not an object"),n.delegate=null,m)}(n,c);if(i){if(i===m)continue;return i}}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if(u===d)throw u=v,c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);u=p;var o=h(a,s,c);if("normal"===o.type){if(u=c.done?v:"suspendedYield",o.arg===m)continue;return{value:o.arg,done:c.done}}"throw"===o.type&&(u=v,c.method="throw",c.arg=o.arg)}})}),l}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var d="suspendedStart",p="executing",v="completed",m={};function g(){}function y(){}function w(){}var b={};l(b,a,function(){return this});var E=Object.getPrototypeOf,L=E&&E(E(k([])));L&&L!==r&&n.call(L,a)&&(b=L);var x=w.prototype=g.prototype=Object.create(b);function O(t){["next","throw","return"].forEach(function(e){l(t,e,function(t){return this._invoke(e,t)})})}function j(t,e){var r;i(this,"_invoke",{value:function(i,o){function a(){return new e(function(r,a){!function r(i,o,a,s){var c=h(t[i],t,o);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then(function(t){r("next",t,a,s)},function(t){r("throw",t,a,s)}):e.resolve(l).then(function(t){u.value=t,a(u)},function(t){return r("throw",t,a,s)})}s(c.arg)}(i,o,r,a)})}return r=r?r.then(a,a):a()}})}function I(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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function k(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw TypeError(typeof e+" is not iterable")}return y.prototype=w,i(x,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:y,configurable:!0}),y.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},O(j.prototype),l(j.prototype,c,function(){return this}),e.AsyncIterator=j,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var a=new j(f(t,r,n,i),o);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},O(x),l(x,u,"Generator"),l(x,a,function(){return this}),l(x,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=k,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEac
1h(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return s.type="throw",s.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):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),m},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),T(r),m}},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 i=n.arg;T(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:k(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function c(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){r(t);return}s.done?e(c):Promise.resolve(c).then(n,i)}var u=(n=(s()).mark(function t(e,n){var i,c,u,l;return s().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:t.next=2;break;case 2:if(!(!o&&e.enabled)){t.next=13;break}return t.next=5,r.e(5447).then(r.t.bind(r,27290,23));case 5:(o=t.sent.default).init(e.appId),(0,a.B)(o.reduxMiddleware()),i=n.userId,c=n.name,u=n.email,o.identify(i,{name:c,email:u}),l=o.track,o.track=function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];l.apply(o,e),o.log(...e)};case 13:case"end":return t.stop()}},t)}),i=function(){var t=this,e=arguments;return new Promise(function(r,i){var o=n.apply(t,e);function a(t){c(o,r,i,a,s,"next",t)}function s(t){c(o,r,i,a,s,"throw",t)}a(void 0)})},function(t,e){return i.apply(this,arguments)}),l=t=>function(){if(o){for(var e,r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];var a=n[0],s=n[1];try{e=null==s?void 0:s()}catch(e){o.log("LogRocket.".concat(t," failed: ").concat(a)),o.error(e)}o[t](a,e)}},f=l("log"),h=l("track"),d=function(){return null==o?void 0:o.error(...arguments)};r.d(e,{Rm:function(){return f},Ts:function(){return u},u4:function(){return h},z3:function(){return d}})},90118:function(t,e,r){r.d(e,{P:function(){return d}});var n,i,o=/^(\d+)\.(\d+)\.(\d+)/,a=(t,e)=>((t,e)=>{var r=o.exec(t),n=o.exec(e);if(!r||!n)return 0/0;for(var i=1;i<=3;i+=1){var a=Number(r[i]),s=Number(n[i]);if(a>s)return 1;if(a<s)return -1}return 0})(t,e)>-1;function s(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 c(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach(function(e){var n,i,o;n=t,i=e,o=r[e],(i=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}
1(t,"string");return"symbol"==typeof e?e:String(e)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function u(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"u">typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,s=[],c=!0,u=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(s.push(n.value),s.length!==e);c=!0);}catch(t){u=!0,i=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return l(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(t,e)}}(t,e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}(n=i||(i={})).INIT="init",n.LOGOUT="logout",n.DIAL="dial",n.TRIGGER_VISIT="turbolinks-before_visit",n.NAVIGATE="turbolinks-load",n.NAVIGATE_REACT="react-navigate",n.VIEW_IMAGE="view-image",n.SAVE_IMAGE="save_image",n.STAGE_SWITCH="switch-stage",n.UPLOAD_DOCUMENT="upload-document",n.INIT_TWILIO="init-twilio";var f=t=>{var e;return null==(e=window.ReactNativeWebView)?void 0:e.postMessage(JSON.stringify(t))},h=["init-twilio","call-disconnect"],d={exists:()=>void 0!==window.ReactNativeWebView,get platform(){if(this.exists())return navigator.userAgent.
1substring(13).split("/")[0]},get platformVersion(){if(this.exists()){var t=navigator.userAgent.indexOf("+"),e=navigator.userAgent.substring(t).indexOf(" ");return e<0?null:navigator.userAgent.substring(t+e).split("/").pop()}},get appVersion(){if(this.exists()){var t=navigator.userAgent.indexOf("/")+1,e=navigator.userAgent.indexOf("(");return navigator.userAgent.substring(t,e)}},get hasVoip(){if(this.exists())return!navigator.userAgent.includes("No_VoIP")},attach(t,e){var r,n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.exists()&&((r=Object.entries(o)).push(["remote-redux",e=>{"dispatch"===e.detail.reduxEventType&&t.dispatch(e.detail.payload.action)}]),r.push(["web-app-api",r=>{var n;switch(r.detail.eventType){case"redux:dispatch":var i=r.detail.payload.action;t.dispatch(i);break;case"navigator:action":var o=r.detail.payload,a=o.action,s=o.args;null==(n=e[a])||n.call(e,...s)}}]),r.forEach(t=>{var e=u(t,2),r=e[0],n=e[1];return window.addEventListener(r,n)}),t.subscribe(()=>{var e=t.getState();e.navigation.history!==n&&(n=e.navigation.history,f({version:"2",method:i.NAVIGATE_REACT,url:window.location.toString()}))}),f({version:"2",method:i.INIT,react:!0})),()=>this.detach(r)},attachTwilio(t){return this._twilioListener&&window.removeEventListener("web-app-api",this._twilioListener),this._twilioListener=e=>{h.forEach(r=>{t[r]&&e.detail.eventType==="twilio:".concat(r)&&t[r]()})},window.addEventListener("web-app-api",this._twilioListener),this._twilioListener},detach(t){this.exists()&&(f({version:"2",method:i.INIT,react:!1}),t.forEach(t=>{var e=u(t,2),r=e[0],n=e[1];return window.removeEventListener(r,n)}))},viewImage(t,e){return!!this.exists()&&!!a(this.appVersion,"2.33.0")&&(f({version:"2",method:i.VIEW_IMAGE,image_url:t,mime:e}),!0)},saveImage(t){this.exists()&&f({version:"2",method:i.SAVE_IMAGE,image_url:t})},uploadDocument(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"*/*";if(this.exists())return new Promise(e=>{var r=t=>{var n=t.detail,i=n.eventType,o=n.payload;if("send:file"===i){window.removeEventListener("web-app-api",r);var a=o.name,s=o.mimeType;e(new File([o.contents],a,{type:s}))}};window.addEventListener("web-app-api",r),f({version:"2",method:i.UPLOAD_DOCUMENT,mime_type:t})})},dial(t,e,r,n,o){return!!this.exists()&&!!this.hasVoip&&("Android"!==this.platform||!!a(this.appVersion,"2.3.0"))&&(a(this.appVersion,"2.30.0")?f({version:"2",method:i.DIAL,to:n,name:o}):f(c(c({},r),{},{version:"2",method:i.DIAL,to:n,access_token:t,remember_token:e})),!0)},initTwilio(t,e){return!!this.exists()&&!!this.hasVoip&&!!a(this.appVersion,"2.30.0")&&(f({version:"2",method:i.INIT_TWILIO,twilioToken:t,twilioPayload:e}),!0)},supportsNativeVideo(){return a(this.appVersion,"2.35.0")}}},69923:function(t,e,r){r.r(e),r.d(e,{Status:function(){return a},config:function(){return E},dial:function(){return C},getDevice:function(){return P},initTwilio:function(){return N},muteIncomingCalls:function(){return O},registerDevice:function(){return S},resumeAudio:function(){return T},status:function(){return L},suspendAudio:function(){return I},unmuteIncomingCalls:function(){return j}});var n,i,o,a,s,c,u=r(48927),l=r(40516),f=new WeakMap,h=t=>{var e=f.get(t);e&&f.delete(t),(null==e?void 0:e.timeout)&&window.clearTimeout(e.timeout)},d=r(70031),p=r(90118);function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function m(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 g(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?m(Object(r),!0).forEach(function(e){var n,i,o;n=t,i=e,o=r[e],(i=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEac
1h(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function y(){y=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var a,s,c,u,l=Object.create((r&&r.prototype instanceof m?r:m).prototype);return i(l,"_invoke",{value:(a=e,s=n,c=new _(o||[]),u=h,function(e,r){if(u===d)throw Error("Generator is already running");if(u===p){if("throw"===e)throw r;return{value:t,done:!0}}for(c.method=e,c.arg=r;;){var n=c.delegate;if(n){var i=function e(r,n){var i=n.method,o=r.iterator[i];if(o===t)return n.delegate=null,"throw"===i&&r.iterator.return&&(n.method="return",n.arg=t,e(r,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=TypeError("The iterator does not provide a '"+i+"' method")),v;var a=f(o,r.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,v;var s=a.arg;return s?s.done?(n[r.resultName]=s.value,n.next=r.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):s:(n.method="throw",n.arg=TypeError("iterator result is not an object"),n.delegate=null,v)}(n,c);if(i){if(i===v)continue;return i}}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if(u===h)throw u=p,c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);u=d;var o=f(a,s,c);if("normal"===o.type){if(u=c.done?p:"suspendedYield",o.arg===v)continue;return{value:o.arg,done:c.done}}"throw"===o.type&&(u=p,c.method="throw",c.arg=o.arg)}})}),l}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",d="executing",p="completed",v={};function m(){}function g(){}function w(){}var b={};u(b,a,function(){return this});var E=Object.getPrototypeOf,L=E&&E(E(k([])));L&&L!==r&&n.call(L,a)&&(b=L);var x=w.prototype=m.prototype=Object.create(b);function O(t){["next","throw","return"].forEach(function(e){u(t,e,function(t){return this._invoke(e,t)})})}function j(t,e){var r;i(this,"_invoke",{value:function(i,o){function a(){return new e(function(r,a){!function r(i,o,a,s){var c=f(t[i],t,o);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then(function(t){r("next",t,a,s)},function(t){r("throw",t,a,s)}):e.resolve(l).then(function(t){u.value=t,a(u)},function(t){return r("throw",t,a,s)})}s(c.arg)}(i,o,r,a)})}return r=r?r.then(a,a):a()}})}function I(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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function k(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw TypeError(typeof e+" is not iterable")}return g.prototype=w,i(x,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:g,configurable:!0}),g.displayName=u(w,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,u(t,c,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},O(j.prototype),u(j.prototype,s,function(){return this}),e.AsyncIterator=j,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var a=new j(l(t,r,n,i),o);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},O(x),u(x,c,"Generator"),u(x,a,function(){return this}),u(x,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=k,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEac
1h(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return s.type="throw",s.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):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),v},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),T(r),v}},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 i=n.arg;T(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:k(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function w(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){r(t);return}s.done?e(c):Promise.resolve(c).then(n,i)}function b(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function a(t){w(o,n,i,a,s,"next",t)}function s(t){w(o,n,i,a,s,"throw",t)}a(void 0)})}}var E={initBackoff:100,callTimeoutMs:5e3,tokenRefreshMs:36e5,forceUpdateTokenAfterMs:846e5};(n=a||(a={})).UNINITIALIZED="uninitialized",n.READY="ready",n.RINGING="ringing",n.CALL_IN_PROGRESS="call_in_progress";var L={get(){return this.value},update(t){var e;this.value=t,null==(e=this.listeners)||e.forEach(e=>e(t))},addListener(t){null!=this.listeners||(this.listeners=[]),this.listeners.push(t)},removeListener(t){var e;this.listeners=null==(e=this.listeners)?void 0:e.filter(e=>e!==t)}};L.update(a.UNINITIALIZED);var x=!1,O=()=>{var t;if(x=!0,L.get()===a.RINGING){var e=()=>{var t;T(),null==(t=null==c?void 0:c.audio)||t.incoming(!1),L.removeListener(e)};L.addListener(e),I()}else null==(t=null==c?void 0:c.audio)||t.incoming(!1)},j=()=>{var t;x=!1,T(),null==(t=null==c?void 0:c.audio)||t.incoming(!0)},I=()=>{var t,e=null==(t=null==c?void 0:c.audio)?void 0:t._audioContext;null==e||e.suspend()},T=()=>{var t,e=null==(t=null==c?void 0:c.audio)?void 0:t._audioContext;null==e||e.resume()},_=t=>{var e,r;null==(e=window.dialManager)||e.close(),null==(r=window.incomingCallPrompt)||r.close(),h(t),L.update(a.READY)},k=t=>{var e;t.on("cancel",()=>{l.u4("Call Canceled"),_(t)}),t.on("disconnect",()=>{l.u4("Call Disconnected"),_(t)}),t.on("error",e=>{console.error(e),_(t)}),t.on("reject",()=>{l.u4("Call Rejected"),_(t)}),e=E.callTimeoutMs,f.has(t)&&h(t),f.set(t,{}),t.on("sample",()=>{var r=f.get(t);r&&(r.timeout&&window.clearTimeout(r.timeout),r.timeout=window.setTimeout(()=>{f.has(t)&&(f.delete(t),(()=>{var e;"pending"!==t.status()&&(console.warn('Call "sample" event timed out, hanging up and cleaning up the call.'),null==(e=window.dialManager)||e.hangup(),_(t))})())},e))})},A=(i=b((y()).mark(function t(e){var r,n,i=arguments;return y().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:2,t.next=3,d.l.ajax({method:"POST",route:"/v1/calls",payload:{subdomain:e}},{retries:r});case 3:return s=(n=t.sent).data.twilio_payload,t.abrupt("return",n.data.twilio_token);case 6:case"end":return t.stop()}},t)})),function(t){return i.apply(this,arguments)}),N=function t(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:E.initBackoff;A(e,0).then(t=>S(e,t,r)).catch(i=>{console.error(i),setTimeout(()=>t(e,r,2*n),n)})},P=()=>c,S=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return new Promise((n,i)=>{if(null==c||c.destroy(),e){if(p.P.exists()&&p.P.hasVoip){p.P.attachTwilio({"init-twilio":()=>{l.u4("Twilio Device Registered"),L.update(a.READY),n(null)},"call-disconnect":()=>{l.u4("Call Disconnected"),L.update(a.READY)}});var o,f,h,d,m=window.sharedApi.getRememberToken(),w=window.sharedApi.getSessionId(),O=g(g({},s),{},{remember_token:m,session_id:w});if(p.P.initTwilio(e,O))return void l.Rm("Using React Native Twilio library");
1l.Rm("Old app version, using Twilio in the webview")}c=new u.pF(e,g({appVersion:"v2.0",closeProtection:"Leaving this page will end your current call. Continue?",maxAverageBitrate:64e3,tokenRefreshMs:E.tokenRefreshMs},r&&{logLevel:"debug"})),x&&(null==(h=c.audio)||h.incoming(!1));var j={deviceActive:!1,deviceError:null},I=(o=b((y()).mark(function e(){return y().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return clearTimeout(d),e.t0=c,e.next=4,A(t);case 4:e.t1=e.sent,e.t0.updateToken.call(e.t0,e.t1),d=window.setTimeout(I,E.forceUpdateTokenAfterMs);case 7:case"end":return e.stop()}},e)})),function(){return o.apply(this,arguments)});d=window.setTimeout(I,E.forceUpdateTokenAfterMs),c.on(u.pF.EventName.TokenWillExpire,I),c.on(u.pF.EventName.Unregistered,()=>{l.u4("Twilio Device Unregistered"),j.deviceActive?L.update(a.UNINITIALIZED):j.deviceError&&(l.z3(j.deviceError),i(j.deviceError))}),c.on(u.pF.EventName.Registered,()=>{l.u4("Twilio Device Registered",()=>({wasActive:j.deviceActive})),L.update(a.READY),j.deviceActive||(j.deviceActive=!0,n(c))}),c.on(u.pF.EventName.Incoming,t=>{if(l.u4("Incoming Call Received",()=>g({status:L.get()},[...t.customParameters.entries()].reduce((t,e)=>{var r=function(t){if(Array.isArray(t))return t}(e)||function(t){var e=null==t?null:"u">typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var r,n,i,o,a=[],s=!0,c=!1;try{i=(e=e.call(t)).next,!1;for(;!(s=(r=i.call(e)).done)&&(a.push(r.value),2!==a.length);s=!0);}catch(t){c=!0,n=t}finally{try{if(!s&&null!=e.return&&(o=e.return(),Object(o)!==o))return}finally{if(c)throw n}}return a}}(e)||function(t){if(t){if("string"==typeof t)return v(t,2);var e=Object.prototype.toString.call(t).slice(8,-1);if("Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return v(t,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=r[0],i=r[1];return Object.assign(t,{["Parameter[".concat(n,"]")]:i})},{}))),L.get()!==a.RINGING){L.update(a.RINGING);var e,r=t.customParameters.get("from_number"),n=t.customParameters.get("display_name"),i=r||t.parameters.From;n&&n!==i?e=n:(e=i,t.callerInfo.isVerified&&(e+=" ✅"));var o=n;n!==i&&(o=n),o||(o=t.parameters.CallerId),o||(o="Incoming Call"),k(t),window.incomingCallPrompt.show({from:e,onAccept:()=>{l.u4("Incoming Call Accepted"),window.dialManager.open(t,{name:o,phone:i}),t.accept(),L.update(a.CALL_IN_PROGRESS)},onIgnore:()=>{l.u4("Incoming Call Ignored"),t.ignore(),L.update(a.READY)}})}});var T=t=>{31005===t.code||31009===t.code?console.error(t):j.deviceError=t};c.on(u.pF.EventName.Error,(f=b((y()).mark(function t(e,r){return y().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:console.error(e),r?_(r):j.deviceActive||T(e);case 2:case"end":return t.stop()}},t)})),function(t,e){return f.apply(this,arguments)})),c.register().catch(T)}})},C=(o=b((y()).mark(function t(e,r){var n,i,o;return y().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(l.u4("Dialing Number",()=>({phone:e,name:r})),L.get()!==a.UNINITIALIZED){t.next=4;break}return console.warn("Cannot place a call before Twilio is initialized"),t.abrupt("return");case 4:if(n=window.sharedApi.getRememberToken(),i=window.sharedApi.getSessionId(),null==c||c.disconnectAll(),L.update(a.CALL_IN_PROGRESS),!p.P.dial(null==c?void 0:c.token,n,s,e,r)){t.next=12;break}return l.u4("Calling via React Native"),t.abrupt("return");case 12:return t.next=14,c.connect({params:g(g({},s),{},{CallTo:e,remember_token:n,session_id:i})});case 14:k(o=t.sent),window.dialManager.open(o,{phone:e,name:r});case 17:case"end":return t.stop()}},t)})),function(t,e){return o.apply(this,arguments)})},99666:function(t,e,r){var n=r(90118),i=r(69923),o=r(74692);window.sharedApi||(window.sharedApi={getRememberToken:()=>{var t;return null==(t=document.getElementById("remember_token"))?void 0:t.innerText},getSessionId:()=>{var t;return null==(t=document.getElementById("session_id"))?void 0:t.innerText},ReactNative:n.P,Twilio:i,AppNotification:class{constructor(){this.max=10,this.notificationsContainer=document.getElementById("notification-containers"),this.showMoreNotifs=document.getElementById("show-more-notifs"),this.noNotifs=document.getElementById("no-notifs"),this.notifications=document.getElementById("notifications"),this.markAll=document.getElementById("mark-all"),this.count=parseInt(this.notifications.dataset.count),this.initialize()}initialize(){for(var t=this.notificationsContainer.children,e=0;e<t.length;e++)this.addListenerToNotification(t[e]);this.addListenerToMarkAll(),this.addListenerToShowMore()}markAsRead(t){var e;(null==(e=t.getElementsByClassName("circle"))?void 0:e[0]).classList.add("hide"),this.incrementCount(-1)}incrementCount(t){var e=document.getElementById("notif-revealer-count-container"),r=document.getElementById("notif-revealer-count"),n=document.getElementById("notif-revealer-count-plus"),i=document.getElementById("count-container"),o=document.getElementById("notif-count"),a=document.getElementById("notif-count-plus");this.count+=t,this.count<=0&&(null==e||e.classList.add("hide"),null==o||o.classList.add("hide"),null==i||i.classList.add("hide")),1==this.count&&(null==e||e.classList.remove("hide"),null==o||o.classList.remove("hide"),null==i||i.classList.remove("hide")),this.count>=this.max?(null==n||n.classList.remove("hide"),null==a||a.classList.remove("hide")):(null==n||n.classList.add("hide"),null==a||a.classList.add("hide"));var s=String(this.count>=this.max?this.max:this.count);r&&(r.innerHTML=s),o&&(o.innerHTML=s)}addListenerToNotification(t){var e;if(null==(e=t.getElementsByClassName("circle"))?void 0:e[0]){var r=()=>{var e,r,n,i=t.dataset.oid;
1(null==(n=null==(r=null==(e=document.getElementById("app-notification-".concat(i)))?void 0:e.querySelector(".circle"))?void 0:r.classList)?void 0:n.contains("hide"))||o.ajax({method:"PUT",url:"/users/".concat(this.notifications.dataset.user_id,"/app_notifications/").concat(i,"/mark_as_read"),success:()=>this.markAsRead(t)})};t.addEventListener("click",r),document.addEventListener("beforeunload",()=>t.removeEventListener("click",r))}}addListenerToMarkAll(){var t=()=>{o.ajax({method:"POST",url:"/users/".concat(this.notifications.dataset.user_id,"/app_notifications/mark_all_as_read"),success:()=>{for(var t,e=this.notificationsContainer.children,r=0;r<e.length;r++){var n=e[r];(null==(t=n.getElementsByClassName("circle"))?void 0:t[0])&&this.markAsRead(n)}this.incrementCount(-this.count)}})};this.markAll.addEventListener("click",t),document.addEventListener("beforeunload",()=>this.markAll.removeEventListener("click",t))}addListenerToShowMore(){var t=()=>{var t=this.notifications.dataset.last_key,e=this.notificationsContainer.children.length-1,r=location.href.split("#")[0];location.href="".concat(r,"#").concat(this.notificationsContainer.children[e].id),o.ajax({method:"GET",url:"/users/".concat(this.notifications.dataset.user_id,"/app_notifications"),data:{last_key:t}})};this.showMoreNotifs.addEventListener("click",t),document.addEventListener("beforeunload",()=>this.showMoreNotifs.removeEventListener("click",t))}handleReceiveNotification(t){var e,r,n,i,o,a;this.notificationsContainer.insertAdjacentHTML("afterbegin",t.html),this.addListenerToNotification(this.notificationsContainer.children[0]),this.incrementCount(1),null==(r=null==(e=this.noNotifs)?void 0:e.classList)||r.add("hide"),null==(i=null==(n=this.showMoreNotifs)?void 0:n.classList)||i.remove("hide"),null==(a=null==(o=this.markAll)?void 0:o.classList)||a.remove("hide")}},muteIncomingCalls:i.muteIncomingCalls,unmuteIncomingCalls:i.unmuteIncomingCalls})},6373:function(t,e,r){var n,i=t=>{n=t},o=t=>e=>r=>n?n(t)(e)(r):e(r);r.d(e,{B:function(){return i},r:function(){return o}})}}]);
2//# sourceMappingURL=6431-aae94154b83e7a19.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.