realibox-ui-sdk 0.0.2
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/README.md +171 -0
- package/custom-elements.json +85 -0
- package/dist/api/index.d.ts +1 -0
- package/dist/api/product/index.d.ts +4 -0
- package/dist/api/product/types/product-search.type.d.ts +84 -0
- package/dist/api.js +1 -0
- package/dist/auth/storage.d.ts +11 -0
- package/dist/auth/types.d.ts +23 -0
- package/dist/auth/validator.d.ts +7 -0
- package/dist/browser.d.ts +1 -0
- package/dist/cn.js +1 -0
- package/dist/components/base/base-element.d.ts +36 -0
- package/dist/components/base/index.d.ts +1 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/product-3d-viewer/index.d.ts +2 -0
- package/dist/components/product-3d-viewer/product-3d-viewer.d.ts +58 -0
- package/dist/components/product-3d-viewer.js +1 -0
- package/dist/components/product-sidebar/index.d.ts +2 -0
- package/dist/components/product-sidebar/product-sidebar.d.ts +108 -0
- package/dist/config.js +1 -0
- package/dist/core/axios/helper.d.ts +8 -0
- package/dist/core/axios/index.d.ts +2 -0
- package/dist/core/cn.d.ts +2 -0
- package/dist/core/config.d.ts +36 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +1 -0
- package/dist/index2.js +34 -0
- package/dist/init.d.ts +4 -0
- package/dist/init.js +1 -0
- package/dist/main.d.ts +0 -0
- package/dist/realibox-ui-sdk.umd.js +34 -0
- package/dist/types/custom-elements.d.ts +7 -0
- package/dist/types/jsx.d.ts +20 -0
- package/dist/types/react-jsx-elements.d.ts +24 -0
- package/dist/vue.d.ts +34 -0
- package/dist/vue.js +1 -0
- package/package.json +87 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).RealiboxUISDK={})}(this,function(e){"use strict";var t=Object.defineProperty,r=(e,r,n)=>((e,r,n)=>r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n)(e,"symbol"!=typeof r?r+"":r,n);const n={development:"https://packvisual-test.realibox.com",production:"https://packvisual.realibox.com"},i={development:"https://packvisual-test.realibox.com/app/mockup_embed_sdk/projects/",production:"https://packvisual.realibox.com/app/mockup_embed_sdk/projects/"},o=class e{constructor(){r(this,"config",{mode:"production"}),r(this,"listeners",new Set)}static getInstance(){return e.instance||(e.instance=new e),e.instance}init(e){const t=e.key?.trim();if(!t)throw new Error("[SDK] initSDK 失败:key 不能为空。");if("development"!==(r=e.mode)&&"production"!==r)throw new Error("[SDK] initSDK 失败:mode 必须为 'development' 或 'production'。");var r;this.config={key:t,mode:e.mode},this.emit()}getConfig(){return{...this.config}}getKey(){return this.config.key}getMode(){return this.config.mode}getApiBaseUrl(){return n[this.getMode()]}getViewerBaseUrl(){return i[this.getMode()]}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}emit(){const e=this.getConfig();for(const t of this.listeners)t(e)}};r(o,"instance",null);const s=o.getInstance();function a(e,t){return{status:e,reason:t,checkedAt:Date.now()}}async function l(e=!1){const t=s.getConfig(),r=t.key?.trim();return r?a("valid","已初始化。"):a("invalid","未检测到 key,请先调用 initSDK({ key, mode })。")}function c(e,t){return function(){return e.apply(t,arguments)}}const{toString:u}=Object.prototype,{getPrototypeOf:d}=Object,{iterator:h,toStringTag:f}=Symbol,p=(e=>t=>{const r=u.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),m=e=>(e=e.toLowerCase(),t=>p(t)===e),g=e=>t=>typeof t===e,{isArray:b}=Array,y=g("undefined");function w(e){return null!==e&&!y(e)&&null!==e.constructor&&!y(e.constructor)&&A(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const v=m("ArrayBuffer"),E=g("string"),A=g("function"),_=g("number"),S=e=>null!==e&&"object"==typeof e,R=e=>{if("object"!==p(e))return!1;const t=d(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||f in e||h in e)},x=m("Date"),O=m("File"),$=m("Blob"),C=m("FileList"),k="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},T=void 0!==k.FormData?k.FormData:void 0,P=m("URLSearchParams"),[N,j,U,B]=["ReadableStream","Request","Response","Headers"].map(m);function L(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,i;if("object"!=typeof e&&(e=[e]),b(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{if(w(e))return;const i=r?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let s;for(n=0;n<o;n++)s=i[n],t.call(null,e[s],s,e)}}function D(e,t){if(w(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n,i=r.length;for(;i-- >0;)if(n=r[i],t===n.toLowerCase())return n;return null}const F="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,M=e=>!y(e)&&e!==F,z=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&d(Uint8Array)),I=m("HTMLFormElement"),H=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),q=m("RegExp"),V=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};L(r,(r,i)=>{let o;!1!==(o=t(r,i,e))&&(n[i]=o||r)}),Object.defineProperties(e,n)},K=m("AsyncFunction"),W=(J="function"==typeof setImmediate,X=A(F.postMessage),J?setImmediate:X?(G=`axios@${Math.random()}`,Z=[],F.addEventListener("message",({source:e,data:t})=>{e===F&&t===G&&Z.length&&Z.shift()()},!1),e=>{Z.push(e),F.postMessage(G,"*")}):e=>setTimeout(e));var J,X,G,Z;const Q="undefined"!=typeof queueMicrotask?queueMicrotask.bind(F):"undefined"!=typeof process&&process.nextTick||W,Y={isArray:b,isArrayBuffer:v,isBuffer:w,isFormData:e=>{let t;return e&&(T&&e instanceof T||A(e.append)&&("formdata"===(t=p(e))||"object"===t&&A(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&v(e.buffer),t},isString:E,isNumber:_,isBoolean:e=>!0===e||!1===e,isObject:S,isPlainObject:R,isEmptyObject:e=>{if(!S(e)||w(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},isReadableStream:N,isRequest:j,isResponse:U,isHeaders:B,isUndefined:y,isDate:x,isFile:O,isReactNativeBlob:e=>!(!e||void 0===e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:$,isRegExp:q,isFunction:A,isStream:e=>S(e)&&A(e.pipe),isURLSearchParams:P,isTypedArray:z,isFileList:C,forEach:L,merge:function e(){const{caseless:t,skipUndefined:r}=M(this)&&this||{},n={},i=(i,o)=>{if("__proto__"===o||"constructor"===o||"prototype"===o)return;const s=t&&D(n,o)||o;R(n[s])&&R(i)?n[s]=e(n[s],i):R(i)?n[s]=e({},i):b(i)?n[s]=i.slice():r&&y(i)||(n[s]=i)};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&L(arguments[o],i);return n},extend:(e,t,r,{allOwnKeys:n}={})=>(L(t,(t,n)=>{r&&A(t)?Object.defineProperty(e,n,{value:c(t,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,n,{value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let i,o,s;const a={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],n&&!n(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==r&&d(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:p,kindOfTest:m,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(b(e))return e;let t=e.length;if(!_(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[h]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:I,hasOwnProperty:H,hasOwnProp:H,reduceDescriptors:V,freezeMethods:e=>{V(e,(t,r)=>{if(A(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];A(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))})},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach(e=>{r[e]=!0})};return b(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:D,global:F,isContextDefined:M,isSpecCompliantForm:function(e){return!!(e&&A(e.append)&&"FormData"===e[f]&&e[h])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(S(e)){if(t.indexOf(e)>=0)return;if(w(e))return e;if(!("toJSON"in e)){t[n]=e;const i=b(e)?[]:{};return L(e,(e,t)=>{const o=r(e,n+1);!y(o)&&(i[t]=o)}),t[n]=void 0,i}}return e};return r(e,0)},isAsyncFn:K,isThenable:e=>e&&(S(e)||A(e))&&A(e.then)&&A(e.catch),setImmediate:W,asap:Q,isIterable:e=>null!=e&&A(e[h])};let ee=class e extends Error{static from(t,r,n,i,o,s){const a=new e(t.message,r||t.code,n,i,o);return a.cause=t,a.name=t.name,null!=t.status&&null==a.status&&(a.status=t.status),s&&Object.assign(a,s),a}constructor(e,t,r,n,i){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Y.toJSONObject(this.config),code:this.code,status:this.status}}};function te(e){return Y.isPlainObject(e)||Y.isArray(e)}function re(e){return Y.endsWith(e,"[]")?e.slice(0,-2):e}function ne(e,t,r){return e?e.concat(t).map(function(e,t){return e=re(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}ee.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",ee.ERR_BAD_OPTION="ERR_BAD_OPTION",ee.ECONNABORTED="ECONNABORTED",ee.ETIMEDOUT="ETIMEDOUT",ee.ERR_NETWORK="ERR_NETWORK",ee.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",ee.ERR_DEPRECATED="ERR_DEPRECATED",ee.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",ee.ERR_BAD_REQUEST="ERR_BAD_REQUEST",ee.ERR_CANCELED="ERR_CANCELED",ee.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",ee.ERR_INVALID_URL="ERR_INVALID_URL";const ie=Y.toFlatObject(Y,{},null,function(e){return/^is[A-Z]/.test(e)});function oe(e,t,r){if(!Y.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=Y.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Y.isUndefined(t[e])})).metaTokens,i=r.visitor||c,o=r.dots,s=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&Y.isSpecCompliantForm(t);if(!Y.isFunction(i))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(Y.isDate(e))return e.toISOString();if(Y.isBoolean(e))return e.toString();if(!a&&Y.isBlob(e))throw new ee("Blob is not supported. Use a Buffer instead.");return Y.isArrayBuffer(e)||Y.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,r,i){let a=e;if(Y.isReactNative(t)&&Y.isReactNativeBlob(e))return t.append(ne(i,r,o),l(e)),!1;if(e&&!i&&"object"==typeof e)if(Y.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(Y.isArray(e)&&function(e){return Y.isArray(e)&&!e.some(te)}(e)||(Y.isFileList(e)||Y.endsWith(r,"[]"))&&(a=Y.toArray(e)))return r=re(r),a.forEach(function(e,n){!Y.isUndefined(e)&&null!==e&&t.append(!0===s?ne([r],n,o):null===s?r:r+"[]",l(e))}),!1;return!!te(e)||(t.append(ne(i,r,o),l(e)),!1)}const u=[],d=Object.assign(ie,{defaultVisitor:c,convertValue:l,isVisitable:te});if(!Y.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!Y.isUndefined(r)){if(-1!==u.indexOf(r))throw Error("Circular reference detected in "+n.join("."));u.push(r),Y.forEach(r,function(r,o){!0===(!(Y.isUndefined(r)||null===r)&&i.call(t,r,Y.isString(o)?o.trim():o,n,d))&&e(r,n?n.concat(o):[o])}),u.pop()}}(e),t}function se(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function ae(e,t){this._pairs=[],e&&oe(e,this,t)}const le=ae.prototype;function ce(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ue(e,t,r){if(!t)return e;const n=r&&r.encode||ce,i=Y.isFunction(r)?{serialize:r}:r,o=i&&i.serialize;let s;if(s=o?o(t,i):Y.isURLSearchParams(t)?t.toString():new ae(t,i).toString(n),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}le.append=function(e,t){this._pairs.push([e,t])},le.toString=function(e){const t=e?function(t){return e.call(this,t,se)}:se;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class de{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Y.forEach(this.handlers,function(t){null!==t&&e(t)})}}const he={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},fe={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ae,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},pe="undefined"!=typeof window&&"undefined"!=typeof document,me="object"==typeof navigator&&navigator||void 0,ge=pe&&(!me||["ReactNative","NativeScript","NS"].indexOf(me.product)<0),be="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ye=pe&&window.location.href||"http://localhost",we={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:pe,hasStandardBrowserEnv:ge,hasStandardBrowserWebWorkerEnv:be,navigator:me,origin:ye},Symbol.toStringTag,{value:"Module"})),...fe};function ve(e){function t(e,r,n,i){let o=e[i++];if("__proto__"===o)return!0;const s=Number.isFinite(+o),a=i>=e.length;return o=!o&&Y.isArray(n)?n.length:o,a?(Y.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r,!s):(n[o]&&Y.isObject(n[o])||(n[o]=[]),t(e,r,n[o],i)&&Y.isArray(n[o])&&(n[o]=function(e){const t={},r=Object.keys(e);let n;const i=r.length;let o;for(n=0;n<i;n++)o=r[n],t[o]=e[o];return t}(n[o])),!s)}if(Y.isFormData(e)&&Y.isFunction(e.entries)){const r={};return Y.forEachEntry(e,(e,n)=>{t(function(e){return Y.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),n,r,0)}),r}return null}const Ee={transitional:he,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,i=Y.isObject(e);if(i&&Y.isHTMLForm(e)&&(e=new FormData(e)),Y.isFormData(e))return n?JSON.stringify(ve(e)):e;if(Y.isArrayBuffer(e)||Y.isBuffer(e)||Y.isStream(e)||Y.isFile(e)||Y.isBlob(e)||Y.isReadableStream(e))return e;if(Y.isArrayBufferView(e))return e.buffer;if(Y.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return oe(e,new we.classes.URLSearchParams,{visitor:function(e,t,r,n){return we.isNode&&Y.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((o=Y.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return oe(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||n?(t.setContentType("application/json",!1),function(e){if(Y.isString(e))try{return(0,JSON.parse)(e),Y.trim(e)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Ee.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(Y.isResponse(e)||Y.isReadableStream(e))return e;if(e&&Y.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e,this.parseReviver)}catch(i){if(r){if("SyntaxError"===i.name)throw ee.from(i,ee.ERR_BAD_RESPONSE,this,null,this.response);throw i}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:we.classes.FormData,Blob:we.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Y.forEach(["delete","get","head","post","put","patch"],e=>{Ee.headers[e]={}});const Ae=Y.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),_e=Symbol("internals");function Se(e){return e&&String(e).trim().toLowerCase()}function Re(e){return!1===e||null==e?e:Y.isArray(e)?e.map(Re):String(e)}function xe(e,t,r,n,i){return Y.isFunction(n)?n.call(this,t,r):(i&&(t=r),Y.isString(t)?Y.isString(n)?-1!==t.indexOf(n):Y.isRegExp(n)?n.test(t):void 0:void 0)}let Oe=class{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function i(e,t,r){const i=Se(t);if(!i)throw new Error("header name must be a non-empty string");const o=Y.findKey(n,i);(!o||void 0===n[o]||!0===r||void 0===r&&!1!==n[o])&&(n[o||t]=Re(e))}const o=(e,t)=>Y.forEach(e,(e,r)=>i(e,r,t));if(Y.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(Y.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o((e=>{const t={};let r,n,i;return e&&e.split("\n").forEach(function(e){i=e.indexOf(":"),r=e.substring(0,i).trim().toLowerCase(),n=e.substring(i+1).trim(),!r||t[r]&&Ae[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t})(e),t);else if(Y.isObject(e)&&Y.isIterable(e)){let r,n,i={};for(const t of e){if(!Y.isArray(t))throw TypeError("Object iterator must return a key-value pair");i[n=t[0]]=(r=i[n])?Y.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}o(i,t)}else null!=e&&i(t,e,r);return this}get(e,t){if(e=Se(e)){const r=Y.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(Y.isFunction(t))return t.call(this,e,r);if(Y.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Se(e)){const r=Y.findKey(this,e);return!(!r||void 0===this[r]||t&&!xe(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function i(e){if(e=Se(e)){const i=Y.findKey(r,e);!i||t&&!xe(0,r[i],i,t)||(delete r[i],n=!0)}}return Y.isArray(e)?e.forEach(i):i(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const i=t[r];e&&!xe(0,this[i],i,e,!0)||(delete this[i],n=!0)}return n}normalize(e){const t=this,r={};return Y.forEach(this,(n,i)=>{const o=Y.findKey(r,i);if(o)return t[o]=Re(n),void delete t[i];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}(i):String(i).trim();s!==i&&delete t[i],t[s]=Re(n),r[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Y.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&Y.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach(e=>r.set(e)),r}static accessor(e){const t=(this[_e]=this[_e]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=Se(e);t[n]||(function(e,t){const r=Y.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:!0})})}(r,e),t[n]=!0)}return Y.isArray(e)?e.forEach(n):n(e),this}};function $e(e,t){const r=this||Ee,n=t||r,i=Oe.from(n.headers);let o=n.data;return Y.forEach(e,function(e){o=e.call(r,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function Ce(e){return!(!e||!e.__CANCEL__)}Oe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Y.reduceDescriptors(Oe.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),Y.freezeMethods(Oe);let ke=class extends ee{constructor(e,t,r){super(null==e?"canceled":e,ee.ERR_CANCELED,t,r),this.name="CanceledError",this.__CANCEL__=!0}};function Te(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new ee("Request failed with status code "+r.status,[ee.ERR_BAD_REQUEST,ee.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}const Pe=(e,t,r=3)=>{let n=0;const i=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i,o=0,s=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=n[s];i||(i=l),r[o]=a,n[o]=l;let u=s,d=0;for(;u!==o;)d+=r[u++],u%=e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-i<t)return;const h=c&&l-c;return h?Math.round(1e3*d/h):void 0}}(50,250);return function(r,o){let s,a,l=0,c=1e3/o;const u=(r,o=Date.now())=>{l=o,s=null,a&&(clearTimeout(a),a=null),(r=>{const o=r.loaded,s=r.lengthComputable?r.total:void 0,a=o-n,l=i(a);n=o,e({loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&o<=s?(s-o)/l:void 0,event:r,lengthComputable:null!=s,[t?"download":"upload"]:!0})})(...r)};return[(...e)=>{const t=Date.now(),r=t-l;r>=c?u(e,t):(s=e,a||(a=setTimeout(()=>{a=null,u(s)},c-r)))},()=>s&&u(s)]}(0,r)},Ne=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},je=e=>(...t)=>Y.asap(()=>e(...t)),Ue=we.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,we.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(we.origin),we.navigator&&/(msie|trident)/i.test(we.navigator.userAgent)):()=>!0,Be=we.hasStandardBrowserEnv?{write(e,t,r,n,i,o,s){if("undefined"==typeof document)return;const a=[`${e}=${encodeURIComponent(t)}`];Y.isNumber(r)&&a.push(`expires=${new Date(r).toUTCString()}`),Y.isString(n)&&a.push(`path=${n}`),Y.isString(i)&&a.push(`domain=${i}`),!0===o&&a.push("secure"),Y.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function Le(e,t,r){let n=!("string"==typeof(i=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(i));var i;return e&&(n||0==r)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const De=e=>e instanceof Oe?{...e}:e;function Fe(e,t){t=t||{};const r={};function n(e,t,r,n){return Y.isPlainObject(e)&&Y.isPlainObject(t)?Y.merge.call({caseless:n},e,t):Y.isPlainObject(t)?Y.merge({},t):Y.isArray(t)?t.slice():t}function i(e,t,r,i){return Y.isUndefined(t)?Y.isUndefined(e)?void 0:n(void 0,e,0,i):n(e,t,0,i)}function o(e,t){if(!Y.isUndefined(t))return n(void 0,t)}function s(e,t){return Y.isUndefined(t)?Y.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(r,i,o){return o in t?n(r,i):o in e?n(void 0,r):void 0}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t,r)=>i(De(e),De(t),0,!0)};return Y.forEach(Object.keys({...e,...t}),function(n){if("__proto__"===n||"constructor"===n||"prototype"===n)return;const o=Y.hasOwnProp(l,n)?l[n]:i,s=o(e[n],t[n],n);Y.isUndefined(s)&&o!==a||(r[n]=s)}),r}const Me=e=>{const t=Fe({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:a}=t;if(t.headers=s=Oe.from(s),t.url=ue(Le(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),Y.isFormData(r))if(we.hasStandardBrowserEnv||we.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(Y.isFunction(r.getHeaders)){const e=r.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,r])=>{t.includes(e.toLowerCase())&&s.set(e,r)})}if(we.hasStandardBrowserEnv&&(n&&Y.isFunction(n)&&(n=n(t)),n||!1!==n&&Ue(t.url))){const e=i&&o&&Be.read(o);e&&s.set(i,e)}return t},ze="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){const n=Me(e);let i=n.data;const o=Oe.from(n.headers).normalize();let s,a,l,c,u,{responseType:d,onUploadProgress:h,onDownloadProgress:f}=n;function p(){c&&c(),u&&u(),n.cancelToken&&n.cancelToken.unsubscribe(s),n.signal&&n.signal.removeEventListener("abort",s)}let m=new XMLHttpRequest;function g(){if(!m)return;const n=Oe.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Te(function(e){t(e),p()},function(e){r(e),p()},{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:n,config:e,request:m}),m=null}m.open(n.method.toUpperCase(),n.url,!0),m.timeout=n.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(g)},m.onabort=function(){m&&(r(new ee("Request aborted",ee.ECONNABORTED,e,m)),m=null)},m.onerror=function(t){const n=t&&t.message?t.message:"Network Error",i=new ee(n,ee.ERR_NETWORK,e,m);i.event=t||null,r(i),m=null},m.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const i=n.transitional||he;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new ee(t,i.clarifyTimeoutError?ee.ETIMEDOUT:ee.ECONNABORTED,e,m)),m=null},void 0===i&&o.setContentType(null),"setRequestHeader"in m&&Y.forEach(o.toJSON(),function(e,t){m.setRequestHeader(t,e)}),Y.isUndefined(n.withCredentials)||(m.withCredentials=!!n.withCredentials),d&&"json"!==d&&(m.responseType=n.responseType),f&&([l,u]=Pe(f,!0),m.addEventListener("progress",l)),h&&m.upload&&([a,c]=Pe(h),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",c)),(n.cancelToken||n.signal)&&(s=t=>{m&&(r(!t||t.type?new ke(null,e,m):t),m.abort(),m=null)},n.cancelToken&&n.cancelToken.subscribe(s),n.signal&&(n.signal.aborted?s():n.signal.addEventListener("abort",s)));const b=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);b&&-1===we.protocols.indexOf(b)?r(new ee("Unsupported protocol "+b+":",ee.ERR_BAD_REQUEST,e)):m.send(i||null)})},Ie=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const i=function(e){if(!r){r=!0,s();const t=e instanceof Error?e:this.reason;n.abort(t instanceof ee?t:new ke(t instanceof Error?t.message:t))}};let o=t&&setTimeout(()=>{o=null,i(new ee(`timeout of ${t}ms exceeded`,ee.ETIMEDOUT))},t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)}),e=null)};e.forEach(e=>e.addEventListener("abort",i));const{signal:a}=n;return a.unsubscribe=()=>Y.asap(s),a}},He=function*(e,t){let r=e.byteLength;if(r<t)return void(yield e);let n,i=0;for(;i<r;)n=i+t,yield e.slice(i,n),i=n},qe=(e,t,r,n)=>{const i=async function*(e,t){for await(const r of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}}(e))yield*He(r,t)}(e,t);let o,s=0,a=e=>{o||(o=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await i.next();if(t)return a(),void e.close();let o=n.byteLength;if(r){let e=s+=o;r(e)}e.enqueue(new Uint8Array(n))}catch(t){throw a(t),t}},cancel:e=>(a(e),i.return())},{highWaterMark:2})},{isFunction:Ve}=Y,Ke=(({Request:e,Response:t})=>({Request:e,Response:t}))(Y.global),{ReadableStream:We,TextEncoder:Je}=Y.global,Xe=(e,...t)=>{try{return!!e(...t)}catch(r){return!1}},Ge=e=>{e=Y.merge.call({skipUndefined:!0},Ke,e);const{fetch:t,Request:r,Response:n}=e,i=t?Ve(t):"function"==typeof fetch,o=Ve(r),s=Ve(n);if(!i)return!1;const a=i&&Ve(We),l=i&&("function"==typeof Je?(e=>t=>e.encode(t))(new Je):async e=>new Uint8Array(await new r(e).arrayBuffer())),c=o&&a&&Xe(()=>{let e=!1;const t=new r(we.origin,{body:new We,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),u=s&&a&&Xe(()=>Y.isReadableStream(new n("").body)),d={stream:u&&(e=>e.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!d[e]&&(d[e]=(t,r)=>{let n=t&&t[e];if(n)return n.call(t);throw new ee(`Response type '${e}' is not supported`,ee.ERR_NOT_SUPPORT,r)})});return async e=>{let{url:i,method:s,data:a,signal:h,cancelToken:f,timeout:p,onDownloadProgress:m,onUploadProgress:g,responseType:b,headers:y,withCredentials:w="same-origin",fetchOptions:v}=Me(e),E=t||fetch;b=b?(b+"").toLowerCase():"text";let A=Ie([h,f&&f.toAbortSignal()],p),_=null;const S=A&&A.unsubscribe&&(()=>{A.unsubscribe()});let R;try{if(g&&c&&"get"!==s&&"head"!==s&&0!==(R=await(async(e,t)=>{const n=Y.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(Y.isBlob(e))return e.size;if(Y.isSpecCompliantForm(e)){const t=new r(we.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Y.isArrayBufferView(e)||Y.isArrayBuffer(e)?e.byteLength:(Y.isURLSearchParams(e)&&(e+=""),Y.isString(e)?(await l(e)).byteLength:void 0)})(t):n})(y,a))){let e,t=new r(i,{method:"POST",body:a,duplex:"half"});if(Y.isFormData(a)&&(e=t.headers.get("content-type"))&&y.setContentType(e),t.body){const[e,r]=Ne(R,Pe(je(g)));a=qe(t.body,65536,e,r)}}Y.isString(w)||(w=w?"include":"omit");const t=o&&"credentials"in r.prototype,h={...v,signal:A,method:s.toUpperCase(),headers:y.normalize().toJSON(),body:a,duplex:"half",credentials:t?w:void 0};_=o&&new r(i,h);let f=await(o?E(_,v):E(i,h));const p=u&&("stream"===b||"response"===b);if(u&&(m||p&&S)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=f[t]});const t=Y.toFiniteNumber(f.headers.get("content-length")),[r,i]=m&&Ne(t,Pe(je(m),!0))||[];f=new n(qe(f.body,65536,r,()=>{i&&i(),S&&S()}),e)}b=b||"text";let x=await d[Y.findKey(d,b)||"text"](f,e);return!p&&S&&S(),await new Promise((t,r)=>{Te(t,r,{data:x,headers:Oe.from(f.headers),status:f.status,statusText:f.statusText,config:e,request:_})})}catch(x){if(S&&S(),x&&"TypeError"===x.name&&/Load failed|fetch/i.test(x.message))throw Object.assign(new ee("Network Error",ee.ERR_NETWORK,e,_,x&&x.response),{cause:x.cause||x});throw ee.from(x,x&&x.code,e,_,x&&x.response)}}},Ze=new Map,Qe=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:i}=t,o=[n,i,r];let s,a,l=o.length,c=Ze;for(;l--;)s=o[l],a=c.get(s),void 0===a&&c.set(s,a=l?new Map:Ge(t)),c=a;return a};Qe();const Ye={http:null,xhr:ze,fetch:{get:Qe}};Y.forEach(Ye,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(r){}Object.defineProperty(e,"adapterName",{value:t})}});const et=e=>`- ${e}`,tt=e=>Y.isFunction(e)||null===e||!1===e,rt=function(e,t){e=Y.isArray(e)?e:[e];const{length:r}=e;let n,i;const o={};for(let s=0;s<r;s++){let r;if(n=e[s],i=n,!tt(n)&&(i=Ye[(r=String(n)).toLowerCase()],void 0===i))throw new ee(`Unknown adapter '${r}'`);if(i&&(Y.isFunction(i)||(i=i.get(t))))break;o[r||"#"+s]=i}if(!i){const e=Object.entries(o).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=r?e.length>1?"since :\n"+e.map(et).join("\n"):" "+et(e[0]):"as no adapter specified";throw new ee("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return i};function nt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ke(null,e)}function it(e){return nt(e),e.headers=Oe.from(e.headers),e.data=$e.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),rt(e.adapter||Ee.adapter,e)(e).then(function(t){return nt(e),t.data=$e.call(e,e.transformResponse,t),t.headers=Oe.from(t.headers),t},function(t){return Ce(t)||(nt(e),t&&t.response&&(t.response.data=$e.call(e,e.transformResponse,t.response),t.response.headers=Oe.from(t.response.headers))),Promise.reject(t)})}const ot="1.13.6",st={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{st[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const at={};st.transitional=function(e,t,r){return(n,i,o)=>{if(!1===e)throw new ee(function(e,t){return"[Axios v"+ot+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}(i," has been removed"+(t?" in "+t:"")),ee.ERR_DEPRECATED);return t&&!at[i]&&(at[i]=!0),!e||e(n,i,o)}},st.spelling=function(e){return(e,t)=>!0};const lt={assertOptions:function(e,t,r){if("object"!=typeof e)throw new ee("options must be an object",ee.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const o=n[i],s=t[o];if(s){const t=e[o],r=void 0===t||s(t,o,e);if(!0!==r)throw new ee("option "+o+" must be "+r,ee.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new ee("Unknown option "+o,ee.ERR_BAD_OPTION)}},validators:st},ct=lt.validators;let ut=class{constructor(e){this.defaults=e||{},this.interceptors={request:new de,response:new de}}async request(e,t){try{return await this._request(e,t)}catch(r){if(r instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{r.stack?t&&!String(r.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(r.stack+="\n"+t):r.stack=t}catch(n){}}throw r}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Fe(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:i}=t;void 0!==r&<.assertOptions(r,{silentJSONParsing:ct.transitional(ct.boolean),forcedJSONParsing:ct.transitional(ct.boolean),clarifyTimeoutError:ct.transitional(ct.boolean),legacyInterceptorReqResOrdering:ct.transitional(ct.boolean)},!1),null!=n&&(Y.isFunction(n)?t.paramsSerializer={serialize:n}:lt.assertOptions(n,{encode:ct.function,serialize:ct.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),lt.assertOptions(t,{baseUrl:ct.spelling("baseURL"),withXsrfToken:ct.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&Y.merge(i.common,i[t.method]);i&&Y.forEach(["delete","get","head","post","put","patch","common"],e=>{delete i[e]}),t.headers=Oe.concat(o,i);const s=[];let a=!0;this.interceptors.request.forEach(function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;a=a&&e.synchronous;const r=t.transitional||he;r&&r.legacyInterceptorReqResOrdering?s.unshift(e.fulfilled,e.rejected):s.push(e.fulfilled,e.rejected)});const l=[];let c;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let u,d=0;if(!a){const e=[it.bind(this),void 0];for(e.unshift(...s),e.push(...l),u=e.length,c=Promise.resolve(t);d<u;)c=c.then(e[d++],e[d++]);return c}u=s.length;let h=t;for(;d<u;){const e=s[d++],t=s[d++];try{h=e(h)}catch(f){t.call(this,f);break}}try{c=it.call(this,h)}catch(f){return Promise.reject(f)}for(d=0,u=l.length;d<u;)c=c.then(l[d++],l[d++]);return c}getUri(e){return ue(Le((e=Fe(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};Y.forEach(["delete","get","head","options"],function(e){ut.prototype[e]=function(t,r){return this.request(Fe(r||{},{method:e,url:t,data:(r||{}).data}))}}),Y.forEach(["post","put","patch"],function(e){function t(t){return function(r,n,i){return this.request(Fe(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}ut.prototype[e]=t(),ut.prototype[e+"Form"]=t(!0)});const dt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(dt).forEach(([e,t])=>{dt[t]=e});const ht=function e(t){const r=new ut(t),n=c(ut.prototype.request,r);return Y.extend(n,ut.prototype,r,{allOwnKeys:!0}),Y.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(Fe(t,r))},n}(Ee);ht.Axios=ut,ht.CanceledError=ke,ht.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const r=this;this.promise.then(e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null}),this.promise.then=e=>{let t;const n=new Promise(e=>{r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e(function(e,n,i){r.reason||(r.reason=new ke(e,n,i),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}},ht.isCancel=Ce,ht.VERSION=ot,ht.toFormData=oe,ht.AxiosError=ee,ht.Cancel=ht.CanceledError,ht.all=function(e){return Promise.all(e)},ht.spread=function(e){return function(t){return e.apply(null,t)}},ht.isAxiosError=function(e){return Y.isObject(e)&&!0===e.isAxiosError},ht.mergeConfig=Fe,ht.AxiosHeaders=Oe,ht.formToJSON=e=>ve(Y.isHTMLForm(e)?new FormData(e):e),ht.getAdapter=rt,ht.HttpStatusCode=dt,ht.default=ht;const{Axios:ft,AxiosError:pt,CanceledError:mt,isCancel:gt,CancelToken:bt,VERSION:yt,all:wt,Cancel:vt,isAxiosError:Et,spread:At,toFormData:_t,AxiosHeaders:St,HttpStatusCode:Rt,formToJSON:xt,getAdapter:Ot,mergeConfig:$t}=ht,Ct=[0,2e5],kt=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),Tt=e=>{if(/^https?:\/\//.test(e)){const[t,r]=e.split("://");return`${t}://${r.replace(/\/{2,}/g,"/")}`}return e.replace(/\/{2,}/g,"/")},Pt=e=>{if(!e||"object"!=typeof e||e instanceof ArrayBuffer||Array.isArray(e))return e;const t={...e};for(const r of Object.keys(t)){const e=t[r];""!==e&&void 0!==e&&"undefined"!==e||delete t[r]}return t},Nt=(e,t)=>kt(e)?"string"==typeof e.message&&e.message.trim()?e.message:"string"==typeof e.msg&&e.msg.trim()?e.msg:t:t,jt=ht.create({headers:{"content-type":"application/json"}});jt.interceptors.request.use(e=>(e.headers.set("x-pv-app-key",(()=>{const e=s.getKey()?.trim();if(!e)throw new Error("SDK Key 缺失,请先调用 initSDK({ key, mode })。");return e})()),e.baseURL=s.getApiBaseUrl(),e));function Ut(e,t){for(const r of e)if(r)if(Array.isArray(r))Ut(r,t);else if("object"!=typeof r)t.push(String(r));else for(const[e,n]of Object.entries(r))n&&t.push(e)}function Bt(...e){const t=[];return Ut(e,t),t.join(" ")}const Lt="realibox-ui-sdk-style";!function(){if("undefined"==typeof document)return;if(document.getElementById(Lt))return;const e=document.createElement("style");e.id=Lt,e.textContent='/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-slate-50:oklch(98.4% .003 247.858);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-900:oklch(20.8% .042 265.755);--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--font-weight-medium:500;--tracking-wide:.025em;--radius-lg:.5rem;--radius-xl:.75rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentColor}::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::-moz-placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.relative{position:relative}.static{position:static}.m-0{margin:calc(var(--spacing) * 0)}.m-4{margin:calc(var(--spacing) * 4)}.mt-1{margin-top:calc(var(--spacing) * 1)}.flex{display:flex}.hidden{display:none}.h-2\\.5{height:calc(var(--spacing) * 2.5)}.h-14{height:calc(var(--spacing) * 14)}.h-64{height:calc(var(--spacing) * 64)}.h-96{height:calc(var(--spacing) * 96)}.h-\\[32rem\\]{height:32rem}.h-\\[800px\\]{height:800px}.h-full{height:100%}.min-h-\\[240px\\]{min-height:240px}.min-h-\\[480px\\]{min-height:480px}.min-h-screen{min-height:100vh}.w-2\\.5{width:calc(var(--spacing) * 2.5)}.w-14{width:calc(var(--spacing) * 14)}.w-full{width:100%}.min-w-0{min-width:calc(var(--spacing) * 0)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-none{--tw-border-style:none;border-style:none}.border-\\[\\#2563eb\\]{border-color:#2563eb}.border-\\[\\#e2e8f0\\]{border-color:#e2e8f0}.border-\\[\\#fecaca\\]{border-color:#fecaca}.bg-\\[\\#2563eb\\]{background-color:#2563eb}.bg-\\[\\#cbd5e1\\]{background-color:#cbd5e1}.bg-\\[\\#eff6ff\\]{background-color:#eff6ff}.bg-\\[\\#f8fafc\\]{background-color:#f8fafc}.bg-\\[\\#fff1f2\\]{background-color:#fff1f2}.bg-slate-50{background-color:var(--color-slate-50)}.bg-white{background-color:var(--color-white)}.bg-\\[linear-gradient\\(180deg\\,\\#f7f8fb_0\\%\\,\\#eef3f8_100\\%\\)\\]{background-image:linear-gradient(#f7f8fb,#eef3f8)}.object-cover{-o-object-fit:cover;object-fit:cover}.p-3{padding:calc(var(--spacing) * 3)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.text-left{text-align:left}.font-sans{font-family:var(--font-sans)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[10px\\]{font-size:10px}.leading-6{--tw-leading:calc(var(--spacing) * 6);line-height:calc(var(--spacing) * 6)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.text-\\[\\#0f172a\\]{color:#0f172a}.text-\\[\\#94a3b8\\]{color:#94a3b8}.text-\\[\\#64748b\\]{color:#64748b}.text-\\[\\#be123c\\]{color:#be123c}.text-slate-400{color:var(--color-slate-400)}.text-slate-900{color:var(--color-slate-900)}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}@media (hover:hover){.hover\\:border-\\[\\#cbd5e1\\]:hover{border-color:#cbd5e1}.hover\\:bg-\\[\\#f8fafc\\]:hover{background-color:#f8fafc}}}product-3d-viewer{box-sizing:border-box;display:block}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}',document.head.appendChild(e)}();const Dt=globalThis,Ft=Dt.ShadowRoot&&(void 0===Dt.ShadyCSS||Dt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Mt=Symbol(),zt=new WeakMap;let It=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==Mt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Ft&&void 0===e){const r=void 0!==t&&1===t.length;r&&(e=zt.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&zt.set(t,e))}return e}toString(){return this.cssText}};const Ht=Ft?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return(e=>new It("string"==typeof e?e:e+"",void 0,Mt))(t)})(e):e,{is:qt,defineProperty:Vt,getOwnPropertyDescriptor:Kt,getOwnPropertyNames:Wt,getOwnPropertySymbols:Jt,getPrototypeOf:Xt}=Object,Gt=globalThis,Zt=Gt.trustedTypes,Qt=Zt?Zt.emptyScript:"",Yt=Gt.reactiveElementPolyfillSupport,er=(e,t)=>e,tr={toAttribute(e,t){switch(t){case Boolean:e=e?Qt:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=null!==e;break;case Number:r=null===e?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch(n){r=null}}return r}},rr=(e,t)=>!qt(e,t),nr={attribute:!0,type:String,converter:tr,reflect:!1,useDefault:!1,hasChanged:rr};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Gt.litPropertyMetadata??(Gt.litPropertyMetadata=new WeakMap);let ir=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=nr){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const r=Symbol(),n=this.getPropertyDescriptor(e,r,t);void 0!==n&&Vt(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){const{get:n,set:i}=Kt(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:n,set(t){const o=n?.call(this);i?.call(this,t),this.requestUpdate(e,o,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??nr}static _$Ei(){if(this.hasOwnProperty(er("elementProperties")))return;const e=Xt(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(er("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(er("properties"))){const e=this.properties,t=[...Wt(e),...Jt(e)];for(const r of t)this.createProperty(r,e[r])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,r]of t)this.elementProperties.set(e,r)}this._$Eh=new Map;for(const[t,r]of this.elementProperties){const e=this._$Eu(t,r);void 0!==e&&this._$Eh.set(e,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const e of r)t.unshift(Ht(e))}else void 0!==e&&t.push(Ht(e));return t}static _$Eu(e,t){const r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??(this._$EO=new Set)).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(Ft)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const r of t){const t=document.createElement("style"),n=Dt.litNonce;void 0!==n&&t.setAttribute("nonce",n),t.textContent=r.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$ET(e,t){const r=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,r);if(void 0!==n&&!0===r.reflect){const i=(void 0!==r.converter?.toAttribute?r.converter:tr).toAttribute(t,r.type);this._$Em=e,null==i?this.removeAttribute(n):this.setAttribute(n,i),this._$Em=null}}_$AK(e,t){const r=this.constructor,n=r._$Eh.get(e);if(void 0!==n&&this._$Em!==n){const e=r.getPropertyOptions(n),i="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:tr;this._$Em=n;const o=i.fromAttribute(t,e.type);this[n]=o??this._$Ej?.get(n)??o,this._$Em=null}}requestUpdate(e,t,r,n=!1,i){if(void 0!==e){const o=this.constructor;if(!1===n&&(i=this[e]),r??(r=o.getPropertyOptions(e)),!((r.hasChanged??rr)(i,t)||r.useDefault&&r.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(o._$Eu(e,r))))return;this.C(e,t,r)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:r,reflect:n,wrapped:i},o){r&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,o??t??this[e]),!0!==i||void 0!==o)||(this._$AL.has(e)||(this.hasUpdated||r||(t=void 0),this._$AL.set(e,t)),!0===n&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,r]of e){const{wrapped:e}=r,n=this[t];!0!==e||this._$AL.has(t)||void 0===n||this.C(t,void 0,r,n)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(r){throw e=!1,this._$EM(),r}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach(e=>this._$ET(e,this[e]))),this._$EM()}updated(e){}firstUpdated(e){}};ir.elementStyles=[],ir.shadowRootOptions={mode:"open"},ir[er("elementProperties")]=new Map,ir[er("finalized")]=new Map,Yt?.({ReactiveElement:ir}),(Gt.reactiveElementVersions??(Gt.reactiveElementVersions=[])).push("2.1.2");const or=globalThis,sr=e=>e,ar=or.trustedTypes,lr=ar?ar.createPolicy("lit-html",{createHTML:e=>e}):void 0,cr="$lit$",ur=`lit$${Math.random().toFixed(9).slice(2)}$`,dr="?"+ur,hr=`<${dr}>`,fr=document,pr=()=>fr.createComment(""),mr=e=>null===e||"object"!=typeof e&&"function"!=typeof e,gr=Array.isArray,br="[ \t\n\f\r]",yr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,wr=/-->/g,vr=/>/g,Er=RegExp(`>|${br}(?:([^\\s"'>=/]+)(${br}*=${br}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Ar=/'/g,_r=/"/g,Sr=/^(?:script|style|textarea|title)$/i,Rr=(e,...t)=>({_$litType$:1,strings:e,values:t}),xr=Symbol.for("lit-noChange"),Or=Symbol.for("lit-nothing"),$r=new WeakMap,Cr=fr.createTreeWalker(fr,129);function kr(e,t){if(!gr(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==lr?lr.createHTML(t):t}class Tr{constructor({strings:e,_$litType$:t},r){let n;this.parts=[];let i=0,o=0;const s=e.length-1,a=this.parts,[l,c]=((e,t)=>{const r=e.length-1,n=[];let i,o=2===t?"<svg>":3===t?"<math>":"",s=yr;for(let a=0;a<r;a++){const t=e[a];let r,l,c=-1,u=0;for(;u<t.length&&(s.lastIndex=u,l=s.exec(t),null!==l);)u=s.lastIndex,s===yr?"!--"===l[1]?s=wr:void 0!==l[1]?s=vr:void 0!==l[2]?(Sr.test(l[2])&&(i=RegExp("</"+l[2],"g")),s=Er):void 0!==l[3]&&(s=Er):s===Er?">"===l[0]?(s=i??yr,c=-1):void 0===l[1]?c=-2:(c=s.lastIndex-l[2].length,r=l[1],s=void 0===l[3]?Er:'"'===l[3]?_r:Ar):s===_r||s===Ar?s=Er:s===wr||s===vr?s=yr:(s=Er,i=void 0);const d=s===Er&&e[a+1].startsWith("/>")?" ":"";o+=s===yr?t+hr:c>=0?(n.push(r),t.slice(0,c)+cr+t.slice(c)+ur+d):t+ur+(-2===c?a:d)}return[kr(e,o+(e[r]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),n]})(e,t);if(this.el=Tr.createElement(l,r),Cr.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(n=Cr.nextNode())&&a.length<s;){if(1===n.nodeType){if(n.hasAttributes())for(const e of n.getAttributeNames())if(e.endsWith(cr)){const t=c[o++],r=n.getAttribute(e).split(ur),s=/([.?@])?(.*)/.exec(t);a.push({type:1,index:i,name:s[2],strings:r,ctor:"."===s[1]?Br:"?"===s[1]?Lr:"@"===s[1]?Dr:Ur}),n.removeAttribute(e)}else e.startsWith(ur)&&(a.push({type:6,index:i}),n.removeAttribute(e));if(Sr.test(n.tagName)){const e=n.textContent.split(ur),t=e.length-1;if(t>0){n.textContent=ar?ar.emptyScript:"";for(let r=0;r<t;r++)n.append(e[r],pr()),Cr.nextNode(),a.push({type:2,index:++i});n.append(e[t],pr())}}}else if(8===n.nodeType)if(n.data===dr)a.push({type:2,index:i});else{let e=-1;for(;-1!==(e=n.data.indexOf(ur,e+1));)a.push({type:7,index:i}),e+=ur.length-1}i++}}static createElement(e,t){const r=fr.createElement("template");return r.innerHTML=e,r}}function Pr(e,t,r=e,n){if(t===xr)return t;let i=void 0!==n?r._$Co?.[n]:r._$Cl;const o=mr(t)?void 0:t._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(!1),void 0===o?i=void 0:(i=new o(e),i._$AT(e,r,n)),void 0!==n?(r._$Co??(r._$Co=[]))[n]=i:r._$Cl=i),void 0!==i&&(t=Pr(e,i._$AS(e,t.values),i,n)),t}class Nr{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:r}=this._$AD,n=(e?.creationScope??fr).importNode(t,!0);Cr.currentNode=n;let i=Cr.nextNode(),o=0,s=0,a=r[0];for(;void 0!==a;){if(o===a.index){let t;2===a.type?t=new jr(i,i.nextSibling,this,e):1===a.type?t=new a.ctor(i,a.name,a.strings,this,e):6===a.type&&(t=new Fr(i,this,e)),this._$AV.push(t),a=r[++s]}o!==a?.index&&(i=Cr.nextNode(),o++)}return Cr.currentNode=fr,n}p(e){let t=0;for(const r of this._$AV)void 0!==r&&(void 0!==r.strings?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}}class jr{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,n){this.type=2,this._$AH=Or,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Pr(this,e,t),mr(e)?e===Or||null==e||""===e?(this._$AH!==Or&&this._$AR(),this._$AH=Or):e!==this._$AH&&e!==xr&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):(e=>gr(e)||"function"==typeof e?.[Symbol.iterator])(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==Or&&mr(this._$AH)?this._$AA.nextSibling.data=e:this.T(fr.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:r}=e,n="number"==typeof r?this._$AC(e):(void 0===r.el&&(r.el=Tr.createElement(kr(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(t);else{const e=new Nr(n,this),r=e.u(this.options);e.p(t),this.T(r),this._$AH=e}}_$AC(e){let t=$r.get(e.strings);return void 0===t&&$r.set(e.strings,t=new Tr(e)),t}k(e){gr(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,n=0;for(const i of e)n===t.length?t.push(r=new jr(this.O(pr()),this.O(pr()),this,this.options)):r=t[n],r._$AI(i),n++;n<t.length&&(this._$AR(r&&r._$AB.nextSibling,n),t.length=n)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const t=sr(e).nextSibling;sr(e).remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}}class Ur{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,n,i){this.type=1,this._$AH=Or,this._$AN=void 0,this.element=e,this.name=t,this._$AM=n,this.options=i,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=Or}_$AI(e,t=this,r,n){const i=this.strings;let o=!1;if(void 0===i)e=Pr(this,e,t,0),o=!mr(e)||e!==this._$AH&&e!==xr,o&&(this._$AH=e);else{const n=e;let s,a;for(e=i[0],s=0;s<i.length-1;s++)a=Pr(this,n[r+s],t,s),a===xr&&(a=this._$AH[s]),o||(o=!mr(a)||a!==this._$AH[s]),a===Or?e=Or:e!==Or&&(e+=(a??"")+i[s+1]),this._$AH[s]=a}o&&!n&&this.j(e)}j(e){e===Or?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Br extends Ur{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Or?void 0:e}}class Lr extends Ur{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==Or)}}class Dr extends Ur{constructor(e,t,r,n,i){super(e,t,r,n,i),this.type=5}_$AI(e,t=this){if((e=Pr(this,e,t,0)??Or)===xr)return;const r=this._$AH,n=e===Or&&r!==Or||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,i=e!==Or&&(r===Or||n);n&&this.element.removeEventListener(this.name,this,r),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class Fr{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){Pr(this,e)}}const Mr=or.litHtmlPolyfillSupport;Mr?.(Tr,jr),(or.litHtmlVersions??(or.litHtmlVersions=[])).push("3.3.2");const zr=globalThis;class Ir extends ir{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=((e,t,r)=>{const n=r?.renderBefore??t;let i=n._$litPart$;if(void 0===i){const e=r?.renderBefore??null;n._$litPart$=i=new jr(t.insertBefore(pr(),e),e,void 0,r??{})}return i._$AI(e),i})(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return xr}}Ir._$litElement$=!0,Ir.finalized=!0,zr.litElementHydrateSupport?.({LitElement:Ir});const Hr=zr.litElementPolyfillSupport;Hr?.({LitElement:Ir}),(zr.litElementVersions??(zr.litElementVersions=[])).push("4.2.2");class qr extends Ir{constructor(){super(),r(this,"unsubscribeConfig",null),r(this,"validationVersion",0),r(this,"handleVisibilityChange",()=>{document.hidden||this.refreshAuthState(!0)}),this.authState="valid",this.authReason=""}createRenderRoot(){return this}get isAuthorized(){return"valid"===this.authState}get componentClassName(){return this.getAttribute("class")??""}connectedCallback(){super.connectedCallback(),this.unsubscribeConfig=s.subscribe(()=>{this.refreshAuthState(!0)}),document.addEventListener("visibilitychange",this.handleVisibilityChange),this.refreshAuthState(!1)}disconnectedCallback(){this.unsubscribeConfig?.(),this.unsubscribeConfig=null,document.removeEventListener("visibilitychange",this.handleVisibilityChange),super.disconnectedCallback()}async refreshAuthState(e){const t=++this.validationVersion,r=await l(e);t===this.validationVersion&&(this.authState=r.status,this.authReason=r.reason)}renderAuthError(){return Rr`<div class=${this.componentClassName}>暂不可用</div>`}}r(qr,"properties",{authState:{state:!0},authReason:{state:!0}});const Vr=e=>e?"true":"false",Kr=e=>e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),Wr=new Set(["project-id","projectid","size","show-top-header","showtopheader","part-selection","partselection","camera-focus","camerafocus","design","outline-render","outlinerender","class","style","slot","id","role","part","title","hidden","tabindex"]);class Jr extends qr{constructor(){super(),r(this,"warnedInvalidAttributes",new Set),this.projectId="",this.size="none",this.showTopHeader=!1,this.partSelection=!1,this.cameraFocus=!1,this.design=!1,this.outlineRender=!1}connectedCallback(){super.connectedCallback(),this.warnInvalidAttributes()}updated(e){super.updated(e),this.warnInvalidAttributes()}resolveStringAttr(e,t){return((e,t)=>{for(const r of t){if(!e.hasAttribute(r))continue;const t=e.getAttribute(r);if(null!==t)return t.trim()}})(this,t)??e}resolveBooleanAttr(e,t){return((e,t)=>{for(const r of t){if(!e.hasAttribute(r))continue;const t=e.getAttribute(r);return null===t||""===t||"false"!==t.trim().toLowerCase()}})(this,t)??(e=>{if("boolean"==typeof e)return e;if("string"!=typeof e)return;const t=e.trim().toLowerCase();return"true"===t||""===t||"false"!==t&&void 0})(e)??!1}resolveStringProp(e){return this.resolveStringAttr(this[e].trim(),[Kr(e),e.toLowerCase()])}resolveBooleanProp(e){return this.resolveBooleanAttr(this[e],[Kr(e),e.toLowerCase()])}get iframeUrl(){const e=this.resolveStringProp("projectId");if(!e)return"";const t=new URL(e,s.getViewerBaseUrl());t.searchParams.set("showTopHeader",Vr(this.resolveBooleanProp("showTopHeader"))),t.searchParams.set("partSelection",Vr(this.resolveBooleanProp("partSelection"))),t.searchParams.set("cameraFocus",Vr(this.resolveBooleanProp("cameraFocus"))),t.searchParams.set("design",Vr(this.resolveBooleanProp("design"))),t.searchParams.set("outlineRender",Vr(this.resolveBooleanProp("outlineRender")));const r=s.getKey()?.trim();return r&&t.searchParams.set("xPvAppKey",r),t.toString()}warnInvalidAttributes(){for(const e of this.getAttributeNames())Wr.has(e)||e.startsWith("aria-")||e.startsWith("data-")||this.warnedInvalidAttributes.has(e)||this.warnedInvalidAttributes.add(e)}get sizeClassName(){switch(this.size){case"sm":return"h-64";case"md":default:return"h-96";case"lg":return"h-[32rem]"}}render(){return this.isAuthorized?this.resolveStringProp("projectId")?Rr`
|
|
2
|
+
<iframe
|
|
3
|
+
class=${Bt("w-full border-none",this.sizeClassName,this.componentClassName)}
|
|
4
|
+
src=${this.iframeUrl}
|
|
5
|
+
title="3D 展示区域"
|
|
6
|
+
loading="lazy"
|
|
7
|
+
allow="fullscreen"
|
|
8
|
+
referrerpolicy="strict-origin-when-cross-origin"
|
|
9
|
+
></iframe>
|
|
10
|
+
`:this.renderPlaceholder():this.renderAuthError()}renderPlaceholder(){const e=Bt("w-full bg-slate-50 flex items-center justify-center overflow-hidden relative",this.sizeClassName,this.componentClassName);return Rr`
|
|
11
|
+
<div class=${e}>
|
|
12
|
+
<div class="flex flex-col items-center gap-3 text-slate-400">
|
|
13
|
+
<svg
|
|
14
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
15
|
+
width="48"
|
|
16
|
+
height="48"
|
|
17
|
+
viewBox="0 0 24 24"
|
|
18
|
+
fill="none"
|
|
19
|
+
stroke="currentColor"
|
|
20
|
+
stroke-width="1.5"
|
|
21
|
+
stroke-linecap="round"
|
|
22
|
+
stroke-linejoin="round"
|
|
23
|
+
>
|
|
24
|
+
<path d="m21 8-9-4-9 4" />
|
|
25
|
+
<path d="m21 16-9 4-9-4" />
|
|
26
|
+
<path d="m2 12 10 4 10-4" />
|
|
27
|
+
<path d="m12 12 7-3.11" />
|
|
28
|
+
<path d="M7 14.89 12 12l5 2.89" />
|
|
29
|
+
<path d="m7 9.11 5 2.89" />
|
|
30
|
+
</svg>
|
|
31
|
+
<span class="text-sm font-medium tracking-wide">暂无 3D 预览</span>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
`}}r(Jr,"properties",{projectId:{type:String,attribute:"project-id"},size:{type:String,attribute:"size"},showTopHeader:{type:Boolean,attribute:"show-top-header"},partSelection:{type:Boolean,attribute:"part-selection"},cameraFocus:{type:Boolean,attribute:"camera-focus"},design:{type:Boolean,attribute:"design"},outlineRender:{type:Boolean,attribute:"outline-render"}}),r(Jr,"booleanPropKeys",["showTopHeader","partSelection","cameraFocus","design","outlineRender"]),customElements.get("product-3d-viewer")||customElements.define("product-3d-viewer",Jr),e.BaseElement=qr,e.Product3dViewer=Jr,e.clearValidationCache=function(){},e.cn=Bt,e.configManager=s,e.initSDK=function(e){s.init(e)},e.postSearchProductsApi=e=>{return t={method:"POST",url:"/api/hub/v1/visitor/products/search",data:e},jt.request({...t,url:Tt(t.url??""),params:Pt(t.params),data:Pt(t.data)}).then(e=>((e,t)=>{if(e.status<200||e.status>=300)throw new Error(`请求失败,状态码:${e.status}`);const r=e.data;if(!kt(r)||"number"!=typeof r.code)return t.fullResponse?e:r;if(Ct.includes(r.code))return t.fullResponse?e:r;if("jwt: malformed token"===r.message)return t.fullResponse?e:r;throw new Error(Nt(r,`请求失败,状态码:${r.code}`))})(e,t)).catch(e=>{if(ht.isAxiosError(e)){const t=e.response?.data;if(t)throw new Error(Nt(t,"请求失败,请稍后重试。"));throw new Error(e.message||"网络异常,请稍后重试。")}throw e});var t},e.sdkReactJSXElementsAugmentation=!0,e.validateLicense=l,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type KebabCase<S extends string> = S extends `${infer Head}${infer Tail}` ? Tail extends Uncapitalize<Tail> ? `${Lowercase<Head>}${KebabCase<Tail>}` : `${Lowercase<Head>}-${KebabCase<Tail>}` : S;
|
|
2
|
+
type OptionalKeys<Props> = {
|
|
3
|
+
[Key in keyof Props]-?: {} extends Pick<Props, Key> ? Key : never;
|
|
4
|
+
}[keyof Props];
|
|
5
|
+
type RequiredKeys<Props> = Exclude<keyof Props, OptionalKeys<Props>>;
|
|
6
|
+
type KebabCaseRequiredProps<Props> = {
|
|
7
|
+
[Key in RequiredKeys<Props> as Key extends string ? KebabCase<Key> : never]: Props[Key];
|
|
8
|
+
};
|
|
9
|
+
type KebabCaseOptionalProps<Props> = {
|
|
10
|
+
[Key in OptionalKeys<Props> as Key extends string ? KebabCase<Key> : never]?: Props[Key];
|
|
11
|
+
};
|
|
12
|
+
type KebabCaseProps<Props> = KebabCaseRequiredProps<Props> & KebabCaseOptionalProps<Props>;
|
|
13
|
+
export type SDKIntrinsicElementProps<Props> = KebabCaseProps<Props> & {
|
|
14
|
+
class?: string;
|
|
15
|
+
className?: string;
|
|
16
|
+
style?: string;
|
|
17
|
+
slot?: string;
|
|
18
|
+
children?: unknown;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Product3dViewerProps } from '../components/product-3d-viewer/product-3d-viewer';
|
|
2
|
+
export {};
|
|
3
|
+
export declare const sdkReactJSXElementsAugmentation = true;
|
|
4
|
+
export type Product3dViewerReactProps = Product3dViewerProps & {
|
|
5
|
+
class?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
style?: unknown;
|
|
8
|
+
slot?: string;
|
|
9
|
+
children?: unknown;
|
|
10
|
+
};
|
|
11
|
+
declare global {
|
|
12
|
+
namespace React {
|
|
13
|
+
namespace JSX {
|
|
14
|
+
interface IntrinsicElements {
|
|
15
|
+
"product-3d-viewer": Product3dViewerReactProps;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
namespace JSX {
|
|
20
|
+
interface IntrinsicElements {
|
|
21
|
+
"product-3d-viewer": Product3dViewerReactProps;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
package/dist/vue.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Product3dViewer } from './components/product-3d-viewer/product-3d-viewer';
|
|
2
|
+
type VuePublicProps = {
|
|
3
|
+
key?: string | number | symbol;
|
|
4
|
+
ref?: unknown;
|
|
5
|
+
class?: unknown;
|
|
6
|
+
style?: unknown;
|
|
7
|
+
};
|
|
8
|
+
type VueHTMLAttributes = {
|
|
9
|
+
class?: string;
|
|
10
|
+
style?: string | Record<string, unknown>;
|
|
11
|
+
id?: string;
|
|
12
|
+
role?: string;
|
|
13
|
+
title?: string;
|
|
14
|
+
hidden?: boolean | "" | "hidden" | "until-found";
|
|
15
|
+
tabindex?: number | string;
|
|
16
|
+
slot?: string;
|
|
17
|
+
};
|
|
18
|
+
type VueTemplateCompatibleValue<Value> = Exclude<Value, undefined> extends boolean ? Value | "true" | "false" | "" : Value;
|
|
19
|
+
type SelectedElementProps<ElementType extends HTMLElement, SelectedProps extends keyof ElementType> = {
|
|
20
|
+
[Key in SelectedProps]?: VueTemplateCompatibleValue<ElementType[Key]>;
|
|
21
|
+
};
|
|
22
|
+
type DefineCustomElement<ElementType extends HTMLElement, SelectedProps extends keyof ElementType> = new () => ElementType & {
|
|
23
|
+
/** @deprecated Only used for Vue template type-checking. */
|
|
24
|
+
$props: VueHTMLAttributes & SelectedElementProps<ElementType, SelectedProps> & VuePublicProps;
|
|
25
|
+
};
|
|
26
|
+
type Product3dViewerElementProps = "projectId";
|
|
27
|
+
export type Product3dViewerVueElement = DefineCustomElement<Product3dViewer, Product3dViewerElementProps>;
|
|
28
|
+
export declare const sdkVueCustomElementTypes = true;
|
|
29
|
+
declare module "vue" {
|
|
30
|
+
interface GlobalComponents {
|
|
31
|
+
"product-3d-viewer": Product3dViewerVueElement;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
export {};
|
package/dist/vue.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0xcee958,_0x349101){const _0x5e3dad=_0x209e,_0x16bbad=_0xcee958();while(!![]){try{const _0x1f0955=parseInt(_0x5e3dad(0xe5))/0x1+-parseInt(_0x5e3dad(0x105))/0x2*(parseInt(_0x5e3dad(0xfb))/0x3)+parseInt(_0x5e3dad(0xe6))/0x4*(parseInt(_0x5e3dad(0xf8))/0x5)+parseInt(_0x5e3dad(0x101))/0x6*(parseInt(_0x5e3dad(0x10a))/0x7)+parseInt(_0x5e3dad(0xf7))/0x8+-parseInt(_0x5e3dad(0xfc))/0x9+-parseInt(_0x5e3dad(0x108))/0xa*(parseInt(_0x5e3dad(0xee))/0xb);if(_0x1f0955===_0x349101)break;else _0x16bbad['push'](_0x16bbad['shift']());}catch(_0x4e22af){_0x16bbad['push'](_0x16bbad['shift']());}}}(_0x3c8c,0x7513a));function _0x209e(_0x4eca3a,_0x527d46){_0x4eca3a=_0x4eca3a-0xe3;const _0x1a5024=_0x3c8c();let _0x44254f=_0x1a5024[_0x4eca3a];if(_0x209e['KKNRHV']===undefined){var _0x3bdbf0=function(_0x33472c){const _0x2fa553='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x51432a='',_0x7a7c6a='';for(let _0x57e746=0x0,_0x54af23,_0x5c2d12,_0x56204d=0x0;_0x5c2d12=_0x33472c['charAt'](_0x56204d++);~_0x5c2d12&&(_0x54af23=_0x57e746%0x4?_0x54af23*0x40+_0x5c2d12:_0x5c2d12,_0x57e746++%0x4)?_0x51432a+=String['fromCharCode'](0xff&_0x54af23>>(-0x2*_0x57e746&0x6)):0x0){_0x5c2d12=_0x2fa553['indexOf'](_0x5c2d12);}for(let _0x46c810=0x0,_0x5d0a36=_0x51432a['length'];_0x46c810<_0x5d0a36;_0x46c810++){_0x7a7c6a+='%'+('00'+_0x51432a['charCodeAt'](_0x46c810)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x7a7c6a);};_0x209e['Qqpswg']=_0x3bdbf0,_0x209e['XAVTqb']={},_0x209e['KKNRHV']=!![];}const _0x660973=_0x1a5024[0x0],_0x3c8c3d=_0x4eca3a+_0x660973,_0x209e5e=_0x209e['XAVTqb'][_0x3c8c3d];return!_0x209e5e?(_0x44254f=_0x209e['Qqpswg'](_0x44254f),_0x209e['XAVTqb'][_0x3c8c3d]=_0x44254f):_0x44254f=_0x209e5e,_0x44254f;}const _0x3bdbf0=(function(){let _0x1ce3b3=!![];return function(_0x4c650b,_0x32a9b8){const _0xaf8b0b=_0x1ce3b3?function(){const _0x5a6cb3=_0x209e;if(_0x32a9b8){const _0xec238a=_0x32a9b8[_0x5a6cb3(0x10d)](_0x4c650b,arguments);return _0x32a9b8=null,_0xec238a;}}:function(){};return _0x1ce3b3=![],_0xaf8b0b;};}()),_0x44254f=_0x3bdbf0(this,function(){const _0x47f571=_0x209e,_0x21a74b={'GPAPX':function(_0x59acdb,_0x122f2e){return _0x59acdb(_0x122f2e);},'uGIqh':function(_0x5aea03,_0x5033c9){return _0x5aea03+_0x5033c9;},'XWbKQ':_0x47f571(0xec)+_0x47f571(0xe7)+_0x47f571(0xfe),'yAMBz':_0x47f571(0xf3)+_0x47f571(0x104)+_0x47f571(0xef)+_0x47f571(0x10c),'KrYgT':_0x47f571(0xeb),'BuBJF':_0x47f571(0xe9),'Secix':_0x47f571(0xff),'UvwPM':_0x47f571(0x103),'uBGcn':function(_0x9bdd1e,_0x2a27ca){return _0x9bdd1e<_0x2a27ca;}};let _0x13c58d;try{const _0x547231=_0x21a74b[_0x47f571(0x107)](Function,_0x21a74b[_0x47f571(0x109)](_0x21a74b[_0x47f571(0xe8)],_0x21a74b[_0x47f571(0xfd)])+');');_0x13c58d=_0x547231();}catch(_0x3ed39a){_0x13c58d=window;}const _0x36b30f=_0x13c58d[_0x47f571(0xf9)]=_0x13c58d[_0x47f571(0xf9)]||{},_0x4a71c3=[_0x47f571(0xea),_0x21a74b[_0x47f571(0xe4)],_0x21a74b[_0x47f571(0xf1)],_0x47f571(0x102),_0x47f571(0xf5)+'n',_0x21a74b[_0x47f571(0xe3)],_0x21a74b[_0x47f571(0x106)]];for(let _0x246fbe=0x0;_0x21a74b[_0x47f571(0xed)](_0x246fbe,_0x4a71c3[_0x47f571(0xf6)]);_0x246fbe++){const _0x1d8820=_0x3bdbf0[_0x47f571(0x100)+_0x47f571(0x10b)][_0x47f571(0xfa)+'e'][_0x47f571(0xf2)](_0x3bdbf0),_0x21ceb3=_0x4a71c3[_0x246fbe],_0x1aa245=_0x36b30f[_0x21ceb3]||_0x1d8820;_0x1d8820[_0x47f571(0xf0)+'_']=_0x3bdbf0[_0x47f571(0xf2)](_0x3bdbf0),_0x1d8820[_0x47f571(0xf4)]=_0x1aa245[_0x47f571(0xf4)][_0x47f571(0xf2)](_0x1aa245),_0x36b30f[_0x21ceb3]=_0x1d8820;}});_0x44254f();const o=!0x0;function _0x3c8c(){const _0x2fe539=['nte0nZKWng9uquTHBW','nJy1wwzJD3n2','y29UC29Szq','ChjVDg90Exa','odC5C0jTuNfS','ndu5mde3mw5ZzNbJAW','EufnqNO','kcKG','DgfIBgu','y29UC3rYDwm','mta0mta2mhzmzLr1DW','zxjYB3i','DhjHy2u','CNvJDg9Ykci','mJq5ofvLDKPkrq','vxz3ue0','r1bbufG','mJm3mgTcDe5lAW','DuDjCwG','mZv6sg5LAwy','Dg9Y','AgLZiIKOicK','yxbWBhK','u2vJAxG','s3jzz1q','mJKWnJK1rwTJthnb','mJC2nZjnqKHHuw0','zNvUy3rPB24','wfDIs1e','Aw5MBW','Bg9N','D2fYBG','CMv0DxjUicG','Dujhy24','nJm0mtvvv1vyD20','CMv0DxjUihq','x19WCM90B18','qNvcsKy','yMLUza','E30Uy29UC3q','Dg9tDhjPBMC','zxHJzxb0Aw8','BgvUz3rO'];_0x3c8c=function(){return _0x2fe539;};return _0x3c8c();}export{o as sdkVueCustomElementTypes};
|
package/package.json
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "realibox-ui-sdk",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.js",
|
|
7
|
+
"browser": "./dist/realibox-ui-sdk.umd.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"unpkg": "./dist/realibox-ui-sdk.umd.js",
|
|
10
|
+
"jsdelivr": "./dist/realibox-ui-sdk.umd.js",
|
|
11
|
+
"customElements": "./custom-elements.json",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"import": "./dist/index.js",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./vue": {
|
|
19
|
+
"types": "./dist/vue.d.ts",
|
|
20
|
+
"import": "./dist/vue.js",
|
|
21
|
+
"default": "./dist/vue.js"
|
|
22
|
+
},
|
|
23
|
+
"./init": {
|
|
24
|
+
"types": "./dist/init.d.ts",
|
|
25
|
+
"import": "./dist/init.js",
|
|
26
|
+
"default": "./dist/init.js"
|
|
27
|
+
},
|
|
28
|
+
"./api": {
|
|
29
|
+
"types": "./dist/api/index.d.ts",
|
|
30
|
+
"import": "./dist/api.js",
|
|
31
|
+
"default": "./dist/api.js"
|
|
32
|
+
},
|
|
33
|
+
"./components/product-3d-viewer": {
|
|
34
|
+
"types": "./dist/components/product-3d-viewer/index.d.ts",
|
|
35
|
+
"import": "./dist/components/product-3d-viewer.js",
|
|
36
|
+
"default": "./dist/components/product-3d-viewer.js"
|
|
37
|
+
},
|
|
38
|
+
"./dist/init": {
|
|
39
|
+
"types": "./dist/init.d.ts",
|
|
40
|
+
"import": "./dist/init.js",
|
|
41
|
+
"default": "./dist/init.js"
|
|
42
|
+
},
|
|
43
|
+
"./dist/components": {
|
|
44
|
+
"types": "./dist/components/index.d.ts"
|
|
45
|
+
},
|
|
46
|
+
"./dist/types/react-jsx-elements": {
|
|
47
|
+
"types": "./dist/types/react-jsx-elements.d.ts"
|
|
48
|
+
},
|
|
49
|
+
"./dist/types/custom-elements": {
|
|
50
|
+
"types": "./dist/types/custom-elements.d.ts"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"files": [
|
|
54
|
+
"dist",
|
|
55
|
+
"custom-elements.json",
|
|
56
|
+
"README.md"
|
|
57
|
+
],
|
|
58
|
+
"scripts": {
|
|
59
|
+
"dev": "vite",
|
|
60
|
+
"build": "vite build && vite build --config vite.browser.config.ts && node scripts/check-dist-alias.mjs",
|
|
61
|
+
"postbuild": "node scripts/obfuscate-dist.mjs",
|
|
62
|
+
"build:debug": "vite build --sourcemap --minify=false",
|
|
63
|
+
"prepublishOnly": "npm run build",
|
|
64
|
+
"preview": "vite preview",
|
|
65
|
+
"lint": "biome check .",
|
|
66
|
+
"lint:fix": "biome check --write ."
|
|
67
|
+
},
|
|
68
|
+
"devDependencies": {
|
|
69
|
+
"@biomejs/biome": "^1.9.4",
|
|
70
|
+
"@tailwindcss/vite": "^4.1.2",
|
|
71
|
+
"@types/node": "^22.13.10",
|
|
72
|
+
"@types/react": "^19.2.14",
|
|
73
|
+
"autoprefixer": "^10.4.20",
|
|
74
|
+
"javascript-obfuscator": "^5.4.1",
|
|
75
|
+
"lit": "^3.2.0",
|
|
76
|
+
"postcss": "^8.5.3",
|
|
77
|
+
"tailwindcss": "^4.1.2",
|
|
78
|
+
"terser": "^5.46.1",
|
|
79
|
+
"typescript": "^5.8.2",
|
|
80
|
+
"vite": "^5.4.14",
|
|
81
|
+
"vite-plugin-dts": "^4.5.4",
|
|
82
|
+
"vue": "^3.5.31"
|
|
83
|
+
},
|
|
84
|
+
"dependencies": {
|
|
85
|
+
"axios": "^1.13.6"
|
|
86
|
+
}
|
|
87
|
+
}
|