@cyberskill/shared 1.197.0 → 1.199.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_tsup-dts-rollup.d.cts +32 -3
- package/dist/_tsup-dts-rollup.d.ts +32 -3
- package/dist/node/cli/cli.util.cjs +1 -1
- package/dist/node/cli/cli.util.js +1 -1
- package/dist/node/cli/index.cjs +1 -1
- package/dist/node/cli/index.js +1 -1
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.js +1 -1
- package/dist/react/apollo-client/apollo-client.component.cjs +1 -1
- package/dist/react/apollo-client/apollo-client.component.js +1 -1
- package/dist/react/apollo-client/apollo-client.util.cjs +1 -1
- package/dist/react/apollo-client/apollo-client.util.d.cts +2 -0
- package/dist/react/apollo-client/apollo-client.util.d.ts +2 -0
- package/dist/react/apollo-client/apollo-client.util.js +1 -1
- package/dist/react/apollo-client/index.cjs +1 -1
- package/dist/react/apollo-client/index.d.cts +2 -0
- package/dist/react/apollo-client/index.d.ts +2 -0
- package/dist/react/apollo-client/index.js +1 -1
- package/dist/react/apollo-client-nextjs/apollo-client.component.cjs +1 -0
- package/dist/react/apollo-client-nextjs/apollo-client.component.css +1 -0
- package/dist/react/apollo-client-nextjs/apollo-client.component.d.cts +1 -0
- package/dist/react/apollo-client-nextjs/apollo-client.component.d.ts +1 -0
- package/dist/react/apollo-client-nextjs/apollo-client.component.js +1 -0
- package/dist/react/apollo-client-nextjs/apollo-client.util.cjs +1 -0
- package/dist/react/apollo-client-nextjs/apollo-client.util.css +1 -0
- package/dist/react/apollo-client-nextjs/apollo-client.util.d.cts +1 -0
- package/dist/react/apollo-client-nextjs/apollo-client.util.d.ts +1 -0
- package/dist/react/apollo-client-nextjs/apollo-client.util.js +1 -0
- package/dist/react/apollo-client-nextjs/index.cjs +1 -0
- package/dist/react/apollo-client-nextjs/index.css +1 -0
- package/dist/react/apollo-client-nextjs/index.d.cts +2 -0
- package/dist/react/apollo-client-nextjs/index.d.ts +2 -0
- package/dist/react/apollo-client-nextjs/index.js +1 -0
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.d.cts +5 -0
- package/dist/react/index.d.ts +5 -0
- package/dist/react/index.js +1 -1
- package/dist/react/userback/index.cjs +1 -1
- package/dist/react/userback/index.d.cts +3 -3
- package/dist/react/userback/index.d.ts +3 -3
- package/dist/react/userback/index.js +1 -1
- package/dist/react/userback/userback.component.cjs +1 -1
- package/dist/react/userback/userback.component.d.cts +1 -1
- package/dist/react/userback/userback.component.d.ts +1 -1
- package/dist/react/userback/userback.component.js +1 -1
- package/dist/react/userback/userback.type.d.cts +2 -2
- package/dist/react/userback/userback.type.d.ts +2 -2
- package/package.json +6 -1
package/dist/react/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e,r){if(r==null||r>e.length)r=e.length;for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function r(e){if(Array.isArray(e))return e}function t(r){if(Array.isArray(r))return e(r)}function n(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function o(e,r,t,n,o,a,u){try{var i=e[a](u);var l=i.value}catch(e){t(e);return}if(i.done){r(l)}else{Promise.resolve(l).then(n,o)}}function a(e){return function(){var r=this,t=arguments;return new Promise(function(n,a){var u=e.apply(r,t);function i(e){o(u,n,a,i,l,"next",e)}function l(e){o(u,n,a,i,l,"throw",e)}i(undefined)})}}function u(e,r,t){r=E(r);return g(e,T()?Reflect.construct(r,t||[],E(e).constructor):r.apply(e,t))}function i(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function l(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||false;n.configurable=true;if("value"in n)n.writable=true;Object.defineProperty(e,n.key,n)}}function s(e,r,t){if(r)l(e.prototype,r);if(t)l(e,t);return e}function c(e,r,t){if(r in e){Object.defineProperty(e,r,{value:t,enumerable:true,configurable:true,writable:true})}else{e[r]=t}return e}function E(e){E=Object.setPrototypeOf?Object.getPrototypeOf:function e(e){return e.__proto__||Object.getPrototypeOf(e)};return E(e)}function f(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function")}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:true,configurable:true}});if(r)O(e,r)}function d(e,r){if(r!=null&&typeof Symbol!=="undefined"&&r[Symbol.hasInstance]){return!!r[Symbol.hasInstance](e)}else{return e instanceof r}}function v(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function p(e,r){var t=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t==null)return;var n=[];var o=true;var a=false;var u,i;try{for(t=t.call(e);!(o=(u=t.next()).done);o=true){n.push(u.value);if(r&&n.length===r)break}}catch(e){a=true;i=e}finally{try{if(!o&&t["return"]!=null)t["return"]()}finally{if(a)throw i}}return n}function S(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function m(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function A(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};var n=Object.keys(t);if(typeof Object.getOwnPropertySymbols==="function"){n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))}n.forEach(function(r){c(e,r,t[r])})}return e}function y(e,r){if(e==null)return{};var t=_(e,r);var n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++){n=a[o];if(r.indexOf(n)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,n))continue;t[n]=e[n]}}return t}function _(e,r){if(e==null)return{};var t={};var n=Object.keys(e);var o,a;for(a=0;a<n.length;a++){o=n[a];if(r.indexOf(o)>=0)continue;t[o]=e[o]}return t}function g(e,r){if(r&&(C(r)==="object"||typeof r==="function")){return r}return n(e)}function O(e,r){O=Object.setPrototypeOf||function e(e,r){e.__proto__=r;return e};return O(e,r)}function h(e,t){return r(e)||p(e,t)||N(e,t)||S()}function b(e){return t(e)||v(e)||N(e)||m()}function C(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function N(r,t){if(!r)return;if(typeof r==="string")return e(r,t);var n=Object.prototype.toString.call(r).slice(8,-1);if(n==="Object"&&r.constructor)n=r.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(r,t)}function T(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(T=function(){return!!e})()}function I(e,r){var t,n,o,a={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},u=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return u.next=i(0),u["throw"]=i(1),u["return"]=i(2),typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function i(e){return function(r){return l([e,r])}}function l(i){if(t)throw new TypeError("Generator is already executing.");while(u&&(u=0,i[0]&&(a=0)),a)try{if(t=1,n&&(o=i[0]&2?n["return"]:i[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;if(n=0,o)i=[i[0]&2,o.value];switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:false};case 5:a.label++;n=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(i[0]===6||i[0]===2)){a=0;continue}if(i[0]===3&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(i[0]===6&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}if(o[2])a.ops.pop();a.trys.pop();continue}i=r.call(e,a)}catch(e){i=[6,e];n=0}finally{t=o=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}}var R=Object.create;var D=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var M=Object.getOwnPropertyNames;var w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty;var G=function(e,r,t){return r in e?D(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t};var x=function(e,r){return D(e,"name",{value:r,configurable:!0})};var k=function(e,r){for(var t in r)D(e,t,{get:r[t],enumerable:!0})},U=function(e,r,t,n){var o=true,a=false,u=undefined;if(r&&(typeof r==="undefined"?"undefined":C(r))=="object"||typeof r=="function")try{var i=function(){var o=s.value;!P.call(e,o)&&o!==t&&D(e,o,{get:function(){return r[o]},enumerable:!(n=L(r,o))||n.enumerable})};for(var l=M(r)[Symbol.iterator](),s;!(o=(s=l.next()).done);o=true)i()}catch(e){a=true;u=e}finally{try{if(!o&&l.return!=null){l.return()}}finally{if(a){throw u}}}return e};var q=function(e,r,t){return t=e!=null?R(w(e)):{},U(r||!e||!e.__esModule?D(t,"default",{value:e,enumerable:!0}):t,e)},Q=function(e){return U(D({},"__esModule",{value:!0}),e)};var F=function(e,r,t){return G(e,(typeof r==="undefined"?"undefined":C(r))!="symbol"?r+"":r,t)};var j={};k(j,{ApolloClientContext:function(){return eu},ApolloClientProvider:function(){return ei},ApolloErrorComponent:function(){return X},ApolloErrorContext:function(){return W},ApolloErrorProvider:function(){return en},ApolloProvider:function(){return eT},GRAPHQL_URI_DEFAULT:function(){return eO},Loading:function(){return eq},LoadingContext:function(){return eF},LoadingProvider:function(){return eB},NEXT_INTL_DEFAULT_LANGUAGE:function(){return eY},NextIntlContext:function(){return eJ},NextIntlProvider:function(){return rt},Toaster:function(){return eo.Toaster},catchError:function(){return eg},getClient:function(){return eN},initI18next:function(){return eP},log:function(){return e_},setGlobalApolloErrorCallback:function(){return er},showGlobalApolloError:function(){return et},storage:function(){return e6},toast:function(){return eo.toast},useApolloClient:function(){return eR.useApolloClient},useApolloError:function(){return Z},useBackgroundQuery:function(){return eR.useBackgroundQuery},useFragment:function(){return eR.useFragment},useLazyQuery:function(){return eR.useLazyQuery},useLoadableQuery:function(){return eR.useLoadableQuery},useLoading:function(){return ez},useMutation:function(){return eR.useMutation},useNextIntl:function(){return e0},useQuery:function(){return eR.useQuery},useQueryRefHandlers:function(){return eR.useQueryRefHandlers},useReactiveVar:function(){return eR.useReactiveVar},useReadQuery:function(){return eR.useReadQuery},useStorage:function(){return e9},useSubscription:function(){return eR.useSubscription},useSuspenseFragment:function(){return eR.useSuspenseFragment},useSuspenseQuery:function(){return eR.useSuspenseQuery},useTranslateI18next:function(){return eL},useTranslateNextIntl:function(){return e1},withNextIntl:function(){return e2}});module.exports=Q(j);var z=require("@apollo/client-integration-nextjs"),H=require("@apollo/client/react/react.cjs"),B=q(require("react"),1);var V=q(require("react"),1);var Y=require("react"),W=(0,Y.createContext)(void 0);var J={"modal-backdrop":"_modal-backdrop_8fveh_1","modal-content":"_modal-content_8fveh_11","btn-close":"_btn-close_8fveh_22","error-title":"_error-title_8fveh_36","btn-retry":"_btn-retry_8fveh_41","error-details":"_error-details_8fveh_54",main:"_main_8fveh_72",network:"_network_8fveh_75",extra:"_extra_8fveh_78"};function X(){var e=(0,V.use)(W),r=e===null||e===void 0?void 0:e.error;if(!r)return null;var t=x(function(e,r){return(r===null||r===void 0?void 0:r.length)?V.default.createElement("div",null,V.default.createElement("strong",null,e,":"),V.default.createElement("ul",null,r.map(function(e){return V.default.createElement("li",{key:e.message},e.message)}))):null},"renderErrorList");return V.default.createElement("div",{className:J["modal-backdrop"]},V.default.createElement("div",{className:J["modal-content"]},V.default.createElement("button",{type:"button",className:J["btn-close"],onClick:e.hideError},"✕"),V.default.createElement("div",{className:J["error-title"]},V.default.createElement("button",{type:"button",className:J["btn-retry"],onClick:x(function(){return window.location.reload()},"onClick")},"Reload")," ",r.message),V.default.createElement("div",{className:J["error-details"]},r.networkError&&V.default.createElement("pre",{className:"network"},V.default.createElement("strong",null,"Network Error:")," ",r.networkError.message),t("GraphQL Errors",b(r.graphQLErrors)),t("Protocol Errors",b(r.protocolErrors)),t("Client Errors",b(r.clientErrors)),r.extraInfo&&V.default.createElement("pre",{className:"extra"},V.default.createElement("strong",null,"Extra Info:")," ",JSON.stringify(r.extraInfo,null,4)))))}x(X,"ApolloErrorComponent");var K=require("react");function Z(){var e=(0,K.use)(W);if(!e)throw new Error("useApolloError must be used within ApolloErrorProvider");return e}x(Z,"useApolloError");var $=q(require("react"),1);var ee=null;function er(e){ee=e}x(er,"setGlobalApolloErrorCallback");function et(e){ee===null||ee===void 0?void 0:ee(e)}x(et,"showGlobalApolloError");function en(e){var r=e.children;var t=h((0,$.useState)(null),2),n=t[0],o=t[1];(0,$.useEffect)(function(){er(o)},[]);var a=(0,$.useMemo)(function(){return{error:n,showError:o,hideError:x(function(){return o(null)},"hideError")}},[n]);return $.default.createElement(W,{value:a},r)}x(en,"ApolloErrorProvider");var eo=require("react-hot-toast");var ea=q(require("react"),1);var eu=(0,ea.createContext)(null);function ei(e){var r=e.client,t=e.children;return ea.default.createElement(eu,{value:r},t)}x(ei,"ApolloClientProvider");var el=require("@apollo/client-integration-nextjs"),es=require("@apollo/client/core/core.cjs"),ec=require("@apollo/client/link/core/core.cjs"),eE=require("@apollo/client/link/error/error.cjs"),ef=require("@apollo/client/link/http/http.cjs"),ed=require("@apollo/client/link/remove-typename/remove-typename.cjs"),ev=require("@apollo/client/link/subscriptions/subscriptions.cjs"),ep=require("@apollo/client/utilities/utilities.cjs"),eS=require("graphql-ws"),em=q(require("react"),1);var eA=require("consola/browser");var ey={GRAPHQL_PARSE_FAILED:{CODE:"GRAPHQL_PARSE_FAILED",MESSAGE:"The GraphQL operation string contains a syntax error."},GRAPHQL_VALIDATION_FAILED:{CODE:"GRAPHQL_VALIDATION_FAILED",MESSAGE:"The GraphQL operation is not valid against the server's schema."},BAD_USER_INPUT:{CODE:"BAD_USER_INPUT",MESSAGE:"The GraphQL operation includes an invalid value for a field argument."},PERSISTED_QUERY_NOT_FOUND:{CODE:"PERSISTED_QUERY_NOT_FOUND",MESSAGE:"A client sent the hash of a query string to execute via automatic persisted queries, but the query was not in the APQ cache."},PERSISTED_QUERY_NOT_SUPPORTED:{CODE:"PERSISTED_QUERY_NOT_SUPPORTED",MESSAGE:"A client sent the hash of a query string to execute via automatic persisted queries, but the server has disabled APQ."},OPERATION_RESOLUTION_FAILURE:{CODE:"OPERATION_RESOLUTION_FAILURE",MESSAGE:"The request was parsed successfully and is valid against the server's schema, but the server couldn't resolve which operation to run. This occurs when a request containing multiple named operations doesn't specify which operation to run (i.e.,operationName), or if the named operation isn't included in the request."},CONTINUE:{CODE:100,MESSAGE:"Continue"},SWITCHING_PROTOCOLS:{CODE:101,MESSAGE:"Switching Protocols"},PROCESSING:{CODE:102,MESSAGE:"Processing"},OK:{CODE:200,MESSAGE:"OK"},CREATED:{CODE:201,MESSAGE:"Created"},ACCEPTED:{CODE:202,MESSAGE:"Accepted"},NON_AUTHORITATIVE_INFORMATION:{CODE:203,MESSAGE:"Non Authoritative Information"},NO_CONTENT:{CODE:204,MESSAGE:"No Content"},RESET_CONTENT:{CODE:205,MESSAGE:"Reset Content"},PARTIAL_CONTENT:{CODE:206,MESSAGE:"Partial Content"},MULTI_STATUS:{CODE:207,MESSAGE:"Multi-Status"},MULTIPLE_CHOICES:{CODE:300,MESSAGE:"Multiple Choices"},MOVED_PERMANENTLY:{CODE:301,MESSAGE:"Moved Permanently"},MOVED_TEMPORARILY:{CODE:302,MESSAGE:"Moved Temporarily"},SEE_OTHER:{CODE:303,MESSAGE:"See Other"},NOT_MODIFIED:{CODE:304,MESSAGE:"Not Modified"},USE_PROXY:{CODE:305,MESSAGE:"Use Proxy"},TEMPORARY_REDIRECT:{CODE:307,MESSAGE:"Temporary Redirect"},PERMANENT_REDIRECT:{CODE:308,MESSAGE:"Permanent Redirect"},BAD_REQUEST:{CODE:400,MESSAGE:"Bad Request"},UNAUTHORIZED:{CODE:401,MESSAGE:"Unauthorized"},PAYMENT_REQUIRED:{CODE:402,MESSAGE:"Payment Required"},FORBIDDEN:{CODE:403,MESSAGE:"Forbidden"},NOT_FOUND:{CODE:404,MESSAGE:"Not Found"},METHOD_NOT_ALLOWED:{CODE:405,MESSAGE:"Method Not Allowed"},NOT_ACCEPTABLE:{CODE:406,MESSAGE:"Not Acceptable"},PROXY_AUTHENTICATION_REQUIRED:{CODE:407,MESSAGE:"Proxy Authentication Required"},REQUEST_TIMEOUT:{CODE:408,MESSAGE:"Request Timeout"},CONFLICT:{CODE:409,MESSAGE:"Conflict"},GONE:{CODE:410,MESSAGE:"Gone"},LENGTH_REQUIRED:{CODE:411,MESSAGE:"Length Required"},PRECONDITION_FAILED:{CODE:412,MESSAGE:"Precondition Failed"},REQUEST_TOO_LONG:{CODE:413,MESSAGE:"Request Entity Too Large"},REQUEST_URI_TOO_LONG:{CODE:414,MESSAGE:"Request-URI Too Long"},UNSUPPORTED_MEDIA_TYPE:{CODE:415,MESSAGE:"Unsupported Media Type"},REQUESTED_RANGE_NOT_SATISFIABLE:{CODE:416,MESSAGE:"Requested Range Not Satisfiable"},EXPECTATION_FAILED:{CODE:417,MESSAGE:"Expectation Failed"},IM_A_TEAPOT:{CODE:418,MESSAGE:"I'm a teapot"},INSUFFICIENT_SPACE_ON_RESOURCE:{CODE:419,MESSAGE:"Insufficient Space on Resource"},METHOD_FAILURE:{CODE:420,MESSAGE:"Method Failure"},MISDIRECTED_REQUEST:{CODE:421,MESSAGE:"Misdirected Request"},UNPROCESSABLE_ENTITY:{CODE:422,MESSAGE:"Unprocessable Entity"},LOCKED:{CODE:423,MESSAGE:"Locked"},FAILED_DEPENDENCY:{CODE:424,MESSAGE:"Failed Dependency"},PRECONDITION_REQUIRED:{CODE:428,MESSAGE:"Precondition Required"},TOO_MANY_REQUESTS:{CODE:429,MESSAGE:"Too Many Requests"},REQUEST_HEADER_FIELDS_TOO_LARGE:{CODE:431,MESSAGE:"Request Header Fields Too Large"},UNAVAILABLE_FOR_LEGAL_REASONS:{CODE:451,MESSAGE:"Unavailable For Legal Reasons"},INTERNAL_SERVER_ERROR:{CODE:500,MESSAGE:"Internal Server Error"},NOT_IMPLEMENTED:{CODE:501,MESSAGE:"Not Implemented"},BAD_GATEWAY:{CODE:502,MESSAGE:"Bad Gateway"},SERVICE_UNAVAILABLE:{CODE:503,MESSAGE:"Service Unavailable"},GATEWAY_TIMEOUT:{CODE:504,MESSAGE:"Gateway Timeout"},HTTP_VERSION_NOT_SUPPORTED:{CODE:505,MESSAGE:"HTTP Version Not Supported"},INSUFFICIENT_STORAGE:{CODE:507,MESSAGE:"Insufficient Storage"},NETWORK_AUTHENTICATION_REQUIRED:{CODE:511,MESSAGE:"Network Authentication Required"}};var e_={silent:eA.consola.silent,level:eA.consola.level,fatal:eA.consola.fatal,error:eA.consola.error,warn:eA.consola.warn,log:eA.consola.log,info:eA.consola.info,success:eA.consola.success,ready:eA.consola.ready,start:eA.consola.start,box:eA.consola.box,debug:eA.consola.debug,trace:eA.consola.trace,verbose:eA.consola.verbose};function eg(e,r){var t=r!==null&&r!==void 0?r:{},n=t.shouldLog,o=n===void 0?!0:n,a=t.returnValue,u=t.callback,i=d(e,Error)?e:new Error(typeof e=="string"?e:"Unknown error");return o&&e_.error(i.message),u&&typeof u=="function"&&u(i),a||{success:!1,message:i.message,code:ey.INTERNAL_SERVER_ERROR.CODE}}x(eg,"catchError");var eO="/graphql";var eh,eb=(eh=/*#__PURE__*/function(e){f(r,e);function r(){i(this,r);var e;e=u(this,r,arguments);F(e,"count",0);return e}s(r,[{key:"request",value:function e(e,r){var t=this;var n=Date.now();return this.count+=1,r(e).map(function(r){var o=Date.now()-n,a=e.operationName||"Unnamed";return e_.info("[Apollo] #".concat(t.count,": ").concat(a," (").concat(o,"ms)")),r})}}]);return r}(ec.ApolloLink),x(eh,"DevLoggerLink"),eh);function eC(e){var r=e.uri,t=e.wsUrl,n=e.customLinks,o=new eb,a=(0,eE.onError)(function(e){var r=e.graphQLErrors,t=e.networkError,n=e.protocolErrors,o=e.operation;var a=(o===null||o===void 0?void 0:o.operationName)||"Unknown";if(r&&r.forEach(function(e){var r=e.message,t=e.locations,n=e.path;e_.error("[GraphQL error] ".concat(a,": ").concat(r,", Location: ").concat(JSON.stringify(t,null,4),", Path: ").concat(n))}),n&&n.forEach(function(e){var r=e.message,t=e.extensions;e_.error("[Protocol error]: ".concat(r,", Extensions: ").concat(JSON.stringify(t,null,4)))}),t&&e_.error("[Network error]: ".concat(t)),r||n||t){var u,i;var l=(r===null||r===void 0?void 0:(u=r[0])===null||u===void 0?void 0:u.message)||(n===null||n===void 0?void 0:(i=n[0])===null||i===void 0?void 0:i.message)||(t===null||t===void 0?void 0:t.message)||"Unexpected error",s=new es.ApolloError({graphQLErrors:r||[],protocolErrors:n||[],clientErrors:[],networkError:t||null,errorMessage:l,extraInfo:{operation:o}});eo.toast.error(function(e){return em.default.createElement(em.default.Fragment,null,l,"\xa0",em.default.createElement("button",{type:"button",onClick:x(function(){setTimeout(function(){et(s)},0),eo.toast.dismiss(e.id)},"onClick")},"Show Details"))})}}),u=(0,ed.removeTypenameFromVariables)();r||e_.warn('[Apollo] No GraphQL URI provided — using "'.concat(eO,'" as default'));var i=new ef.HttpLink({uri:r!==null&&r!==void 0?r:eO,credentials:"include"}),l=t?new ev.GraphQLWsLink((0,eS.createClient)({url:t})):ec.ApolloLink.empty(),s=d(l,ec.ApolloLink)?(0,ec.split)(function(e){var r=e.query;var t=(0,ep.getMainDefinition)(r);return t.kind==="OperationDefinition"&&t.operation==="subscription"},l,i):i;return s===i&&t&&e_.warn("[Apollo] WS URL is set, but subscriptions fallback to HTTP. Check your wsLink config."),[o,a,u].concat(b(n!==null&&n!==void 0?n:[]),[s])}x(eC,"createApolloLinks");function eN(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;var t=(0,ec.from)(eC(e));return r?new el.ApolloClient(A({link:t,cache:new el.InMemoryCache},e)):new es.ApolloClient(A({link:t,cache:new es.InMemoryCache},e))}x(eN,"getClient");function eT(e){var r=e.isNextJS,t=e.options,n=e.children;var o=(0,B.useMemo)(function(){return eN(t||{},r)},[t,r]),a=r?B.default.createElement(z.ApolloNextAppProvider,{makeClient:x(function(){return o},"makeClient")},n):B.default.createElement(H.ApolloProvider,{client:o},n);return B.default.createElement(B.default.Fragment,null,B.default.createElement(en,null,B.default.createElement(ei,{client:o},a),B.default.createElement(X,null)),B.default.createElement(eo.Toaster,{position:"top-right"}))}x(eT,"ApolloProvider");var eI=require("react");var eR=require("@apollo/client/react/hooks/hooks.cjs");var eD=require("react-i18next"),eL=eD.useTranslation;var eM=q(require("i18next"),1),ew=require("react-i18next");function eP(e){return eM.default.use(ew.initReactI18next).init(e)}x(eP,"initI18next");var eG=q(require("clsx"),1),ex=q(require("react"),1);var ek={overlay:"_overlay_1ank4_1",fullscreen:"_fullscreen_1ank4_1",block:"_block_1ank4_2","overlay-fade-in":"_overlay-fade-in_1ank4_1",container:"_container_1ank4_35",ring:"_ring_1ank4_45",rotate1:"_rotate1_1ank4_1",rotate2:"_rotate2_1ank4_1",rotate3:"_rotate3_1ank4_1",rotate4:"_rotate4_1ank4_1",message:"_message_1ank4_69","text-fade":"_text-fade_1ank4_1"};function eU(){if(document.getElementById("noscroll-style"))return;var e=document.createElement("style");e.id="noscroll-style",e.innerHTML="\n .noscroll {\n overflow: hidden !important;\n height: 100vh !important;\n }\n ",document.head.appendChild(e)}x(eU,"injectNoScrollStyle");function eq(e){var r=e.full,t=r===void 0?!1:r,n=e.block,o=n===void 0?!1:n,a=e.className,u=a===void 0?"":a,i=e.message,l=i===void 0?"Loading":i,s=y(e,["full","block","className","message"]);(0,ex.useEffect)(function(){if(t){document.body.classList.add("noscroll");var e=x(function(e){return e.preventDefault()},"handleContextMenu");return document.addEventListener("contextmenu",e),function(){document.body.classList.remove("noscroll"),document.removeEventListener("contextmenu",e)}}},[t]),(0,ex.useEffect)(function(){eU()},[]);function c(){return ex.default.createElement("div",A({className:ek.container},s),ex.default.createElement("div",{className:ek.ring}),ex.default.createElement("div",{className:ek.ring}),ex.default.createElement("div",{className:ek.ring}),ex.default.createElement("div",{className:ek.ring}),l&&ex.default.createElement("div",{className:ek.message},l))}return x(c,"_renderLoading"),t?ex.default.createElement("div",{className:(0,eG.default)(ek.fullscreen,u)},c()):o?ex.default.createElement("div",{className:(0,eG.default)(ek.block,u)},c()):c()}x(eq,"Loading");var eQ=require("react"),eF=(0,eQ.createContext)(void 0);var ej=require("react");function ez(){var e=(0,ej.use)(eF);if(!e)throw new Error("useLoading must be used within a LoadingProvider");return e}x(ez,"useLoading");var eH=q(require("react"),1);function eB(e){var r=e.children;var t=h((0,eH.useState)(!1),2),n=t[0],o=t[1],a=h((0,eH.useState)(!1),2),u=a[0],i=a[1],l=(0,eH.useCallback)(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;o(!0),i(e)},[]),s=(0,eH.useCallback)(function(){o(!1),i(!1)},[]),c=(0,eH.useMemo)(function(){return{isLoading:n,isGlobalLoading:u,showLoading:l,hideLoading:s}},[n,u,l,s]);return eH.default.createElement(eF,{value:c},n?eH.default.createElement(eq,{full:u}):r)}x(eB,"LoadingProvider");var eV=require("date-fns/locale"),eY={label:"English",value:"en",flag:"\uD83C\uDDFA\uD83C\uDDF8",adapterLocale:eV.enUS,icon:"flagpack:gb-nir",numberFormat:{code:"en-US",currency:"USD"},timezone:"America/New_York"};var eW=require("react"),eJ=(0,eW.createContext)(void 0);var eX=require("next-intl"),eK=q(require("react"),1);var eZ=require("next-intl"),e$=require("react");function e0(){var e=(0,e$.use)(eJ);if(!e)throw new Error("useNextIntl must be used within a NextIntlProvider");return e}x(e0,"useNextIntl");var e1=eZ.useTranslations;function e2(e){var r=x(function(r){var t;var n;var o=e0(),a=o.currentLanguage,u=r.messages,i=r.languages,l="en",s=u[(a===null||a===void 0?void 0:a.value)||l],c=(n=(t=i.find(function(e){return e.value===(a===null||a===void 0?void 0:a.value)}))===null||t===void 0?void 0:t.timezone)!==null&&n!==void 0?n:eY.timezone;return u?eK.default.createElement(eX.NextIntlClientProvider,{locale:(a===null||a===void 0?void 0:a.value)||l,messages:s||null,timeZone:c},eK.default.createElement(e,r)):(e_.warn("Missing messages for language: ".concat((a===null||a===void 0?void 0:a.value)||l)),null)},"PageWithI18n");return r.displayName="withNextIntl(".concat(e.displayName||e.name||"Component",")"),r}x(e2,"withNextIntl");var e4=q(require("react"),1);var e3=require("react");var e8={Date:{is:x(function(e){return d(e,Date)},"is"),serialize:x(function(e){return{__type:"Date",value:e.toISOString()}},"serialize"),deserialize:x(function(e){return new Date(e)},"deserialize")},Map:{is:x(function(e){return d(e,Map)},"is"),serialize:x(function(e){return{__type:"Map",value:Array.from(e.entries())}},"serialize"),deserialize:x(function(e){return new Map(e)},"deserialize")},Set:{is:x(function(e){return d(e,Set)},"is"),serialize:x(function(e){return{__type:"Set",value:Array.from(e)}},"serialize"),deserialize:x(function(e){return new Set(e)},"deserialize")},RegExp:{is:x(function(e){return d(e,RegExp)},"is"),serialize:x(function(e){return{__type:"RegExp",value:{source:e.source,flags:e.flags}}},"serialize"),deserialize:x(function(e){var r=e.source,t=e.flags;return new RegExp(r,t)},"deserialize")},BigInt:{is:x(function(e){return(typeof e==="undefined"?"undefined":C(e))=="bigint"},"is"),serialize:x(function(e){return{__type:"BigInt",value:e.toString()}},"serialize"),deserialize:x(function(e){return BigInt(e)},"deserialize")}},e5={serialize:function e(e){return JSON.stringify(e,function(e,r){var t=true,n=false,o=undefined;try{for(var a=Object.keys(e8)[Symbol.iterator](),u;!(t=(u=a.next()).done);t=true){var i=u.value;var l=e8[i];if(l.is(r))return l.serialize(r)}}catch(e){n=true;o=e}finally{try{if(!t&&a.return!=null){a.return()}}finally{if(n){throw o}}}return r})},deserialize:function e(e){return JSON.parse(e,function(e,r){if(r&&(typeof r==="undefined"?"undefined":C(r))=="object"&&"__type"in r&&typeof r.__type=="string"){var t=r.__type,n=e8[t];if(n)return n.deserialize(r.value)}return r})}};var e7=q(require("localforage"),1);var e6={get:function e(e){return a(function(){var r;return I(this,function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);return[4,e7.default.getItem(e)];case 1:return[2,t.sent()];case 2:r=t.sent();return[2,eg(r,{returnValue:null})];case 3:return[2]}})})()},set:function e(e,r){return a(function(){var t;return I(this,function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,e7.default.setItem(e,r)];case 1:n.sent();return[3,3];case 2:t=n.sent();eg(t);return[3,3];case 3:return[2]}})})()},remove:function e(e){return a(function(){var r;return I(this,function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);return[4,e7.default.removeItem(e)];case 1:t.sent();return[3,3];case 2:r=t.sent();eg(r);return[3,3];case 3:return[2]}})})()},keys:function e(){return a(function(){var e,r;return I(this,function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);return[4,e7.default.keys()];case 1:return[2,(e=t.sent())!==null&&e!==void 0?e:[]];case 2:r=t.sent();return[2,eg(r,{returnValue:[]})];case 3:return[2]}})})()}};function e9(e,r){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e5;var n=h((0,e3.useState)(r),2),o=n[0],u=n[1],i=h((0,e3.useState)(!1),2),l=i[0],s=i[1];(0,e3.useEffect)(function(){var n=!0;return x(function(){return a(function(){var o,a,i,l;return I(this,function(c){switch(c.label){case 0:c.trys.push([0,6,7,8]);return[4,e6.get(e)];case 1:o=c.sent();if(!n)return[3,5];if(!(o!==null))return[3,2];a=t.deserialize(o);u(a);return[3,5];case 2:if(!(r!==void 0))return[3,4];i=t.serialize(r);return[4,e6.set(e,i)];case 3:c.sent(),u(r);return[3,5];case 4:u(void 0);c.label=5;case 5:return[3,8];case 6:l=c.sent();eg(l),n&&u(r);return[3,8];case 7:n&&s(!0);return[7];case 8:return[2]}})})()},"loadValue")(),function(){n=!1,s(!1)}},[e,r,t]),(0,e3.useEffect)(function(){if(!l)return;x(function(){return a(function(){var r,n;return I(this,function(a){switch(a.label){case 0:a.trys.push([0,3,,4]);if(!(o!==void 0))return[3,2];r=t.serialize(o);return[4,e6.set(e,r)];case 1:a.sent();a.label=2;case 2:return[3,4];case 3:n=a.sent();eg(n);return[3,4];case 4:return[2]}})})()},"saveValue")()},[o,e,t,l]);var c=(0,e3.useCallback)(function(e){u(function(r){return typeof e=="function"?e(r):e})},[]),E=(0,e3.useCallback)(function(){return a(function(){var r;return I(this,function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);return[4,e6.remove(e)];case 1:t.sent(),u(void 0);return[3,3];case 2:r=t.sent();eg(r);return[3,3];case 3:return[2]}})})()},[e]);return{value:o,set:c,remove:E}}x(e9,"useStorage");function re(e){var r=e.children;return e4.default.createElement(e4.default.Fragment,null,r)}x(re,"LanguageWrapperBase");var rr=e2(re);function rt(e){var r=e.children,t=e.languages,n=e.messages;var o=e9("lang",t[0]),a=o.value,u=o.set,i=(0,e4.useMemo)(function(){return{languages:t,currentLanguage:a!==null&&a!==void 0?a:eY,setCurrentLanguage:u}},[t,u,a]);return e4.default.createElement(eJ,{value:i},e4.default.createElement(rr,{languages:t,messages:n},r))}x(rt,"NextIntlProvider");0&&(module.exports={ApolloClientContext:ApolloClientContext,ApolloClientProvider:ApolloClientProvider,ApolloErrorComponent:ApolloErrorComponent,ApolloErrorContext:ApolloErrorContext,ApolloErrorProvider:ApolloErrorProvider,ApolloProvider:ApolloProvider,GRAPHQL_URI_DEFAULT:GRAPHQL_URI_DEFAULT,Loading:Loading,LoadingContext:LoadingContext,LoadingProvider:LoadingProvider,NEXT_INTL_DEFAULT_LANGUAGE:NEXT_INTL_DEFAULT_LANGUAGE,NextIntlContext:NextIntlContext,NextIntlProvider:NextIntlProvider,Toaster:Toaster,catchError:catchError,getClient:getClient,initI18next:initI18next,log:log,setGlobalApolloErrorCallback:setGlobalApolloErrorCallback,showGlobalApolloError:showGlobalApolloError,storage:storage,toast:toast,useApolloClient:useApolloClient,useApolloError:useApolloError,useBackgroundQuery:useBackgroundQuery,useFragment:useFragment,useLazyQuery:useLazyQuery,useLoadableQuery:useLoadableQuery,useLoading:useLoading,useMutation:useMutation,useNextIntl:useNextIntl,useQuery:useQuery,useQueryRefHandlers:useQueryRefHandlers,useReactiveVar:useReactiveVar,useReadQuery:useReadQuery,useStorage:useStorage,useSubscription:useSubscription,useSuspenseFragment:useSuspenseFragment,useSuspenseQuery:useSuspenseQuery,useTranslateI18next:useTranslateI18next,useTranslateNextIntl:useTranslateNextIntl,withNextIntl:withNextIntl});
|
|
1
|
+
"use strict";function e(e,r){if(r==null||r>e.length)r=e.length;for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function r(e){if(Array.isArray(e))return e}function t(r){if(Array.isArray(r))return e(r)}function n(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function o(e,r,t,n,o,a,u){try{var i=e[a](u);var l=i.value}catch(e){t(e);return}if(i.done){r(l)}else{Promise.resolve(l).then(n,o)}}function a(e){return function(){var r=this,t=arguments;return new Promise(function(n,a){var u=e.apply(r,t);function i(e){o(u,n,a,i,l,"next",e)}function l(e){o(u,n,a,i,l,"throw",e)}i(undefined)})}}function u(e,r,t){r=f(r);return g(e,N()?Reflect.construct(r,t||[],f(e).constructor):r.apply(e,t))}function i(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function l(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||false;n.configurable=true;if("value"in n)n.writable=true;Object.defineProperty(e,n.key,n)}}function c(e,r,t){if(r)l(e.prototype,r);if(t)l(e,t);return e}function s(e,r,t){if(r in e){Object.defineProperty(e,r,{value:t,enumerable:true,configurable:true,writable:true})}else{e[r]=t}return e}function f(e){f=Object.setPrototypeOf?Object.getPrototypeOf:function e(e){return e.__proto__||Object.getPrototypeOf(e)};return f(e)}function E(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function")}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:true,configurable:true}});if(r)O(e,r)}function d(e,r){if(r!=null&&typeof Symbol!=="undefined"&&r[Symbol.hasInstance]){return!!r[Symbol.hasInstance](e)}else{return e instanceof r}}function v(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function p(e,r){var t=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t==null)return;var n=[];var o=true;var a=false;var u,i;try{for(t=t.call(e);!(o=(u=t.next()).done);o=true){n.push(u.value);if(r&&n.length===r)break}}catch(e){a=true;i=e}finally{try{if(!o&&t["return"]!=null)t["return"]()}finally{if(a)throw i}}return n}function S(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function m(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function A(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};var n=Object.keys(t);if(typeof Object.getOwnPropertySymbols==="function"){n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))}n.forEach(function(r){s(e,r,t[r])})}return e}function y(e,r){if(e==null)return{};var t=_(e,r);var n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++){n=a[o];if(r.indexOf(n)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,n))continue;t[n]=e[n]}}return t}function _(e,r){if(e==null)return{};var t={};var n=Object.keys(e);var o,a;for(a=0;a<n.length;a++){o=n[a];if(r.indexOf(o)>=0)continue;t[o]=e[o]}return t}function g(e,r){if(r&&(C(r)==="object"||typeof r==="function")){return r}return n(e)}function O(e,r){O=Object.setPrototypeOf||function e(e,r){e.__proto__=r;return e};return O(e,r)}function h(e,t){return r(e)||p(e,t)||T(e,t)||S()}function b(e){return t(e)||v(e)||T(e)||m()}function C(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function T(r,t){if(!r)return;if(typeof r==="string")return e(r,t);var n=Object.prototype.toString.call(r).slice(8,-1);if(n==="Object"&&r.constructor)n=r.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(r,t)}function N(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(N=function(){return!!e})()}function I(e,r){var t,n,o,a={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},u=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return u.next=i(0),u["throw"]=i(1),u["return"]=i(2),typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function i(e){return function(r){return l([e,r])}}function l(i){if(t)throw new TypeError("Generator is already executing.");while(u&&(u=0,i[0]&&(a=0)),a)try{if(t=1,n&&(o=i[0]&2?n["return"]:i[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;if(n=0,o)i=[i[0]&2,o.value];switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:false};case 5:a.label++;n=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(i[0]===6||i[0]===2)){a=0;continue}if(i[0]===3&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(i[0]===6&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}if(o[2])a.ops.pop();a.trys.pop();continue}i=r.call(e,a)}catch(e){i=[6,e];n=0}finally{t=o=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}}var R=Object.create;var D=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var M=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty;var G=function(e,r,t){return r in e?D(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t};var k=function(e,r){return D(e,"name",{value:r,configurable:!0})};var x=function(e,r){for(var t in r)D(e,t,{get:r[t],enumerable:!0})},U=function(e,r,t,n){var o=true,a=false,u=undefined;if(r&&(typeof r==="undefined"?"undefined":C(r))=="object"||typeof r=="function")try{var i=function(){var o=c.value;!P.call(e,o)&&o!==t&&D(e,o,{get:function(){return r[o]},enumerable:!(n=L(r,o))||n.enumerable})};for(var l=w(r)[Symbol.iterator](),c;!(o=(c=l.next()).done);o=true)i()}catch(e){a=true;u=e}finally{try{if(!o&&l.return!=null){l.return()}}finally{if(a){throw u}}}return e};var q=function(e,r,t){return t=e!=null?R(M(e)):{},U(r||!e||!e.__esModule?D(t,"default",{value:e,enumerable:!0}):t,e)},Q=function(e){return U(D({},"__esModule",{value:!0}),e)};var F=function(e,r,t){return G(e,(typeof r==="undefined"?"undefined":C(r))!="symbol"?r+"":r,t)};var j={};x(j,{ApolloClientContext:function(){return ea},ApolloClientProvider:function(){return eu},ApolloErrorComponent:function(){return X},ApolloErrorContext:function(){return Y},ApolloErrorProvider:function(){return et},ApolloProvider:function(){return eC},DevLoggerLink:function(){return eO},GRAPHQL_URI_DEFAULT:function(){return e_},Loading:function(){return ex},LoadingContext:function(){return eq},LoadingProvider:function(){return ez},NEXT_INTL_DEFAULT_LANGUAGE:function(){return eB},NextIntlContext:function(){return eY},NextIntlProvider:function(){return re},Toaster:function(){return en.Toaster},Userback:function(){return rn},catchError:function(){return ey},createApolloLinks:function(){return eh},getClient:function(){return eb},initI18next:function(){return ew},log:function(){return eA},setGlobalApolloErrorCallback:function(){return ee},showGlobalApolloError:function(){return er},storage:function(){return e5},toast:function(){return en.toast},useApolloClient:function(){return eN.useApolloClient},useApolloError:function(){return K},useBackgroundQuery:function(){return eN.useBackgroundQuery},useFragment:function(){return eN.useFragment},useLazyQuery:function(){return eN.useLazyQuery},useLoadableQuery:function(){return eN.useLoadableQuery},useLoading:function(){return eF},useMutation:function(){return eN.useMutation},useNextIntl:function(){return eZ},useQuery:function(){return eN.useQuery},useQueryRefHandlers:function(){return eN.useQueryRefHandlers},useReactiveVar:function(){return eN.useReactiveVar},useReadQuery:function(){return eN.useReadQuery},useStorage:function(){return e7},useSubscription:function(){return eN.useSubscription},useSuspenseFragment:function(){return eN.useSuspenseFragment},useSuspenseQuery:function(){return eN.useSuspenseQuery},useTranslateI18next:function(){return eR},useTranslateNextIntl:function(){return e$},withNextIntl:function(){return e0}});module.exports=Q(j);var z=require("@apollo/client/react/react.cjs"),H=q(require("react"),1);var B=q(require("react"),1);var V=require("react"),Y=(0,V.createContext)(void 0);var W={"modal-backdrop":"_modal-backdrop_8fveh_1","modal-content":"_modal-content_8fveh_11","btn-close":"_btn-close_8fveh_22","error-title":"_error-title_8fveh_36","btn-retry":"_btn-retry_8fveh_41","error-details":"_error-details_8fveh_54",main:"_main_8fveh_72",network:"_network_8fveh_75",extra:"_extra_8fveh_78"};function X(){var e=(0,B.use)(Y),r=e===null||e===void 0?void 0:e.error;if(!r)return null;var t=k(function(e,r){return(r===null||r===void 0?void 0:r.length)?B.default.createElement("div",null,B.default.createElement("strong",null,e,":"),B.default.createElement("ul",null,r.map(function(e){return B.default.createElement("li",{key:e.message},e.message)}))):null},"renderErrorList");return B.default.createElement("div",{className:W["modal-backdrop"]},B.default.createElement("div",{className:W["modal-content"]},B.default.createElement("button",{type:"button",className:W["btn-close"],onClick:e.hideError},"✕"),B.default.createElement("div",{className:W["error-title"]},B.default.createElement("button",{type:"button",className:W["btn-retry"],onClick:k(function(){return window.location.reload()},"onClick")},"Reload")," ",r.message),B.default.createElement("div",{className:W["error-details"]},r.networkError&&B.default.createElement("pre",{className:"network"},B.default.createElement("strong",null,"Network Error:")," ",r.networkError.message),t("GraphQL Errors",b(r.graphQLErrors)),t("Protocol Errors",b(r.protocolErrors)),t("Client Errors",b(r.clientErrors)),r.extraInfo&&B.default.createElement("pre",{className:"extra"},B.default.createElement("strong",null,"Extra Info:")," ",JSON.stringify(r.extraInfo,null,4)))))}k(X,"ApolloErrorComponent");var J=require("react");function K(){var e=(0,J.use)(Y);if(!e)throw new Error("useApolloError must be used within ApolloErrorProvider");return e}k(K,"useApolloError");var Z=q(require("react"),1);var $=null;function ee(e){$=e}k(ee,"setGlobalApolloErrorCallback");function er(e){$===null||$===void 0?void 0:$(e)}k(er,"showGlobalApolloError");function et(e){var r=e.children;var t=h((0,Z.useState)(null),2),n=t[0],o=t[1];(0,Z.useEffect)(function(){ee(o)},[]);var a=(0,Z.useMemo)(function(){return{error:n,showError:o,hideError:k(function(){return o(null)},"hideError")}},[n]);return Z.default.createElement(Y,{value:a},r)}k(et,"ApolloErrorProvider");var en=require("react-hot-toast");var eo=q(require("react"),1);var ea=(0,eo.createContext)(null);function eu(e){var r=e.client,t=e.children;return eo.default.createElement(ea,{value:r},t)}k(eu,"ApolloClientProvider");var ei=require("@apollo/client/core/core.cjs"),el=require("@apollo/client/link/core/core.cjs"),ec=require("@apollo/client/link/error/error.cjs"),es=require("@apollo/client/link/http/http.cjs"),ef=require("@apollo/client/link/remove-typename/remove-typename.cjs"),eE=require("@apollo/client/link/subscriptions/subscriptions.cjs"),ed=require("@apollo/client/utilities/utilities.cjs"),ev=require("graphql-ws"),ep=q(require("react"),1);var eS=require("consola/browser");var em={GRAPHQL_PARSE_FAILED:{CODE:"GRAPHQL_PARSE_FAILED",MESSAGE:"The GraphQL operation string contains a syntax error."},GRAPHQL_VALIDATION_FAILED:{CODE:"GRAPHQL_VALIDATION_FAILED",MESSAGE:"The GraphQL operation is not valid against the server's schema."},BAD_USER_INPUT:{CODE:"BAD_USER_INPUT",MESSAGE:"The GraphQL operation includes an invalid value for a field argument."},PERSISTED_QUERY_NOT_FOUND:{CODE:"PERSISTED_QUERY_NOT_FOUND",MESSAGE:"A client sent the hash of a query string to execute via automatic persisted queries, but the query was not in the APQ cache."},PERSISTED_QUERY_NOT_SUPPORTED:{CODE:"PERSISTED_QUERY_NOT_SUPPORTED",MESSAGE:"A client sent the hash of a query string to execute via automatic persisted queries, but the server has disabled APQ."},OPERATION_RESOLUTION_FAILURE:{CODE:"OPERATION_RESOLUTION_FAILURE",MESSAGE:"The request was parsed successfully and is valid against the server's schema, but the server couldn't resolve which operation to run. This occurs when a request containing multiple named operations doesn't specify which operation to run (i.e.,operationName), or if the named operation isn't included in the request."},CONTINUE:{CODE:100,MESSAGE:"Continue"},SWITCHING_PROTOCOLS:{CODE:101,MESSAGE:"Switching Protocols"},PROCESSING:{CODE:102,MESSAGE:"Processing"},OK:{CODE:200,MESSAGE:"OK"},CREATED:{CODE:201,MESSAGE:"Created"},ACCEPTED:{CODE:202,MESSAGE:"Accepted"},NON_AUTHORITATIVE_INFORMATION:{CODE:203,MESSAGE:"Non Authoritative Information"},NO_CONTENT:{CODE:204,MESSAGE:"No Content"},RESET_CONTENT:{CODE:205,MESSAGE:"Reset Content"},PARTIAL_CONTENT:{CODE:206,MESSAGE:"Partial Content"},MULTI_STATUS:{CODE:207,MESSAGE:"Multi-Status"},MULTIPLE_CHOICES:{CODE:300,MESSAGE:"Multiple Choices"},MOVED_PERMANENTLY:{CODE:301,MESSAGE:"Moved Permanently"},MOVED_TEMPORARILY:{CODE:302,MESSAGE:"Moved Temporarily"},SEE_OTHER:{CODE:303,MESSAGE:"See Other"},NOT_MODIFIED:{CODE:304,MESSAGE:"Not Modified"},USE_PROXY:{CODE:305,MESSAGE:"Use Proxy"},TEMPORARY_REDIRECT:{CODE:307,MESSAGE:"Temporary Redirect"},PERMANENT_REDIRECT:{CODE:308,MESSAGE:"Permanent Redirect"},BAD_REQUEST:{CODE:400,MESSAGE:"Bad Request"},UNAUTHORIZED:{CODE:401,MESSAGE:"Unauthorized"},PAYMENT_REQUIRED:{CODE:402,MESSAGE:"Payment Required"},FORBIDDEN:{CODE:403,MESSAGE:"Forbidden"},NOT_FOUND:{CODE:404,MESSAGE:"Not Found"},METHOD_NOT_ALLOWED:{CODE:405,MESSAGE:"Method Not Allowed"},NOT_ACCEPTABLE:{CODE:406,MESSAGE:"Not Acceptable"},PROXY_AUTHENTICATION_REQUIRED:{CODE:407,MESSAGE:"Proxy Authentication Required"},REQUEST_TIMEOUT:{CODE:408,MESSAGE:"Request Timeout"},CONFLICT:{CODE:409,MESSAGE:"Conflict"},GONE:{CODE:410,MESSAGE:"Gone"},LENGTH_REQUIRED:{CODE:411,MESSAGE:"Length Required"},PRECONDITION_FAILED:{CODE:412,MESSAGE:"Precondition Failed"},REQUEST_TOO_LONG:{CODE:413,MESSAGE:"Request Entity Too Large"},REQUEST_URI_TOO_LONG:{CODE:414,MESSAGE:"Request-URI Too Long"},UNSUPPORTED_MEDIA_TYPE:{CODE:415,MESSAGE:"Unsupported Media Type"},REQUESTED_RANGE_NOT_SATISFIABLE:{CODE:416,MESSAGE:"Requested Range Not Satisfiable"},EXPECTATION_FAILED:{CODE:417,MESSAGE:"Expectation Failed"},IM_A_TEAPOT:{CODE:418,MESSAGE:"I'm a teapot"},INSUFFICIENT_SPACE_ON_RESOURCE:{CODE:419,MESSAGE:"Insufficient Space on Resource"},METHOD_FAILURE:{CODE:420,MESSAGE:"Method Failure"},MISDIRECTED_REQUEST:{CODE:421,MESSAGE:"Misdirected Request"},UNPROCESSABLE_ENTITY:{CODE:422,MESSAGE:"Unprocessable Entity"},LOCKED:{CODE:423,MESSAGE:"Locked"},FAILED_DEPENDENCY:{CODE:424,MESSAGE:"Failed Dependency"},PRECONDITION_REQUIRED:{CODE:428,MESSAGE:"Precondition Required"},TOO_MANY_REQUESTS:{CODE:429,MESSAGE:"Too Many Requests"},REQUEST_HEADER_FIELDS_TOO_LARGE:{CODE:431,MESSAGE:"Request Header Fields Too Large"},UNAVAILABLE_FOR_LEGAL_REASONS:{CODE:451,MESSAGE:"Unavailable For Legal Reasons"},INTERNAL_SERVER_ERROR:{CODE:500,MESSAGE:"Internal Server Error"},NOT_IMPLEMENTED:{CODE:501,MESSAGE:"Not Implemented"},BAD_GATEWAY:{CODE:502,MESSAGE:"Bad Gateway"},SERVICE_UNAVAILABLE:{CODE:503,MESSAGE:"Service Unavailable"},GATEWAY_TIMEOUT:{CODE:504,MESSAGE:"Gateway Timeout"},HTTP_VERSION_NOT_SUPPORTED:{CODE:505,MESSAGE:"HTTP Version Not Supported"},INSUFFICIENT_STORAGE:{CODE:507,MESSAGE:"Insufficient Storage"},NETWORK_AUTHENTICATION_REQUIRED:{CODE:511,MESSAGE:"Network Authentication Required"}};var eA={silent:eS.consola.silent,level:eS.consola.level,fatal:eS.consola.fatal,error:eS.consola.error,warn:eS.consola.warn,log:eS.consola.log,info:eS.consola.info,success:eS.consola.success,ready:eS.consola.ready,start:eS.consola.start,box:eS.consola.box,debug:eS.consola.debug,trace:eS.consola.trace,verbose:eS.consola.verbose};function ey(e,r){var t=r!==null&&r!==void 0?r:{},n=t.shouldLog,o=n===void 0?!0:n,a=t.returnValue,u=t.callback,i=d(e,Error)?e:new Error(typeof e=="string"?e:"Unknown error");return o&&eA.error(i.message),u&&typeof u=="function"&&u(i),a||{success:!1,message:i.message,code:em.INTERNAL_SERVER_ERROR.CODE}}k(ey,"catchError");var e_="/graphql";var eg=/*#__PURE__*/function(e){E(r,e);function r(){i(this,r);var e;e=u(this,r,arguments);F(e,"count",0);return e}c(r,[{key:"request",value:function e(e,r){var t=this;var n=Date.now();return this.count+=1,r(e).map(function(r){var o=Date.now()-n,a=e.operationName||"Unnamed";return eA.info("[Apollo] #".concat(t.count,": ").concat(a," (").concat(o,"ms)")),r})}}]);return r}(el.ApolloLink);k(eg,"DevLoggerLink");var eO=eg;function eh(e){var r=e.uri,t=e.wsUrl,n=e.customLinks,o=new eO,a=(0,ec.onError)(function(e){var r=e.graphQLErrors,t=e.networkError,n=e.protocolErrors,o=e.operation;var a=(o===null||o===void 0?void 0:o.operationName)||"Unknown";if(r&&r.forEach(function(e){var r=e.message,t=e.locations,n=e.path;eA.error("[GraphQL error] ".concat(a,": ").concat(r,", Location: ").concat(JSON.stringify(t,null,4),", Path: ").concat(n))}),n&&n.forEach(function(e){var r=e.message,t=e.extensions;eA.error("[Protocol error]: ".concat(r,", Extensions: ").concat(JSON.stringify(t,null,4)))}),t&&eA.error("[Network error]: ".concat(t)),r||n||t){var u,i;var l=(r===null||r===void 0?void 0:(u=r[0])===null||u===void 0?void 0:u.message)||(n===null||n===void 0?void 0:(i=n[0])===null||i===void 0?void 0:i.message)||(t===null||t===void 0?void 0:t.message)||"Unexpected error",c=new ei.ApolloError({graphQLErrors:r||[],protocolErrors:n||[],clientErrors:[],networkError:t||null,errorMessage:l,extraInfo:{operation:o}});en.toast.error(function(e){return ep.default.createElement(ep.default.Fragment,null,l,"\xa0",ep.default.createElement("button",{type:"button",onClick:k(function(){setTimeout(function(){er(c)},0),en.toast.dismiss(e.id)},"onClick")},"Show Details"))})}}),u=(0,ef.removeTypenameFromVariables)();r||eA.warn('[Apollo] No GraphQL URI provided — using "'.concat(e_,'" as default'));var i=new es.HttpLink({uri:r!==null&&r!==void 0?r:e_,credentials:"include"}),l=t?new eE.GraphQLWsLink((0,ev.createClient)({url:t})):el.ApolloLink.empty(),c=d(l,el.ApolloLink)?(0,el.split)(function(e){var r=e.query;var t=(0,ed.getMainDefinition)(r);return t.kind==="OperationDefinition"&&t.operation==="subscription"},l,i):i;return c===i&&t&&eA.warn("[Apollo] WS URL is set, but subscriptions fallback to HTTP. Check your wsLink config."),[o,a,u].concat(b(n!==null&&n!==void 0?n:[]),[c])}k(eh,"createApolloLinks");function eb(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var r=(0,el.from)(eh(e));return new ei.ApolloClient(A({link:r,cache:new ei.InMemoryCache},e))}k(eb,"getClient");function eC(e){var r=e.options,t=e.children;var n=(0,H.useMemo)(function(){return eb(r||{})},[r]);return H.default.createElement(H.default.Fragment,null,H.default.createElement(et,null,H.default.createElement(eu,{client:n},H.default.createElement(z.ApolloProvider,{client:n},t)),H.default.createElement(X,null)),H.default.createElement(en.Toaster,{position:"top-right"}))}k(eC,"ApolloProvider");var eT=require("react");var eN=require("@apollo/client/react/hooks/hooks.cjs");var eI=require("react-i18next"),eR=eI.useTranslation;var eD=q(require("i18next"),1),eL=require("react-i18next");function ew(e){return eD.default.use(eL.initReactI18next).init(e)}k(ew,"initI18next");var eM=q(require("clsx"),1),eP=q(require("react"),1);var eG={overlay:"_overlay_1ank4_1",fullscreen:"_fullscreen_1ank4_1",block:"_block_1ank4_2","overlay-fade-in":"_overlay-fade-in_1ank4_1",container:"_container_1ank4_35",ring:"_ring_1ank4_45",rotate1:"_rotate1_1ank4_1",rotate2:"_rotate2_1ank4_1",rotate3:"_rotate3_1ank4_1",rotate4:"_rotate4_1ank4_1",message:"_message_1ank4_69","text-fade":"_text-fade_1ank4_1"};function ek(){if(document.getElementById("noscroll-style"))return;var e=document.createElement("style");e.id="noscroll-style",e.innerHTML="\n .noscroll {\n overflow: hidden !important;\n height: 100vh !important;\n }\n ",document.head.appendChild(e)}k(ek,"injectNoScrollStyle");function ex(e){var r=e.full,t=r===void 0?!1:r,n=e.block,o=n===void 0?!1:n,a=e.className,u=a===void 0?"":a,i=e.message,l=i===void 0?"Loading":i,c=y(e,["full","block","className","message"]);(0,eP.useEffect)(function(){if(t){document.body.classList.add("noscroll");var e=k(function(e){return e.preventDefault()},"handleContextMenu");return document.addEventListener("contextmenu",e),function(){document.body.classList.remove("noscroll"),document.removeEventListener("contextmenu",e)}}},[t]),(0,eP.useEffect)(function(){ek()},[]);function s(){return eP.default.createElement("div",A({className:eG.container},c),eP.default.createElement("div",{className:eG.ring}),eP.default.createElement("div",{className:eG.ring}),eP.default.createElement("div",{className:eG.ring}),eP.default.createElement("div",{className:eG.ring}),l&&eP.default.createElement("div",{className:eG.message},l))}return k(s,"_renderLoading"),t?eP.default.createElement("div",{className:(0,eM.default)(eG.fullscreen,u)},s()):o?eP.default.createElement("div",{className:(0,eM.default)(eG.block,u)},s()):s()}k(ex,"Loading");var eU=require("react"),eq=(0,eU.createContext)(void 0);var eQ=require("react");function eF(){var e=(0,eQ.use)(eq);if(!e)throw new Error("useLoading must be used within a LoadingProvider");return e}k(eF,"useLoading");var ej=q(require("react"),1);function ez(e){var r=e.children;var t=h((0,ej.useState)(!1),2),n=t[0],o=t[1],a=h((0,ej.useState)(!1),2),u=a[0],i=a[1],l=(0,ej.useCallback)(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;o(!0),i(e)},[]),c=(0,ej.useCallback)(function(){o(!1),i(!1)},[]),s=(0,ej.useMemo)(function(){return{isLoading:n,isGlobalLoading:u,showLoading:l,hideLoading:c}},[n,u,l,c]);return ej.default.createElement(eq,{value:s},n?ej.default.createElement(ex,{full:u}):r)}k(ez,"LoadingProvider");var eH=require("date-fns/locale"),eB={label:"English",value:"en",flag:"\uD83C\uDDFA\uD83C\uDDF8",adapterLocale:eH.enUS,icon:"flagpack:gb-nir",numberFormat:{code:"en-US",currency:"USD"},timezone:"America/New_York"};var eV=require("react"),eY=(0,eV.createContext)(void 0);var eW=require("next-intl"),eX=q(require("react"),1);var eJ=require("next-intl"),eK=require("react");function eZ(){var e=(0,eK.use)(eY);if(!e)throw new Error("useNextIntl must be used within a NextIntlProvider");return e}k(eZ,"useNextIntl");var e$=eJ.useTranslations;function e0(e){var r=k(function(r){var t;var n;var o=eZ(),a=o.currentLanguage,u=r.messages,i=r.languages,l="en",c=u[(a===null||a===void 0?void 0:a.value)||l],s=(n=(t=i.find(function(e){return e.value===(a===null||a===void 0?void 0:a.value)}))===null||t===void 0?void 0:t.timezone)!==null&&n!==void 0?n:eB.timezone;return u?eX.default.createElement(eW.NextIntlClientProvider,{locale:(a===null||a===void 0?void 0:a.value)||l,messages:c||null,timeZone:s},eX.default.createElement(e,r)):(eA.warn("Missing messages for language: ".concat((a===null||a===void 0?void 0:a.value)||l)),null)},"PageWithI18n");return r.displayName="withNextIntl(".concat(e.displayName||e.name||"Component",")"),r}k(e0,"withNextIntl");var e1=q(require("react"),1);var e2=require("react");var e4={Date:{is:k(function(e){return d(e,Date)},"is"),serialize:k(function(e){return{__type:"Date",value:e.toISOString()}},"serialize"),deserialize:k(function(e){return new Date(e)},"deserialize")},Map:{is:k(function(e){return d(e,Map)},"is"),serialize:k(function(e){return{__type:"Map",value:Array.from(e.entries())}},"serialize"),deserialize:k(function(e){return new Map(e)},"deserialize")},Set:{is:k(function(e){return d(e,Set)},"is"),serialize:k(function(e){return{__type:"Set",value:Array.from(e)}},"serialize"),deserialize:k(function(e){return new Set(e)},"deserialize")},RegExp:{is:k(function(e){return d(e,RegExp)},"is"),serialize:k(function(e){return{__type:"RegExp",value:{source:e.source,flags:e.flags}}},"serialize"),deserialize:k(function(e){var r=e.source,t=e.flags;return new RegExp(r,t)},"deserialize")},BigInt:{is:k(function(e){return(typeof e==="undefined"?"undefined":C(e))=="bigint"},"is"),serialize:k(function(e){return{__type:"BigInt",value:e.toString()}},"serialize"),deserialize:k(function(e){return BigInt(e)},"deserialize")}},e3={serialize:function e(e){return JSON.stringify(e,function(e,r){var t=true,n=false,o=undefined;try{for(var a=Object.keys(e4)[Symbol.iterator](),u;!(t=(u=a.next()).done);t=true){var i=u.value;var l=e4[i];if(l.is(r))return l.serialize(r)}}catch(e){n=true;o=e}finally{try{if(!t&&a.return!=null){a.return()}}finally{if(n){throw o}}}return r})},deserialize:function e(e){return JSON.parse(e,function(e,r){if(r&&(typeof r==="undefined"?"undefined":C(r))=="object"&&"__type"in r&&typeof r.__type=="string"){var t=r.__type,n=e4[t];if(n)return n.deserialize(r.value)}return r})}};var e8=q(require("localforage"),1);var e5={get:function e(e){return a(function(){var r;return I(this,function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);return[4,e8.default.getItem(e)];case 1:return[2,t.sent()];case 2:r=t.sent();return[2,ey(r,{returnValue:null})];case 3:return[2]}})})()},set:function e(e,r){return a(function(){var t;return I(this,function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,e8.default.setItem(e,r)];case 1:n.sent();return[3,3];case 2:t=n.sent();ey(t);return[3,3];case 3:return[2]}})})()},remove:function e(e){return a(function(){var r;return I(this,function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);return[4,e8.default.removeItem(e)];case 1:t.sent();return[3,3];case 2:r=t.sent();ey(r);return[3,3];case 3:return[2]}})})()},keys:function e(){return a(function(){var e,r;return I(this,function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);return[4,e8.default.keys()];case 1:return[2,(e=t.sent())!==null&&e!==void 0?e:[]];case 2:r=t.sent();return[2,ey(r,{returnValue:[]})];case 3:return[2]}})})()}};function e7(e,r){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e3;var n=h((0,e2.useState)(r),2),o=n[0],u=n[1],i=h((0,e2.useState)(!1),2),l=i[0],c=i[1];(0,e2.useEffect)(function(){var n=!0;return k(function(){return a(function(){var o,a,i,l;return I(this,function(s){switch(s.label){case 0:s.trys.push([0,6,7,8]);return[4,e5.get(e)];case 1:o=s.sent();if(!n)return[3,5];if(!(o!==null))return[3,2];a=t.deserialize(o);u(a);return[3,5];case 2:if(!(r!==void 0))return[3,4];i=t.serialize(r);return[4,e5.set(e,i)];case 3:s.sent(),u(r);return[3,5];case 4:u(void 0);s.label=5;case 5:return[3,8];case 6:l=s.sent();ey(l),n&&u(r);return[3,8];case 7:n&&c(!0);return[7];case 8:return[2]}})})()},"loadValue")(),function(){n=!1,c(!1)}},[e,r,t]),(0,e2.useEffect)(function(){if(!l)return;k(function(){return a(function(){var r,n;return I(this,function(a){switch(a.label){case 0:a.trys.push([0,3,,4]);if(!(o!==void 0))return[3,2];r=t.serialize(o);return[4,e5.set(e,r)];case 1:a.sent();a.label=2;case 2:return[3,4];case 3:n=a.sent();ey(n);return[3,4];case 4:return[2]}})})()},"saveValue")()},[o,e,t,l]);var s=(0,e2.useCallback)(function(e){u(function(r){return typeof e=="function"?e(r):e})},[]),f=(0,e2.useCallback)(function(){return a(function(){var r;return I(this,function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);return[4,e5.remove(e)];case 1:t.sent(),u(void 0);return[3,3];case 2:r=t.sent();ey(r);return[3,3];case 3:return[2]}})})()},[e]);return{value:o,set:s,remove:f}}k(e7,"useStorage");function e6(e){var r=e.children;return e1.default.createElement(e1.default.Fragment,null,r)}k(e6,"LanguageWrapperBase");var e9=e0(e6);function re(e){var r=e.children,t=e.languages,n=e.messages;var o=e7("lang",t[0]),a=o.value,u=o.set,i=(0,e1.useMemo)(function(){return{languages:t,currentLanguage:a!==null&&a!==void 0?a:eB,setCurrentLanguage:u}},[t,u,a]);return e1.default.createElement(eY,{value:i},e1.default.createElement(e9,{languages:t,messages:n},r))}k(re,"NextIntlProvider");var rr=q(require("@userback/widget"),1),rt=require("react");function rn(e){var r=e.token,t=e.options;return(0,rt.useEffect)(function(){if(!r)return;var e;return k(function(){return a(function(){var n,o,a;return I(this,function(u){switch(u.label){case 0:n=t||{},o=n.hide,a=y(n,["hide"]);return[4,(0,rr.default)(r,a)];case 1:u.sent(),o&&o.length>0&&o.forEach(function(e){document.querySelectorAll(e).forEach(function(e){return e.remove()})}),e=new MutationObserver(function(){o&&o.length>0&&o.forEach(function(e){document.querySelectorAll(e).forEach(function(e){return e.remove()})})}),e.observe(document.body,{childList:!0,subtree:!0});return[2]}})})()},"loadUserback")(),function(){e===null||e===void 0?void 0:e.disconnect()}},[r,t]),null}k(rn,"Userback");0&&(module.exports={ApolloClientContext:ApolloClientContext,ApolloClientProvider:ApolloClientProvider,ApolloErrorComponent:ApolloErrorComponent,ApolloErrorContext:ApolloErrorContext,ApolloErrorProvider:ApolloErrorProvider,ApolloProvider:ApolloProvider,DevLoggerLink:DevLoggerLink,GRAPHQL_URI_DEFAULT:GRAPHQL_URI_DEFAULT,Loading:Loading,LoadingContext:LoadingContext,LoadingProvider:LoadingProvider,NEXT_INTL_DEFAULT_LANGUAGE:NEXT_INTL_DEFAULT_LANGUAGE,NextIntlContext:NextIntlContext,NextIntlProvider:NextIntlProvider,Toaster:Toaster,Userback:Userback,catchError:catchError,createApolloLinks:createApolloLinks,getClient:getClient,initI18next:initI18next,log:log,setGlobalApolloErrorCallback:setGlobalApolloErrorCallback,showGlobalApolloError:showGlobalApolloError,storage:storage,toast:toast,useApolloClient:useApolloClient,useApolloError:useApolloError,useBackgroundQuery:useBackgroundQuery,useFragment:useFragment,useLazyQuery:useLazyQuery,useLoadableQuery:useLoadableQuery,useLoading:useLoading,useMutation:useMutation,useNextIntl:useNextIntl,useQuery:useQuery,useQueryRefHandlers:useQueryRefHandlers,useReactiveVar:useReactiveVar,useReadQuery:useReadQuery,useStorage:useStorage,useSubscription:useSubscription,useSuspenseFragment:useSuspenseFragment,useSuspenseQuery:useSuspenseQuery,useTranslateI18next:useTranslateI18next,useTranslateNextIntl:useTranslateNextIntl,withNextIntl:withNextIntl});
|
package/dist/react/index.d.cts
CHANGED
|
@@ -21,7 +21,9 @@ export { ApolloCache } from '../_tsup-dts-rollup.cjs';
|
|
|
21
21
|
export { ApolloClient } from '../_tsup-dts-rollup.cjs';
|
|
22
22
|
export { ApolloClientOptions } from '../_tsup-dts-rollup.cjs';
|
|
23
23
|
export { NormalizedCacheObject } from '../_tsup-dts-rollup.cjs';
|
|
24
|
+
export { createApolloLinks } from '../_tsup-dts-rollup.cjs';
|
|
24
25
|
export { getClient } from '../_tsup-dts-rollup.cjs';
|
|
26
|
+
export { DevLoggerLink } from '../_tsup-dts-rollup.cjs';
|
|
25
27
|
export { ApolloErrorComponent } from '../_tsup-dts-rollup.cjs';
|
|
26
28
|
export { ApolloErrorContext } from '../_tsup-dts-rollup.cjs';
|
|
27
29
|
export { useApolloError } from '../_tsup-dts-rollup.cjs';
|
|
@@ -55,3 +57,6 @@ export { useStorage } from '../_tsup-dts-rollup.cjs';
|
|
|
55
57
|
export { storage_alias_3 as storage } from '../_tsup-dts-rollup.cjs';
|
|
56
58
|
export { toast } from '../_tsup-dts-rollup.cjs';
|
|
57
59
|
export { Toaster } from '../_tsup-dts-rollup.cjs';
|
|
60
|
+
export { Userback } from '../_tsup-dts-rollup.cjs';
|
|
61
|
+
export { I_UserBackOptions } from '../_tsup-dts-rollup.cjs';
|
|
62
|
+
export { I_UserBackProps } from '../_tsup-dts-rollup.cjs';
|
package/dist/react/index.d.ts
CHANGED
|
@@ -21,7 +21,9 @@ export { ApolloCache } from '../_tsup-dts-rollup.js';
|
|
|
21
21
|
export { ApolloClient } from '../_tsup-dts-rollup.js';
|
|
22
22
|
export { ApolloClientOptions } from '../_tsup-dts-rollup.js';
|
|
23
23
|
export { NormalizedCacheObject } from '../_tsup-dts-rollup.js';
|
|
24
|
+
export { createApolloLinks } from '../_tsup-dts-rollup.js';
|
|
24
25
|
export { getClient } from '../_tsup-dts-rollup.js';
|
|
26
|
+
export { DevLoggerLink } from '../_tsup-dts-rollup.js';
|
|
25
27
|
export { ApolloErrorComponent } from '../_tsup-dts-rollup.js';
|
|
26
28
|
export { ApolloErrorContext } from '../_tsup-dts-rollup.js';
|
|
27
29
|
export { useApolloError } from '../_tsup-dts-rollup.js';
|
|
@@ -55,3 +57,6 @@ export { useStorage } from '../_tsup-dts-rollup.js';
|
|
|
55
57
|
export { storage_alias_3 as storage } from '../_tsup-dts-rollup.js';
|
|
56
58
|
export { toast } from '../_tsup-dts-rollup.js';
|
|
57
59
|
export { Toaster } from '../_tsup-dts-rollup.js';
|
|
60
|
+
export { Userback } from '../_tsup-dts-rollup.js';
|
|
61
|
+
export { I_UserBackOptions } from '../_tsup-dts-rollup.js';
|
|
62
|
+
export { I_UserBackProps } from '../_tsup-dts-rollup.js';
|
package/dist/react/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e,r){if(r==null||r>e.length)r=e.length;for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function r(e){if(Array.isArray(e))return e}function t(r){if(Array.isArray(r))return e(r)}function n(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function o(e,r,t,n,o,a,i){try{var l=e[a](i);var s=l.value}catch(e){t(e);return}if(l.done){r(s)}else{Promise.resolve(s).then(n,o)}}function a(e){return function(){var r=this,t=arguments;return new Promise(function(n,a){var i=e.apply(r,t);function l(e){o(i,n,a,l,s,"next",e)}function s(e){o(i,n,a,l,s,"throw",e)}l(undefined)})}}function i(e,r,t){r=E(r);return h(e,N()?Reflect.construct(r,t||[],E(e).constructor):r.apply(e,t))}function l(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function s(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||false;n.configurable=true;if("value"in n)n.writable=true;Object.defineProperty(e,n.key,n)}}function u(e,r,t){if(r)s(e.prototype,r);if(t)s(e,t);return e}function c(e,r,t){if(r in e){Object.defineProperty(e,r,{value:t,enumerable:true,configurable:true,writable:true})}else{e[r]=t}return e}function E(e){E=Object.setPrototypeOf?Object.getPrototypeOf:function e(e){return e.__proto__||Object.getPrototypeOf(e)};return E(e)}function f(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function")}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:true,configurable:true}});if(r)y(e,r)}function m(e,r){if(r!=null&&typeof Symbol!=="undefined"&&r[Symbol.hasInstance]){return!!r[Symbol.hasInstance](e)}else{return e instanceof r}}function d(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function p(e,r){var t=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t==null)return;var n=[];var o=true;var a=false;var i,l;try{for(t=t.call(e);!(o=(i=t.next()).done);o=true){n.push(i.value);if(r&&n.length===r)break}}catch(e){a=true;l=e}finally{try{if(!o&&t["return"]!=null)t["return"]()}finally{if(a)throw l}}return n}function v(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function S(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};var n=Object.keys(t);if(typeof Object.getOwnPropertySymbols==="function"){n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))}n.forEach(function(r){c(e,r,t[r])})}return e}function A(e,r){if(e==null)return{};var t=O(e,r);var n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++){n=a[o];if(r.indexOf(n)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,n))continue;t[n]=e[n]}}return t}function O(e,r){if(e==null)return{};var t={};var n=Object.keys(e);var o,a;for(a=0;a<n.length;a++){o=n[a];if(r.indexOf(o)>=0)continue;t[o]=e[o]}return t}function h(e,r){if(r&&(C(r)==="object"||typeof r==="function")){return r}return n(e)}function y(e,r){y=Object.setPrototypeOf||function e(e,r){e.__proto__=r;return e};return y(e,r)}function g(e,t){return r(e)||p(e,t)||T(e,t)||v()}function b(e){return t(e)||d(e)||T(e)||S()}function C(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function T(r,t){if(!r)return;if(typeof r==="string")return e(r,t);var n=Object.prototype.toString.call(r).slice(8,-1);if(n==="Object"&&r.constructor)n=r.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(r,t)}function N(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(N=function(){return!!e})()}function D(e,r){var t,n,o,a={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return i.next=l(0),i["throw"]=l(1),i["return"]=l(2),typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function l(e){return function(r){return s([e,r])}}function s(l){if(t)throw new TypeError("Generator is already executing.");while(i&&(i=0,l[0]&&(a=0)),a)try{if(t=1,n&&(o=l[0]&2?n["return"]:l[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;if(n=0,o)l=[l[0]&2,o.value];switch(l[0]){case 0:case 1:o=l;break;case 4:a.label++;return{value:l[1],done:false};case 5:a.label++;n=l[1];l=[0];continue;case 7:l=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){a=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(l[0]===6&&a.label<o[1]){a.label=o[1];o=l;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(l);break}if(o[2])a.ops.pop();a.trys.pop();continue}l=r.call(e,a)}catch(e){l=[6,e];n=0}finally{t=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}}var R=Object.defineProperty;var I=function(e,r,t){return r in e?R(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t};var M=function(e,r){return R(e,"name",{value:r,configurable:!0})};var L=function(e,r,t){return I(e,(typeof r==="undefined"?"undefined":C(r))!="symbol"?r+"":r,t)};import{ApolloNextAppProvider as w}from"@apollo/client-integration-nextjs";import{ApolloProvider as G}from"@apollo/client/react/react.cjs";import P,{useMemo as k}from"react";import U,{use as x}from"react";import{createContext as Q}from"react";var F=Q(void 0);var j={"modal-backdrop":"_modal-backdrop_8fveh_1","modal-content":"_modal-content_8fveh_11","btn-close":"_btn-close_8fveh_22","error-title":"_error-title_8fveh_36","btn-retry":"_btn-retry_8fveh_41","error-details":"_error-details_8fveh_54",main:"_main_8fveh_72",network:"_network_8fveh_75",extra:"_extra_8fveh_78"};function z(){var e=x(F),r=e===null||e===void 0?void 0:e.error;if(!r)return null;var t=M(function(e,r){return(r===null||r===void 0?void 0:r.length)?U.createElement("div",null,U.createElement("strong",null,e,":"),U.createElement("ul",null,r.map(function(e){return U.createElement("li",{key:e.message},e.message)}))):null},"renderErrorList");return U.createElement("div",{className:j["modal-backdrop"]},U.createElement("div",{className:j["modal-content"]},U.createElement("button",{type:"button",className:j["btn-close"],onClick:e.hideError},"✕"),U.createElement("div",{className:j["error-title"]},U.createElement("button",{type:"button",className:j["btn-retry"],onClick:M(function(){return window.location.reload()},"onClick")},"Reload")," ",r.message),U.createElement("div",{className:j["error-details"]},r.networkError&&U.createElement("pre",{className:"network"},U.createElement("strong",null,"Network Error:")," ",r.networkError.message),t("GraphQL Errors",b(r.graphQLErrors)),t("Protocol Errors",b(r.protocolErrors)),t("Client Errors",b(r.clientErrors)),r.extraInfo&&U.createElement("pre",{className:"extra"},U.createElement("strong",null,"Extra Info:")," ",JSON.stringify(r.extraInfo,null,4)))))}M(z,"ApolloErrorComponent");import{use as q}from"react";function H(){var e=q(F);if(!e)throw new Error("useApolloError must be used within ApolloErrorProvider");return e}M(H,"useApolloError");import B,{useEffect as V,useMemo as Y,useState as W}from"react";var J=null;function X(e){J=e}M(X,"setGlobalApolloErrorCallback");function K(e){J===null||J===void 0?void 0:J(e)}M(K,"showGlobalApolloError");function Z(e){var r=e.children;var t=g(W(null),2),n=t[0],o=t[1];V(function(){X(o)},[]);var a=Y(function(){return{error:n,showError:o,hideError:M(function(){return o(null)},"hideError")}},[n]);return B.createElement(F,{value:a},r)}M(Z,"ApolloErrorProvider");import{toast as $,Toaster as ee}from"react-hot-toast";import er,{createContext as et}from"react";var en=et(null);function eo(e){var r=e.client,t=e.children;return er.createElement(en,{value:r},t)}M(eo,"ApolloClientProvider");import{ApolloClient as ea,InMemoryCache as ei}from"@apollo/client-integration-nextjs";import{ApolloClient as el,ApolloError as es,InMemoryCache as eu}from"@apollo/client/core/core.cjs";import{ApolloLink as ec,from as eE,split as ef}from"@apollo/client/link/core/core.cjs";import{onError as em}from"@apollo/client/link/error/error.cjs";import{HttpLink as ed}from"@apollo/client/link/http/http.cjs";import{removeTypenameFromVariables as ep}from"@apollo/client/link/remove-typename/remove-typename.cjs";import{GraphQLWsLink as ev}from"@apollo/client/link/subscriptions/subscriptions.cjs";import{getMainDefinition as eS}from"@apollo/client/utilities/utilities.cjs";import{createClient as e_}from"graphql-ws";import eA from"react";import{consola as eO}from"consola/browser";var eh={GRAPHQL_PARSE_FAILED:{CODE:"GRAPHQL_PARSE_FAILED",MESSAGE:"The GraphQL operation string contains a syntax error."},GRAPHQL_VALIDATION_FAILED:{CODE:"GRAPHQL_VALIDATION_FAILED",MESSAGE:"The GraphQL operation is not valid against the server's schema."},BAD_USER_INPUT:{CODE:"BAD_USER_INPUT",MESSAGE:"The GraphQL operation includes an invalid value for a field argument."},PERSISTED_QUERY_NOT_FOUND:{CODE:"PERSISTED_QUERY_NOT_FOUND",MESSAGE:"A client sent the hash of a query string to execute via automatic persisted queries, but the query was not in the APQ cache."},PERSISTED_QUERY_NOT_SUPPORTED:{CODE:"PERSISTED_QUERY_NOT_SUPPORTED",MESSAGE:"A client sent the hash of a query string to execute via automatic persisted queries, but the server has disabled APQ."},OPERATION_RESOLUTION_FAILURE:{CODE:"OPERATION_RESOLUTION_FAILURE",MESSAGE:"The request was parsed successfully and is valid against the server's schema, but the server couldn't resolve which operation to run. This occurs when a request containing multiple named operations doesn't specify which operation to run (i.e.,operationName), or if the named operation isn't included in the request."},CONTINUE:{CODE:100,MESSAGE:"Continue"},SWITCHING_PROTOCOLS:{CODE:101,MESSAGE:"Switching Protocols"},PROCESSING:{CODE:102,MESSAGE:"Processing"},OK:{CODE:200,MESSAGE:"OK"},CREATED:{CODE:201,MESSAGE:"Created"},ACCEPTED:{CODE:202,MESSAGE:"Accepted"},NON_AUTHORITATIVE_INFORMATION:{CODE:203,MESSAGE:"Non Authoritative Information"},NO_CONTENT:{CODE:204,MESSAGE:"No Content"},RESET_CONTENT:{CODE:205,MESSAGE:"Reset Content"},PARTIAL_CONTENT:{CODE:206,MESSAGE:"Partial Content"},MULTI_STATUS:{CODE:207,MESSAGE:"Multi-Status"},MULTIPLE_CHOICES:{CODE:300,MESSAGE:"Multiple Choices"},MOVED_PERMANENTLY:{CODE:301,MESSAGE:"Moved Permanently"},MOVED_TEMPORARILY:{CODE:302,MESSAGE:"Moved Temporarily"},SEE_OTHER:{CODE:303,MESSAGE:"See Other"},NOT_MODIFIED:{CODE:304,MESSAGE:"Not Modified"},USE_PROXY:{CODE:305,MESSAGE:"Use Proxy"},TEMPORARY_REDIRECT:{CODE:307,MESSAGE:"Temporary Redirect"},PERMANENT_REDIRECT:{CODE:308,MESSAGE:"Permanent Redirect"},BAD_REQUEST:{CODE:400,MESSAGE:"Bad Request"},UNAUTHORIZED:{CODE:401,MESSAGE:"Unauthorized"},PAYMENT_REQUIRED:{CODE:402,MESSAGE:"Payment Required"},FORBIDDEN:{CODE:403,MESSAGE:"Forbidden"},NOT_FOUND:{CODE:404,MESSAGE:"Not Found"},METHOD_NOT_ALLOWED:{CODE:405,MESSAGE:"Method Not Allowed"},NOT_ACCEPTABLE:{CODE:406,MESSAGE:"Not Acceptable"},PROXY_AUTHENTICATION_REQUIRED:{CODE:407,MESSAGE:"Proxy Authentication Required"},REQUEST_TIMEOUT:{CODE:408,MESSAGE:"Request Timeout"},CONFLICT:{CODE:409,MESSAGE:"Conflict"},GONE:{CODE:410,MESSAGE:"Gone"},LENGTH_REQUIRED:{CODE:411,MESSAGE:"Length Required"},PRECONDITION_FAILED:{CODE:412,MESSAGE:"Precondition Failed"},REQUEST_TOO_LONG:{CODE:413,MESSAGE:"Request Entity Too Large"},REQUEST_URI_TOO_LONG:{CODE:414,MESSAGE:"Request-URI Too Long"},UNSUPPORTED_MEDIA_TYPE:{CODE:415,MESSAGE:"Unsupported Media Type"},REQUESTED_RANGE_NOT_SATISFIABLE:{CODE:416,MESSAGE:"Requested Range Not Satisfiable"},EXPECTATION_FAILED:{CODE:417,MESSAGE:"Expectation Failed"},IM_A_TEAPOT:{CODE:418,MESSAGE:"I'm a teapot"},INSUFFICIENT_SPACE_ON_RESOURCE:{CODE:419,MESSAGE:"Insufficient Space on Resource"},METHOD_FAILURE:{CODE:420,MESSAGE:"Method Failure"},MISDIRECTED_REQUEST:{CODE:421,MESSAGE:"Misdirected Request"},UNPROCESSABLE_ENTITY:{CODE:422,MESSAGE:"Unprocessable Entity"},LOCKED:{CODE:423,MESSAGE:"Locked"},FAILED_DEPENDENCY:{CODE:424,MESSAGE:"Failed Dependency"},PRECONDITION_REQUIRED:{CODE:428,MESSAGE:"Precondition Required"},TOO_MANY_REQUESTS:{CODE:429,MESSAGE:"Too Many Requests"},REQUEST_HEADER_FIELDS_TOO_LARGE:{CODE:431,MESSAGE:"Request Header Fields Too Large"},UNAVAILABLE_FOR_LEGAL_REASONS:{CODE:451,MESSAGE:"Unavailable For Legal Reasons"},INTERNAL_SERVER_ERROR:{CODE:500,MESSAGE:"Internal Server Error"},NOT_IMPLEMENTED:{CODE:501,MESSAGE:"Not Implemented"},BAD_GATEWAY:{CODE:502,MESSAGE:"Bad Gateway"},SERVICE_UNAVAILABLE:{CODE:503,MESSAGE:"Service Unavailable"},GATEWAY_TIMEOUT:{CODE:504,MESSAGE:"Gateway Timeout"},HTTP_VERSION_NOT_SUPPORTED:{CODE:505,MESSAGE:"HTTP Version Not Supported"},INSUFFICIENT_STORAGE:{CODE:507,MESSAGE:"Insufficient Storage"},NETWORK_AUTHENTICATION_REQUIRED:{CODE:511,MESSAGE:"Network Authentication Required"}};var ey={silent:eO.silent,level:eO.level,fatal:eO.fatal,error:eO.error,warn:eO.warn,log:eO.log,info:eO.info,success:eO.success,ready:eO.ready,start:eO.start,box:eO.box,debug:eO.debug,trace:eO.trace,verbose:eO.verbose};function eg(e,r){var t=r!==null&&r!==void 0?r:{},n=t.shouldLog,o=n===void 0?!0:n,a=t.returnValue,i=t.callback,l=m(e,Error)?e:new Error(typeof e=="string"?e:"Unknown error");return o&&ey.error(l.message),i&&typeof i=="function"&&i(l),a||{success:!1,message:l.message,code:eh.INTERNAL_SERVER_ERROR.CODE}}M(eg,"catchError");var eb="/graphql";var eC,eT=(eC=/*#__PURE__*/function(e){"use strict";f(r,e);function r(){l(this,r);var e;e=i(this,r,arguments);L(e,"count",0);return e}u(r,[{key:"request",value:function e(e,r){var t=this;var n=Date.now();return this.count+=1,r(e).map(function(r){var o=Date.now()-n,a=e.operationName||"Unnamed";return ey.info("[Apollo] #".concat(t.count,": ").concat(a," (").concat(o,"ms)")),r})}}]);return r}(ec),M(eC,"DevLoggerLink"),eC);function eN(e){var r=e.uri,t=e.wsUrl,n=e.customLinks,o=new eT,a=em(function(e){var r=e.graphQLErrors,t=e.networkError,n=e.protocolErrors,o=e.operation;var a=(o===null||o===void 0?void 0:o.operationName)||"Unknown";if(r&&r.forEach(function(e){var r=e.message,t=e.locations,n=e.path;ey.error("[GraphQL error] ".concat(a,": ").concat(r,", Location: ").concat(JSON.stringify(t,null,4),", Path: ").concat(n))}),n&&n.forEach(function(e){var r=e.message,t=e.extensions;ey.error("[Protocol error]: ".concat(r,", Extensions: ").concat(JSON.stringify(t,null,4)))}),t&&ey.error("[Network error]: ".concat(t)),r||n||t){var i,l;var s=(r===null||r===void 0?void 0:(i=r[0])===null||i===void 0?void 0:i.message)||(n===null||n===void 0?void 0:(l=n[0])===null||l===void 0?void 0:l.message)||(t===null||t===void 0?void 0:t.message)||"Unexpected error",u=new es({graphQLErrors:r||[],protocolErrors:n||[],clientErrors:[],networkError:t||null,errorMessage:s,extraInfo:{operation:o}});$.error(function(e){return eA.createElement(eA.Fragment,null,s,"\xa0",eA.createElement("button",{type:"button",onClick:M(function(){setTimeout(function(){K(u)},0),$.dismiss(e.id)},"onClick")},"Show Details"))})}}),i=ep();r||ey.warn('[Apollo] No GraphQL URI provided — using "'.concat(eb,'" as default'));var l=new ed({uri:r!==null&&r!==void 0?r:eb,credentials:"include"}),s=t?new ev(e_({url:t})):ec.empty(),u=m(s,ec)?ef(function(e){var r=e.query;var t=eS(r);return t.kind==="OperationDefinition"&&t.operation==="subscription"},s,l):l;return u===l&&t&&ey.warn("[Apollo] WS URL is set, but subscriptions fallback to HTTP. Check your wsLink config."),[o,a,i].concat(b(n!==null&&n!==void 0?n:[]),[u])}M(eN,"createApolloLinks");function eD(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;var t=eE(eN(e));return r?new ea(_({link:t,cache:new ei},e)):new el(_({link:t,cache:new eu},e))}M(eD,"getClient");function eR(e){var r=e.isNextJS,t=e.options,n=e.children;var o=k(function(){return eD(t||{},r)},[t,r]),a=r?P.createElement(w,{makeClient:M(function(){return o},"makeClient")},n):P.createElement(G,{client:o},n);return P.createElement(P.Fragment,null,P.createElement(Z,null,P.createElement(eo,{client:o},a),P.createElement(z,null)),P.createElement(ee,{position:"top-right"}))}M(eR,"ApolloProvider");import{use as eI}from"react";import{useApolloClient as eM,useBackgroundQuery as eL,useFragment as ew,useLazyQuery as eG,useLoadableQuery as eP,useMutation as ek,useQuery as eU,useQueryRefHandlers as ex,useReactiveVar as eQ,useReadQuery as eF,useSubscription as ej,useSuspenseFragment as ez,useSuspenseQuery as eq}from"@apollo/client/react/hooks/hooks.cjs";import{useTranslation as eH}from"react-i18next";var eB=eH;import eV from"i18next";import{initReactI18next as eY}from"react-i18next";function eW(e){return eV.use(eY).init(e)}M(eW,"initI18next");import eJ from"clsx";import eX,{useEffect as eK}from"react";var eZ={overlay:"_overlay_1ank4_1",fullscreen:"_fullscreen_1ank4_1",block:"_block_1ank4_2","overlay-fade-in":"_overlay-fade-in_1ank4_1",container:"_container_1ank4_35",ring:"_ring_1ank4_45",rotate1:"_rotate1_1ank4_1",rotate2:"_rotate2_1ank4_1",rotate3:"_rotate3_1ank4_1",rotate4:"_rotate4_1ank4_1",message:"_message_1ank4_69","text-fade":"_text-fade_1ank4_1"};function e$(){if(document.getElementById("noscroll-style"))return;var e=document.createElement("style");e.id="noscroll-style",e.innerHTML="\n .noscroll {\n overflow: hidden !important;\n height: 100vh !important;\n }\n ",document.head.appendChild(e)}M(e$,"injectNoScrollStyle");function e0(e){var r=e.full,t=r===void 0?!1:r,n=e.block,o=n===void 0?!1:n,a=e.className,i=a===void 0?"":a,l=e.message,s=l===void 0?"Loading":l,u=A(e,["full","block","className","message"]);eK(function(){if(t){document.body.classList.add("noscroll");var e=M(function(e){return e.preventDefault()},"handleContextMenu");return document.addEventListener("contextmenu",e),function(){document.body.classList.remove("noscroll"),document.removeEventListener("contextmenu",e)}}},[t]),eK(function(){e$()},[]);function c(){return eX.createElement("div",_({className:eZ.container},u),eX.createElement("div",{className:eZ.ring}),eX.createElement("div",{className:eZ.ring}),eX.createElement("div",{className:eZ.ring}),eX.createElement("div",{className:eZ.ring}),s&&eX.createElement("div",{className:eZ.message},s))}return M(c,"_renderLoading"),t?eX.createElement("div",{className:eJ(eZ.fullscreen,i)},c()):o?eX.createElement("div",{className:eJ(eZ.block,i)},c()):c()}M(e0,"Loading");import{createContext as e1}from"react";var e2=e1(void 0);import{use as e4}from"react";function e3(){var e=e4(e2);if(!e)throw new Error("useLoading must be used within a LoadingProvider");return e}M(e3,"useLoading");import e8,{useCallback as e5,useMemo as e7,useState as e6}from"react";function e9(e){var r=e.children;var t=g(e6(!1),2),n=t[0],o=t[1],a=g(e6(!1),2),i=a[0],l=a[1],s=e5(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;o(!0),l(e)},[]),u=e5(function(){o(!1),l(!1)},[]),c=e7(function(){return{isLoading:n,isGlobalLoading:i,showLoading:s,hideLoading:u}},[n,i,s,u]);return e8.createElement(e2,{value:c},n?e8.createElement(e0,{full:i}):r)}M(e9,"LoadingProvider");import{enUS as re}from"date-fns/locale";var rr={label:"English",value:"en",flag:"\uD83C\uDDFA\uD83C\uDDF8",adapterLocale:re,icon:"flagpack:gb-nir",numberFormat:{code:"en-US",currency:"USD"},timezone:"America/New_York"};import{createContext as rt}from"react";var rn=rt(void 0);import{NextIntlClientProvider as ro}from"next-intl";import ra from"react";import{useTranslations as ri}from"next-intl";import{use as rl}from"react";function rs(){var e=rl(rn);if(!e)throw new Error("useNextIntl must be used within a NextIntlProvider");return e}M(rs,"useNextIntl");var ru=ri;function rc(e){var r=M(function(r){var t;var n;var o=rs(),a=o.currentLanguage,i=r.messages,l=r.languages,s="en",u=i[(a===null||a===void 0?void 0:a.value)||s],c=(n=(t=l.find(function(e){return e.value===(a===null||a===void 0?void 0:a.value)}))===null||t===void 0?void 0:t.timezone)!==null&&n!==void 0?n:rr.timezone;return i?ra.createElement(ro,{locale:(a===null||a===void 0?void 0:a.value)||s,messages:u||null,timeZone:c},ra.createElement(e,r)):(ey.warn("Missing messages for language: ".concat((a===null||a===void 0?void 0:a.value)||s)),null)},"PageWithI18n");return r.displayName="withNextIntl(".concat(e.displayName||e.name||"Component",")"),r}M(rc,"withNextIntl");import rE,{useMemo as rf}from"react";import{useCallback as rm,useEffect as rd,useState as rp}from"react";var rv={Date:{is:M(function(e){return m(e,Date)},"is"),serialize:M(function(e){return{__type:"Date",value:e.toISOString()}},"serialize"),deserialize:M(function(e){return new Date(e)},"deserialize")},Map:{is:M(function(e){return m(e,Map)},"is"),serialize:M(function(e){return{__type:"Map",value:Array.from(e.entries())}},"serialize"),deserialize:M(function(e){return new Map(e)},"deserialize")},Set:{is:M(function(e){return m(e,Set)},"is"),serialize:M(function(e){return{__type:"Set",value:Array.from(e)}},"serialize"),deserialize:M(function(e){return new Set(e)},"deserialize")},RegExp:{is:M(function(e){return m(e,RegExp)},"is"),serialize:M(function(e){return{__type:"RegExp",value:{source:e.source,flags:e.flags}}},"serialize"),deserialize:M(function(e){var r=e.source,t=e.flags;return new RegExp(r,t)},"deserialize")},BigInt:{is:M(function(e){return(typeof e==="undefined"?"undefined":C(e))=="bigint"},"is"),serialize:M(function(e){return{__type:"BigInt",value:e.toString()}},"serialize"),deserialize:M(function(e){return BigInt(e)},"deserialize")}},rS={serialize:function e(e){return JSON.stringify(e,function(e,r){var t=true,n=false,o=undefined;try{for(var a=Object.keys(rv)[Symbol.iterator](),i;!(t=(i=a.next()).done);t=true){var l=i.value;var s=rv[l];if(s.is(r))return s.serialize(r)}}catch(e){n=true;o=e}finally{try{if(!t&&a.return!=null){a.return()}}finally{if(n){throw o}}}return r})},deserialize:function e(e){return JSON.parse(e,function(e,r){if(r&&(typeof r==="undefined"?"undefined":C(r))=="object"&&"__type"in r&&typeof r.__type=="string"){var t=r.__type,n=rv[t];if(n)return n.deserialize(r.value)}return r})}};import r_ from"localforage";var rA={get:function e(e){return a(function(){var r;return D(this,function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);return[4,r_.getItem(e)];case 1:return[2,t.sent()];case 2:r=t.sent();return[2,eg(r,{returnValue:null})];case 3:return[2]}})})()},set:function e(e,r){return a(function(){var t;return D(this,function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,r_.setItem(e,r)];case 1:n.sent();return[3,3];case 2:t=n.sent();eg(t);return[3,3];case 3:return[2]}})})()},remove:function e(e){return a(function(){var r;return D(this,function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);return[4,r_.removeItem(e)];case 1:t.sent();return[3,3];case 2:r=t.sent();eg(r);return[3,3];case 3:return[2]}})})()},keys:function e(){return a(function(){var e,r;return D(this,function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);return[4,r_.keys()];case 1:return[2,(e=t.sent())!==null&&e!==void 0?e:[]];case 2:r=t.sent();return[2,eg(r,{returnValue:[]})];case 3:return[2]}})})()}};function rO(e,r){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:rS;var n=g(rp(r),2),o=n[0],i=n[1],l=g(rp(!1),2),s=l[0],u=l[1];rd(function(){var n=!0;return M(function(){return a(function(){var o,a,l,s;return D(this,function(c){switch(c.label){case 0:c.trys.push([0,6,7,8]);return[4,rA.get(e)];case 1:o=c.sent();if(!n)return[3,5];if(!(o!==null))return[3,2];a=t.deserialize(o);i(a);return[3,5];case 2:if(!(r!==void 0))return[3,4];l=t.serialize(r);return[4,rA.set(e,l)];case 3:c.sent(),i(r);return[3,5];case 4:i(void 0);c.label=5;case 5:return[3,8];case 6:s=c.sent();eg(s),n&&i(r);return[3,8];case 7:n&&u(!0);return[7];case 8:return[2]}})})()},"loadValue")(),function(){n=!1,u(!1)}},[e,r,t]),rd(function(){if(!s)return;M(function(){return a(function(){var r,n;return D(this,function(a){switch(a.label){case 0:a.trys.push([0,3,,4]);if(!(o!==void 0))return[3,2];r=t.serialize(o);return[4,rA.set(e,r)];case 1:a.sent();a.label=2;case 2:return[3,4];case 3:n=a.sent();eg(n);return[3,4];case 4:return[2]}})})()},"saveValue")()},[o,e,t,s]);var c=rm(function(e){i(function(r){return typeof e=="function"?e(r):e})},[]),E=rm(function(){return a(function(){var r;return D(this,function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);return[4,rA.remove(e)];case 1:t.sent(),i(void 0);return[3,3];case 2:r=t.sent();eg(r);return[3,3];case 3:return[2]}})})()},[e]);return{value:o,set:c,remove:E}}M(rO,"useStorage");function rh(e){var r=e.children;return rE.createElement(rE.Fragment,null,r)}M(rh,"LanguageWrapperBase");var ry=rc(rh);function rg(e){var r=e.children,t=e.languages,n=e.messages;var o=rO("lang",t[0]),a=o.value,i=o.set,l=rf(function(){return{languages:t,currentLanguage:a!==null&&a!==void 0?a:rr,setCurrentLanguage:i}},[t,i,a]);return rE.createElement(rn,{value:l},rE.createElement(ry,{languages:t,messages:n},r))}M(rg,"NextIntlProvider");export{en as ApolloClientContext,eo as ApolloClientProvider,z as ApolloErrorComponent,F as ApolloErrorContext,Z as ApolloErrorProvider,eR as ApolloProvider,eb as GRAPHQL_URI_DEFAULT,e0 as Loading,e2 as LoadingContext,e9 as LoadingProvider,rr as NEXT_INTL_DEFAULT_LANGUAGE,rn as NextIntlContext,rg as NextIntlProvider,ee as Toaster,eg as catchError,eD as getClient,eW as initI18next,ey as log,X as setGlobalApolloErrorCallback,K as showGlobalApolloError,rA as storage,$ as toast,eM as useApolloClient,H as useApolloError,eL as useBackgroundQuery,ew as useFragment,eG as useLazyQuery,eP as useLoadableQuery,e3 as useLoading,ek as useMutation,rs as useNextIntl,eU as useQuery,ex as useQueryRefHandlers,eQ as useReactiveVar,eF as useReadQuery,rO as useStorage,ej as useSubscription,ez as useSuspenseFragment,eq as useSuspenseQuery,eB as useTranslateI18next,ru as useTranslateNextIntl,rc as withNextIntl};
|
|
1
|
+
function e(e,r){if(r==null||r>e.length)r=e.length;for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function r(e){if(Array.isArray(e))return e}function t(r){if(Array.isArray(r))return e(r)}function n(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function o(e,r,t,n,o,a,i){try{var u=e[a](i);var s=u.value}catch(e){t(e);return}if(u.done){r(s)}else{Promise.resolve(s).then(n,o)}}function a(e){return function(){var r=this,t=arguments;return new Promise(function(n,a){var i=e.apply(r,t);function u(e){o(i,n,a,u,s,"next",e)}function s(e){o(i,n,a,u,s,"throw",e)}u(undefined)})}}function i(e,r,t){r=E(r);return A(e,N()?Reflect.construct(r,t||[],E(e).constructor):r.apply(e,t))}function u(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function s(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||false;n.configurable=true;if("value"in n)n.writable=true;Object.defineProperty(e,n.key,n)}}function l(e,r,t){if(r)s(e.prototype,r);if(t)s(e,t);return e}function c(e,r,t){if(r in e){Object.defineProperty(e,r,{value:t,enumerable:true,configurable:true,writable:true})}else{e[r]=t}return e}function E(e){E=Object.setPrototypeOf?Object.getPrototypeOf:function e(e){return e.__proto__||Object.getPrototypeOf(e)};return E(e)}function f(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function")}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:true,configurable:true}});if(r)y(e,r)}function d(e,r){if(r!=null&&typeof Symbol!=="undefined"&&r[Symbol.hasInstance]){return!!r[Symbol.hasInstance](e)}else{return e instanceof r}}function m(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function p(e,r){var t=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t==null)return;var n=[];var o=true;var a=false;var i,u;try{for(t=t.call(e);!(o=(i=t.next()).done);o=true){n.push(i.value);if(r&&n.length===r)break}}catch(e){a=true;u=e}finally{try{if(!o&&t["return"]!=null)t["return"]()}finally{if(a)throw u}}return n}function v(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function S(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function O(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};var n=Object.keys(t);if(typeof Object.getOwnPropertySymbols==="function"){n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))}n.forEach(function(r){c(e,r,t[r])})}return e}function _(e,r){if(e==null)return{};var t=h(e,r);var n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++){n=a[o];if(r.indexOf(n)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,n))continue;t[n]=e[n]}}return t}function h(e,r){if(e==null)return{};var t={};var n=Object.keys(e);var o,a;for(a=0;a<n.length;a++){o=n[a];if(r.indexOf(o)>=0)continue;t[o]=e[o]}return t}function A(e,r){if(r&&(T(r)==="object"||typeof r==="function")){return r}return n(e)}function y(e,r){y=Object.setPrototypeOf||function e(e,r){e.__proto__=r;return e};return y(e,r)}function g(e,t){return r(e)||p(e,t)||C(e,t)||v()}function b(e){return t(e)||m(e)||C(e)||S()}function T(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function C(r,t){if(!r)return;if(typeof r==="string")return e(r,t);var n=Object.prototype.toString.call(r).slice(8,-1);if(n==="Object"&&r.constructor)n=r.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(r,t)}function N(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(N=function(){return!!e})()}function D(e,r){var t,n,o,a={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return i.next=u(0),i["throw"]=u(1),i["return"]=u(2),typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function u(e){return function(r){return s([e,r])}}function s(u){if(t)throw new TypeError("Generator is already executing.");while(i&&(i=0,u[0]&&(a=0)),a)try{if(t=1,n&&(o=u[0]&2?n["return"]:u[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;if(n=0,o)u=[u[0]&2,o.value];switch(u[0]){case 0:case 1:o=u;break;case 4:a.label++;return{value:u[1],done:false};case 5:a.label++;n=u[1];u=[0];continue;case 7:u=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){a=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(u[0]===6&&a.label<o[1]){a.label=o[1];o=u;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(u);break}if(o[2])a.ops.pop();a.trys.pop();continue}u=r.call(e,a)}catch(e){u=[6,e];n=0}finally{t=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}}var R=Object.defineProperty;var I=function(e,r,t){return r in e?R(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t};var L=function(e,r){return R(e,"name",{value:r,configurable:!0})};var M=function(e,r,t){return I(e,(typeof r==="undefined"?"undefined":T(r))!="symbol"?r+"":r,t)};import{ApolloProvider as w}from"@apollo/client/react/react.cjs";import G,{useMemo as P}from"react";import k,{use as U}from"react";import{createContext as x}from"react";var Q=x(void 0);var F={"modal-backdrop":"_modal-backdrop_8fveh_1","modal-content":"_modal-content_8fveh_11","btn-close":"_btn-close_8fveh_22","error-title":"_error-title_8fveh_36","btn-retry":"_btn-retry_8fveh_41","error-details":"_error-details_8fveh_54",main:"_main_8fveh_72",network:"_network_8fveh_75",extra:"_extra_8fveh_78"};function j(){var e=U(Q),r=e===null||e===void 0?void 0:e.error;if(!r)return null;var t=L(function(e,r){return(r===null||r===void 0?void 0:r.length)?k.createElement("div",null,k.createElement("strong",null,e,":"),k.createElement("ul",null,r.map(function(e){return k.createElement("li",{key:e.message},e.message)}))):null},"renderErrorList");return k.createElement("div",{className:F["modal-backdrop"]},k.createElement("div",{className:F["modal-content"]},k.createElement("button",{type:"button",className:F["btn-close"],onClick:e.hideError},"✕"),k.createElement("div",{className:F["error-title"]},k.createElement("button",{type:"button",className:F["btn-retry"],onClick:L(function(){return window.location.reload()},"onClick")},"Reload")," ",r.message),k.createElement("div",{className:F["error-details"]},r.networkError&&k.createElement("pre",{className:"network"},k.createElement("strong",null,"Network Error:")," ",r.networkError.message),t("GraphQL Errors",b(r.graphQLErrors)),t("Protocol Errors",b(r.protocolErrors)),t("Client Errors",b(r.clientErrors)),r.extraInfo&&k.createElement("pre",{className:"extra"},k.createElement("strong",null,"Extra Info:")," ",JSON.stringify(r.extraInfo,null,4)))))}L(j,"ApolloErrorComponent");import{use as z}from"react";function q(){var e=z(Q);if(!e)throw new Error("useApolloError must be used within ApolloErrorProvider");return e}L(q,"useApolloError");import H,{useEffect as V,useMemo as B,useState as Y}from"react";var W=null;function K(e){W=e}L(K,"setGlobalApolloErrorCallback");function J(e){W===null||W===void 0?void 0:W(e)}L(J,"showGlobalApolloError");function X(e){var r=e.children;var t=g(Y(null),2),n=t[0],o=t[1];V(function(){K(o)},[]);var a=B(function(){return{error:n,showError:o,hideError:L(function(){return o(null)},"hideError")}},[n]);return H.createElement(Q,{value:a},r)}L(X,"ApolloErrorProvider");import{toast as Z,Toaster as $}from"react-hot-toast";import ee,{createContext as er}from"react";var et=er(null);function en(e){var r=e.client,t=e.children;return ee.createElement(et,{value:r},t)}L(en,"ApolloClientProvider");import{ApolloClient as eo,ApolloError as ea,InMemoryCache as ei}from"@apollo/client/core/core.cjs";import{ApolloLink as eu,from as es,split as el}from"@apollo/client/link/core/core.cjs";import{onError as ec}from"@apollo/client/link/error/error.cjs";import{HttpLink as eE}from"@apollo/client/link/http/http.cjs";import{removeTypenameFromVariables as ef}from"@apollo/client/link/remove-typename/remove-typename.cjs";import{GraphQLWsLink as ed}from"@apollo/client/link/subscriptions/subscriptions.cjs";import{getMainDefinition as em}from"@apollo/client/utilities/utilities.cjs";import{createClient as ep}from"graphql-ws";import ev from"react";import{consola as eS}from"consola/browser";var eO={GRAPHQL_PARSE_FAILED:{CODE:"GRAPHQL_PARSE_FAILED",MESSAGE:"The GraphQL operation string contains a syntax error."},GRAPHQL_VALIDATION_FAILED:{CODE:"GRAPHQL_VALIDATION_FAILED",MESSAGE:"The GraphQL operation is not valid against the server's schema."},BAD_USER_INPUT:{CODE:"BAD_USER_INPUT",MESSAGE:"The GraphQL operation includes an invalid value for a field argument."},PERSISTED_QUERY_NOT_FOUND:{CODE:"PERSISTED_QUERY_NOT_FOUND",MESSAGE:"A client sent the hash of a query string to execute via automatic persisted queries, but the query was not in the APQ cache."},PERSISTED_QUERY_NOT_SUPPORTED:{CODE:"PERSISTED_QUERY_NOT_SUPPORTED",MESSAGE:"A client sent the hash of a query string to execute via automatic persisted queries, but the server has disabled APQ."},OPERATION_RESOLUTION_FAILURE:{CODE:"OPERATION_RESOLUTION_FAILURE",MESSAGE:"The request was parsed successfully and is valid against the server's schema, but the server couldn't resolve which operation to run. This occurs when a request containing multiple named operations doesn't specify which operation to run (i.e.,operationName), or if the named operation isn't included in the request."},CONTINUE:{CODE:100,MESSAGE:"Continue"},SWITCHING_PROTOCOLS:{CODE:101,MESSAGE:"Switching Protocols"},PROCESSING:{CODE:102,MESSAGE:"Processing"},OK:{CODE:200,MESSAGE:"OK"},CREATED:{CODE:201,MESSAGE:"Created"},ACCEPTED:{CODE:202,MESSAGE:"Accepted"},NON_AUTHORITATIVE_INFORMATION:{CODE:203,MESSAGE:"Non Authoritative Information"},NO_CONTENT:{CODE:204,MESSAGE:"No Content"},RESET_CONTENT:{CODE:205,MESSAGE:"Reset Content"},PARTIAL_CONTENT:{CODE:206,MESSAGE:"Partial Content"},MULTI_STATUS:{CODE:207,MESSAGE:"Multi-Status"},MULTIPLE_CHOICES:{CODE:300,MESSAGE:"Multiple Choices"},MOVED_PERMANENTLY:{CODE:301,MESSAGE:"Moved Permanently"},MOVED_TEMPORARILY:{CODE:302,MESSAGE:"Moved Temporarily"},SEE_OTHER:{CODE:303,MESSAGE:"See Other"},NOT_MODIFIED:{CODE:304,MESSAGE:"Not Modified"},USE_PROXY:{CODE:305,MESSAGE:"Use Proxy"},TEMPORARY_REDIRECT:{CODE:307,MESSAGE:"Temporary Redirect"},PERMANENT_REDIRECT:{CODE:308,MESSAGE:"Permanent Redirect"},BAD_REQUEST:{CODE:400,MESSAGE:"Bad Request"},UNAUTHORIZED:{CODE:401,MESSAGE:"Unauthorized"},PAYMENT_REQUIRED:{CODE:402,MESSAGE:"Payment Required"},FORBIDDEN:{CODE:403,MESSAGE:"Forbidden"},NOT_FOUND:{CODE:404,MESSAGE:"Not Found"},METHOD_NOT_ALLOWED:{CODE:405,MESSAGE:"Method Not Allowed"},NOT_ACCEPTABLE:{CODE:406,MESSAGE:"Not Acceptable"},PROXY_AUTHENTICATION_REQUIRED:{CODE:407,MESSAGE:"Proxy Authentication Required"},REQUEST_TIMEOUT:{CODE:408,MESSAGE:"Request Timeout"},CONFLICT:{CODE:409,MESSAGE:"Conflict"},GONE:{CODE:410,MESSAGE:"Gone"},LENGTH_REQUIRED:{CODE:411,MESSAGE:"Length Required"},PRECONDITION_FAILED:{CODE:412,MESSAGE:"Precondition Failed"},REQUEST_TOO_LONG:{CODE:413,MESSAGE:"Request Entity Too Large"},REQUEST_URI_TOO_LONG:{CODE:414,MESSAGE:"Request-URI Too Long"},UNSUPPORTED_MEDIA_TYPE:{CODE:415,MESSAGE:"Unsupported Media Type"},REQUESTED_RANGE_NOT_SATISFIABLE:{CODE:416,MESSAGE:"Requested Range Not Satisfiable"},EXPECTATION_FAILED:{CODE:417,MESSAGE:"Expectation Failed"},IM_A_TEAPOT:{CODE:418,MESSAGE:"I'm a teapot"},INSUFFICIENT_SPACE_ON_RESOURCE:{CODE:419,MESSAGE:"Insufficient Space on Resource"},METHOD_FAILURE:{CODE:420,MESSAGE:"Method Failure"},MISDIRECTED_REQUEST:{CODE:421,MESSAGE:"Misdirected Request"},UNPROCESSABLE_ENTITY:{CODE:422,MESSAGE:"Unprocessable Entity"},LOCKED:{CODE:423,MESSAGE:"Locked"},FAILED_DEPENDENCY:{CODE:424,MESSAGE:"Failed Dependency"},PRECONDITION_REQUIRED:{CODE:428,MESSAGE:"Precondition Required"},TOO_MANY_REQUESTS:{CODE:429,MESSAGE:"Too Many Requests"},REQUEST_HEADER_FIELDS_TOO_LARGE:{CODE:431,MESSAGE:"Request Header Fields Too Large"},UNAVAILABLE_FOR_LEGAL_REASONS:{CODE:451,MESSAGE:"Unavailable For Legal Reasons"},INTERNAL_SERVER_ERROR:{CODE:500,MESSAGE:"Internal Server Error"},NOT_IMPLEMENTED:{CODE:501,MESSAGE:"Not Implemented"},BAD_GATEWAY:{CODE:502,MESSAGE:"Bad Gateway"},SERVICE_UNAVAILABLE:{CODE:503,MESSAGE:"Service Unavailable"},GATEWAY_TIMEOUT:{CODE:504,MESSAGE:"Gateway Timeout"},HTTP_VERSION_NOT_SUPPORTED:{CODE:505,MESSAGE:"HTTP Version Not Supported"},INSUFFICIENT_STORAGE:{CODE:507,MESSAGE:"Insufficient Storage"},NETWORK_AUTHENTICATION_REQUIRED:{CODE:511,MESSAGE:"Network Authentication Required"}};var e_={silent:eS.silent,level:eS.level,fatal:eS.fatal,error:eS.error,warn:eS.warn,log:eS.log,info:eS.info,success:eS.success,ready:eS.ready,start:eS.start,box:eS.box,debug:eS.debug,trace:eS.trace,verbose:eS.verbose};function eh(e,r){var t=r!==null&&r!==void 0?r:{},n=t.shouldLog,o=n===void 0?!0:n,a=t.returnValue,i=t.callback,u=d(e,Error)?e:new Error(typeof e=="string"?e:"Unknown error");return o&&e_.error(u.message),i&&typeof i=="function"&&i(u),a||{success:!1,message:u.message,code:eO.INTERNAL_SERVER_ERROR.CODE}}L(eh,"catchError");var eA="/graphql";var ey=/*#__PURE__*/function(e){"use strict";f(r,e);function r(){u(this,r);var e;e=i(this,r,arguments);M(e,"count",0);return e}l(r,[{key:"request",value:function e(e,r){var t=this;var n=Date.now();return this.count+=1,r(e).map(function(r){var o=Date.now()-n,a=e.operationName||"Unnamed";return e_.info("[Apollo] #".concat(t.count,": ").concat(a," (").concat(o,"ms)")),r})}}]);return r}(eu);L(ey,"DevLoggerLink");var eg=ey;function eb(e){var r=e.uri,t=e.wsUrl,n=e.customLinks,o=new eg,a=ec(function(e){var r=e.graphQLErrors,t=e.networkError,n=e.protocolErrors,o=e.operation;var a=(o===null||o===void 0?void 0:o.operationName)||"Unknown";if(r&&r.forEach(function(e){var r=e.message,t=e.locations,n=e.path;e_.error("[GraphQL error] ".concat(a,": ").concat(r,", Location: ").concat(JSON.stringify(t,null,4),", Path: ").concat(n))}),n&&n.forEach(function(e){var r=e.message,t=e.extensions;e_.error("[Protocol error]: ".concat(r,", Extensions: ").concat(JSON.stringify(t,null,4)))}),t&&e_.error("[Network error]: ".concat(t)),r||n||t){var i,u;var s=(r===null||r===void 0?void 0:(i=r[0])===null||i===void 0?void 0:i.message)||(n===null||n===void 0?void 0:(u=n[0])===null||u===void 0?void 0:u.message)||(t===null||t===void 0?void 0:t.message)||"Unexpected error",l=new ea({graphQLErrors:r||[],protocolErrors:n||[],clientErrors:[],networkError:t||null,errorMessage:s,extraInfo:{operation:o}});Z.error(function(e){return ev.createElement(ev.Fragment,null,s,"\xa0",ev.createElement("button",{type:"button",onClick:L(function(){setTimeout(function(){J(l)},0),Z.dismiss(e.id)},"onClick")},"Show Details"))})}}),i=ef();r||e_.warn('[Apollo] No GraphQL URI provided — using "'.concat(eA,'" as default'));var u=new eE({uri:r!==null&&r!==void 0?r:eA,credentials:"include"}),s=t?new ed(ep({url:t})):eu.empty(),l=d(s,eu)?el(function(e){var r=e.query;var t=em(r);return t.kind==="OperationDefinition"&&t.operation==="subscription"},s,u):u;return l===u&&t&&e_.warn("[Apollo] WS URL is set, but subscriptions fallback to HTTP. Check your wsLink config."),[o,a,i].concat(b(n!==null&&n!==void 0?n:[]),[l])}L(eb,"createApolloLinks");function eT(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var r=es(eb(e));return new eo(O({link:r,cache:new ei},e))}L(eT,"getClient");function eC(e){var r=e.options,t=e.children;var n=P(function(){return eT(r||{})},[r]);return G.createElement(G.Fragment,null,G.createElement(X,null,G.createElement(en,{client:n},G.createElement(w,{client:n},t)),G.createElement(j,null)),G.createElement($,{position:"top-right"}))}L(eC,"ApolloProvider");import{use as eN}from"react";import{useApolloClient as eD,useBackgroundQuery as eR,useFragment as eI,useLazyQuery as eL,useLoadableQuery as eM,useMutation as ew,useQuery as eG,useQueryRefHandlers as eP,useReactiveVar as ek,useReadQuery as eU,useSubscription as ex,useSuspenseFragment as eQ,useSuspenseQuery as eF}from"@apollo/client/react/hooks/hooks.cjs";import{useTranslation as ej}from"react-i18next";var ez=ej;import eq from"i18next";import{initReactI18next as eH}from"react-i18next";function eV(e){return eq.use(eH).init(e)}L(eV,"initI18next");import eB from"clsx";import eY,{useEffect as eW}from"react";var eK={overlay:"_overlay_1ank4_1",fullscreen:"_fullscreen_1ank4_1",block:"_block_1ank4_2","overlay-fade-in":"_overlay-fade-in_1ank4_1",container:"_container_1ank4_35",ring:"_ring_1ank4_45",rotate1:"_rotate1_1ank4_1",rotate2:"_rotate2_1ank4_1",rotate3:"_rotate3_1ank4_1",rotate4:"_rotate4_1ank4_1",message:"_message_1ank4_69","text-fade":"_text-fade_1ank4_1"};function eJ(){if(document.getElementById("noscroll-style"))return;var e=document.createElement("style");e.id="noscroll-style",e.innerHTML="\n .noscroll {\n overflow: hidden !important;\n height: 100vh !important;\n }\n ",document.head.appendChild(e)}L(eJ,"injectNoScrollStyle");function eX(e){var r=e.full,t=r===void 0?!1:r,n=e.block,o=n===void 0?!1:n,a=e.className,i=a===void 0?"":a,u=e.message,s=u===void 0?"Loading":u,l=_(e,["full","block","className","message"]);eW(function(){if(t){document.body.classList.add("noscroll");var e=L(function(e){return e.preventDefault()},"handleContextMenu");return document.addEventListener("contextmenu",e),function(){document.body.classList.remove("noscroll"),document.removeEventListener("contextmenu",e)}}},[t]),eW(function(){eJ()},[]);function c(){return eY.createElement("div",O({className:eK.container},l),eY.createElement("div",{className:eK.ring}),eY.createElement("div",{className:eK.ring}),eY.createElement("div",{className:eK.ring}),eY.createElement("div",{className:eK.ring}),s&&eY.createElement("div",{className:eK.message},s))}return L(c,"_renderLoading"),t?eY.createElement("div",{className:eB(eK.fullscreen,i)},c()):o?eY.createElement("div",{className:eB(eK.block,i)},c()):c()}L(eX,"Loading");import{createContext as eZ}from"react";var e$=eZ(void 0);import{use as e0}from"react";function e1(){var e=e0(e$);if(!e)throw new Error("useLoading must be used within a LoadingProvider");return e}L(e1,"useLoading");import e2,{useCallback as e4,useMemo as e3,useState as e8}from"react";function e5(e){var r=e.children;var t=g(e8(!1),2),n=t[0],o=t[1],a=g(e8(!1),2),i=a[0],u=a[1],s=e4(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;o(!0),u(e)},[]),l=e4(function(){o(!1),u(!1)},[]),c=e3(function(){return{isLoading:n,isGlobalLoading:i,showLoading:s,hideLoading:l}},[n,i,s,l]);return e2.createElement(e$,{value:c},n?e2.createElement(eX,{full:i}):r)}L(e5,"LoadingProvider");import{enUS as e7}from"date-fns/locale";var e6={label:"English",value:"en",flag:"\uD83C\uDDFA\uD83C\uDDF8",adapterLocale:e7,icon:"flagpack:gb-nir",numberFormat:{code:"en-US",currency:"USD"},timezone:"America/New_York"};import{createContext as e9}from"react";var re=e9(void 0);import{NextIntlClientProvider as rr}from"next-intl";import rt from"react";import{useTranslations as rn}from"next-intl";import{use as ro}from"react";function ra(){var e=ro(re);if(!e)throw new Error("useNextIntl must be used within a NextIntlProvider");return e}L(ra,"useNextIntl");var ri=rn;function ru(e){var r=L(function(r){var t;var n;var o=ra(),a=o.currentLanguage,i=r.messages,u=r.languages,s="en",l=i[(a===null||a===void 0?void 0:a.value)||s],c=(n=(t=u.find(function(e){return e.value===(a===null||a===void 0?void 0:a.value)}))===null||t===void 0?void 0:t.timezone)!==null&&n!==void 0?n:e6.timezone;return i?rt.createElement(rr,{locale:(a===null||a===void 0?void 0:a.value)||s,messages:l||null,timeZone:c},rt.createElement(e,r)):(e_.warn("Missing messages for language: ".concat((a===null||a===void 0?void 0:a.value)||s)),null)},"PageWithI18n");return r.displayName="withNextIntl(".concat(e.displayName||e.name||"Component",")"),r}L(ru,"withNextIntl");import rs,{useMemo as rl}from"react";import{useCallback as rc,useEffect as rE,useState as rf}from"react";var rd={Date:{is:L(function(e){return d(e,Date)},"is"),serialize:L(function(e){return{__type:"Date",value:e.toISOString()}},"serialize"),deserialize:L(function(e){return new Date(e)},"deserialize")},Map:{is:L(function(e){return d(e,Map)},"is"),serialize:L(function(e){return{__type:"Map",value:Array.from(e.entries())}},"serialize"),deserialize:L(function(e){return new Map(e)},"deserialize")},Set:{is:L(function(e){return d(e,Set)},"is"),serialize:L(function(e){return{__type:"Set",value:Array.from(e)}},"serialize"),deserialize:L(function(e){return new Set(e)},"deserialize")},RegExp:{is:L(function(e){return d(e,RegExp)},"is"),serialize:L(function(e){return{__type:"RegExp",value:{source:e.source,flags:e.flags}}},"serialize"),deserialize:L(function(e){var r=e.source,t=e.flags;return new RegExp(r,t)},"deserialize")},BigInt:{is:L(function(e){return(typeof e==="undefined"?"undefined":T(e))=="bigint"},"is"),serialize:L(function(e){return{__type:"BigInt",value:e.toString()}},"serialize"),deserialize:L(function(e){return BigInt(e)},"deserialize")}},rm={serialize:function e(e){return JSON.stringify(e,function(e,r){var t=true,n=false,o=undefined;try{for(var a=Object.keys(rd)[Symbol.iterator](),i;!(t=(i=a.next()).done);t=true){var u=i.value;var s=rd[u];if(s.is(r))return s.serialize(r)}}catch(e){n=true;o=e}finally{try{if(!t&&a.return!=null){a.return()}}finally{if(n){throw o}}}return r})},deserialize:function e(e){return JSON.parse(e,function(e,r){if(r&&(typeof r==="undefined"?"undefined":T(r))=="object"&&"__type"in r&&typeof r.__type=="string"){var t=r.__type,n=rd[t];if(n)return n.deserialize(r.value)}return r})}};import rp from"localforage";var rv={get:function e(e){return a(function(){var r;return D(this,function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);return[4,rp.getItem(e)];case 1:return[2,t.sent()];case 2:r=t.sent();return[2,eh(r,{returnValue:null})];case 3:return[2]}})})()},set:function e(e,r){return a(function(){var t;return D(this,function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,rp.setItem(e,r)];case 1:n.sent();return[3,3];case 2:t=n.sent();eh(t);return[3,3];case 3:return[2]}})})()},remove:function e(e){return a(function(){var r;return D(this,function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);return[4,rp.removeItem(e)];case 1:t.sent();return[3,3];case 2:r=t.sent();eh(r);return[3,3];case 3:return[2]}})})()},keys:function e(){return a(function(){var e,r;return D(this,function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);return[4,rp.keys()];case 1:return[2,(e=t.sent())!==null&&e!==void 0?e:[]];case 2:r=t.sent();return[2,eh(r,{returnValue:[]})];case 3:return[2]}})})()}};function rS(e,r){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:rm;var n=g(rf(r),2),o=n[0],i=n[1],u=g(rf(!1),2),s=u[0],l=u[1];rE(function(){var n=!0;return L(function(){return a(function(){var o,a,u,s;return D(this,function(c){switch(c.label){case 0:c.trys.push([0,6,7,8]);return[4,rv.get(e)];case 1:o=c.sent();if(!n)return[3,5];if(!(o!==null))return[3,2];a=t.deserialize(o);i(a);return[3,5];case 2:if(!(r!==void 0))return[3,4];u=t.serialize(r);return[4,rv.set(e,u)];case 3:c.sent(),i(r);return[3,5];case 4:i(void 0);c.label=5;case 5:return[3,8];case 6:s=c.sent();eh(s),n&&i(r);return[3,8];case 7:n&&l(!0);return[7];case 8:return[2]}})})()},"loadValue")(),function(){n=!1,l(!1)}},[e,r,t]),rE(function(){if(!s)return;L(function(){return a(function(){var r,n;return D(this,function(a){switch(a.label){case 0:a.trys.push([0,3,,4]);if(!(o!==void 0))return[3,2];r=t.serialize(o);return[4,rv.set(e,r)];case 1:a.sent();a.label=2;case 2:return[3,4];case 3:n=a.sent();eh(n);return[3,4];case 4:return[2]}})})()},"saveValue")()},[o,e,t,s]);var c=rc(function(e){i(function(r){return typeof e=="function"?e(r):e})},[]),E=rc(function(){return a(function(){var r;return D(this,function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);return[4,rv.remove(e)];case 1:t.sent(),i(void 0);return[3,3];case 2:r=t.sent();eh(r);return[3,3];case 3:return[2]}})})()},[e]);return{value:o,set:c,remove:E}}L(rS,"useStorage");function rO(e){var r=e.children;return rs.createElement(rs.Fragment,null,r)}L(rO,"LanguageWrapperBase");var r_=ru(rO);function rh(e){var r=e.children,t=e.languages,n=e.messages;var o=rS("lang",t[0]),a=o.value,i=o.set,u=rl(function(){return{languages:t,currentLanguage:a!==null&&a!==void 0?a:e6,setCurrentLanguage:i}},[t,i,a]);return rs.createElement(re,{value:u},rs.createElement(r_,{languages:t,messages:n},r))}L(rh,"NextIntlProvider");import rA from"@userback/widget";import{useEffect as ry}from"react";function rg(e){var r=e.token,t=e.options;return ry(function(){if(!r)return;var e;return L(function(){return a(function(){var n,o,a;return D(this,function(i){switch(i.label){case 0:n=t||{},o=n.hide,a=_(n,["hide"]);return[4,rA(r,a)];case 1:i.sent(),o&&o.length>0&&o.forEach(function(e){document.querySelectorAll(e).forEach(function(e){return e.remove()})}),e=new MutationObserver(function(){o&&o.length>0&&o.forEach(function(e){document.querySelectorAll(e).forEach(function(e){return e.remove()})})}),e.observe(document.body,{childList:!0,subtree:!0});return[2]}})})()},"loadUserback")(),function(){e===null||e===void 0?void 0:e.disconnect()}},[r,t]),null}L(rg,"Userback");export{et as ApolloClientContext,en as ApolloClientProvider,j as ApolloErrorComponent,Q as ApolloErrorContext,X as ApolloErrorProvider,eC as ApolloProvider,eg as DevLoggerLink,eA as GRAPHQL_URI_DEFAULT,eX as Loading,e$ as LoadingContext,e5 as LoadingProvider,e6 as NEXT_INTL_DEFAULT_LANGUAGE,re as NextIntlContext,rh as NextIntlProvider,$ as Toaster,rg as Userback,eh as catchError,eb as createApolloLinks,eT as getClient,eV as initI18next,e_ as log,K as setGlobalApolloErrorCallback,J as showGlobalApolloError,rv as storage,Z as toast,eD as useApolloClient,q as useApolloError,eR as useBackgroundQuery,eI as useFragment,eL as useLazyQuery,eM as useLoadableQuery,e1 as useLoading,ew as useMutation,ra as useNextIntl,eG as useQuery,eP as useQueryRefHandlers,ek as useReactiveVar,eU as useReadQuery,rS as useStorage,ex as useSubscription,eQ as useSuspenseFragment,eF as useSuspenseQuery,ez as useTranslateI18next,ri as useTranslateNextIntl,ru as withNextIntl};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e,r,t,n,o,u,c){try{var a=e[u](c);var i=a.value}catch(e){t(e);return}if(a.done){r(i)}else{Promise.resolve(i).then(n,o)}}function r(r){return function(){var t=this,n=arguments;return new Promise(function(o,u){var c=r.apply(t,n);function a(r){e(c,o,u,a,i,"next",r)}function i(r){e(c,o,u,a,i,"throw",r)}a(undefined)})}}function t(e,r){if(e==null)return{};var t=n(e,r);var o,u;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(u=0;u<c.length;u++){o=c[u];if(r.indexOf(o)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,o))continue;t[o]=e[o]}}return t}function n(e,r){if(e==null)return{};var t={};var n=Object.keys(e);var o,u;for(u=0;u<n.length;u++){o=n[u];if(r.indexOf(o)>=0)continue;t[o]=e[o]}return t}function o(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function u(e,r){var t,n,o,u={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},c=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return c.next=a(0),c["throw"]=a(1),c["return"]=a(2),typeof Symbol==="function"&&(c[Symbol.iterator]=function(){return this}),c;function a(e){return function(r){return i([e,r])}}function i(a){if(t)throw new TypeError("Generator is already executing.");while(c&&(c=0,a[0]&&(u=0)),u)try{if(t=1,n&&(o=a[0]&2?n["return"]:a[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;if(n=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:u.label++;return{value:a[1],done:false};case 5:u.label++;n=a[1];a=[0];continue;case 7:a=u.ops.pop();u.trys.pop();continue;default:if(!(o=u.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){u=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(a[0]===6&&u.label<o[1]){u.label=o[1];o=a;break}if(o&&u.label<o[2]){u.label=o[2];u.ops.push(a);break}if(o[2])u.ops.pop();u.trys.pop();continue}a=r.call(e,u)}catch(e){a=[6,e];n=0}finally{t=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}}var c=Object.create;var a=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var f=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty;var b=function(e,r){return a(e,"name",{value:r,configurable:!0})};var v=function(e,r){for(var t in r)a(e,t,{get:r[t],enumerable:!0})},y=function(e,r,t,n){var u=true,c=false,f=undefined;if(r&&(typeof r==="undefined"?"undefined":o(r))=="object"||typeof r=="function")try{var b=function(){var o=y.value;!s.call(e,o)&&o!==t&&a(e,o,{get:function(){return r[o]},enumerable:!(n=i(r,o))||n.enumerable})};for(var v=l(r)[Symbol.iterator](),y;!(u=(y=v.next()).done);u=true)b()}catch(e){c=true;f=e}finally{try{if(!u&&v.return!=null){v.return()}}finally{if(c){throw f}}}return e};var p=function(e,r,t){return t=e!=null?c(f(e)):{},y(r||!e||!e.__esModule?a(t,"default",{value:e,enumerable:!0}):t,e)},d=function(e){return y(a({},"__esModule",{value:!0}),e)};var h={};v(h,{Userback:function(){return w}});module.exports=d(h);var m=p(require("@userback/widget"),1),O=require("react");function w(e){var n=e.token,o=e.options;return(0,O.useEffect)(function(){if(!n)return;var e;return b(function(){return r(function(){var r,c;return u(this,function(u){switch(u.label){case 0:r=o.hide,
|
|
1
|
+
"use strict";function e(e,r,t,n,o,u,c){try{var a=e[u](c);var i=a.value}catch(e){t(e);return}if(a.done){r(i)}else{Promise.resolve(i).then(n,o)}}function r(r){return function(){var t=this,n=arguments;return new Promise(function(o,u){var c=r.apply(t,n);function a(r){e(c,o,u,a,i,"next",r)}function i(r){e(c,o,u,a,i,"throw",r)}a(undefined)})}}function t(e,r){if(e==null)return{};var t=n(e,r);var o,u;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(u=0;u<c.length;u++){o=c[u];if(r.indexOf(o)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,o))continue;t[o]=e[o]}}return t}function n(e,r){if(e==null)return{};var t={};var n=Object.keys(e);var o,u;for(u=0;u<n.length;u++){o=n[u];if(r.indexOf(o)>=0)continue;t[o]=e[o]}return t}function o(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function u(e,r){var t,n,o,u={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},c=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return c.next=a(0),c["throw"]=a(1),c["return"]=a(2),typeof Symbol==="function"&&(c[Symbol.iterator]=function(){return this}),c;function a(e){return function(r){return i([e,r])}}function i(a){if(t)throw new TypeError("Generator is already executing.");while(c&&(c=0,a[0]&&(u=0)),u)try{if(t=1,n&&(o=a[0]&2?n["return"]:a[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;if(n=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:u.label++;return{value:a[1],done:false};case 5:u.label++;n=a[1];a=[0];continue;case 7:a=u.ops.pop();u.trys.pop();continue;default:if(!(o=u.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){u=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(a[0]===6&&u.label<o[1]){u.label=o[1];o=a;break}if(o&&u.label<o[2]){u.label=o[2];u.ops.push(a);break}if(o[2])u.ops.pop();u.trys.pop();continue}a=r.call(e,u)}catch(e){a=[6,e];n=0}finally{t=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}}var c=Object.create;var a=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var f=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty;var b=function(e,r){return a(e,"name",{value:r,configurable:!0})};var v=function(e,r){for(var t in r)a(e,t,{get:r[t],enumerable:!0})},y=function(e,r,t,n){var u=true,c=false,f=undefined;if(r&&(typeof r==="undefined"?"undefined":o(r))=="object"||typeof r=="function")try{var b=function(){var o=y.value;!s.call(e,o)&&o!==t&&a(e,o,{get:function(){return r[o]},enumerable:!(n=i(r,o))||n.enumerable})};for(var v=l(r)[Symbol.iterator](),y;!(u=(y=v.next()).done);u=true)b()}catch(e){c=true;f=e}finally{try{if(!u&&v.return!=null){v.return()}}finally{if(c){throw f}}}return e};var p=function(e,r,t){return t=e!=null?c(f(e)):{},y(r||!e||!e.__esModule?a(t,"default",{value:e,enumerable:!0}):t,e)},d=function(e){return y(a({},"__esModule",{value:!0}),e)};var h={};v(h,{Userback:function(){return w}});module.exports=d(h);var m=p(require("@userback/widget"),1),O=require("react");function w(e){var n=e.token,o=e.options;return(0,O.useEffect)(function(){if(!n)return;var e;return b(function(){return r(function(){var r,c,a;return u(this,function(u){switch(u.label){case 0:r=o||{},c=r.hide,a=t(r,["hide"]);return[4,(0,m.default)(n,a)];case 1:u.sent(),c&&c.length>0&&c.forEach(function(e){document.querySelectorAll(e).forEach(function(e){return e.remove()})}),e=new MutationObserver(function(){c&&c.length>0&&c.forEach(function(e){document.querySelectorAll(e).forEach(function(e){return e.remove()})})}),e.observe(document.body,{childList:!0,subtree:!0});return[2]}})})()},"loadUserback")(),function(){e===null||e===void 0?void 0:e.disconnect()}},[n,o]),null}b(w,"Userback");0&&(module.exports={Userback:Userback});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Userback } from '../../_tsup-dts-rollup.cjs';
|
|
2
|
-
export { I_UserBackOptions } from '../../_tsup-dts-rollup.cjs';
|
|
3
|
-
export { I_UserBackProps } from '../../_tsup-dts-rollup.cjs';
|
|
1
|
+
export { Userback_alias_1 as Userback } from '../../_tsup-dts-rollup.cjs';
|
|
2
|
+
export { I_UserBackOptions_alias_1 as I_UserBackOptions } from '../../_tsup-dts-rollup.cjs';
|
|
3
|
+
export { I_UserBackProps_alias_1 as I_UserBackProps } from '../../_tsup-dts-rollup.cjs';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Userback } from '../../_tsup-dts-rollup.js';
|
|
2
|
-
export { I_UserBackOptions } from '../../_tsup-dts-rollup.js';
|
|
3
|
-
export { I_UserBackProps } from '../../_tsup-dts-rollup.js';
|
|
1
|
+
export { Userback_alias_1 as Userback } from '../../_tsup-dts-rollup.js';
|
|
2
|
+
export { I_UserBackOptions_alias_1 as I_UserBackOptions } from '../../_tsup-dts-rollup.js';
|
|
3
|
+
export { I_UserBackProps_alias_1 as I_UserBackProps } from '../../_tsup-dts-rollup.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e,r,n,t,o,u,i){try{var c=e[u](i);var a=c.value}catch(e){n(e);return}if(c.done){r(a)}else{Promise.resolve(a).then(t,o)}}function r(r){return function(){var n=this,t=arguments;return new Promise(function(o,u){var i=r.apply(n,t);function c(r){e(i,o,u,c,a,"next",r)}function a(r){e(i,o,u,c,a,"throw",r)}c(undefined)})}}function n(e,r){if(e==null)return{};var n=t(e,r);var o,u;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(u=0;u<i.length;u++){o=i[u];if(r.indexOf(o)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,o))continue;n[o]=e[o]}}return n}function t(e,r){if(e==null)return{};var n={};var t=Object.keys(e);var o,u;for(u=0;u<t.length;u++){o=t[u];if(r.indexOf(o)>=0)continue;n[o]=e[o]}return n}function o(e,r){var n,t,o,u={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return i.next=c(0),i["throw"]=c(1),i["return"]=c(2),typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(e){return function(r){return a([e,r])}}function a(c){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,c[0]&&(u=0)),u)try{if(n=1,t&&(o=c[0]&2?t["return"]:c[0]?t["throw"]||((o=t["return"])&&o.call(t),0):t.next)&&!(o=o.call(t,c[1])).done)return o;if(t=0,o)c=[c[0]&2,o.value];switch(c[0]){case 0:case 1:o=c;break;case 4:u.label++;return{value:c[1],done:false};case 5:u.label++;t=c[1];c=[0];continue;case 7:c=u.ops.pop();u.trys.pop();continue;default:if(!(o=u.trys,o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){u=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){u.label=c[1];break}if(c[0]===6&&u.label<o[1]){u.label=o[1];o=c;break}if(o&&u.label<o[2]){u.label=o[2];u.ops.push(c);break}if(o[2])u.ops.pop();u.trys.pop();continue}c=r.call(e,u)}catch(e){c=[6,e];t=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}}var u=Object.defineProperty;var i=function(e,r){return u(e,"name",{value:r,configurable:!0})};import c from"@userback/widget";import{useEffect as a}from"react";function l(e){var t=e.token,u=e.options;return a(function(){if(!t)return;var e;return i(function(){return r(function(){var r,i;return o(this,function(o){switch(o.label){case 0:r=u.hide,
|
|
1
|
+
function e(e,r,n,t,o,u,i){try{var c=e[u](i);var a=c.value}catch(e){n(e);return}if(c.done){r(a)}else{Promise.resolve(a).then(t,o)}}function r(r){return function(){var n=this,t=arguments;return new Promise(function(o,u){var i=r.apply(n,t);function c(r){e(i,o,u,c,a,"next",r)}function a(r){e(i,o,u,c,a,"throw",r)}c(undefined)})}}function n(e,r){if(e==null)return{};var n=t(e,r);var o,u;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(u=0;u<i.length;u++){o=i[u];if(r.indexOf(o)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,o))continue;n[o]=e[o]}}return n}function t(e,r){if(e==null)return{};var n={};var t=Object.keys(e);var o,u;for(u=0;u<t.length;u++){o=t[u];if(r.indexOf(o)>=0)continue;n[o]=e[o]}return n}function o(e,r){var n,t,o,u={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return i.next=c(0),i["throw"]=c(1),i["return"]=c(2),typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(e){return function(r){return a([e,r])}}function a(c){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,c[0]&&(u=0)),u)try{if(n=1,t&&(o=c[0]&2?t["return"]:c[0]?t["throw"]||((o=t["return"])&&o.call(t),0):t.next)&&!(o=o.call(t,c[1])).done)return o;if(t=0,o)c=[c[0]&2,o.value];switch(c[0]){case 0:case 1:o=c;break;case 4:u.label++;return{value:c[1],done:false};case 5:u.label++;t=c[1];c=[0];continue;case 7:c=u.ops.pop();u.trys.pop();continue;default:if(!(o=u.trys,o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){u=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){u.label=c[1];break}if(c[0]===6&&u.label<o[1]){u.label=o[1];o=c;break}if(o&&u.label<o[2]){u.label=o[2];u.ops.push(c);break}if(o[2])u.ops.pop();u.trys.pop();continue}c=r.call(e,u)}catch(e){c=[6,e];t=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}}var u=Object.defineProperty;var i=function(e,r){return u(e,"name",{value:r,configurable:!0})};import c from"@userback/widget";import{useEffect as a}from"react";function l(e){var t=e.token,u=e.options;return a(function(){if(!t)return;var e;return i(function(){return r(function(){var r,i,a;return o(this,function(o){switch(o.label){case 0:r=u||{},i=r.hide,a=n(r,["hide"]);return[4,c(t,a)];case 1:o.sent(),i&&i.length>0&&i.forEach(function(e){document.querySelectorAll(e).forEach(function(e){return e.remove()})}),e=new MutationObserver(function(){i&&i.length>0&&i.forEach(function(e){document.querySelectorAll(e).forEach(function(e){return e.remove()})})}),e.observe(document.body,{childList:!0,subtree:!0});return[2]}})})()},"loadUserback")(),function(){e===null||e===void 0?void 0:e.disconnect()}},[t,u]),null}i(l,"Userback");export{l as Userback};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e,r,t,n,o,u,c){try{var a=e[u](c);var i=a.value}catch(e){t(e);return}if(a.done){r(i)}else{Promise.resolve(i).then(n,o)}}function r(r){return function(){var t=this,n=arguments;return new Promise(function(o,u){var c=r.apply(t,n);function a(r){e(c,o,u,a,i,"next",r)}function i(r){e(c,o,u,a,i,"throw",r)}a(undefined)})}}function t(e,r){if(e==null)return{};var t=n(e,r);var o,u;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(u=0;u<c.length;u++){o=c[u];if(r.indexOf(o)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,o))continue;t[o]=e[o]}}return t}function n(e,r){if(e==null)return{};var t={};var n=Object.keys(e);var o,u;for(u=0;u<n.length;u++){o=n[u];if(r.indexOf(o)>=0)continue;t[o]=e[o]}return t}function o(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function u(e,r){var t,n,o,u={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},c=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return c.next=a(0),c["throw"]=a(1),c["return"]=a(2),typeof Symbol==="function"&&(c[Symbol.iterator]=function(){return this}),c;function a(e){return function(r){return i([e,r])}}function i(a){if(t)throw new TypeError("Generator is already executing.");while(c&&(c=0,a[0]&&(u=0)),u)try{if(t=1,n&&(o=a[0]&2?n["return"]:a[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;if(n=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:u.label++;return{value:a[1],done:false};case 5:u.label++;n=a[1];a=[0];continue;case 7:a=u.ops.pop();u.trys.pop();continue;default:if(!(o=u.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){u=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(a[0]===6&&u.label<o[1]){u.label=o[1];o=a;break}if(o&&u.label<o[2]){u.label=o[2];u.ops.push(a);break}if(o[2])u.ops.pop();u.trys.pop();continue}a=r.call(e,u)}catch(e){a=[6,e];n=0}finally{t=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}}var c=Object.create;var a=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var f=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty;var b=function(e,r){return a(e,"name",{value:r,configurable:!0})};var v=function(e,r){for(var t in r)a(e,t,{get:r[t],enumerable:!0})},y=function(e,r,t,n){var u=true,c=false,f=undefined;if(r&&(typeof r==="undefined"?"undefined":o(r))=="object"||typeof r=="function")try{var b=function(){var o=y.value;!s.call(e,o)&&o!==t&&a(e,o,{get:function(){return r[o]},enumerable:!(n=i(r,o))||n.enumerable})};for(var v=l(r)[Symbol.iterator](),y;!(u=(y=v.next()).done);u=true)b()}catch(e){c=true;f=e}finally{try{if(!u&&v.return!=null){v.return()}}finally{if(c){throw f}}}return e};var p=function(e,r,t){return t=e!=null?c(f(e)):{},y(r||!e||!e.__esModule?a(t,"default",{value:e,enumerable:!0}):t,e)},d=function(e){return y(a({},"__esModule",{value:!0}),e)};var h={};v(h,{Userback:function(){return w}});module.exports=d(h);var m=p(require("@userback/widget"),1),O=require("react");function w(e){var n=e.token,o=e.options;return(0,O.useEffect)(function(){if(!n)return;var e;return b(function(){return r(function(){var r,c;return u(this,function(u){switch(u.label){case 0:r=o.hide,
|
|
1
|
+
"use strict";function e(e,r,t,n,o,u,c){try{var a=e[u](c);var i=a.value}catch(e){t(e);return}if(a.done){r(i)}else{Promise.resolve(i).then(n,o)}}function r(r){return function(){var t=this,n=arguments;return new Promise(function(o,u){var c=r.apply(t,n);function a(r){e(c,o,u,a,i,"next",r)}function i(r){e(c,o,u,a,i,"throw",r)}a(undefined)})}}function t(e,r){if(e==null)return{};var t=n(e,r);var o,u;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(u=0;u<c.length;u++){o=c[u];if(r.indexOf(o)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,o))continue;t[o]=e[o]}}return t}function n(e,r){if(e==null)return{};var t={};var n=Object.keys(e);var o,u;for(u=0;u<n.length;u++){o=n[u];if(r.indexOf(o)>=0)continue;t[o]=e[o]}return t}function o(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function u(e,r){var t,n,o,u={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},c=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return c.next=a(0),c["throw"]=a(1),c["return"]=a(2),typeof Symbol==="function"&&(c[Symbol.iterator]=function(){return this}),c;function a(e){return function(r){return i([e,r])}}function i(a){if(t)throw new TypeError("Generator is already executing.");while(c&&(c=0,a[0]&&(u=0)),u)try{if(t=1,n&&(o=a[0]&2?n["return"]:a[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;if(n=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:u.label++;return{value:a[1],done:false};case 5:u.label++;n=a[1];a=[0];continue;case 7:a=u.ops.pop();u.trys.pop();continue;default:if(!(o=u.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){u=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(a[0]===6&&u.label<o[1]){u.label=o[1];o=a;break}if(o&&u.label<o[2]){u.label=o[2];u.ops.push(a);break}if(o[2])u.ops.pop();u.trys.pop();continue}a=r.call(e,u)}catch(e){a=[6,e];n=0}finally{t=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}}var c=Object.create;var a=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var f=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty;var b=function(e,r){return a(e,"name",{value:r,configurable:!0})};var v=function(e,r){for(var t in r)a(e,t,{get:r[t],enumerable:!0})},y=function(e,r,t,n){var u=true,c=false,f=undefined;if(r&&(typeof r==="undefined"?"undefined":o(r))=="object"||typeof r=="function")try{var b=function(){var o=y.value;!s.call(e,o)&&o!==t&&a(e,o,{get:function(){return r[o]},enumerable:!(n=i(r,o))||n.enumerable})};for(var v=l(r)[Symbol.iterator](),y;!(u=(y=v.next()).done);u=true)b()}catch(e){c=true;f=e}finally{try{if(!u&&v.return!=null){v.return()}}finally{if(c){throw f}}}return e};var p=function(e,r,t){return t=e!=null?c(f(e)):{},y(r||!e||!e.__esModule?a(t,"default",{value:e,enumerable:!0}):t,e)},d=function(e){return y(a({},"__esModule",{value:!0}),e)};var h={};v(h,{Userback:function(){return w}});module.exports=d(h);var m=p(require("@userback/widget"),1),O=require("react");function w(e){var n=e.token,o=e.options;return(0,O.useEffect)(function(){if(!n)return;var e;return b(function(){return r(function(){var r,c,a;return u(this,function(u){switch(u.label){case 0:r=o||{},c=r.hide,a=t(r,["hide"]);return[4,(0,m.default)(n,a)];case 1:u.sent(),c&&c.length>0&&c.forEach(function(e){document.querySelectorAll(e).forEach(function(e){return e.remove()})}),e=new MutationObserver(function(){c&&c.length>0&&c.forEach(function(e){document.querySelectorAll(e).forEach(function(e){return e.remove()})})}),e.observe(document.body,{childList:!0,subtree:!0});return[2]}})})()},"loadUserback")(),function(){e===null||e===void 0?void 0:e.disconnect()}},[n,o]),null}b(w,"Userback");0&&(module.exports={Userback:Userback});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Userback_alias_2 as Userback } from '../../_tsup-dts-rollup.cjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Userback_alias_2 as Userback } from '../../_tsup-dts-rollup.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e,r,n,t,o,u,i){try{var c=e[u](i);var a=c.value}catch(e){n(e);return}if(c.done){r(a)}else{Promise.resolve(a).then(t,o)}}function r(r){return function(){var n=this,t=arguments;return new Promise(function(o,u){var i=r.apply(n,t);function c(r){e(i,o,u,c,a,"next",r)}function a(r){e(i,o,u,c,a,"throw",r)}c(undefined)})}}function n(e,r){if(e==null)return{};var n=t(e,r);var o,u;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(u=0;u<i.length;u++){o=i[u];if(r.indexOf(o)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,o))continue;n[o]=e[o]}}return n}function t(e,r){if(e==null)return{};var n={};var t=Object.keys(e);var o,u;for(u=0;u<t.length;u++){o=t[u];if(r.indexOf(o)>=0)continue;n[o]=e[o]}return n}function o(e,r){var n,t,o,u={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return i.next=c(0),i["throw"]=c(1),i["return"]=c(2),typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(e){return function(r){return a([e,r])}}function a(c){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,c[0]&&(u=0)),u)try{if(n=1,t&&(o=c[0]&2?t["return"]:c[0]?t["throw"]||((o=t["return"])&&o.call(t),0):t.next)&&!(o=o.call(t,c[1])).done)return o;if(t=0,o)c=[c[0]&2,o.value];switch(c[0]){case 0:case 1:o=c;break;case 4:u.label++;return{value:c[1],done:false};case 5:u.label++;t=c[1];c=[0];continue;case 7:c=u.ops.pop();u.trys.pop();continue;default:if(!(o=u.trys,o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){u=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){u.label=c[1];break}if(c[0]===6&&u.label<o[1]){u.label=o[1];o=c;break}if(o&&u.label<o[2]){u.label=o[2];u.ops.push(c);break}if(o[2])u.ops.pop();u.trys.pop();continue}c=r.call(e,u)}catch(e){c=[6,e];t=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}}var u=Object.defineProperty;var i=function(e,r){return u(e,"name",{value:r,configurable:!0})};import c from"@userback/widget";import{useEffect as a}from"react";function l(e){var t=e.token,u=e.options;return a(function(){if(!t)return;var e;return i(function(){return r(function(){var r,i;return o(this,function(o){switch(o.label){case 0:r=u.hide,
|
|
1
|
+
function e(e,r,n,t,o,u,i){try{var c=e[u](i);var a=c.value}catch(e){n(e);return}if(c.done){r(a)}else{Promise.resolve(a).then(t,o)}}function r(r){return function(){var n=this,t=arguments;return new Promise(function(o,u){var i=r.apply(n,t);function c(r){e(i,o,u,c,a,"next",r)}function a(r){e(i,o,u,c,a,"throw",r)}c(undefined)})}}function n(e,r){if(e==null)return{};var n=t(e,r);var o,u;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(u=0;u<i.length;u++){o=i[u];if(r.indexOf(o)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,o))continue;n[o]=e[o]}}return n}function t(e,r){if(e==null)return{};var n={};var t=Object.keys(e);var o,u;for(u=0;u<t.length;u++){o=t[u];if(r.indexOf(o)>=0)continue;n[o]=e[o]}return n}function o(e,r){var n,t,o,u={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return i.next=c(0),i["throw"]=c(1),i["return"]=c(2),typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(e){return function(r){return a([e,r])}}function a(c){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,c[0]&&(u=0)),u)try{if(n=1,t&&(o=c[0]&2?t["return"]:c[0]?t["throw"]||((o=t["return"])&&o.call(t),0):t.next)&&!(o=o.call(t,c[1])).done)return o;if(t=0,o)c=[c[0]&2,o.value];switch(c[0]){case 0:case 1:o=c;break;case 4:u.label++;return{value:c[1],done:false};case 5:u.label++;t=c[1];c=[0];continue;case 7:c=u.ops.pop();u.trys.pop();continue;default:if(!(o=u.trys,o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){u=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){u.label=c[1];break}if(c[0]===6&&u.label<o[1]){u.label=o[1];o=c;break}if(o&&u.label<o[2]){u.label=o[2];u.ops.push(c);break}if(o[2])u.ops.pop();u.trys.pop();continue}c=r.call(e,u)}catch(e){c=[6,e];t=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}}var u=Object.defineProperty;var i=function(e,r){return u(e,"name",{value:r,configurable:!0})};import c from"@userback/widget";import{useEffect as a}from"react";function l(e){var t=e.token,u=e.options;return a(function(){if(!t)return;var e;return i(function(){return r(function(){var r,i,a;return o(this,function(o){switch(o.label){case 0:r=u||{},i=r.hide,a=n(r,["hide"]);return[4,c(t,a)];case 1:o.sent(),i&&i.length>0&&i.forEach(function(e){document.querySelectorAll(e).forEach(function(e){return e.remove()})}),e=new MutationObserver(function(){i&&i.length>0&&i.forEach(function(e){document.querySelectorAll(e).forEach(function(e){return e.remove()})})}),e.observe(document.body,{childList:!0,subtree:!0});return[2]}})})()},"loadUserback")(),function(){e===null||e===void 0?void 0:e.disconnect()}},[t,u]),null}i(l,"Userback");export{l as Userback};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export { I_UserBackOptions_alias_2 as I_UserBackOptions } from '../../_tsup-dts-rollup.cjs';
|
|
2
|
+
export { I_UserBackProps_alias_2 as I_UserBackProps } from '../../_tsup-dts-rollup.cjs';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export { I_UserBackOptions_alias_2 as I_UserBackOptions } from '../../_tsup-dts-rollup.js';
|
|
2
|
+
export { I_UserBackProps_alias_2 as I_UserBackProps } from '../../_tsup-dts-rollup.js';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyberskill/shared",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.199.0",
|
|
5
5
|
"description": "CyberSkill Shared",
|
|
6
6
|
"author": "Stephen Cheng",
|
|
7
7
|
"license": "MIT",
|
|
@@ -134,6 +134,11 @@
|
|
|
134
134
|
"import": "./dist/react/apollo-client/index.js",
|
|
135
135
|
"require": "./dist/react/apollo-client/index.cjs"
|
|
136
136
|
},
|
|
137
|
+
"./react/apollo-client-nextjs": {
|
|
138
|
+
"types": "./dist/react/apollo-client-nextjs/index.d.ts",
|
|
139
|
+
"import": "./dist/react/apollo-client-nextjs/index.js",
|
|
140
|
+
"require": "./dist/react/apollo-client-nextjs/index.cjs"
|
|
141
|
+
},
|
|
137
142
|
"./react/apollo-error": {
|
|
138
143
|
"types": "./dist/react/apollo-error/index.d.ts",
|
|
139
144
|
"import": "./dist/react/apollo-error/index.js",
|