adp-web-components 0.0.23 → 0.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/dead-stock-lookup.cjs.entry.js +1 -1
- package/dist/cjs/distributor-lookup.cjs.entry.js +4 -4
- package/dist/cjs/dynamic-claim_6.cjs.entry.js +5 -5
- package/dist/cjs/form-input.cjs.entry.js +1 -1
- package/dist/cjs/general-inquiry-form.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/manufacturer-lookup.cjs.entry.js +5 -4
- package/dist/cjs/shift-components.cjs.js +1 -1
- package/dist/cjs/vehicle-lookup.cjs.entry.js +16 -9
- package/dist/collection/collection-manifest.json +4 -4
- package/dist/collection/components/form-input/form-input.js +1 -1
- package/dist/collection/components/general-inquiry-form/general-inquiry-form.js +1 -1
- package/dist/collection/components/part-lookup/dead-stock-lookup.js +1 -1
- package/dist/collection/components/part-lookup/distributor-lookup.js +4 -4
- package/dist/collection/components/part-lookup/manufacturer-lookup.js +5 -4
- package/dist/collection/components/vehicle-accessories/vehicle-accessories.js +3 -3
- package/dist/collection/components/vehicle-lookup/vehicle-lookup.js +34 -46
- package/dist/collection/components/vehicle-specification/vehicle-specification.js +1 -1
- package/dist/collection/components/warranty-details/warranty-details.js +1 -1
- package/dist/collection/templates/parts/mock-data.js +170 -170
- package/dist/components/dead-stock-lookup.js +1 -1
- package/dist/components/distributor-lookup.js +1 -1
- package/dist/components/form-input.js +1 -1
- package/dist/components/general-inquiry-form.js +1 -1
- package/dist/components/manufacturer-lookup.js +1 -1
- package/dist/components/{p-23551e81.js → p-044025a6.js} +1 -1
- package/dist/components/{p-e46b126e.js → p-442f4eff.js} +1 -1
- package/dist/components/{p-c8eef708.js → p-84427fef.js} +1 -1
- package/dist/components/{p-3bf0339d.js → p-b90fd51c.js} +1 -1
- package/dist/components/vehicle-accessories.js +1 -1
- package/dist/components/vehicle-lookup.js +1 -1
- package/dist/components/vehicle-specification.js +1 -1
- package/dist/components/warranty-details.js +1 -1
- package/dist/esm/dead-stock-lookup.entry.js +1 -1
- package/dist/esm/distributor-lookup.entry.js +4 -4
- package/dist/esm/dynamic-claim_6.entry.js +5 -5
- package/dist/esm/form-input.entry.js +1 -1
- package/dist/esm/general-inquiry-form.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/manufacturer-lookup.entry.js +5 -4
- package/dist/esm/shift-components.js +1 -1
- package/dist/esm/vehicle-lookup.entry.js +16 -9
- package/dist/shift-components/p-0cce310b.entry.js +5 -0
- package/dist/shift-components/p-2f7785d3.entry.js +5 -0
- package/dist/shift-components/{p-3f3b41b4.entry.js → p-48efd004.entry.js} +1 -1
- package/dist/shift-components/{p-1a727cfd.entry.js → p-73fa9b86.entry.js} +1 -1
- package/dist/shift-components/{p-4c3f2850.entry.js → p-9f58a33b.entry.js} +1 -1
- package/dist/shift-components/p-cb379a17.entry.js +5 -0
- package/dist/shift-components/{p-15e82b1a.entry.js → p-fad254c9.entry.js} +1 -1
- package/dist/shift-components/shift-components.esm.js +1 -1
- package/dist/types/components/vehicle-lookup/vehicle-lookup.d.ts +11 -2
- package/dist/types/components.d.ts +5 -15
- package/dist/types/global/types/part-information.d.ts +7 -7
- package/package.json +1 -1
- package/dist/shift-components/p-9427d4ab.entry.js +0 -5
- package/dist/shift-components/p-cabe9fa4.entry.js +0 -5
- package/dist/shift-components/p-e2cdbb4c.entry.js +0 -5
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built by ShiftSoftware
|
|
3
3
|
* Copyright (c)
|
|
4
4
|
*/
|
|
5
|
-
import{r as t,h as e,H as r,g as i}from"./p-f37b60d5.js";function n(t){this._maxSize=t,this.clear()}n.prototype.clear=function(){this._size=0,this._values=Object.create(null)},n.prototype.get=function(t){return this._values[t]},n.prototype.set=function(t,e){return this._size>=this._maxSize&&this.clear(),t in this._values||this._size++,this._values[t]=e};var s=/[^.^\]^[]+|(?=\[\]|\.\.)/g,a=/^\d+$/,o=/^\d/,u=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,l=/^\s*(['"]?)(.*?)(\1)\s*$/,h=new n(512),f=new n(512),c=new n(512),d={Cache:n,split:m,normalizePath:p,setter:function(t){var e=p(t);return f.get(t)||f.set(t,(function(t,r){for(var i=0,n=e.length,s=t;i<n-1;){var a=e[i];if("__proto__"===a||"constructor"===a||"prototype"===a)return t;s=s[e[i++]]}s[e[i]]=r}))},getter:function(t,e){var r=p(t);return c.get(t)||c.set(t,(function(t){for(var i=0,n=r.length;i<n;){if(null==t&&e)return;t=t[r[i++]]}return t}))},join:function(t){return t.reduce((function(t,e){return t+(b(e)||a.test(e)?"["+e+"]":(t?".":"")+e)}),"")},forEach:function(t,e,r){!function(t,e,r){var i,n,s,a,o=t.length;for(n=0;n<o;n++)(i=t[n])&&(x(i)&&(i='"'+i+'"'),s=!(a=b(i))&&/^\d+$/.test(i),e.call(r,i,a,s,n,t))}(Array.isArray(t)?t:m(t),e,r)}};function p(t){return h.get(t)||h.set(t,m(t).map((function(t){return t.replace(l,"$2")})))}function m(t){return t.match(s)||[""]}function b(t){return"string"==typeof t&&t&&-1!==["'",'"'].indexOf(t.charAt(0))}function x(t){return!b(t)&&(function(t){return t.match(o)&&!t.match(a)}(t)||function(t){return u.test(t)}(t))}const w=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,v=t=>t.match(w)||[];var g=t=>v(t).reduce(((t,e)=>`${t}${t?e[0].toUpperCase()+e.slice(1).toLowerCase():e.toLowerCase()}`),""),y=t=>((t,e)=>v(t).join(e).toLowerCase())(t,"_"),F={exports:{}};function $(t,e){var r=t.length,i=new Array(r),n={},s=r,a=function(t){for(var e=new Map,r=0,i=t.length;r<i;r++){var n=t[r];e.has(n[0])||e.set(n[0],new Set),e.has(n[1])||e.set(n[1],new Set),e.get(n[0]).add(n[1])}return e}(e),o=function(t){for(var e=new Map,r=0,i=t.length;r<i;r++)e.set(t[r],r);return e}(t);for(e.forEach((function(t){if(!o.has(t[0])||!o.has(t[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")}));s--;)n[s]||u(t[s],s,new Set);return i;function u(t,e,s){if(s.has(t)){var l;try{l=", node was:"+JSON.stringify(t)}catch(t){l=""}throw new Error("Cyclic dependency"+l)}if(!o.has(t))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(t));if(!n[e]){n[e]=!0;var h=a.get(t)||new Set;if(e=(h=Array.from(h)).length){s.add(t);do{var f=h[--e];u(f,o.get(f),s)}while(e);s.delete(t)}i[--r]=t}}}F.exports=function(t){return $(function(t){for(var e=new Set,r=0,i=t.length;r<i;r++){var n=t[r];e.add(n[0]),e.add(n[1])}return Array.from(e)}(t),t)},F.exports.array=$;const O=F.exports,E=Object.prototype.toString,k=Error.prototype.toString,j=RegExp.prototype.toString,A="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",D=/^Symbol\((.*)\)(.*)$/;function S(t,e=!1){if(null==t||!0===t||!1===t)return""+t;const r=typeof t;if("number"===r)return function(t){return t!=+t?"NaN":0===t&&1/t<0?"-0":""+t}(t);if("string"===r)return e?`"${t}"`:t;if("function"===r)return"[Function "+(t.name||"anonymous")+"]";if("symbol"===r)return A.call(t).replace(D,"Symbol($1)");const i=E.call(t).slice(8,-1);return"Date"===i?isNaN(t.getTime())?""+t:t.toISOString(t):"Error"===i||t instanceof Error?"["+k.call(t)+"]":"RegExp"===i?j.call(t):null}function z(t,e){let r=S(t,e);return null!==r?r:JSON.stringify(t,(function(t,r){let i=S(this[t],e);return null!==i?i:r}),2)}function T(t){return null==t?[]:[].concat(t)}let _,C,N,V=/\$\{\s*(\w+)\s*\}/g;_=Symbol.toStringTag;class Z{constructor(t,e,r,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[_]="Error",this.name="ValidationError",this.value=e,this.path=r,this.type=i,this.errors=[],this.inner=[],T(t).forEach((t=>{M.isError(t)?(this.errors.push(...t.errors),this.inner.push(...t.inner.length?t.inner:[t])):this.errors.push(t)})),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}C=Symbol.hasInstance,N=Symbol.toStringTag;class M extends Error{static formatError(t,e){return e=Object.assign({},e,{path:e.label||e.path||"this",originalPath:e.path}),"string"==typeof t?t.replace(V,((t,r)=>z(e[r]))):"function"==typeof t?t(e):t}static isError(t){return t&&"ValidationError"===t.name}constructor(t,e,r,i,n){const s=new Z(t,e,r,i);if(n)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[N]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,M)}static[C](t){return Z[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let q={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:t,type:e,value:r,originalValue:i})=>{const n=null!=i&&i!==r?` (cast from the value \`${z(i,!0)}\`).`:".";return"mixed"!==e?`${t} must be a \`${e}\` type, but the final value was: \`${z(r,!0)}\``+n:`${t} must match the configured type. The validated value was: \`${z(r,!0)}\``+n}},U={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},P={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},R={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},I={notType:t=>{const{path:e,value:r,spec:i}=t,n=i.types.length;if(Array.isArray(r)){if(r.length<n)return`${e} tuple value has too few items, expected a length of ${n} but got ${r.length} for value: \`${z(r,!0)}\``;if(r.length>n)return`${e} tuple value has too many items, expected a length of ${n} but got ${r.length} for value: \`${z(r,!0)}\``}return M.formatError(q.notType,t)}};Object.assign(Object.create(null),{mixed:q,string:U,number:{min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},date:P,object:R,array:{min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},boolean:{isValue:"${path} field must be ${value}"},tuple:I});const L=t=>t&&t.__isYupSchema__;class J{static fromOptions(t,e){if(!e.then&&!e.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:i,otherwise:n}=e,s="function"==typeof r?r:(...t)=>t.every((t=>t===r));return new J(t,((t,e)=>{var r;let a=s(...t)?i:n;return null!=(r=null==a?void 0:a(e))?r:e}))}constructor(t,e){this.fn=void 0,this.refs=t,this.refs=t,this.fn=e}resolve(t,e){let r=this.refs.map((t=>t.getValue(null==e?void 0:e.value,null==e?void 0:e.parent,null==e?void 0:e.context))),i=this.fn(r,t,e);if(void 0===i||i===t)return t;if(!L(i))throw new TypeError("conditions must return a schema object");return i.resolve(e)}}class Y{constructor(t,e={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,"string"!=typeof t)throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),""===t)throw new TypeError("ref must be a non-empty string");this.isContext="$"===this.key[0],this.isValue="."===this.key[0],this.isSibling=!this.isContext&&!this.isValue,this.path=this.key.slice((this.isContext?"$":this.isValue?".":"").length),this.getter=this.path&&d.getter(this.path,!0),this.map=e.map}getValue(t,e,r){let i=this.isContext?r:this.isValue?t:e;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(t,e){return this.getValue(t,null==e?void 0:e.parent,null==e?void 0:e.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}Y.prototype.__isYupRef=!0;const H=t=>null==t;function K(t){function e({value:e,path:r="",options:i,originalValue:n,schema:s},a,o){const{name:u,test:l,params:h,message:f,skipAbsent:c}=t;let{parent:d,context:p,abortEarly:m=s.spec.abortEarly,disableStackTrace:b=s.spec.disableStackTrace}=i;function x(t){return Y.isRef(t)?t.getValue(e,d,p):t}function w(t={}){const i=Object.assign({value:e,originalValue:n,label:s.spec.label,path:t.path||r,spec:s.spec,disableStackTrace:t.disableStackTrace||b},h,t.params);for(const t of Object.keys(i))i[t]=x(i[t]);const a=new M(M.formatError(t.message||f,i),e,i.path,t.type||u,i.disableStackTrace);return a.params=i,a}const v=m?a:o;let g={path:r,parent:d,type:u,from:i.from,createError:w,resolve:x,options:i,originalValue:n,schema:s};const y=t=>{M.isError(t)?v(t):t?o(null):v(w())},F=t=>{M.isError(t)?v(t):a(t)};if(c&&H(e))return y(!0);let $;try{var O;if($=l.call(g,e,g),"function"==typeof(null==(O=$)?void 0:O.then)){if(i.sync)throw new Error(`Validation test of type: "${g.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve($).then(y,F)}}catch(t){return void F(t)}y($)}return e.OPTIONS=t,e}function B(t,e,r,i=r){let n,s,a;return e?(d.forEach(e,((o,u,l)=>{let h=u?o.slice(1,o.length-1):o,f="tuple"===(t=t.resolve({context:i,parent:n,value:r})).type,c=l?parseInt(h,10):0;if(t.innerType||f){if(f&&!l)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${a}" must contain an index to the tuple element, e.g. "${a}[0]"`);if(r&&c>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${o}, in the path: ${e}. because there is no value at that index. `);n=r,r=r&&r[c],t=f?t.spec.types[c]:t.innerType}if(!l){if(!t.fields||!t.fields[h])throw new Error(`The schema does not contain the path: ${e}. (failed at: ${a} which is a type: "${t.type}")`);n=r,r=r&&r[h],t=t.fields[h]}s=h,a=u?"["+o+"]":"."+o})),{schema:t,parent:n,parentPath:s}):{parent:n,parentPath:e,schema:t}}class G extends Set{describe(){const t=[];for(const e of this.values())t.push(Y.isRef(e)?e.describe():e);return t}resolveAll(t){let e=[];for(const r of this.values())e.push(t(r));return e}clone(){return new G(this.values())}merge(t,e){const r=this.clone();return t.forEach((t=>r.add(t))),e.forEach((t=>r.delete(t))),r}}function Q(t,e=new Map){if(L(t)||!t||"object"!=typeof t)return t;if(e.has(t))return e.get(t);let r;if(t instanceof Date)r=new Date(t.getTime()),e.set(t,r);else if(t instanceof RegExp)r=new RegExp(t),e.set(t,r);else if(Array.isArray(t)){r=new Array(t.length),e.set(t,r);for(let i=0;i<t.length;i++)r[i]=Q(t[i],e)}else if(t instanceof Map){r=new Map,e.set(t,r);for(const[i,n]of t.entries())r.set(i,Q(n,e))}else if(t instanceof Set){r=new Set,e.set(t,r);for(const i of t)r.add(Q(i,e))}else{if(!(t instanceof Object))throw Error(`Unable to clone ${t}`);r={},e.set(t,r);for(const[i,n]of Object.entries(t))r[i]=Q(n,e)}return r}class W{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new G,this._blacklist=new G,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation((()=>{this.typeError(q.notType)})),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},null==t?void 0:t.spec),this.withMutation((t=>{t.nonNullable()}))}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const e=Object.create(Object.getPrototypeOf(this));return e.type=this.type,e._typeCheck=this._typeCheck,e._whitelist=this._whitelist.clone(),e._blacklist=this._blacklist.clone(),e.internalTests=Object.assign({},this.internalTests),e.exclusiveTests=Object.assign({},this.exclusiveTests),e.deps=[...this.deps],e.conditions=[...this.conditions],e.tests=[...this.tests],e.transforms=[...this.transforms],e.spec=Q(Object.assign({},this.spec,t)),e}label(t){let e=this.clone();return e.spec.label=t,e}meta(...t){if(0===t.length)return this.spec.meta;let e=this.clone();return e.spec.meta=Object.assign(e.spec.meta||{},t[0]),e}withMutation(t){let e=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=e,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&"mixed"!==this.type)throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let e=this,r=t.clone();const i=Object.assign({},e.spec,r.spec);return r.spec=i,r.internalTests=Object.assign({},e.internalTests,r.internalTests),r._whitelist=e._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=e._blacklist.merge(t._blacklist,t._whitelist),r.tests=e.tests,r.exclusiveTests=e.exclusiveTests,r.withMutation((e=>{t.tests.forEach((t=>{e.test(t.OPTIONS)}))})),r.transforms=[...e.transforms,...r.transforms],r}isType(t){return null==t?!(!this.spec.nullable||null!==t)||!(!this.spec.optional||void 0!==t):this._typeCheck(t)}resolve(t){let e=this;if(e.conditions.length){let r=e.conditions;e=e.clone(),e.conditions=[],e=r.reduce(((e,r)=>r.resolve(e,t)),e),e=e.resolve(t)}return e}resolveOptions(t){var e,r,i,n;return Object.assign({},t,{from:t.from||[],strict:null!=(e=t.strict)?e:this.spec.strict,abortEarly:null!=(r=t.abortEarly)?r:this.spec.abortEarly,recursive:null!=(i=t.recursive)?i:this.spec.recursive,disableStackTrace:null!=(n=t.disableStackTrace)?n:this.spec.disableStackTrace})}cast(t,e={}){let r=this.resolve(Object.assign({value:t},e)),i="ignore-optionality"===e.assert,n=r._cast(t,e);if(!1!==e.assert&&!r.isType(n)){if(i&&H(n))return n;let s=z(t),a=z(n);throw new TypeError(`The value of ${e.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}". \n\nattempted value: ${s} \n`+(a!==s?`result of cast: ${a}`:""))}return n}_cast(t,e){let r=void 0===t?t:this.transforms.reduce(((e,r)=>r.call(this,e,t,this)),t);return void 0===r&&(r=this.getDefault(e)),r}_validate(t,e={},r,i){let{path:n,originalValue:s=t,strict:a=this.spec.strict}=e,o=t;a||(o=this._cast(o,Object.assign({assert:!1},e)));let u=[];for(let t of Object.values(this.internalTests))t&&u.push(t);this.runTests({path:n,value:o,originalValue:s,options:e,tests:u},r,(t=>{if(t.length)return i(t,o);this.runTests({path:n,value:o,originalValue:s,options:e,tests:this.tests},r,i)}))}runTests(t,e,r){let i=!1,{tests:n,value:s,originalValue:a,path:o,options:u}=t,l=t=>{i||(i=!0,e(t,s))},h=t=>{i||(i=!0,r(t,s))},f=n.length,c=[];if(!f)return h([]);let d={value:s,originalValue:a,path:o,options:u,schema:this};for(let t=0;t<n.length;t++)(0,n[t])(d,l,(function(t){t&&(Array.isArray(t)?c.push(...t):c.push(t)),--f<=0&&h(c)}))}asNestedTest({key:t,index:e,parent:r,parentPath:i,originalParent:n,options:s}){const a=null!=t?t:e;if(null==a)throw TypeError("Must include `key` or `index` for nested validations");const o="number"==typeof a;let u=r[a];const l=Object.assign({},s,{strict:!0,parent:r,value:u,originalValue:n[a],key:void 0,[o?"index":"key"]:a,path:o||a.includes(".")?`${i||""}[${o?a:`"${a}"`}]`:(i?`${i}.`:"")+t});return(t,e,r)=>this.resolve(l)._validate(u,l,e,r)}validate(t,e){var r;let i=this.resolve(Object.assign({},e,{value:t})),n=null!=(r=null==e?void 0:e.disableStackTrace)?r:i.spec.disableStackTrace;return new Promise(((r,s)=>i._validate(t,e,((t,e)=>{M.isError(t)&&(t.value=e),s(t)}),((t,e)=>{t.length?s(new M(t,e,void 0,void 0,n)):r(e)}))))}validateSync(t,e){var r;let i,n=this.resolve(Object.assign({},e,{value:t})),s=null!=(r=null==e?void 0:e.disableStackTrace)?r:n.spec.disableStackTrace;return n._validate(t,Object.assign({},e,{sync:!0}),((t,e)=>{throw M.isError(t)&&(t.value=e),t}),((e,r)=>{if(e.length)throw new M(e,t,void 0,void 0,s);i=r})),i}isValid(t,e){return this.validate(t,e).then((()=>!0),(t=>{if(M.isError(t))return!1;throw t}))}isValidSync(t,e){try{return this.validateSync(t,e),!0}catch(t){if(M.isError(t))return!1;throw t}}_getDefault(t){let e=this.spec.default;return null==e?e:"function"==typeof e?e.call(this,t):Q(e)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return 0===arguments.length?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,e){const r=this.clone({nullable:t});return r.internalTests.nullable=K({message:e,name:"nullable",test(t){return null!==t||this.schema.spec.nullable}}),r}optionality(t,e){const r=this.clone({optional:t});return r.internalTests.optionality=K({message:e,name:"optionality",test(t){return void 0!==t||this.schema.spec.optional}}),r}optional(){return this.optionality(!0)}defined(t=q.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=q.notNull){return this.nullability(!1,t)}required(t=q.required){return this.clone().withMutation((e=>e.nonNullable(t).defined(t)))}notRequired(){return this.clone().withMutation((t=>t.nullable().optional()))}transform(t){let e=this.clone();return e.transforms.push(t),e}test(...t){let e;if(e=1===t.length?"function"==typeof t[0]?{test:t[0]}:t[0]:2===t.length?{name:t[0],test:t[1]}:{name:t[0],message:t[1],test:t[2]},void 0===e.message&&(e.message=q.default),"function"!=typeof e.test)throw new TypeError("`test` is a required parameters");let r=this.clone(),i=K(e),n=e.exclusive||e.name&&!0===r.exclusiveTests[e.name];if(e.exclusive&&!e.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return e.name&&(r.exclusiveTests[e.name]=!!e.exclusive),r.tests=r.tests.filter((t=>{if(t.OPTIONS.name===e.name){if(n)return!1;if(t.OPTIONS.test===i.OPTIONS.test)return!1}return!0})),r.tests.push(i),r}when(t,e){Array.isArray(t)||"string"==typeof t||(e=t,t=".");let r=this.clone(),i=T(t).map((t=>new Y(t)));return i.forEach((t=>{t.isSibling&&r.deps.push(t.key)})),r.conditions.push("function"==typeof e?new J(i,e):J.fromOptions(i,e)),r}typeError(t){let e=this.clone();return e.internalTests.typeError=K({message:t,name:"typeError",skipAbsent:!0,test(t){return!!this.schema._typeCheck(t)||this.createError({params:{type:this.schema.type}})}}),e}oneOf(t,e=q.oneOf){let r=this.clone();return t.forEach((t=>{r._whitelist.add(t),r._blacklist.delete(t)})),r.internalTests.whiteList=K({message:e,name:"oneOf",skipAbsent:!0,test(t){let e=this.schema._whitelist,r=e.resolveAll(this.resolve);return!!r.includes(t)||this.createError({params:{values:Array.from(e).join(", "),resolved:r}})}}),r}notOneOf(t,e=q.notOneOf){let r=this.clone();return t.forEach((t=>{r._blacklist.add(t),r._whitelist.delete(t)})),r.internalTests.blacklist=K({message:e,name:"notOneOf",test(t){let e=this.schema._blacklist,r=e.resolveAll(this.resolve);return!r.includes(t)||this.createError({params:{values:Array.from(e).join(", "),resolved:r}})}}),r}strip(t=!0){let e=this.clone();return e.spec.strip=t,e}describe(t){const e=(t?this.resolve(t):this).clone(),{label:r,meta:i,optional:n,nullable:s}=e.spec;return{meta:i,label:r,optional:n,nullable:s,default:e.getDefault(t),type:e.type,oneOf:e._whitelist.describe(),notOneOf:e._blacklist.describe(),tests:e.tests.map((t=>({name:t.OPTIONS.name,params:t.OPTIONS.params}))).filter(((t,e,r)=>r.findIndex((e=>e.name===t.name))===e))}}}W.prototype.__isYupSchema__=!0;for(const t of["validate","validateSync"])W.prototype[`${t}At`]=function(e,r,i={}){const{parent:n,parentPath:s,schema:a}=B(this,e,r,i.context);return a[t](n&&n[s],Object.assign({},i,{parent:n,path:e}))};for(const t of["equals","is"])W.prototype[t]=W.prototype.oneOf;for(const t of["not","nope"])W.prototype[t]=W.prototype.notOneOf;const X=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function tt(t){var e,r;const i=X.exec(t);return i?{year:et(i[1]),month:et(i[2],1)-1,day:et(i[3],1),hour:et(i[4]),minute:et(i[5]),second:et(i[6]),millisecond:i[7]?et(i[7].substring(0,3)):0,precision:null!=(e=null==(r=i[7])?void 0:r.length)?e:void 0,z:i[8]||void 0,plusMinus:i[9]||void 0,hourOffset:et(i[10]),minuteOffset:et(i[11])}:null}function et(t,e=0){return Number(t)||e}let rt=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,it=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,nt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,st=new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"),at=t=>H(t)||t===t.trim(),ot={}.toString();function ut(){return new lt}class lt extends W{constructor(){super({type:"string",check:t=>(t instanceof String&&(t=t.valueOf()),"string"==typeof t)}),this.withMutation((()=>{this.transform(((t,e,r)=>{if(!r.spec.coerce||r.isType(t))return t;if(Array.isArray(t))return t;const i=null!=t&&t.toString?t.toString():t;return i===ot?t:i}))}))}required(t){return super.required(t).withMutation((e=>e.test({message:t||q.required,name:"required",skipAbsent:!0,test:t=>!!t.length})))}notRequired(){return super.notRequired().withMutation((t=>(t.tests=t.tests.filter((t=>"required"!==t.OPTIONS.name)),t)))}length(t,e=U.length){return this.test({message:e,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(e){return e.length===this.resolve(t)}})}min(t,e=U.min){return this.test({message:e,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(e){return e.length>=this.resolve(t)}})}max(t,e=U.max){return this.test({name:"max",exclusive:!0,message:e,params:{max:t},skipAbsent:!0,test(e){return e.length<=this.resolve(t)}})}matches(t,e){let r,i,n=!1;return e&&("object"==typeof e?({excludeEmptyString:n=!1,message:r,name:i}=e):r=e),this.test({name:i||"matches",message:r||U.matches,params:{regex:t},skipAbsent:!0,test:e=>""===e&&n||-1!==e.search(t)})}email(t=U.email){return this.matches(rt,{name:"email",message:t,excludeEmptyString:!0})}url(t=U.url){return this.matches(it,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=U.uuid){return this.matches(nt,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let e,r,i="";return t&&("object"==typeof t?({message:i="",allowOffset:e=!1,precision:r}=t):i=t),this.matches(st,{name:"datetime",message:i||U.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:i||U.datetime_offset,params:{allowOffset:e},skipAbsent:!0,test:t=>{if(!t||e)return!0;const r=tt(t);return!!r&&!!r.z}}).test({name:"datetime_precision",message:i||U.datetime_precision,params:{precision:r},skipAbsent:!0,test:t=>{if(!t||null==r)return!0;const e=tt(t);return!!e&&e.precision===r}})}ensure(){return this.default("").transform((t=>null===t?"":t))}trim(t=U.trim){return this.transform((t=>null!=t?t.trim():t)).test({message:t,name:"trim",test:at})}lowercase(t=U.lowercase){return this.transform((t=>H(t)?t:t.toLowerCase())).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:t=>H(t)||t===t.toLowerCase()})}uppercase(t=U.uppercase){return this.transform((t=>H(t)?t:t.toUpperCase())).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:t=>H(t)||t===t.toUpperCase()})}}ut.prototype=lt.prototype;let ht=new Date("");class ft extends W{constructor(){super({type:"date",check:t=>"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(t.getTime())}),this.withMutation((()=>{this.transform(((t,e,r)=>!r.spec.coerce||r.isType(t)||null===t?t:(t=function(t){const e=tt(t);if(!e)return Date.parse?Date.parse(t):Number.NaN;if(void 0===e.z&&void 0===e.plusMinus)return new Date(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond).valueOf();let r=0;return"Z"!==e.z&&void 0!==e.plusMinus&&(r=60*e.hourOffset+e.minuteOffset,"+"===e.plusMinus&&(r=0-r)),Date.UTC(e.year,e.month,e.day,e.hour,e.minute+r,e.second,e.millisecond)}(t),isNaN(t)?ft.INVALID_DATE:new Date(t))))}))}prepareParam(t,e){let r;if(Y.isRef(t))r=t;else{let i=this.cast(t);if(!this._typeCheck(i))throw new TypeError(`\`${e}\` must be a Date or a value that can be \`cast()\` to a Date`);r=i}return r}min(t,e=P.min){let r=this.prepareParam(t,"min");return this.test({message:e,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(t){return t>=this.resolve(r)}})}max(t,e=P.max){let r=this.prepareParam(t,"max");return this.test({message:e,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(t){return t<=this.resolve(r)}})}}function ct(t,e){let r=1/0;return t.some(((t,i)=>{var n;if(null!=(n=e.path)&&n.includes(t))return r=i,!0})),r}function dt(t){return(e,r)=>ct(t,e)-ct(t,r)}ft.INVALID_DATE=ht;const pt=(t,e,r)=>{if("string"!=typeof t)return t;let i=t;try{i=JSON.parse(t)}catch(t){}return r.isType(i)?i:t};function mt(t){if("fields"in t){const e={};for(const[r,i]of Object.entries(t.fields))e[r]=mt(i);return t.setFields(e)}if("array"===t.type){const e=t.optional();return e.innerType&&(e.innerType=mt(e.innerType)),e}return"tuple"===t.type?t.optional().clone({types:t.spec.types.map(mt)}):"optional"in t?t.optional():t}let bt=t=>"[object Object]"===Object.prototype.toString.call(t);function xt(t,e){let r=Object.keys(t.fields);return Object.keys(e).filter((t=>-1===r.indexOf(t)))}const wt=dt([]);function vt(t){return new gt(t)}class gt extends W{constructor(t){super({type:"object",check:t=>bt(t)||"function"==typeof t}),this.fields=Object.create(null),this._sortErrors=wt,this._nodes=[],this._excludedEdges=[],this.withMutation((()=>{t&&this.shape(t)}))}_cast(t,e={}){var r;let i=super._cast(t,e);if(void 0===i)return this.getDefault(e);if(!this._typeCheck(i))return i;let n=this.fields,s=null!=(r=e.stripUnknown)?r:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(i).filter((t=>!this._nodes.includes(t)))),o={},u=Object.assign({},e,{parent:o,__validating:e.__validating||!1}),l=!1;for(const t of a){let r=n[t],a=t in i;if(r){let n,s=i[t];u.path=(e.path?`${e.path}.`:"")+t,r=r.resolve({value:s,context:e.context,parent:o});let a=r instanceof W?r.spec:void 0,h=null==a?void 0:a.strict;if(null!=a&&a.strip){l=l||t in i;continue}n=e.__validating&&h?i[t]:r.cast(i[t],u),void 0!==n&&(o[t]=n)}else a&&!s&&(o[t]=i[t]);a===t in o&&o[t]===i[t]||(l=!0)}return l?o:i}_validate(t,e={},r,i){let{from:n=[],originalValue:s=t,recursive:a=this.spec.recursive}=e;e.from=[{schema:this,value:s},...n],e.__validating=!0,e.originalValue=s,super._validate(t,e,r,((t,n)=>{if(!a||!bt(n))return void i(t,n);s=s||n;let o=[];for(let t of this._nodes){let r=this.fields[t];r&&!Y.isRef(r)&&o.push(r.asNestedTest({options:e,key:t,parent:n,parentPath:e.path,originalParent:s}))}this.runTests({tests:o,value:n,originalValue:s,options:e},r,(e=>{i(e.sort(this._sortErrors).concat(t),n)}))}))}clone(t){const e=super.clone(t);return e.fields=Object.assign({},this.fields),e._nodes=this._nodes,e._excludedEdges=this._excludedEdges,e._sortErrors=this._sortErrors,e}concat(t){let e=super.concat(t),r=e.fields;for(let[t,e]of Object.entries(this.fields)){const i=r[t];r[t]=void 0===i?e:i}return e.withMutation((e=>e.setFields(r,[...this._excludedEdges,...t._excludedEdges])))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let e={};return this._nodes.forEach((r=>{var i;const n=this.fields[r];let s=t;null!=(i=s)&&i.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[r]})),e[r]=n&&"getDefault"in n?n.getDefault(s):void 0})),e}setFields(t,e){let r=this.clone();return r.fields=t,r._nodes=function(t,e=[]){let r=[],i=new Set,n=new Set(e.map((([t,e])=>`${t}-${e}`)));function s(t,e){let s=d.split(t)[0];i.add(s),n.has(`${e}-${s}`)||r.push([e,s])}for(const e of Object.keys(t)){let r=t[e];i.add(e),Y.isRef(r)&&r.isSibling?s(r.path,e):L(r)&&"deps"in r&&r.deps.forEach((t=>s(t,e)))}return O.array(Array.from(i),r).reverse()}(t,e),r._sortErrors=dt(Object.keys(t)),e&&(r._excludedEdges=e),r}shape(t,e=[]){return this.clone().withMutation((r=>{let i=r._excludedEdges;return e.length&&(Array.isArray(e[0])||(e=[e]),i=[...r._excludedEdges,...e]),r.setFields(Object.assign(r.fields,t),i)}))}partial(){const t={};for(const[e,r]of Object.entries(this.fields))t[e]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return mt(this)}pick(t){const e={};for(const r of t)this.fields[r]&&(e[r]=this.fields[r]);return this.setFields(e,this._excludedEdges.filter((([e,r])=>t.includes(e)&&t.includes(r))))}omit(t){const e=[];for(const r of Object.keys(this.fields))t.includes(r)||e.push(r);return this.pick(e)}from(t,e,r){let i=d.getter(t,!0);return this.transform((n=>{if(!n)return n;let s=n;return((t,e)=>{const r=[...d.normalizePath(e)];if(1===r.length)return r[0]in t;let i=r.pop(),n=d.getter(d.join(r),!0)(t);return!(!n||!(i in n))})(n,t)&&(s=Object.assign({},n),r||delete s[t],s[e]=i(n)),s}))}json(){return this.transform(pt)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||R.exact,test(t){if(null==t)return!0;const e=xt(this.schema,t);return 0===e.length||this.createError({params:{properties:e.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,e=R.noUnknown){"boolean"!=typeof t&&(e=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:e,test(e){if(null==e)return!0;const r=xt(this.schema,e);return!t||0===r.length||this.createError({params:{unknown:r.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,e=R.noUnknown){return this.noUnknown(!t,e)}transformKeys(t){return this.transform((e=>{if(!e)return e;const r={};for(const i of Object.keys(e))r[t(i)]=e[i];return r}))}camelCase(){return this.transformKeys(g)}snakeCase(){return this.transformKeys(y)}constantCase(){return this.transformKeys((t=>y(t).toUpperCase()))}describe(t){const e=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[n,s]of Object.entries(e.fields)){var i;let e=t;null!=(i=e)&&i.value&&(e=Object.assign({},e,{parent:e.value,value:e.value[n]})),r.fields[n]=s.describe(e)}return r}}vt.prototype=gt.prototype;class yt{constructor(t,e,r){this.isSubmitted=!1,this.validationType="onSubmit",this.subscribedFields={},this.formErrors={},this.getFormErrors=()=>this.formErrors,this.getValues=()=>{const t=this.context.el.shadowRoot.querySelector("form"),e=new FormData(t);return Object.fromEntries(e.entries())},this.focusFirstInput=t=>{if(t.length){const e=t.map((t=>this.context.el.shadowRoot.querySelector(`input[name="${t.name}"]`))).filter((t=>t)).sort(((t,e)=>t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?-1:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING?1:0));e[0]&&e[0].focus()}},this.onSubmit=t=>{t.preventDefault(),(async()=>{try{this.isSubmitted=!0,this.context.isLoading=!0,this.signal({isError:!1});const t=this.getValues(),e=await this.schemaObject.validate(t,{abortEarly:!1,strict:!0});await this.context.formSubmit(e)}catch(t){if("ValidationError"===t.name){this.formErrors={};const e=[];t.inner.forEach((t=>{t.path&&(this.formErrors[t.path]=t.message,e.find((e=>e.name===t.path))||e.push({isError:!0,name:t.path,errorMessage:t.message}))})),this.signal(e),this.focusFirstInput(e)}else console.error("Unexpected Error:",t)}finally{this.context.isLoading=!1}})()},this.newController=(t,e)=>("text"===e&&(this.subscribedFields[t]={name:t,isError:!1,disabled:!1,errorMessage:"",onInput:e=>{this.onChanges(t,e.target.value)}}),this.subscribedFields[t]),this.signal=t=>{Array.isArray(t)?t.forEach((t=>{this.subscribedFields[t.name]&&Object.assign(this.subscribedFields[t.name],t)})):Object.values(this.subscribedFields).forEach((e=>Object.assign(e,t)))},this.onChanges=async(t,e)=>{if(!this.isSubmitted&&"always"!==this.validationType)return;const r=this.subscribedFields[t].isError;try{this.schemaObject.fields[t].validateSync(e),this.signal([{name:t,isError:!1}]),!1!==r&&(this.context.renderControl={})}catch(e){e.message&&(this.signal([{name:t,isError:!0,errorMessage:e.message}]),this.context.renderControl={})}},this.context=t,this.schemaObject=e,this.formController={onSubmit:this.onSubmit},(null==r?void 0:r.validationType)&&(this.validationType=r.validationType)}}const Ft=vt({name:ut().required("r").min(4,"kd").max(7,"kk"),name2:ut().required()}),$t=class{constructor(e){t(this,e),this.form=new yt(this,Ft),this.nameController=this.form.newController("name","text"),this.name2Controller=this.form.newController("name2","text"),this.isLoading=void 0,this.renderControl={}}async formSubmit(t){console.log(t)}render(){const{formController:t}=this.form;return e(r,{key:"d9b4b093c809a56b5ee8cd07b691006bcb1fec1b"},e("form",Object.assign({key:"d2b869ff5a69287a5134d9a886b0f47619acd548"},t),e("form-input",Object.assign({key:"3be3ab63fa20ba896200a325251d9ebc934e524f"},this.nameController,{label:"Name",name:"name"})),e("form-input",Object.assign({key:"845fad4ee5c0f7b0295068a5019b24285f619ce6"},this.name2Controller,{label:"Name2",name:"name2"})),e("button",{key:"2502a1e8daeeab52567eac7103f68aeefeb5c862",type:"submit"},"sd")))}get el(){return i(this)}};$t.style='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host{all:initial!important;display:block}*{font-family:Arial}.static{position:static}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}';export{$t as general_inquiry_form}
|
|
5
|
+
import{r as t,h as e,H as r,g as i}from"./p-f37b60d5.js";function n(t){this._maxSize=t,this.clear()}n.prototype.clear=function(){this._size=0,this._values=Object.create(null)},n.prototype.get=function(t){return this._values[t]},n.prototype.set=function(t,e){return this._size>=this._maxSize&&this.clear(),t in this._values||this._size++,this._values[t]=e};var s=/[^.^\]^[]+|(?=\[\]|\.\.)/g,a=/^\d+$/,o=/^\d/,u=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,l=/^\s*(['"]?)(.*?)(\1)\s*$/,h=new n(512),f=new n(512),c=new n(512),d={Cache:n,split:m,normalizePath:p,setter:function(t){var e=p(t);return f.get(t)||f.set(t,(function(t,r){for(var i=0,n=e.length,s=t;i<n-1;){var a=e[i];if("__proto__"===a||"constructor"===a||"prototype"===a)return t;s=s[e[i++]]}s[e[i]]=r}))},getter:function(t,e){var r=p(t);return c.get(t)||c.set(t,(function(t){for(var i=0,n=r.length;i<n;){if(null==t&&e)return;t=t[r[i++]]}return t}))},join:function(t){return t.reduce((function(t,e){return t+(b(e)||a.test(e)?"["+e+"]":(t?".":"")+e)}),"")},forEach:function(t,e,r){!function(t,e,r){var i,n,s,a,o=t.length;for(n=0;n<o;n++)(i=t[n])&&(x(i)&&(i='"'+i+'"'),s=!(a=b(i))&&/^\d+$/.test(i),e.call(r,i,a,s,n,t))}(Array.isArray(t)?t:m(t),e,r)}};function p(t){return h.get(t)||h.set(t,m(t).map((function(t){return t.replace(l,"$2")})))}function m(t){return t.match(s)||[""]}function b(t){return"string"==typeof t&&t&&-1!==["'",'"'].indexOf(t.charAt(0))}function x(t){return!b(t)&&(function(t){return t.match(o)&&!t.match(a)}(t)||function(t){return u.test(t)}(t))}const w=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,v=t=>t.match(w)||[];var g=t=>v(t).reduce(((t,e)=>`${t}${t?e[0].toUpperCase()+e.slice(1).toLowerCase():e.toLowerCase()}`),""),y=t=>((t,e)=>v(t).join(e).toLowerCase())(t,"_"),F={exports:{}};function $(t,e){var r=t.length,i=new Array(r),n={},s=r,a=function(t){for(var e=new Map,r=0,i=t.length;r<i;r++){var n=t[r];e.has(n[0])||e.set(n[0],new Set),e.has(n[1])||e.set(n[1],new Set),e.get(n[0]).add(n[1])}return e}(e),o=function(t){for(var e=new Map,r=0,i=t.length;r<i;r++)e.set(t[r],r);return e}(t);for(e.forEach((function(t){if(!o.has(t[0])||!o.has(t[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")}));s--;)n[s]||u(t[s],s,new Set);return i;function u(t,e,s){if(s.has(t)){var l;try{l=", node was:"+JSON.stringify(t)}catch(t){l=""}throw new Error("Cyclic dependency"+l)}if(!o.has(t))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(t));if(!n[e]){n[e]=!0;var h=a.get(t)||new Set;if(e=(h=Array.from(h)).length){s.add(t);do{var f=h[--e];u(f,o.get(f),s)}while(e);s.delete(t)}i[--r]=t}}}F.exports=function(t){return $(function(t){for(var e=new Set,r=0,i=t.length;r<i;r++){var n=t[r];e.add(n[0]),e.add(n[1])}return Array.from(e)}(t),t)},F.exports.array=$;const O=F.exports,E=Object.prototype.toString,k=Error.prototype.toString,j=RegExp.prototype.toString,A="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",D=/^Symbol\((.*)\)(.*)$/;function S(t,e=!1){if(null==t||!0===t||!1===t)return""+t;const r=typeof t;if("number"===r)return function(t){return t!=+t?"NaN":0===t&&1/t<0?"-0":""+t}(t);if("string"===r)return e?`"${t}"`:t;if("function"===r)return"[Function "+(t.name||"anonymous")+"]";if("symbol"===r)return A.call(t).replace(D,"Symbol($1)");const i=E.call(t).slice(8,-1);return"Date"===i?isNaN(t.getTime())?""+t:t.toISOString(t):"Error"===i||t instanceof Error?"["+k.call(t)+"]":"RegExp"===i?j.call(t):null}function z(t,e){let r=S(t,e);return null!==r?r:JSON.stringify(t,(function(t,r){let i=S(this[t],e);return null!==i?i:r}),2)}function T(t){return null==t?[]:[].concat(t)}let _,C,N,V=/\$\{\s*(\w+)\s*\}/g;_=Symbol.toStringTag;class Z{constructor(t,e,r,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[_]="Error",this.name="ValidationError",this.value=e,this.path=r,this.type=i,this.errors=[],this.inner=[],T(t).forEach((t=>{M.isError(t)?(this.errors.push(...t.errors),this.inner.push(...t.inner.length?t.inner:[t])):this.errors.push(t)})),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}C=Symbol.hasInstance,N=Symbol.toStringTag;class M extends Error{static formatError(t,e){return e=Object.assign({},e,{path:e.label||e.path||"this",originalPath:e.path}),"string"==typeof t?t.replace(V,((t,r)=>z(e[r]))):"function"==typeof t?t(e):t}static isError(t){return t&&"ValidationError"===t.name}constructor(t,e,r,i,n){const s=new Z(t,e,r,i);if(n)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[N]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,M)}static[C](t){return Z[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let q={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:t,type:e,value:r,originalValue:i})=>{const n=null!=i&&i!==r?` (cast from the value \`${z(i,!0)}\`).`:".";return"mixed"!==e?`${t} must be a \`${e}\` type, but the final value was: \`${z(r,!0)}\``+n:`${t} must match the configured type. The validated value was: \`${z(r,!0)}\``+n}},U={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},P={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},R={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},I={notType:t=>{const{path:e,value:r,spec:i}=t,n=i.types.length;if(Array.isArray(r)){if(r.length<n)return`${e} tuple value has too few items, expected a length of ${n} but got ${r.length} for value: \`${z(r,!0)}\``;if(r.length>n)return`${e} tuple value has too many items, expected a length of ${n} but got ${r.length} for value: \`${z(r,!0)}\``}return M.formatError(q.notType,t)}};Object.assign(Object.create(null),{mixed:q,string:U,number:{min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},date:P,object:R,array:{min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},boolean:{isValue:"${path} field must be ${value}"},tuple:I});const L=t=>t&&t.__isYupSchema__;class J{static fromOptions(t,e){if(!e.then&&!e.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:i,otherwise:n}=e,s="function"==typeof r?r:(...t)=>t.every((t=>t===r));return new J(t,((t,e)=>{var r;let a=s(...t)?i:n;return null!=(r=null==a?void 0:a(e))?r:e}))}constructor(t,e){this.fn=void 0,this.refs=t,this.refs=t,this.fn=e}resolve(t,e){let r=this.refs.map((t=>t.getValue(null==e?void 0:e.value,null==e?void 0:e.parent,null==e?void 0:e.context))),i=this.fn(r,t,e);if(void 0===i||i===t)return t;if(!L(i))throw new TypeError("conditions must return a schema object");return i.resolve(e)}}class Y{constructor(t,e={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,"string"!=typeof t)throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),""===t)throw new TypeError("ref must be a non-empty string");this.isContext="$"===this.key[0],this.isValue="."===this.key[0],this.isSibling=!this.isContext&&!this.isValue,this.path=this.key.slice((this.isContext?"$":this.isValue?".":"").length),this.getter=this.path&&d.getter(this.path,!0),this.map=e.map}getValue(t,e,r){let i=this.isContext?r:this.isValue?t:e;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(t,e){return this.getValue(t,null==e?void 0:e.parent,null==e?void 0:e.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}Y.prototype.__isYupRef=!0;const H=t=>null==t;function K(t){function e({value:e,path:r="",options:i,originalValue:n,schema:s},a,o){const{name:u,test:l,params:h,message:f,skipAbsent:c}=t;let{parent:d,context:p,abortEarly:m=s.spec.abortEarly,disableStackTrace:b=s.spec.disableStackTrace}=i;function x(t){return Y.isRef(t)?t.getValue(e,d,p):t}function w(t={}){const i=Object.assign({value:e,originalValue:n,label:s.spec.label,path:t.path||r,spec:s.spec,disableStackTrace:t.disableStackTrace||b},h,t.params);for(const t of Object.keys(i))i[t]=x(i[t]);const a=new M(M.formatError(t.message||f,i),e,i.path,t.type||u,i.disableStackTrace);return a.params=i,a}const v=m?a:o;let g={path:r,parent:d,type:u,from:i.from,createError:w,resolve:x,options:i,originalValue:n,schema:s};const y=t=>{M.isError(t)?v(t):t?o(null):v(w())},F=t=>{M.isError(t)?v(t):a(t)};if(c&&H(e))return y(!0);let $;try{var O;if($=l.call(g,e,g),"function"==typeof(null==(O=$)?void 0:O.then)){if(i.sync)throw new Error(`Validation test of type: "${g.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve($).then(y,F)}}catch(t){return void F(t)}y($)}return e.OPTIONS=t,e}function B(t,e,r,i=r){let n,s,a;return e?(d.forEach(e,((o,u,l)=>{let h=u?o.slice(1,o.length-1):o,f="tuple"===(t=t.resolve({context:i,parent:n,value:r})).type,c=l?parseInt(h,10):0;if(t.innerType||f){if(f&&!l)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${a}" must contain an index to the tuple element, e.g. "${a}[0]"`);if(r&&c>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${o}, in the path: ${e}. because there is no value at that index. `);n=r,r=r&&r[c],t=f?t.spec.types[c]:t.innerType}if(!l){if(!t.fields||!t.fields[h])throw new Error(`The schema does not contain the path: ${e}. (failed at: ${a} which is a type: "${t.type}")`);n=r,r=r&&r[h],t=t.fields[h]}s=h,a=u?"["+o+"]":"."+o})),{schema:t,parent:n,parentPath:s}):{parent:n,parentPath:e,schema:t}}class G extends Set{describe(){const t=[];for(const e of this.values())t.push(Y.isRef(e)?e.describe():e);return t}resolveAll(t){let e=[];for(const r of this.values())e.push(t(r));return e}clone(){return new G(this.values())}merge(t,e){const r=this.clone();return t.forEach((t=>r.add(t))),e.forEach((t=>r.delete(t))),r}}function Q(t,e=new Map){if(L(t)||!t||"object"!=typeof t)return t;if(e.has(t))return e.get(t);let r;if(t instanceof Date)r=new Date(t.getTime()),e.set(t,r);else if(t instanceof RegExp)r=new RegExp(t),e.set(t,r);else if(Array.isArray(t)){r=new Array(t.length),e.set(t,r);for(let i=0;i<t.length;i++)r[i]=Q(t[i],e)}else if(t instanceof Map){r=new Map,e.set(t,r);for(const[i,n]of t.entries())r.set(i,Q(n,e))}else if(t instanceof Set){r=new Set,e.set(t,r);for(const i of t)r.add(Q(i,e))}else{if(!(t instanceof Object))throw Error(`Unable to clone ${t}`);r={},e.set(t,r);for(const[i,n]of Object.entries(t))r[i]=Q(n,e)}return r}class W{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new G,this._blacklist=new G,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation((()=>{this.typeError(q.notType)})),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},null==t?void 0:t.spec),this.withMutation((t=>{t.nonNullable()}))}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const e=Object.create(Object.getPrototypeOf(this));return e.type=this.type,e._typeCheck=this._typeCheck,e._whitelist=this._whitelist.clone(),e._blacklist=this._blacklist.clone(),e.internalTests=Object.assign({},this.internalTests),e.exclusiveTests=Object.assign({},this.exclusiveTests),e.deps=[...this.deps],e.conditions=[...this.conditions],e.tests=[...this.tests],e.transforms=[...this.transforms],e.spec=Q(Object.assign({},this.spec,t)),e}label(t){let e=this.clone();return e.spec.label=t,e}meta(...t){if(0===t.length)return this.spec.meta;let e=this.clone();return e.spec.meta=Object.assign(e.spec.meta||{},t[0]),e}withMutation(t){let e=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=e,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&"mixed"!==this.type)throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let e=this,r=t.clone();const i=Object.assign({},e.spec,r.spec);return r.spec=i,r.internalTests=Object.assign({},e.internalTests,r.internalTests),r._whitelist=e._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=e._blacklist.merge(t._blacklist,t._whitelist),r.tests=e.tests,r.exclusiveTests=e.exclusiveTests,r.withMutation((e=>{t.tests.forEach((t=>{e.test(t.OPTIONS)}))})),r.transforms=[...e.transforms,...r.transforms],r}isType(t){return null==t?!(!this.spec.nullable||null!==t)||!(!this.spec.optional||void 0!==t):this._typeCheck(t)}resolve(t){let e=this;if(e.conditions.length){let r=e.conditions;e=e.clone(),e.conditions=[],e=r.reduce(((e,r)=>r.resolve(e,t)),e),e=e.resolve(t)}return e}resolveOptions(t){var e,r,i,n;return Object.assign({},t,{from:t.from||[],strict:null!=(e=t.strict)?e:this.spec.strict,abortEarly:null!=(r=t.abortEarly)?r:this.spec.abortEarly,recursive:null!=(i=t.recursive)?i:this.spec.recursive,disableStackTrace:null!=(n=t.disableStackTrace)?n:this.spec.disableStackTrace})}cast(t,e={}){let r=this.resolve(Object.assign({value:t},e)),i="ignore-optionality"===e.assert,n=r._cast(t,e);if(!1!==e.assert&&!r.isType(n)){if(i&&H(n))return n;let s=z(t),a=z(n);throw new TypeError(`The value of ${e.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}". \n\nattempted value: ${s} \n`+(a!==s?`result of cast: ${a}`:""))}return n}_cast(t,e){let r=void 0===t?t:this.transforms.reduce(((e,r)=>r.call(this,e,t,this)),t);return void 0===r&&(r=this.getDefault(e)),r}_validate(t,e={},r,i){let{path:n,originalValue:s=t,strict:a=this.spec.strict}=e,o=t;a||(o=this._cast(o,Object.assign({assert:!1},e)));let u=[];for(let t of Object.values(this.internalTests))t&&u.push(t);this.runTests({path:n,value:o,originalValue:s,options:e,tests:u},r,(t=>{if(t.length)return i(t,o);this.runTests({path:n,value:o,originalValue:s,options:e,tests:this.tests},r,i)}))}runTests(t,e,r){let i=!1,{tests:n,value:s,originalValue:a,path:o,options:u}=t,l=t=>{i||(i=!0,e(t,s))},h=t=>{i||(i=!0,r(t,s))},f=n.length,c=[];if(!f)return h([]);let d={value:s,originalValue:a,path:o,options:u,schema:this};for(let t=0;t<n.length;t++)(0,n[t])(d,l,(function(t){t&&(Array.isArray(t)?c.push(...t):c.push(t)),--f<=0&&h(c)}))}asNestedTest({key:t,index:e,parent:r,parentPath:i,originalParent:n,options:s}){const a=null!=t?t:e;if(null==a)throw TypeError("Must include `key` or `index` for nested validations");const o="number"==typeof a;let u=r[a];const l=Object.assign({},s,{strict:!0,parent:r,value:u,originalValue:n[a],key:void 0,[o?"index":"key"]:a,path:o||a.includes(".")?`${i||""}[${o?a:`"${a}"`}]`:(i?`${i}.`:"")+t});return(t,e,r)=>this.resolve(l)._validate(u,l,e,r)}validate(t,e){var r;let i=this.resolve(Object.assign({},e,{value:t})),n=null!=(r=null==e?void 0:e.disableStackTrace)?r:i.spec.disableStackTrace;return new Promise(((r,s)=>i._validate(t,e,((t,e)=>{M.isError(t)&&(t.value=e),s(t)}),((t,e)=>{t.length?s(new M(t,e,void 0,void 0,n)):r(e)}))))}validateSync(t,e){var r;let i,n=this.resolve(Object.assign({},e,{value:t})),s=null!=(r=null==e?void 0:e.disableStackTrace)?r:n.spec.disableStackTrace;return n._validate(t,Object.assign({},e,{sync:!0}),((t,e)=>{throw M.isError(t)&&(t.value=e),t}),((e,r)=>{if(e.length)throw new M(e,t,void 0,void 0,s);i=r})),i}isValid(t,e){return this.validate(t,e).then((()=>!0),(t=>{if(M.isError(t))return!1;throw t}))}isValidSync(t,e){try{return this.validateSync(t,e),!0}catch(t){if(M.isError(t))return!1;throw t}}_getDefault(t){let e=this.spec.default;return null==e?e:"function"==typeof e?e.call(this,t):Q(e)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return 0===arguments.length?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,e){const r=this.clone({nullable:t});return r.internalTests.nullable=K({message:e,name:"nullable",test(t){return null!==t||this.schema.spec.nullable}}),r}optionality(t,e){const r=this.clone({optional:t});return r.internalTests.optionality=K({message:e,name:"optionality",test(t){return void 0!==t||this.schema.spec.optional}}),r}optional(){return this.optionality(!0)}defined(t=q.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=q.notNull){return this.nullability(!1,t)}required(t=q.required){return this.clone().withMutation((e=>e.nonNullable(t).defined(t)))}notRequired(){return this.clone().withMutation((t=>t.nullable().optional()))}transform(t){let e=this.clone();return e.transforms.push(t),e}test(...t){let e;if(e=1===t.length?"function"==typeof t[0]?{test:t[0]}:t[0]:2===t.length?{name:t[0],test:t[1]}:{name:t[0],message:t[1],test:t[2]},void 0===e.message&&(e.message=q.default),"function"!=typeof e.test)throw new TypeError("`test` is a required parameters");let r=this.clone(),i=K(e),n=e.exclusive||e.name&&!0===r.exclusiveTests[e.name];if(e.exclusive&&!e.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return e.name&&(r.exclusiveTests[e.name]=!!e.exclusive),r.tests=r.tests.filter((t=>{if(t.OPTIONS.name===e.name){if(n)return!1;if(t.OPTIONS.test===i.OPTIONS.test)return!1}return!0})),r.tests.push(i),r}when(t,e){Array.isArray(t)||"string"==typeof t||(e=t,t=".");let r=this.clone(),i=T(t).map((t=>new Y(t)));return i.forEach((t=>{t.isSibling&&r.deps.push(t.key)})),r.conditions.push("function"==typeof e?new J(i,e):J.fromOptions(i,e)),r}typeError(t){let e=this.clone();return e.internalTests.typeError=K({message:t,name:"typeError",skipAbsent:!0,test(t){return!!this.schema._typeCheck(t)||this.createError({params:{type:this.schema.type}})}}),e}oneOf(t,e=q.oneOf){let r=this.clone();return t.forEach((t=>{r._whitelist.add(t),r._blacklist.delete(t)})),r.internalTests.whiteList=K({message:e,name:"oneOf",skipAbsent:!0,test(t){let e=this.schema._whitelist,r=e.resolveAll(this.resolve);return!!r.includes(t)||this.createError({params:{values:Array.from(e).join(", "),resolved:r}})}}),r}notOneOf(t,e=q.notOneOf){let r=this.clone();return t.forEach((t=>{r._blacklist.add(t),r._whitelist.delete(t)})),r.internalTests.blacklist=K({message:e,name:"notOneOf",test(t){let e=this.schema._blacklist,r=e.resolveAll(this.resolve);return!r.includes(t)||this.createError({params:{values:Array.from(e).join(", "),resolved:r}})}}),r}strip(t=!0){let e=this.clone();return e.spec.strip=t,e}describe(t){const e=(t?this.resolve(t):this).clone(),{label:r,meta:i,optional:n,nullable:s}=e.spec;return{meta:i,label:r,optional:n,nullable:s,default:e.getDefault(t),type:e.type,oneOf:e._whitelist.describe(),notOneOf:e._blacklist.describe(),tests:e.tests.map((t=>({name:t.OPTIONS.name,params:t.OPTIONS.params}))).filter(((t,e,r)=>r.findIndex((e=>e.name===t.name))===e))}}}W.prototype.__isYupSchema__=!0;for(const t of["validate","validateSync"])W.prototype[`${t}At`]=function(e,r,i={}){const{parent:n,parentPath:s,schema:a}=B(this,e,r,i.context);return a[t](n&&n[s],Object.assign({},i,{parent:n,path:e}))};for(const t of["equals","is"])W.prototype[t]=W.prototype.oneOf;for(const t of["not","nope"])W.prototype[t]=W.prototype.notOneOf;const X=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function tt(t){var e,r;const i=X.exec(t);return i?{year:et(i[1]),month:et(i[2],1)-1,day:et(i[3],1),hour:et(i[4]),minute:et(i[5]),second:et(i[6]),millisecond:i[7]?et(i[7].substring(0,3)):0,precision:null!=(e=null==(r=i[7])?void 0:r.length)?e:void 0,z:i[8]||void 0,plusMinus:i[9]||void 0,hourOffset:et(i[10]),minuteOffset:et(i[11])}:null}function et(t,e=0){return Number(t)||e}let rt=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,it=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,nt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,st=new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"),at=t=>H(t)||t===t.trim(),ot={}.toString();function ut(){return new lt}class lt extends W{constructor(){super({type:"string",check:t=>(t instanceof String&&(t=t.valueOf()),"string"==typeof t)}),this.withMutation((()=>{this.transform(((t,e,r)=>{if(!r.spec.coerce||r.isType(t))return t;if(Array.isArray(t))return t;const i=null!=t&&t.toString?t.toString():t;return i===ot?t:i}))}))}required(t){return super.required(t).withMutation((e=>e.test({message:t||q.required,name:"required",skipAbsent:!0,test:t=>!!t.length})))}notRequired(){return super.notRequired().withMutation((t=>(t.tests=t.tests.filter((t=>"required"!==t.OPTIONS.name)),t)))}length(t,e=U.length){return this.test({message:e,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(e){return e.length===this.resolve(t)}})}min(t,e=U.min){return this.test({message:e,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(e){return e.length>=this.resolve(t)}})}max(t,e=U.max){return this.test({name:"max",exclusive:!0,message:e,params:{max:t},skipAbsent:!0,test(e){return e.length<=this.resolve(t)}})}matches(t,e){let r,i,n=!1;return e&&("object"==typeof e?({excludeEmptyString:n=!1,message:r,name:i}=e):r=e),this.test({name:i||"matches",message:r||U.matches,params:{regex:t},skipAbsent:!0,test:e=>""===e&&n||-1!==e.search(t)})}email(t=U.email){return this.matches(rt,{name:"email",message:t,excludeEmptyString:!0})}url(t=U.url){return this.matches(it,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=U.uuid){return this.matches(nt,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let e,r,i="";return t&&("object"==typeof t?({message:i="",allowOffset:e=!1,precision:r}=t):i=t),this.matches(st,{name:"datetime",message:i||U.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:i||U.datetime_offset,params:{allowOffset:e},skipAbsent:!0,test:t=>{if(!t||e)return!0;const r=tt(t);return!!r&&!!r.z}}).test({name:"datetime_precision",message:i||U.datetime_precision,params:{precision:r},skipAbsent:!0,test:t=>{if(!t||null==r)return!0;const e=tt(t);return!!e&&e.precision===r}})}ensure(){return this.default("").transform((t=>null===t?"":t))}trim(t=U.trim){return this.transform((t=>null!=t?t.trim():t)).test({message:t,name:"trim",test:at})}lowercase(t=U.lowercase){return this.transform((t=>H(t)?t:t.toLowerCase())).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:t=>H(t)||t===t.toLowerCase()})}uppercase(t=U.uppercase){return this.transform((t=>H(t)?t:t.toUpperCase())).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:t=>H(t)||t===t.toUpperCase()})}}ut.prototype=lt.prototype;let ht=new Date("");class ft extends W{constructor(){super({type:"date",check:t=>"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(t.getTime())}),this.withMutation((()=>{this.transform(((t,e,r)=>!r.spec.coerce||r.isType(t)||null===t?t:(t=function(t){const e=tt(t);if(!e)return Date.parse?Date.parse(t):Number.NaN;if(void 0===e.z&&void 0===e.plusMinus)return new Date(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond).valueOf();let r=0;return"Z"!==e.z&&void 0!==e.plusMinus&&(r=60*e.hourOffset+e.minuteOffset,"+"===e.plusMinus&&(r=0-r)),Date.UTC(e.year,e.month,e.day,e.hour,e.minute+r,e.second,e.millisecond)}(t),isNaN(t)?ft.INVALID_DATE:new Date(t))))}))}prepareParam(t,e){let r;if(Y.isRef(t))r=t;else{let i=this.cast(t);if(!this._typeCheck(i))throw new TypeError(`\`${e}\` must be a Date or a value that can be \`cast()\` to a Date`);r=i}return r}min(t,e=P.min){let r=this.prepareParam(t,"min");return this.test({message:e,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(t){return t>=this.resolve(r)}})}max(t,e=P.max){let r=this.prepareParam(t,"max");return this.test({message:e,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(t){return t<=this.resolve(r)}})}}function ct(t,e){let r=1/0;return t.some(((t,i)=>{var n;if(null!=(n=e.path)&&n.includes(t))return r=i,!0})),r}function dt(t){return(e,r)=>ct(t,e)-ct(t,r)}ft.INVALID_DATE=ht;const pt=(t,e,r)=>{if("string"!=typeof t)return t;let i=t;try{i=JSON.parse(t)}catch(t){}return r.isType(i)?i:t};function mt(t){if("fields"in t){const e={};for(const[r,i]of Object.entries(t.fields))e[r]=mt(i);return t.setFields(e)}if("array"===t.type){const e=t.optional();return e.innerType&&(e.innerType=mt(e.innerType)),e}return"tuple"===t.type?t.optional().clone({types:t.spec.types.map(mt)}):"optional"in t?t.optional():t}let bt=t=>"[object Object]"===Object.prototype.toString.call(t);function xt(t,e){let r=Object.keys(t.fields);return Object.keys(e).filter((t=>-1===r.indexOf(t)))}const wt=dt([]);function vt(t){return new gt(t)}class gt extends W{constructor(t){super({type:"object",check:t=>bt(t)||"function"==typeof t}),this.fields=Object.create(null),this._sortErrors=wt,this._nodes=[],this._excludedEdges=[],this.withMutation((()=>{t&&this.shape(t)}))}_cast(t,e={}){var r;let i=super._cast(t,e);if(void 0===i)return this.getDefault(e);if(!this._typeCheck(i))return i;let n=this.fields,s=null!=(r=e.stripUnknown)?r:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(i).filter((t=>!this._nodes.includes(t)))),o={},u=Object.assign({},e,{parent:o,__validating:e.__validating||!1}),l=!1;for(const t of a){let r=n[t],a=t in i;if(r){let n,s=i[t];u.path=(e.path?`${e.path}.`:"")+t,r=r.resolve({value:s,context:e.context,parent:o});let a=r instanceof W?r.spec:void 0,h=null==a?void 0:a.strict;if(null!=a&&a.strip){l=l||t in i;continue}n=e.__validating&&h?i[t]:r.cast(i[t],u),void 0!==n&&(o[t]=n)}else a&&!s&&(o[t]=i[t]);a===t in o&&o[t]===i[t]||(l=!0)}return l?o:i}_validate(t,e={},r,i){let{from:n=[],originalValue:s=t,recursive:a=this.spec.recursive}=e;e.from=[{schema:this,value:s},...n],e.__validating=!0,e.originalValue=s,super._validate(t,e,r,((t,n)=>{if(!a||!bt(n))return void i(t,n);s=s||n;let o=[];for(let t of this._nodes){let r=this.fields[t];r&&!Y.isRef(r)&&o.push(r.asNestedTest({options:e,key:t,parent:n,parentPath:e.path,originalParent:s}))}this.runTests({tests:o,value:n,originalValue:s,options:e},r,(e=>{i(e.sort(this._sortErrors).concat(t),n)}))}))}clone(t){const e=super.clone(t);return e.fields=Object.assign({},this.fields),e._nodes=this._nodes,e._excludedEdges=this._excludedEdges,e._sortErrors=this._sortErrors,e}concat(t){let e=super.concat(t),r=e.fields;for(let[t,e]of Object.entries(this.fields)){const i=r[t];r[t]=void 0===i?e:i}return e.withMutation((e=>e.setFields(r,[...this._excludedEdges,...t._excludedEdges])))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let e={};return this._nodes.forEach((r=>{var i;const n=this.fields[r];let s=t;null!=(i=s)&&i.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[r]})),e[r]=n&&"getDefault"in n?n.getDefault(s):void 0})),e}setFields(t,e){let r=this.clone();return r.fields=t,r._nodes=function(t,e=[]){let r=[],i=new Set,n=new Set(e.map((([t,e])=>`${t}-${e}`)));function s(t,e){let s=d.split(t)[0];i.add(s),n.has(`${e}-${s}`)||r.push([e,s])}for(const e of Object.keys(t)){let r=t[e];i.add(e),Y.isRef(r)&&r.isSibling?s(r.path,e):L(r)&&"deps"in r&&r.deps.forEach((t=>s(t,e)))}return O.array(Array.from(i),r).reverse()}(t,e),r._sortErrors=dt(Object.keys(t)),e&&(r._excludedEdges=e),r}shape(t,e=[]){return this.clone().withMutation((r=>{let i=r._excludedEdges;return e.length&&(Array.isArray(e[0])||(e=[e]),i=[...r._excludedEdges,...e]),r.setFields(Object.assign(r.fields,t),i)}))}partial(){const t={};for(const[e,r]of Object.entries(this.fields))t[e]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return mt(this)}pick(t){const e={};for(const r of t)this.fields[r]&&(e[r]=this.fields[r]);return this.setFields(e,this._excludedEdges.filter((([e,r])=>t.includes(e)&&t.includes(r))))}omit(t){const e=[];for(const r of Object.keys(this.fields))t.includes(r)||e.push(r);return this.pick(e)}from(t,e,r){let i=d.getter(t,!0);return this.transform((n=>{if(!n)return n;let s=n;return((t,e)=>{const r=[...d.normalizePath(e)];if(1===r.length)return r[0]in t;let i=r.pop(),n=d.getter(d.join(r),!0)(t);return!(!n||!(i in n))})(n,t)&&(s=Object.assign({},n),r||delete s[t],s[e]=i(n)),s}))}json(){return this.transform(pt)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||R.exact,test(t){if(null==t)return!0;const e=xt(this.schema,t);return 0===e.length||this.createError({params:{properties:e.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,e=R.noUnknown){"boolean"!=typeof t&&(e=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:e,test(e){if(null==e)return!0;const r=xt(this.schema,e);return!t||0===r.length||this.createError({params:{unknown:r.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,e=R.noUnknown){return this.noUnknown(!t,e)}transformKeys(t){return this.transform((e=>{if(!e)return e;const r={};for(const i of Object.keys(e))r[t(i)]=e[i];return r}))}camelCase(){return this.transformKeys(g)}snakeCase(){return this.transformKeys(y)}constantCase(){return this.transformKeys((t=>y(t).toUpperCase()))}describe(t){const e=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[n,s]of Object.entries(e.fields)){var i;let e=t;null!=(i=e)&&i.value&&(e=Object.assign({},e,{parent:e.value,value:e.value[n]})),r.fields[n]=s.describe(e)}return r}}vt.prototype=gt.prototype;class yt{constructor(t,e,r){this.isSubmitted=!1,this.validationType="onSubmit",this.subscribedFields={},this.formErrors={},this.getFormErrors=()=>this.formErrors,this.getValues=()=>{const t=this.context.el.shadowRoot.querySelector("form"),e=new FormData(t);return Object.fromEntries(e.entries())},this.focusFirstInput=t=>{if(t.length){const e=t.map((t=>this.context.el.shadowRoot.querySelector(`input[name="${t.name}"]`))).filter((t=>t)).sort(((t,e)=>t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?-1:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING?1:0));e[0]&&e[0].focus()}},this.onSubmit=t=>{t.preventDefault(),(async()=>{try{this.isSubmitted=!0,this.context.isLoading=!0,this.signal({isError:!1});const t=this.getValues(),e=await this.schemaObject.validate(t,{abortEarly:!1,strict:!0});await this.context.formSubmit(e)}catch(t){if("ValidationError"===t.name){this.formErrors={};const e=[];t.inner.forEach((t=>{t.path&&(this.formErrors[t.path]=t.message,e.find((e=>e.name===t.path))||e.push({isError:!0,name:t.path,errorMessage:t.message}))})),this.signal(e),this.focusFirstInput(e)}else console.error("Unexpected Error:",t)}finally{this.context.isLoading=!1}})()},this.newController=(t,e)=>("text"===e&&(this.subscribedFields[t]={name:t,isError:!1,disabled:!1,errorMessage:"",onInput:e=>{this.onChanges(t,e.target.value)}}),this.subscribedFields[t]),this.signal=t=>{Array.isArray(t)?t.forEach((t=>{this.subscribedFields[t.name]&&Object.assign(this.subscribedFields[t.name],t)})):Object.values(this.subscribedFields).forEach((e=>Object.assign(e,t)))},this.onChanges=async(t,e)=>{if(!this.isSubmitted&&"always"!==this.validationType)return;const r=this.subscribedFields[t].isError;try{this.schemaObject.fields[t].validateSync(e),this.signal([{name:t,isError:!1}]),!1!==r&&(this.context.renderControl={})}catch(e){e.message&&(this.signal([{name:t,isError:!0,errorMessage:e.message}]),this.context.renderControl={})}},this.context=t,this.schemaObject=e,this.formController={onSubmit:this.onSubmit},(null==r?void 0:r.validationType)&&(this.validationType=r.validationType)}}const Ft=vt({name:ut().required("r").min(4,"kd").max(7,"kk"),name2:ut().required()}),$t=class{constructor(e){t(this,e),this.form=new yt(this,Ft),this.nameController=this.form.newController("name","text"),this.name2Controller=this.form.newController("name2","text"),this.isLoading=void 0,this.renderControl={}}async formSubmit(t){console.log(t)}render(){const{formController:t}=this.form;return e(r,{key:"47600eab650c2c967e3b39a37f212cead08b90af"},e("form",Object.assign({key:"79fedfe357eed67267c43f7ae6a865e41f4d0fa0"},t),e("form-input",Object.assign({key:"b001b26a0dc65b7158af45011394269b80dfd694"},this.nameController,{label:"Name",name:"name"})),e("form-input",Object.assign({key:"3f7472ecbd8d4f6c0f89a7432a2e49dfc825f6d4"},this.name2Controller,{label:"Name2",name:"name2"})),e("button",{key:"08d3b507d6739e307b72346643e8c7b191c7a5bb",type:"submit"},"sd")))}get el(){return i(this)}};$t.style='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host{all:initial!important;display:block}*{font-family:Arial}.static{position:static}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}';export{$t as general_inquiry_form}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built by ShiftSoftware
|
|
3
|
+
* Copyright (c)
|
|
4
|
+
*/
|
|
5
|
+
import{r as t,h as e,H as i,g as a}from"./p-f37b60d5.js";import{L as o}from"./p-65939a2f.js";import{c as r}from"./p-98d9e7ab.js";import{g as n}from"./p-4f08bcb8.js";let s={};const l=class{constructor(e){t(this,e),this.baseUrl="",this.isDev=!1,this.queryString="",this.headerTitle="Manufacturer",this.loadingStateChange=void 0,this.loadedResponse=void 0,this.state="idle",this.externalPartNumber=null,this.errorMessage=null,this.partInformation=void 0}handleSettingData(t){this.partInformation=t}async setData(t,e={}){let i;clearTimeout(this.networkTimeoutRef),this.abortController&&this.abortController.abort(),this.abortController=new AbortController;const a="string"==typeof t,o=a?t:null==t?void 0:t.partNumber;this.externalPartNumber=o;try{if(!o||0===o.trim().length)return void(this.state="idle");this.state="data"===this.state||"error"===this.state?this.state+"-loading":"loading",await new Promise((t=>{i=setTimeout(t,700),this.networkTimeoutRef=i}));const r=a?await n(this,{scopedTimeoutRef:i,partNumber:o,mockData:s},e):t;if(this.networkTimeoutRef===i){if(!r)throw new Error("Wrong response format");this.handleSettingData(r)}this.errorMessage=null,this.state="data"}catch(t){if(t&&"AbortError"===(null==t?void 0:t.name))return;this.state="error",this.partInformation=null,this.errorMessage=t.message}}async fetchData(t=this.externalPartNumber,e={}){await this.setData(t,e)}async loadingListener(){this.loadingStateChange&&this.loadingStateChange(this.state.includes("loading"))}async setMockData(t){s=t}render(){var t,a,n;const s=this.partInformation?[{label:"Origin",value:this.partInformation.tmcPart.origin},{label:"Warranty Price",value:null===(t=this.partInformation.tmcPart.warrantyPrice)||void 0===t?void 0:t.toFixed(2)},{label:"Special Price",value:null===(a=this.partInformation.tmcPart.specialPrice)||void 0===a?void 0:a.toFixed(2)},{label:"Wholesales Price",value:null===(n=this.partInformation.tmcPart.salesPrice)||void 0===n?void 0:n.toFixed(2)},{label:"PNC",value:this.partInformation.tmcPart.pnc},{label:"PNC Russian Name",value:this.partInformation.tmcPart.pncLocalName},{label:"Bin Code",value:this.partInformation.tmcPart.binCode},{label:"Dimension 1",value:this.partInformation.tmcPart.dimension1},{label:"Dimension 2",value:this.partInformation.tmcPart.dimension2},{label:"Dimension 3",value:this.partInformation.tmcPart.dimension3},{label:"Net Weight",value:this.partInformation.tmcPart.netWeight},{label:"Gross Weight",value:this.partInformation.tmcPart.grossWeight},{label:"Cubic Measure",value:this.partInformation.tmcPart.cubicMeasure},{label:"HS Code",value:this.partInformation.tmcPart.hsCode},{label:"UZ HS Code",value:this.partInformation.tmcPart.uzHsCode}]:[];return e(i,{key:"70104f0e559c15b91730e3235283f5b109d5b6e1"},e("div",{key:"72445bb2f2bd2a4901d83653693cad6d74848bbf",class:"min-h-[100px] relative transition-all duration-300 overflow-hidden"},e("div",{key:"e015671c30956ee7cd9556b0865c727faac73c26"},e(o,{key:"9cfd90ad038a8a6899c5b8315356027d8d6d7b49",isLoading:this.state.includes("loading")}),e("div",{key:"31777103977e7800263ba653a47aa3ef94528066",class:r("transition-all duration-700",{"scale-0":this.state.includes("loading")||"idle"===this.state,"opacity-0":this.state.includes("loading")})},["error","error-loading"].includes(this.state)&&e("div",{key:"329786ca5069fe3e702de57ed2c2dfd9a5b4baa1",class:"py-[16px]"},e("div",{key:"4b0ebd492a1e6489f919ef40d668553dbc403934",class:" px-[16px] py-[8px] border reject-card text-[20px] rounded-[8px] w-fit mx-auto"},this.errorMessage)),["data","data-loading"].includes(this.state)&&e("div",{key:"c2bafc9545f2f35772637b12b9a5421a4ffbf991"},e("div",{key:"2fc401b9275eb151ef427a0f5948749f1c8fa3b8",class:"flex mt-[12px] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]"},e("div",{key:"c9a662c20668ec968d2f5571a970bd9366921d75",class:"w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]"},this.headerTitle),e("div",{key:"a3d84bcde09f93215d40e4266444c1a8b3af6c2c",class:"px-[30px] py-[10px] flex flex-col gap-[15px]"},e("div",{key:"f00dcb4e90c76fb89823228c1ca5de81d368f659",class:"grid grid-cols-3 gap-[50px]"},s.map((({label:t,value:i})=>e("div",{key:t,class:"flex flex-col flex-1"},e("strong",{class:"py-[10px] px-0 border-b-[gray] border-b"},t),e("div",{class:"py-[10px] px-0"},i))))))))))))}get el(){return a(this)}static get watchers(){return{state:["loadingListener"]}}};l.style='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host{all:initial!important;display:block}*{font-family:Arial}.static{position:static}.relative{position:relative}.mx-auto{margin-left:auto;margin-right:auto}.mt-\\[12px\\]{margin-top:12px}.flex{display:flex}.grid{display:grid}.h-\\[40px\\]{height:40px}.min-h-\\[100px\\]{min-height:100px}.w-fit{width:fit-content}.w-full{width:100%}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.scale-0{--tw-scale-x:0;--tw-scale-y:0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.gap-\\[15px\\]{gap:15px}.gap-\\[50px\\]{gap:50px}.overflow-hidden{overflow:hidden}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[8px\\]{border-radius:8px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-\\[\\#d6d8dc\\]{--tw-border-opacity:1;border-color:rgb(214 216 220/var(--tw-border-opacity,1))}.border-b-\\[gray\\]{--tw-border-opacity:1;border-bottom-color:rgb(128 128 128/var(--tw-border-opacity,1))}.bg-\\[\\#e1e3e5\\]{--tw-bg-opacity:1;background-color:rgb(225 227 229/var(--tw-bg-opacity,1))}.px-0{padding-left:0;padding-right:0}.px-\\[16px\\]{padding-left:16px;padding-right:16px}.px-\\[30px\\]{padding-left:30px;padding-right:30px}.py-\\[10px\\]{padding-bottom:10px;padding-top:10px}.py-\\[16px\\]{padding-bottom:16px;padding-top:16px}.py-\\[8px\\]{padding-bottom:8px;padding-top:8px}.text-center{text-align:center}.text-\\[18px\\]{font-size:18px}.text-\\[20px\\]{font-size:20px}.text-\\[\\#383c43\\]{--tw-text-opacity:1;color:rgb(56 60 67/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}.duration-700{transition-duration:.7s}.reject-card{background-color:#f7d7d8;border-color:#f2aeb5;color:#58151c}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.z-50{z-index:50}.size-\\[40px\\]{height:40px;width:40px}.size-full{height:100%;width:100%}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin-2s{animation:spin 2s linear infinite}.duration-100{transition-duration:.1s}';export{l as manufacturer_lookup}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built by ShiftSoftware
|
|
3
3
|
* Copyright (c)
|
|
4
4
|
*/
|
|
5
|
-
import{r as t,c as e,h as o,H as i}from"./p-f37b60d5.js";import{c as r}from"./p-98d9e7ab.js";const a=class{constructor(o){t(this,o),this.onInput=e(this,"onInput",7),this.name=void 0,this.label=void 0,this.class=void 0,this.isError=void 0,this.disabled=void 0,this.labelClass=void 0,this.errorClass=void 0,this.errorMessage=void 0,this.containerClass=void 0}render(){const{class:t,errorClass:e,containerClass:a,disabled:n,label:s,isError:l,labelClass:d,name:c,errorMessage:p,onInput:b}=this;return o(i,{key:"
|
|
5
|
+
import{r as t,c as e,h as o,H as i}from"./p-f37b60d5.js";import{c as r}from"./p-98d9e7ab.js";const a=class{constructor(o){t(this,o),this.onInput=e(this,"onInput",7),this.name=void 0,this.label=void 0,this.class=void 0,this.isError=void 0,this.disabled=void 0,this.labelClass=void 0,this.errorClass=void 0,this.errorMessage=void 0,this.containerClass=void 0}render(){const{class:t,errorClass:e,containerClass:a,disabled:n,label:s,isError:l,labelClass:d,name:c,errorMessage:p,onInput:b}=this;return o(i,{key:"761ec590e596266ba0f0731d429e9cac8d33c4bb"},o("label",{key:"38d0d5424f78c31e813c260a07538e2284c2b483",class:r("relative w-full pb-[20px] inline-flex flex-col",a)},s&&o("div",{key:"dc37f884cb50c8462da03f2a6371298e54f12e20",class:r("mb-[4px]",d)},s),o("input",{key:"d864c7c1065c9dfc6bddaaf6aad08fbff73718ff",name:c,onInput:b,disabled:n,class:r("border disabled:opacity-75 flex-1 py-[6px] px-[12px] transition-colors duration-300 rounded-lg outline-none focus:border-slate-600 w-full",{"!border-red-500":l},t)}),o("div",{key:"86e4082d194c4cdcbd2a337939cb06aaf7a8b833",class:r("absolute bottom-0 -z-10 text-red-500 transition-all duration-300",{"-translate-y-full opacity-0":!l},e)},p)))}};a.style='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host{all:initial!important;display:block}*{font-family:Arial}.static{position:static}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.absolute{position:absolute}.relative{position:relative}.bottom-0{bottom:0}.-z-10{z-index:-10}.mb-\\[4px\\]{margin-bottom:4px}.inline-flex{display:inline-flex}.w-full{width:100%}.flex-1{flex:1 1 0%}.-translate-y-full{--tw-translate-y:-100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.flex-col{flex-direction:column}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.\\!border-red-500{--tw-border-opacity:1!important;border-color:rgb(239 68 68/var(--tw-border-opacity,1))!important}.px-\\[12px\\]{padding-left:12px;padding-right:12px}.py-\\[6px\\]{padding-bottom:6px;padding-top:6px}.pb-\\[20px\\]{padding-bottom:20px}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.outline-none{outline:2px solid transparent;outline-offset:2px}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}.focus\\:border-slate-600:focus{--tw-border-opacity:1;border-color:rgb(71 85 105/var(--tw-border-opacity,1))}.disabled\\:opacity-75:disabled{opacity:.75}';export{a as form_input}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built by ShiftSoftware
|
|
3
3
|
* Copyright (c)
|
|
4
4
|
*/
|
|
5
|
-
import{p as e,b as a}from"./p-f37b60d5.js";export{s as setNonce}from"./p-f37b60d5.js";import{g as t}from"./p-42d320e2.js";(()=>{const a=import.meta.url,t={};return""!==a&&(t.resourcesUrl=new URL(".",a).href),e(t)})().then((async e=>(await t(),a([["p-
|
|
5
|
+
import{p as e,b as a}from"./p-f37b60d5.js";export{s as setNonce}from"./p-f37b60d5.js";import{g as t}from"./p-42d320e2.js";(()=>{const a=import.meta.url,t={};return""!==a&&(t.resourcesUrl=new URL(".",a).href),e(t)})().then((async e=>(await t(),a([["p-2f7785d3",[[4,"vehicle-lookup",{activeElement:[1,"active-element"],baseUrl:[1,"base-url"],isDev:[4,"is-dev"],queryString:[1,"query-string"],loadingStateChanged:[16],blazorOnLoadingStateChange:[1,"blazor-on-loading-state-change"],errorStateListener:[16],blazorErrorStateListener:[1,"blazor-error-state-listener"],wrapperErrorState:[32],blazorRef:[32],setBlazorRef:[64],fetchVin:[64],getPageContext:[64]},null,{wrapperErrorState:["errorListener"],onLoadingStateChanged:["handleLoadingListenerPropChange"],blazorOnLoadingStateChange:["handleBlazorLoadingRefChange"]}]]],["p-9f58a33b",[[1,"general-inquiry-form",{isLoading:[32],renderControl:[32]}]]],["p-73fa9b86",[[1,"dead-stock-lookup",{baseUrl:[1,"base-url"],isDev:[4,"is-dev"],queryString:[1,"query-string"],loadingStateChange:[16],loadedResponse:[16],state:[32],externalPartNumber:[32],errorMessage:[32],partInformation:[32],setData:[64],fetchData:[64],setMockData:[64]},null,{state:["loadingListener"]}]]],["p-0cce310b",[[1,"distributor-lookup",{baseUrl:[1,"base-url"],isDev:[4,"is-dev"],queryString:[1,"query-string"],loadingStateChange:[16],loadedResponse:[16],state:[32],externalPartNumber:[32],errorMessage:[32],partInformation:[32],setData:[64],fetchData:[64],setMockData:[64]},null,{state:["loadingListener"]}]]],["p-cb379a17",[[1,"manufacturer-lookup",{baseUrl:[1,"base-url"],isDev:[4,"is-dev"],queryString:[1,"query-string"],headerTitle:[1,"header-title"],loadingStateChange:[16],loadedResponse:[16],state:[32],externalPartNumber:[32],errorMessage:[32],partInformation:[32],setData:[64],fetchData:[64],setMockData:[64]},null,{state:["loadingListener"]}]]],["p-fad254c9",[[0,"form-input",{name:[1],label:[1],class:[1],isError:[4,"is-error"],disabled:[4],labelClass:[1,"label-class"],errorClass:[1,"error-class"],errorMessage:[1,"error-message"],containerClass:[1,"container-class"]}]]],["p-2bb4415e",[[1,"dynamic-redeem",{vin:[1],item:[16],canceledItems:[16],unInvoicedByBrokerName:[1,"un-invoiced-by-broker-name"],handleScanner:[16],handleQrChanges:[16],loadingStateChange:[16],confirmServiceCancellation:[32],confirmUnInvoicedTBPVehicles:[32],internalVin:[32],isOpened:[32],internalItem:[32],internalCanceledItem:[32],isLoading:[32],quite:[64],getQrValue:[64]},null,{isLoading:["onIsLoadingChange"],canceledItems:["changeInternalCanceledItem"],unInvoicedByBrokerName:["changeConfirmUnInvoicedTBPVehicles"],vin:["changeInternalVin"],item:["changeInternalItem"]}]]],["p-48efd004",[[1,"dynamic-claim",{baseUrl:[1,"base-url"],isDev:[4,"is-dev"],queryString:[1,"query-string"],loadingStateChange:[16],loadedResponse:[16],isIdle:[32],popupClasses:[32],externalVin:[32],activePopupIndex:[32],vehicleInformation:[32],errorMessage:[32],isLoading:[32],setMockData:[64],setData:[64],fetchData:[64],completeClaim:[64]},null,{isLoading:["onLoadingChange"],vehicleInformation:["resetProgressBar"],popupClasses:["windowScrollListener"]}],[1,"paint-thickness",{baseUrl:[1,"base-url"],isDev:[4,"is-dev"],queryString:[1,"query-string"],loadingStateChange:[16],loadedResponse:[16],state:[32],externalVin:[32],errorMessage:[32],expandedImage:[32],vehicleInformation:[32],setData:[64],fetchData:[64],setMockData:[64]},null,{state:["loadingListener"]}],[1,"service-history",{baseUrl:[1,"base-url"],isDev:[4,"is-dev"],queryString:[1,"query-string"],loadingStateChange:[16],loadedResponse:[16],state:[32],externalVin:[32],errorMessage:[32],vehicleInformation:[32],setData:[64],fetchData:[64],setMockData:[64]},null,{state:["loadingListener"]}],[1,"vehicle-accessories",{baseUrl:[1,"base-url"],isDev:[4,"is-dev"],queryString:[1,"query-string"],loadingStateChange:[16],loadedResponse:[16],state:[32],externalVin:[32],errorMessage:[32],expandedImage:[32],vehicleInformation:[32],setData:[64],fetchData:[64],setMockData:[64]},null,{state:["loadingListener"]}],[1,"vehicle-specification",{baseUrl:[1,"base-url"],isDev:[4,"is-dev"],queryString:[1,"query-string"],loadingStateChange:[16],loadedResponse:[16],state:[32],externalVin:[32],errorMessage:[32],vehicleInformation:[32],setData:[64],fetchData:[64],setMockData:[64]},null,{state:["loadingListener"]}],[1,"warranty-details",{baseUrl:[1,"base-url"],unauthorizedSscLookupBaseUrl:[1,"unauthorized-ssc-lookup-base-url"],isDev:[4,"is-dev"],showSsc:[4,"show-ssc"],queryString:[1,"query-string"],unauthorizedSscLookupQueryString:[1,"unauthorized-ssc-lookup-query-string"],recaptchaKey:[1,"recaptcha-key"],showWarranty:[4,"show-warranty"],cityId:[1,"city-id"],cityIntegrationId:[1,"city-integration-id"],companyId:[1,"company-id"],companyIntegrationId:[1,"company-integration-id"],companyBranchId:[1,"company-branch-id"],companyBranchIntegrationId:[1,"company-branch-integration-id"],userId:[1,"user-id"],brandIntegrationId:[1,"brand-integration-id"],customerName:[1,"customer-name"],customerPhone:[1,"customer-phone"],customerEmail:[1,"customer-email"],loadingStateChange:[16],loadedResponse:[16],state:[32],externalVin:[32],errorMessage:[32],showRecaptcha:[32],unInvoicedByBrokerName:[32],vehicleInformation:[32],checkingUnauthorizedSSC:[32],recaptchaRes:[32],headers:[32],setData:[64],fetchData:[64],setMockData:[64]},null,{state:["loadingListener"]}]]]],e))));
|
|
@@ -5,8 +5,17 @@ import { ServiceHistory } from "../service-history/service-history";
|
|
|
5
5
|
import { PaintThickness } from "../paint-thickness/paint-thickness";
|
|
6
6
|
import { DynamicClaim } from "../dynamic-claim/dynamic-claim";
|
|
7
7
|
import { DotNetObjectReference } from "../../global/types/components";
|
|
8
|
+
export type ComponentMap = {
|
|
9
|
+
'dynamic-claim': DynamicClaim;
|
|
10
|
+
'paint-thickness': PaintThickness;
|
|
11
|
+
'service-history': ServiceHistory;
|
|
12
|
+
'warranty-details': WarrantyDetails;
|
|
13
|
+
'vehicle-accessories': VehicleAccessories;
|
|
14
|
+
'vehicle-specification': VehicleSpecification;
|
|
15
|
+
};
|
|
16
|
+
export type ActiveElement = keyof ComponentMap | '';
|
|
8
17
|
export declare class VehicleLookup {
|
|
9
|
-
|
|
18
|
+
activeElement?: ActiveElement;
|
|
10
19
|
baseUrl: string;
|
|
11
20
|
isDev: boolean;
|
|
12
21
|
queryString: string;
|
|
@@ -25,7 +34,7 @@ export declare class VehicleLookup {
|
|
|
25
34
|
setBlazorRef(newBlazorRef: DotNetObjectReference): Promise<void>;
|
|
26
35
|
fetchVin(vin: string, headers?: any): Promise<"VIN is required" | "Invalid VIN">;
|
|
27
36
|
getPageContext(): Promise<{
|
|
28
|
-
componentsList:
|
|
37
|
+
componentsList: ComponentMap;
|
|
29
38
|
}>;
|
|
30
39
|
private handleLoadData;
|
|
31
40
|
render(): any;
|
|
@@ -8,21 +8,11 @@ import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
|
8
8
|
import { PartInformation } from "./global/types/part-information";
|
|
9
9
|
import { DotNetObjectReference, MockJson } from "./global/types/components";
|
|
10
10
|
import { ServiceItem, VehicleInformation } from "./global/types/vehicle-information";
|
|
11
|
-
import {
|
|
12
|
-
import { VehicleAccessories } from "./components/vehicle-accessories/vehicle-accessories";
|
|
13
|
-
import { WarrantyDetails } from "./components/warranty-details/warranty-details";
|
|
14
|
-
import { ServiceHistory } from "./components/service-history/service-history";
|
|
15
|
-
import { PaintThickness } from "./components/paint-thickness/paint-thickness";
|
|
16
|
-
import { DynamicClaim } from "./components/dynamic-claim/dynamic-claim";
|
|
11
|
+
import { ActiveElement, ComponentMap } from "./components/vehicle-lookup/vehicle-lookup";
|
|
17
12
|
export { PartInformation } from "./global/types/part-information";
|
|
18
13
|
export { DotNetObjectReference, MockJson } from "./global/types/components";
|
|
19
14
|
export { ServiceItem, VehicleInformation } from "./global/types/vehicle-information";
|
|
20
|
-
export {
|
|
21
|
-
export { VehicleAccessories } from "./components/vehicle-accessories/vehicle-accessories";
|
|
22
|
-
export { WarrantyDetails } from "./components/warranty-details/warranty-details";
|
|
23
|
-
export { ServiceHistory } from "./components/service-history/service-history";
|
|
24
|
-
export { PaintThickness } from "./components/paint-thickness/paint-thickness";
|
|
25
|
-
export { DynamicClaim } from "./components/dynamic-claim/dynamic-claim";
|
|
15
|
+
export { ActiveElement, ComponentMap } from "./components/vehicle-lookup/vehicle-lookup";
|
|
26
16
|
export namespace Components {
|
|
27
17
|
interface DeadStockLookup {
|
|
28
18
|
"baseUrl": string;
|
|
@@ -121,13 +111,13 @@ export namespace Components {
|
|
|
121
111
|
"setMockData": (newMockData: MockJson<VehicleInformation>) => Promise<void>;
|
|
122
112
|
}
|
|
123
113
|
interface VehicleLookup {
|
|
124
|
-
"
|
|
114
|
+
"activeElement"?: ActiveElement;
|
|
125
115
|
"baseUrl": string;
|
|
126
116
|
"blazorErrorStateListener": string;
|
|
127
117
|
"blazorOnLoadingStateChange": string;
|
|
128
118
|
"errorStateListener"?: (newError: string) => void;
|
|
129
119
|
"fetchVin": (vin: string, headers?: any) => Promise<"VIN is required" | "Invalid VIN">;
|
|
130
|
-
"getPageContext": () => Promise<{ componentsList:
|
|
120
|
+
"getPageContext": () => Promise<{ componentsList: ComponentMap; }>;
|
|
131
121
|
"isDev": boolean;
|
|
132
122
|
"loadingStateChanged"?: (isLoading: boolean) => void;
|
|
133
123
|
"queryString": string;
|
|
@@ -355,7 +345,7 @@ declare namespace LocalJSX {
|
|
|
355
345
|
"queryString"?: string;
|
|
356
346
|
}
|
|
357
347
|
interface VehicleLookup {
|
|
358
|
-
"
|
|
348
|
+
"activeElement"?: ActiveElement;
|
|
359
349
|
"baseUrl"?: string;
|
|
360
350
|
"blazorErrorStateListener"?: string;
|
|
361
351
|
"blazorOnLoadingStateChange"?: string;
|
|
@@ -11,12 +11,12 @@ export type TMCPart = {
|
|
|
11
11
|
pnc: string;
|
|
12
12
|
pncLocalName: string;
|
|
13
13
|
binCode: string;
|
|
14
|
-
dimension1:
|
|
15
|
-
dimension2:
|
|
16
|
-
dimension3:
|
|
17
|
-
netWeight:
|
|
18
|
-
grossWeight:
|
|
19
|
-
cubicMeasure:
|
|
14
|
+
dimension1: number;
|
|
15
|
+
dimension2: number;
|
|
16
|
+
dimension3: number;
|
|
17
|
+
netWeight: number;
|
|
18
|
+
grossWeight: number;
|
|
19
|
+
cubicMeasure: number;
|
|
20
20
|
hsCode: string;
|
|
21
21
|
uzHsCode: string;
|
|
22
22
|
origin: string;
|
|
@@ -35,7 +35,7 @@ export type BranchDeadStock = {
|
|
|
35
35
|
};
|
|
36
36
|
export type StockPart = {
|
|
37
37
|
localDescription: string;
|
|
38
|
-
fob:
|
|
38
|
+
fob: number;
|
|
39
39
|
partDescription: string;
|
|
40
40
|
supersededTo: string;
|
|
41
41
|
supersededFrom: string;
|
package/package.json
CHANGED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built by ShiftSoftware
|
|
3
|
-
* Copyright (c)
|
|
4
|
-
*/
|
|
5
|
-
import{r as t,h as e,H as i,g as a}from"./p-f37b60d5.js";import{c as o}from"./p-98d9e7ab.js";const r=class{constructor(e){t(this,e),this.activeLookupIndex="0",this.baseUrl="",this.isDev=!1,this.queryString="",this.loadingStateChanged=void 0,this.blazorOnLoadingStateChange="",this.wrapperErrorState="",this.errorStateListener=void 0,this.blazorErrorStateListener="",this.blazorRef=void 0}async componentDidLoad(){const t=this.el.getElementsByTagName("vehicle-specification")[0],e=this.el.getElementsByTagName("vehicle-accessories")[0],i=this.el.getElementsByTagName("warranty-details")[0],a=this.el.getElementsByTagName("service-history")[0],o=this.el.getElementsByTagName("paint-thickness")[0],r=this.el.getElementsByTagName("dynamic-claim")[0];this.componentsList=[t,e,i,a,o,r],this.componentsList.forEach((t=>{t&&(this.loadingStateChanged&&(t.loadingStateChange=this.loadingStateChanged),t.loadedResponse=e=>this.handleLoadData(e,t))}))}async errorListener(t){this.errorStateListener&&this.errorStateListener(t),this.blazorRef&&this.blazorErrorStateListener&&this.blazorRef.invokeMethodAsync(this.blazorErrorStateListener,t)}async handleLoadingListenerPropChange(t){this.componentsList.forEach((e=>{e&&(e.loadingStateChange=t)}))}async handleBlazorLoadingRefChange(t){this.blazorRef&&this.componentsList.forEach((e=>{e&&(e.loadingStateChange=e=>this.blazorRef.invokeMethodAsync(t,e))}))}async setBlazorRef(t){this.blazorRef=t,this.blazorOnLoadingStateChange&&this.componentsList.forEach((t=>{t&&(t.loadingStateChange=t=>this.blazorRef.invokeMethodAsync(this.blazorOnLoadingStateChange,t))}))}async fetchVin(t,e={}){const i=this.componentsList[this.activeLookupIndex]||null;if(this.wrapperErrorState="",i)return""==t?this.wrapperErrorState="VIN is required":function(t){const e={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:1,B:2,C:3,D:4,E:5,F:6,G:7,H:8,J:1,K:2,L:3,M:4,N:5,P:7,R:9,S:2,T:3,U:4,V:5,W:6,X:7,Y:8,Z:9},i=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2];let a=0,o=!0;for(let r=0;r<t.length;r++){const s=e[t[r].toUpperCase()];if(void 0===s){o=!1;break}a+=s*i[r]}let r=(a%11).toString();return"10"===r&&(r="X"),t[8]!=r&&(o=!1),o}(t)?void i.fetchData(t,e):this.wrapperErrorState="Invalid VIN"}async getPageContext(){return{componentsList:this.componentsList}}handleLoadData(t,e){this.componentsList.forEach((i=>{null!==i&&i!==e&&t&&i.setData(t)}))}render(){return e(i,{key:"a104d030b4bbbf3ec28593add20d04952b17c632"},e("div",{key:"adb7057e14063716a516661a3ffe902851913e17",class:o("w-full",{hidden:"0"!==this.activeLookupIndex})},e("vehicle-specification",{key:"8278dbf8e9c6d0da05b40c26e353f415d7289837",isDev:this.isDev,"base-url":this.baseUrl,"query-string":this.queryString})),e("div",{key:"07703a73ffb31debc93af5eb0302220eac710e15",class:o("w-full",{hidden:"1"!==this.activeLookupIndex})},e("vehicle-accessories",{key:"e337b5505ac3e072aa416deccaa45c5c89ffd328",isDev:this.isDev,"base-url":this.baseUrl,"query-string":this.queryString})),e("div",{key:"a081fb2e6eac75d9e84e01374239ad4f4e595abd",class:o("w-full",{hidden:"2"!==this.activeLookupIndex})},e("warranty-details",{key:"236ac6361bf3bdebbcd962dd8214dcd7484f2ae8","show-ssc":"true","show-warranty":"true",isDev:this.isDev,"base-url":this.baseUrl,"query-string":this.queryString},e("slot",{key:"3e32ec9a94a04201978903c536a964c633d36130"}))),e("div",{key:"01f8fb4a8a45d254a52870a08a3d0c9eaf053a4d",class:o("w-full",{hidden:"3"!==this.activeLookupIndex})},e("service-history",{key:"d6e9386ee6f2c0c55408e355f50f33cb248d43bf",isDev:this.isDev,"base-url":this.baseUrl,"query-string":this.queryString})),e("div",{key:"5f3ae1adf2705a45e39baf3233bbc3c327b0f302",class:o("w-full",{hidden:"4"!==this.activeLookupIndex})},e("paint-thickness",{key:"28aadcfa4f4ac74b04caff33f47e54b881e78e6c",isDev:this.isDev,"base-url":this.baseUrl,"query-string":this.queryString})),e("div",{key:"f27f9f92926206fad9dfe176fe458282ffaa45cc",class:o("w-full",{hidden:"5"!==this.activeLookupIndex})},e("dynamic-claim",{key:"0e079345929cacd17401efbd141cc64621b4cad8",isDev:this.isDev,"base-url":this.baseUrl,"query-string":this.queryString})))}get el(){return a(this)}static get watchers(){return{wrapperErrorState:["errorListener"],onLoadingStateChanged:["handleLoadingListenerPropChange"],blazorOnLoadingStateChange:["handleBlazorLoadingRefChange"]}}};r.style='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host{display:block}.static{position:static}.hidden{display:none}.w-full{width:100%}.relative{position:relative}.sticky{position:sticky}.top-0{top:0}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-bottom:.5rem;margin-top:.5rem}.mt-\\[12px\\]{margin-top:12px}.flex{display:flex}.table{display:table}.h-0{height:0}.h-\\[40px\\]{height:40px}.h-\\[80px\\]{height:80px}.max-h-\\[70dvh\\]{max-height:70dvh}.min-h-\\[100px\\]{min-height:100px}.w-fit{width:fit-content}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.scale-0{--tw-scale-x:0;--tw-scale-y:0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[8px\\]{border-radius:8px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-\\[\\#d6d8dc\\]{--tw-border-opacity:1;border-color:rgb(214 216 220/var(--tw-border-opacity,1))}.bg-\\[\\#e1e3e5\\]{--tw-bg-opacity:1;background-color:rgb(225 227 229/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.px-\\[10px\\]{padding-left:10px;padding-right:10px}.px-\\[16px\\]{padding-left:16px;padding-right:16px}.py-4{padding-bottom:1rem;padding-top:1rem}.py-\\[20px\\]{padding-bottom:20px;padding-top:20px}.py-\\[8px\\]{padding-bottom:8px;padding-top:8px}.pt-\\[4px\\]{padding-top:4px}.text-center{text-align:center}.text-\\[18px\\]{font-size:18px}.text-\\[20px\\]{font-size:20px}.font-bold{font-weight:700}.text-\\[\\#383c43\\]{--tw-text-opacity:1;color:rgb(56 60 67/var(--tw-text-opacity,1))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}.duration-700{transition-duration:.7s}.reject-card{background-color:#f7d7d8;border-color:#f2aeb5;color:#58151c}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.success-card{background-color:#d0e7de;border-color:#a2d0bb;color:#0b3521}';export{r as vehicle_lookup}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built by ShiftSoftware
|
|
3
|
-
* Copyright (c)
|
|
4
|
-
*/
|
|
5
|
-
import{r as t,h as e,H as i,g as o}from"./p-f37b60d5.js";import{L as a}from"./p-65939a2f.js";import{c as r}from"./p-98d9e7ab.js";import{g as n}from"./p-4f08bcb8.js";let s={};const d=class{constructor(e){t(this,e),this.baseUrl="",this.isDev=!1,this.queryString="",this.loadingStateChange=void 0,this.loadedResponse=void 0,this.state="idle",this.externalPartNumber=null,this.errorMessage=null,this.partInformation=void 0}handleSettingData(t){this.partInformation=t}async setData(t,e={}){let i;clearTimeout(this.networkTimeoutRef),this.abortController&&this.abortController.abort(),this.abortController=new AbortController;const o="string"==typeof t,a=o?t:null==t?void 0:t.partNumber;this.externalPartNumber=a;try{if(!a||0===a.trim().length)return void(this.state="idle");this.state="data"===this.state||"error"===this.state?this.state+"-loading":"loading",await new Promise((t=>{i=setTimeout(t,700),this.networkTimeoutRef=i}));const r=o?await n(this,{scopedTimeoutRef:i,partNumber:a,mockData:s},e):t;if(this.networkTimeoutRef===i){if(!r)throw new Error("Wrong response format");this.handleSettingData(r)}this.errorMessage=null,this.state="data"}catch(t){if(t&&"AbortError"===(null==t?void 0:t.name))return;this.state="error",this.partInformation=null,this.errorMessage=t.message}}async fetchData(t=this.externalPartNumber,e={}){await this.setData(t,e)}async loadingListener(){this.loadingStateChange&&this.loadingStateChange(this.state.includes("loading"))}async setMockData(t){s=t}render(){var t;const o=this.partInformation?[{label:"Description",value:this.partInformation.stockParts[0].partDescription},{label:"Product Group",value:this.partInformation.stockParts[0].group},{label:"Russian Description",value:this.partInformation.stockParts[0].localDescription},{label:"Dealer Purchase price",value:this.partInformation.stockParts[0].fob},{label:"Recommended Retail price",value:this.partInformation.stockParts[0].price},{label:"Superseded From",value:this.partInformation.stockParts[0].supersededFrom},{label:"Superseded To",value:this.partInformation.stockParts[0].supersededTo}]:[],n=!!this.partInformation&&!this.partInformation.stockParts.some((({quantityLookUpResult:t})=>"LookupIsSkipped"===t||"QuantityNotWithinLookupThreshold"===t));return e(i,{key:"7032a390d65b610f56b6f31221eeadd3f0b61a12"},e("div",{key:"a0013f7b239eeae3d51d449cd845a3defce7bebd",class:"min-h-[100px] relative transition-all duration-300 overflow-hidden"},e("div",{key:"d99504791305435eca6e25fc5c347999e19f91a9"},e(a,{key:"ba91edc70d6215aff3232cd21be617eb55fab106",isLoading:this.state.includes("loading")}),e("div",{key:"e22b6b928dbf8445d11b16d68e726db8a365a789",class:r("transition-all duration-700",{"scale-0":this.state.includes("loading")||"idle"===this.state,"opacity-0":this.state.includes("loading")})},["error","error-loading"].includes(this.state)&&e("div",{key:"63b21a0578fa125216a7145533e75f2f1302daab",class:"py-[16px]"},e("div",{key:"3b6696073cdaed2160b10b021ba412cb86fe2657",class:" px-[16px] py-[8px] border reject-card text-[20px] rounded-[8px] w-fit mx-auto"},this.errorMessage)),["data","data-loading"].includes(this.state)&&e("div",{key:"5bbb69a62353f8a6a632b5cc09a9b9e76dc9c62d"},e("div",{key:"9c6dc4be0e6d83c759e091b83cebbab7c8cb6e3b",class:"flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]"},e("div",{key:"3f97274764dffae9d61508b718f57766a09af172",class:"w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]"},"Info"),e("div",{key:"78901a2fa38d6c79dc8558d3ecb4b389f3392b8a",class:"py-[10px] px-[30px] flex flex-col gap-[15px]"},e("div",{key:"5759e1248b91ffa883b880afaf3aed0262c49fe6",class:"grid grid-cols-3 gap-[50px]"},o.map((({label:t,value:i})=>e("div",{key:t,class:"flex flex-col flex-1"},e("strong",{class:"py-[10px] px-0 border-b-[gray] border-b"},t),e("div",{class:"py-[10px] px-0"},i))))))),n&&e("div",{key:"038d9d58365695f788c65414395802f0e25fb3b3",class:"flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]"},e("div",{key:"15c48929fdaebcb5fcbdc80fa8b0c8ea26561da2",class:"w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]"},"Distributor Stock"),e("div",{key:"b96121251261d73279e66254b1ac9fc1961d20b0",class:"flex flex-col gap-[15px]"},e("table",{key:"3e8f1cc014a14785d36ed0fe4156f907ba0d157c",class:"w-full overflow-auto relative border-collapse"},e("thead",{key:"ab239b04efb12ecbc07b2490430c5dc19741d525",class:"top-0 font-bold sticky bg-white"},e("tr",{key:"5847b1fb7f010062edddd2d75fc7db055823728e"},["Location","Availability"].map((t=>e("th",{key:t,class:"px-[10px] py-[20px] text-center whitespace-nowrap border-b border-[#d6d8dc]"},t))))),e("tbody",{key:"2d7a4c8fc658bc31314e56bd46d55a201b2cba07"},null===(t=this.partInformation)||void 0===t?void 0:t.stockParts.map((t=>e("tr",{class:"transition-colors duration-100 border-b border-[#d6d8dc] last:border-none hover:bg-slate-100",key:t.locationID},e("td",{class:r("px-[10px] py-[20px] text-center whitespace-nowrap")},t.locationName),e("td",{class:r("px-[10px] py-[20px] text-center whitespace-nowrap")},e("div",{class:r("text-[red]",{"text-[green]":"Available"===t.quantityLookUpResult,"text-[orange]":"PartiallyAvailable"===t.quantityLookUpResult})},e("strong",null,"Available"===t.quantityLookUpResult?"Available":"PartiallyAvailable"===t.quantityLookUpResult?"Partially Available":"Not Available")))))))))))))))}get el(){return o(this)}static get watchers(){return{state:["loadingListener"]}}};d.style='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host{all:initial!important;display:block}*{font-family:Arial}.static{position:static}.relative{position:relative}.sticky{position:sticky}.top-0{top:0}.mx-auto{margin-left:auto;margin-right:auto}.mt-\\[12px\\]{margin-top:12px}.flex{display:flex}.table{display:table}.grid{display:grid}.h-\\[40px\\]{height:40px}.max-h-\\[70dvh\\]{max-height:70dvh}.min-h-\\[100px\\]{min-height:100px}.w-fit{width:fit-content}.w-full{width:100%}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.scale-0{--tw-scale-x:0;--tw-scale-y:0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.gap-\\[15px\\]{gap:15px}.gap-\\[50px\\]{gap:50px}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[8px\\]{border-radius:8px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-\\[\\#d6d8dc\\]{--tw-border-opacity:1;border-color:rgb(214 216 220/var(--tw-border-opacity,1))}.border-b-\\[gray\\]{--tw-border-opacity:1;border-bottom-color:rgb(128 128 128/var(--tw-border-opacity,1))}.bg-\\[\\#e1e3e5\\]{--tw-bg-opacity:1;background-color:rgb(225 227 229/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.px-0{padding-left:0;padding-right:0}.px-\\[10px\\]{padding-left:10px;padding-right:10px}.px-\\[16px\\]{padding-left:16px;padding-right:16px}.px-\\[30px\\]{padding-left:30px;padding-right:30px}.py-\\[10px\\]{padding-bottom:10px;padding-top:10px}.py-\\[16px\\]{padding-bottom:16px;padding-top:16px}.py-\\[20px\\]{padding-bottom:20px;padding-top:20px}.py-\\[8px\\]{padding-bottom:8px;padding-top:8px}.text-center{text-align:center}.text-\\[18px\\]{font-size:18px}.text-\\[20px\\]{font-size:20px}.font-bold{font-weight:700}.text-\\[\\#383c43\\]{--tw-text-opacity:1;color:rgb(56 60 67/var(--tw-text-opacity,1))}.text-\\[green\\]{--tw-text-opacity:1;color:rgb(0 128 0/var(--tw-text-opacity,1))}.text-\\[orange\\]{--tw-text-opacity:1;color:rgb(255 165 0/var(--tw-text-opacity,1))}.text-\\[red\\]{--tw-text-opacity:1;color:rgb(255 0 0/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}.duration-700{transition-duration:.7s}.reject-card{background-color:#f7d7d8;border-color:#f2aeb5;color:#58151c}.last\\:border-none:last-child{border-style:none}.hover\\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.z-50{z-index:50}.size-\\[40px\\]{height:40px;width:40px}.size-full{height:100%;width:100%}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin-2s{animation:spin 2s linear infinite}';export{d as distributor_lookup}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built by ShiftSoftware
|
|
3
|
-
* Copyright (c)
|
|
4
|
-
*/
|
|
5
|
-
import{r as t,h as e,H as i,g as a}from"./p-f37b60d5.js";import{L as o}from"./p-65939a2f.js";import{c as r}from"./p-98d9e7ab.js";import{g as s}from"./p-4f08bcb8.js";let n={};const l=class{constructor(e){t(this,e),this.baseUrl="",this.isDev=!1,this.queryString="",this.headerTitle="Manufacturer",this.loadingStateChange=void 0,this.loadedResponse=void 0,this.state="idle",this.externalPartNumber=null,this.errorMessage=null,this.partInformation=void 0}handleSettingData(t){this.partInformation=t}async setData(t,e={}){let i;clearTimeout(this.networkTimeoutRef),this.abortController&&this.abortController.abort(),this.abortController=new AbortController;const a="string"==typeof t,o=a?t:null==t?void 0:t.partNumber;this.externalPartNumber=o;try{if(!o||0===o.trim().length)return void(this.state="idle");this.state="data"===this.state||"error"===this.state?this.state+"-loading":"loading",await new Promise((t=>{i=setTimeout(t,700),this.networkTimeoutRef=i}));const r=a?await s(this,{scopedTimeoutRef:i,partNumber:o,mockData:n},e):t;if(this.networkTimeoutRef===i){if(!r)throw new Error("Wrong response format");this.handleSettingData(r)}this.errorMessage=null,this.state="data"}catch(t){if(t&&"AbortError"===(null==t?void 0:t.name))return;this.state="error",this.partInformation=null,this.errorMessage=t.message}}async fetchData(t=this.externalPartNumber,e={}){await this.setData(t,e)}async loadingListener(){this.loadingStateChange&&this.loadingStateChange(this.state.includes("loading"))}async setMockData(t){n=t}render(){const t=this.partInformation?[{label:"Origin",value:this.partInformation.tmcPart.origin},{label:"Warranty Price",value:this.partInformation.tmcPart.warrantyPrice},{label:"Special Price",value:this.partInformation.tmcPart.specialPrice},{label:"Wholesales Price",value:this.partInformation.tmcPart.salesPrice},{label:"PNC",value:this.partInformation.tmcPart.pnc},{label:"PNC Russian Name",value:this.partInformation.tmcPart.pncLocalName},{label:"Bin Code",value:this.partInformation.tmcPart.binCode},{label:"Dimension 1",value:this.partInformation.tmcPart.dimension1},{label:"Dimension 2",value:this.partInformation.tmcPart.dimension2},{label:"Dimension 3",value:this.partInformation.tmcPart.dimension3},{label:"Net Weight",value:this.partInformation.tmcPart.netWeight},{label:"Gross Weight",value:this.partInformation.tmcPart.grossWeight},{label:"Cubic Measure",value:this.partInformation.tmcPart.cubicMeasure},{label:"HS Code",value:this.partInformation.tmcPart.hsCode},{label:"UZ HS Code",value:this.partInformation.tmcPart.uzHsCode}]:[];return e(i,{key:"42d691681bf4e255e08fcb8de8af5f17aa62c3a2"},e("div",{key:"3ac98dd33bb1b8b8e2d5f3d45b15b0fae790e4d8",class:"min-h-[100px] relative transition-all duration-300 overflow-hidden"},e("div",{key:"ea59a314c5fb6b3402bf5f0463abf17309e2b573"},e(o,{key:"19bf488dbe3746a98891362d4f43e55974540a71",isLoading:this.state.includes("loading")}),e("div",{key:"d9645d2783182168bd143c1378e97370c763976c",class:r("transition-all duration-700",{"scale-0":this.state.includes("loading")||"idle"===this.state,"opacity-0":this.state.includes("loading")})},["error","error-loading"].includes(this.state)&&e("div",{key:"f626a317a398319f000f07f33a1718a1c456f596",class:"py-[16px]"},e("div",{key:"e0e104413cb71a94f49ebdc5ac788256695cb8fc",class:" px-[16px] py-[8px] border reject-card text-[20px] rounded-[8px] w-fit mx-auto"},this.errorMessage)),["data","data-loading"].includes(this.state)&&e("div",{key:"4efcef154a9631abca531d82f1d45bd28a43801e"},e("div",{key:"5b160935a09585372d887e107d9b73e81251c61f",class:"flex mt-[12px] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]"},e("div",{key:"f72a04bb9a74e95c3c4b9b693e2185267add7606",class:"w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]"},this.headerTitle),e("div",{key:"3f5b740e844134afaac8d2b834c36fa2b799829f",class:"px-[30px] py-[10px] flex flex-col gap-[15px]"},e("div",{key:"cc973124470d8a7cfd4839d8c8c9def63f4f40df",class:"grid grid-cols-3 gap-[50px]"},t.map((({label:t,value:i})=>e("div",{key:t,class:"flex flex-col flex-1"},e("strong",{class:"py-[10px] px-0 border-b-[gray] border-b"},t),e("div",{class:"py-[10px] px-0"},i))))))))))))}get el(){return a(this)}static get watchers(){return{state:["loadingListener"]}}};l.style='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host{all:initial!important;display:block}*{font-family:Arial}.static{position:static}.relative{position:relative}.mx-auto{margin-left:auto;margin-right:auto}.mt-\\[12px\\]{margin-top:12px}.flex{display:flex}.grid{display:grid}.h-\\[40px\\]{height:40px}.min-h-\\[100px\\]{min-height:100px}.w-fit{width:fit-content}.w-full{width:100%}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.scale-0{--tw-scale-x:0;--tw-scale-y:0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.gap-\\[15px\\]{gap:15px}.gap-\\[50px\\]{gap:50px}.overflow-hidden{overflow:hidden}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[8px\\]{border-radius:8px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-\\[\\#d6d8dc\\]{--tw-border-opacity:1;border-color:rgb(214 216 220/var(--tw-border-opacity,1))}.border-b-\\[gray\\]{--tw-border-opacity:1;border-bottom-color:rgb(128 128 128/var(--tw-border-opacity,1))}.bg-\\[\\#e1e3e5\\]{--tw-bg-opacity:1;background-color:rgb(225 227 229/var(--tw-bg-opacity,1))}.px-0{padding-left:0;padding-right:0}.px-\\[16px\\]{padding-left:16px;padding-right:16px}.px-\\[30px\\]{padding-left:30px;padding-right:30px}.py-\\[10px\\]{padding-bottom:10px;padding-top:10px}.py-\\[16px\\]{padding-bottom:16px;padding-top:16px}.py-\\[8px\\]{padding-bottom:8px;padding-top:8px}.text-center{text-align:center}.text-\\[18px\\]{font-size:18px}.text-\\[20px\\]{font-size:20px}.text-\\[\\#383c43\\]{--tw-text-opacity:1;color:rgb(56 60 67/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}.duration-700{transition-duration:.7s}.reject-card{background-color:#f7d7d8;border-color:#f2aeb5;color:#58151c}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.z-50{z-index:50}.size-\\[40px\\]{height:40px;width:40px}.size-full{height:100%;width:100%}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin-2s{animation:spin 2s linear infinite}.duration-100{transition-duration:.1s}';export{l as manufacturer_lookup}
|