import{Y as Z,Q as c,ar as x}from"./main-DHoZdmBw.js";import{_ as ee}from"./trackingMixin.vue_vue_type_script_lang-Dme3gIa8.js";import{_ as ie}from"./userMixin-DTZNvHsb.js";var I={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"addMultipleItems"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BaseSiteId"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accessToken"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"cartId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"userId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isIds"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"items"}},type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"AddItem"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"createNewCart"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"lang"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"addMultipleItems"},arguments:[{kind:"Argument",name:{kind:"Name",value:"baseSiteId"},value:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}}},{kind:"Argument",name:{kind:"Name",value:"accessToken"},value:{kind:"Variable",name:{kind:"Name",value:"accessToken"}}},{kind:"Argument",name:{kind:"Name",value:"cartId"},value:{kind:"Variable",name:{kind:"Name",value:"cartId"}}},{kind:"Argument",name:{kind:"Name",value:"userId"},value:{kind:"Variable",name:{kind:"Name",value:"userId"}}},{kind:"Argument",name:{kind:"Name",value:"items"},value:{kind:"Variable",name:{kind:"Name",value:"items"}}},{kind:"Argument",name:{kind:"Name",value:"isIds"},value:{kind:"Variable",name:{kind:"Name",value:"isIds"}}},{kind:"Argument",name:{kind:"Name",value:"createNewCart"},value:{kind:"Variable",name:{kind:"Name",value:"createNewCart"}}},{kind:"Argument",name:{kind:"Name",value:"lang"},value:{kind:"Variable",name:{kind:"Name",value:"lang"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"cartId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cartModifications"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"productCode"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"statusCode"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:493}};I.loc.source={body:`mutation addMultipleItems(
  $baseSiteId: BaseSiteId!
  $accessToken: String!
  $cartId: String!
  $userId: String!
  $isIds: Boolean!
  $items: [AddItem]
  $createNewCart: Boolean
  $lang: String
) {
  addMultipleItems(
    baseSiteId: $baseSiteId
    accessToken: $accessToken
    cartId: $cartId
    userId: $userId
    items: $items
    isIds: $isIds
    createNewCart: $createNewCart
    lang: $lang
  ) {
    cartId
    cartModifications {
      productCode
      statusCode
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function f(e,i){if(e.kind==="FragmentSpread")i.add(e.name.value);else if(e.kind==="VariableDefinition"){var a=e.type;a.kind==="NamedType"&&i.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(n){f(n,i)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(n){f(n,i)}),e.definitions&&e.definitions.forEach(function(n){f(n,i)})}var E={};(function(){I.definitions.forEach(function(i){if(i.name){var a=new Set;f(i,a),E[i.name.value]=a}})})();function _(e,i){for(var a=0;a<e.definitions.length;a++){var n=e.definitions[a];if(n.name&&n.name.value==i)return n}}function ae(e,i){var a={kind:e.kind,definitions:[_(e,i)]};e.hasOwnProperty("loc")&&(a.loc=e.loc);var n=E[i]||new Set,s=new Set,d=new Set;for(n.forEach(function(t){d.add(t)});d.size>0;){var l=d;d=new Set,l.forEach(function(t){if(!s.has(t)){s.add(t);var r=E[t]||new Set;r.forEach(function(u){d.add(u)})}})}return s.forEach(function(t){var r=_(e,t);r&&a.definitions.push(r)}),a}ae(I,"addMultipleItems");var F={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"addItem"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BaseSiteId"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accessToken"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"cartId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"quantity"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isIds"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"userId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"lang"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"addItem"},arguments:[{kind:"Argument",name:{kind:"Name",value:"baseSiteId"},value:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}}},{kind:"Argument",name:{kind:"Name",value:"accessToken"},value:{kind:"Variable",name:{kind:"Name",value:"accessToken"}}},{kind:"Argument",name:{kind:"Name",value:"cartId"},value:{kind:"Variable",name:{kind:"Name",value:"cartId"}}},{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"quantity"},value:{kind:"Variable",name:{kind:"Name",value:"quantity"}}},{kind:"Argument",name:{kind:"Name",value:"isIds"},value:{kind:"Variable",name:{kind:"Name",value:"isIds"}}},{kind:"Argument",name:{kind:"Name",value:"userId"},value:{kind:"Variable",name:{kind:"Name",value:"userId"}}},{kind:"Argument",name:{kind:"Name",value:"lang"},value:{kind:"Variable",name:{kind:"Name",value:"lang"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"requestedItems"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"addedItems"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"statusCode"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cartId"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:429}};F.loc.source={body:`mutation addItem(
  $baseSiteId: BaseSiteId!
  $accessToken: String!
  $cartId: String!
  $id: String!
  $quantity: Int
  $isIds: Boolean!
  $userId: String!
  $lang: String
) {
  addItem(
    baseSiteId: $baseSiteId
    accessToken: $accessToken
    cartId: $cartId
    id: $id
    quantity: $quantity
    isIds: $isIds
    userId: $userId
    lang: $lang
  ) {
    requestedItems
    addedItems
    statusCode
    cartId
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function N(e,i){if(e.kind==="FragmentSpread")i.add(e.name.value);else if(e.kind==="VariableDefinition"){var a=e.type;a.kind==="NamedType"&&i.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(n){N(n,i)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(n){N(n,i)}),e.definitions&&e.definitions.forEach(function(n){N(n,i)})}var A={};(function(){F.definitions.forEach(function(i){if(i.name){var a=new Set;N(i,a),A[i.name.value]=a}})})();function U(e,i){for(var a=0;a<e.definitions.length;a++){var n=e.definitions[a];if(n.name&&n.name.value==i)return n}}function ne(e,i){var a={kind:e.kind,definitions:[U(e,i)]};e.hasOwnProperty("loc")&&(a.loc=e.loc);var n=A[i]||new Set,s=new Set,d=new Set;for(n.forEach(function(t){d.add(t)});d.size>0;){var l=d;d=new Set,l.forEach(function(t){if(!s.has(t)){s.add(t);var r=A[t]||new Set;r.forEach(function(u){d.add(u)})}})}return s.forEach(function(t){var r=U(e,t);r&&a.definitions.push(r)}),a}ne(F,"addItem");var $={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"deleteCartPositions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BaseSiteId"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accessToken"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"entries"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isIds"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"cartId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"userId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"lang"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteCartPositions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"baseSiteId"},value:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}}},{kind:"Argument",name:{kind:"Name",value:"accessToken"},value:{kind:"Variable",name:{kind:"Name",value:"accessToken"}}},{kind:"Argument",name:{kind:"Name",value:"entries"},value:{kind:"Variable",name:{kind:"Name",value:"entries"}}},{kind:"Argument",name:{kind:"Name",value:"isIds"},value:{kind:"Variable",name:{kind:"Name",value:"isIds"}}},{kind:"Argument",name:{kind:"Name",value:"cartId"},value:{kind:"Variable",name:{kind:"Name",value:"cartId"}}},{kind:"Argument",name:{kind:"Name",value:"userId"},value:{kind:"Variable",name:{kind:"Name",value:"userId"}}},{kind:"Argument",name:{kind:"Name",value:"lang"},value:{kind:"Variable",name:{kind:"Name",value:"lang"}}}],directives:[]}]}}],loc:{start:0,end:325}};$.loc.source={body:`mutation deleteCartPositions($baseSiteId: BaseSiteId!, $accessToken: String!, $entries: String!, $isIds: Boolean!, $cartId: String!, $userId: String!, $lang: String) {
  deleteCartPositions(baseSiteId: $baseSiteId, accessToken: $accessToken, entries: $entries, isIds: $isIds, cartId: $cartId, userId: $userId, lang: $lang)
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function g(e,i){if(e.kind==="FragmentSpread")i.add(e.name.value);else if(e.kind==="VariableDefinition"){var a=e.type;a.kind==="NamedType"&&i.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(n){g(n,i)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(n){g(n,i)}),e.definitions&&e.definitions.forEach(function(n){g(n,i)})}var P={};(function(){$.definitions.forEach(function(i){if(i.name){var a=new Set;g(i,a),P[i.name.value]=a}})})();function G(e,i){for(var a=0;a<e.definitions.length;a++){var n=e.definitions[a];if(n.name&&n.name.value==i)return n}}function te(e,i){var a={kind:e.kind,definitions:[G(e,i)]};e.hasOwnProperty("loc")&&(a.loc=e.loc);var n=P[i]||new Set,s=new Set,d=new Set;for(n.forEach(function(t){d.add(t)});d.size>0;){var l=d;d=new Set,l.forEach(function(t){if(!s.has(t)){s.add(t);var r=P[t]||new Set;r.forEach(function(u){d.add(u)})}})}return s.forEach(function(t){var r=G(e,t);r&&a.definitions.push(r)}),a}te($,"deleteCartPositions");var T={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"deleteProduct"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BaseSiteId"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accessToken"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isIds"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"cartId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"userId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"lang"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteProduct"},arguments:[{kind:"Argument",name:{kind:"Name",value:"baseSiteId"},value:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}}},{kind:"Argument",name:{kind:"Name",value:"accessToken"},value:{kind:"Variable",name:{kind:"Name",value:"accessToken"}}},{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"isIds"},value:{kind:"Variable",name:{kind:"Name",value:"isIds"}}},{kind:"Argument",name:{kind:"Name",value:"cartId"},value:{kind:"Variable",name:{kind:"Name",value:"cartId"}}},{kind:"Argument",name:{kind:"Name",value:"userId"},value:{kind:"Variable",name:{kind:"Name",value:"userId"}}},{kind:"Argument",name:{kind:"Name",value:"lang"},value:{kind:"Variable",name:{kind:"Name",value:"lang"}}}],directives:[]}]}}],loc:{start:0,end:295}};T.loc.source={body:`mutation deleteProduct($baseSiteId: BaseSiteId!, $accessToken: String!, $id: Int!, $isIds: Boolean!, $cartId: String!, $userId: String!, $lang: String) {
  deleteProduct(baseSiteId: $baseSiteId, accessToken: $accessToken, id: $id, isIds: $isIds, cartId: $cartId, userId: $userId, lang: $lang)
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function h(e,i){if(e.kind==="FragmentSpread")i.add(e.name.value);else if(e.kind==="VariableDefinition"){var a=e.type;a.kind==="NamedType"&&i.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(n){h(n,i)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(n){h(n,i)}),e.definitions&&e.definitions.forEach(function(n){h(n,i)})}var R={};(function(){T.definitions.forEach(function(i){if(i.name){var a=new Set;h(i,a),R[i.name.value]=a}})})();function z(e,i){for(var a=0;a<e.definitions.length;a++){var n=e.definitions[a];if(n.name&&n.name.value==i)return n}}function de(e,i){var a={kind:e.kind,definitions:[z(e,i)]};e.hasOwnProperty("loc")&&(a.loc=e.loc);var n=R[i]||new Set,s=new Set,d=new Set;for(n.forEach(function(t){d.add(t)});d.size>0;){var l=d;d=new Set,l.forEach(function(t){if(!s.has(t)){s.add(t);var r=R[t]||new Set;r.forEach(function(u){d.add(u)})}})}return s.forEach(function(t){var r=z(e,t);r&&a.definitions.push(r)}),a}de(T,"deleteProduct");var V={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"CartProductParts"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CartProduct"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"articleNo"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pricePerUnitFormatted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"availability"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"unit"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPrice"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currencyIso"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"formattedValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"formattedValueOnly"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"image"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"quantity"},arguments:[],directives:[]}]}}],loc:{start:0,end:227}};V.loc.source={body:`fragment CartProductParts on CartProduct {
  id
  articleNo
  pricePerUnitFormatted
  availability
  unit
  totalPrice {
    currencyIso
    formattedValue
    formattedValueOnly
    value
  }
  name
  image
  url
  quantity
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function p(e,i){if(e.kind==="FragmentSpread")i.add(e.name.value);else if(e.kind==="VariableDefinition"){var a=e.type;a.kind==="NamedType"&&i.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(n){p(n,i)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(n){p(n,i)}),e.definitions&&e.definitions.forEach(function(n){p(n,i)})}var O={};(function(){V.definitions.forEach(function(i){if(i.name){var a=new Set;p(i,a),O[i.name.value]=a}})})();function X(e,i){for(var a=0;a<e.definitions.length;a++){var n=e.definitions[a];if(n.name&&n.name.value==i)return n}}function re(e,i){var a={kind:e.kind,definitions:[X(e,i)]};e.hasOwnProperty("loc")&&(a.loc=e.loc);var n=O[i]||new Set,s=new Set,d=new Set;for(n.forEach(function(t){d.add(t)});d.size>0;){var l=d;d=new Set,l.forEach(function(t){if(!s.has(t)){s.add(t);var r=O[t]||new Set;r.forEach(function(u){d.add(u)})}})}return s.forEach(function(t){var r=X(e,t);r&&a.definitions.push(r)}),a}re(V,"CartProductParts");var k={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getCart"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BaseSiteId"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accessToken"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"catalogLocale"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CatalogLocale"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"cartId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"noOrderSimulate"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isIds"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"userId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"idToken"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"lang"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCart"},arguments:[{kind:"Argument",name:{kind:"Name",value:"baseSiteId"},value:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}}},{kind:"Argument",name:{kind:"Name",value:"accessToken"},value:{kind:"Variable",name:{kind:"Name",value:"accessToken"}}},{kind:"Argument",name:{kind:"Name",value:"catalogLocale"},value:{kind:"Variable",name:{kind:"Name",value:"catalogLocale"}}},{kind:"Argument",name:{kind:"Name",value:"cartId"},value:{kind:"Variable",name:{kind:"Name",value:"cartId"}}},{kind:"Argument",name:{kind:"Name",value:"noOrderSimulate"},value:{kind:"Variable",name:{kind:"Name",value:"noOrderSimulate"}}},{kind:"Argument",name:{kind:"Name",value:"isIds"},value:{kind:"Variable",name:{kind:"Name",value:"isIds"}}},{kind:"Argument",name:{kind:"Name",value:"userId"},value:{kind:"Variable",name:{kind:"Name",value:"userId"}}},{kind:"Argument",name:{kind:"Name",value:"idToken"},value:{kind:"Variable",name:{kind:"Name",value:"idToken"}}},{kind:"Argument",name:{kind:"Name",value:"lang"},value:{kind:"Variable",name:{kind:"Name",value:"lang"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"cart"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"guid"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"deliveryCost"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formattedValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"formattedValueOnly"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currencyIso"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"requestedDeliveryDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"calculatedDeliveryDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"calculated"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"subTotal"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formattedValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"formattedValueOnly"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currencyIso"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"subTotalWithTax"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalDiscounts"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalItems"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPrice"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formattedValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"formattedValueOnly"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currencyIso"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"totalPriceWithTax"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalTax"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formattedValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"formattedValueOnly"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"totalTaxes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"formattedValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"rate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"baseValueFormatted"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"totalUnitCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"comment"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"purchaseOrderNumber"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"deliveryDescription"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"orderDeliverySpeed"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"idsCart"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"firstName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"products"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CartProductParts"},directives:[]},{kind:"Field",name:{kind:"Name",value:"price"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"priceValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"initialQuantity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"deliverySpeed"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"catalogProductData"},arguments:[{kind:"Argument",name:{kind:"Name",value:"baseSiteId"},value:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}}},{kind:"Argument",name:{kind:"Name",value:"apiLang"},value:{kind:"Variable",name:{kind:"Name",value:"catalogLocale"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"ProductName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"CategoryDisplayNamePath"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"basePrices"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currencyIso"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currencySymbol"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"qty"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"unit"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"valueFormatted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"valueFormattedGross"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"priceRows"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"dateRange"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"minQtd"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"unit"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"quantityStepRanges"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"rangeTo"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"rangeFrom"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"rangeValue"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"fischerBestPrice"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"stockLevels"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"warehouse"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"partPackagingAllowed"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"discounts"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"absolute"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"code"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"discountScales"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"absolute"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"baseValue"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currencyIso"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currencySymbol"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"formattedValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"formattedValueOnly"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"priceType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"diffToBaseValue"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currencyIso"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currencySymbol"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"formattedValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"formattedValueOnly"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"priceType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"discountConditionMet"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"discountValueRelative"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"scaleType"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"appliedValue"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currencyIso"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currencySymbol"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"formattedValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"formattedValueOnly"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"priceType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"appliedVouchers"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"voucherCode"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"deliveryAddress"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"country"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isocode"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"firstName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name2"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name3"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name4"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"postalCode"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"region"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"countryIso"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isocode"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isocodeShort"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"streetName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"streetNumber"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"town"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sapCustomerID"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"phone"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"billingAddress"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"companyName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"country"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isocode"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"firstName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name2"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name3"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name4"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"postalCode"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"region"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"countryIso"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isocode"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isocodeShort"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"streetName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"streetNumber"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"town"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sapCustomerID"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"phone"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"canNotUseBillingAddressForDelivery"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:3975}};k.loc.source={body:`#import "./cartProductPartsFragment.gql"

query getCart(
  $baseSiteId: BaseSiteId!
  $accessToken: String!
  $catalogLocale: CatalogLocale!
  $cartId: String!
  $noOrderSimulate: Boolean
  $isIds: Boolean!
  $userId: String!
  $idToken: String
  $lang: String
) {
  getCart(
    baseSiteId: $baseSiteId
    accessToken: $accessToken
    catalogLocale: $catalogLocale
    cartId: $cartId
    noOrderSimulate: $noOrderSimulate
    isIds: $isIds
    userId: $userId
    idToken: $idToken
    lang: $lang
  ) {
    cart {
      id
      guid
      deliveryCost {
        formattedValue
        formattedValueOnly
        value
        currencyIso
      }
      requestedDeliveryDate
      calculatedDeliveryDate
      calculated
      subTotal {
        formattedValue
        formattedValueOnly
        value
        currencyIso
      }
      subTotalWithTax
      totalDiscounts
      totalItems
      totalPrice {
        formattedValue
        formattedValueOnly
        value
        currencyIso
      }
      totalPriceWithTax
      totalTax {
        formattedValue
        formattedValueOnly
        value
      }
      totalTaxes {
        formattedValue
        value
        rate
        baseValueFormatted
      }
      totalUnitCount
      comment
      purchaseOrderNumber
      deliveryDescription
      orderDeliverySpeed
      idsCart
      user {
        email
        firstName
        lastName
        title
      }
      products {
        ...CartProductParts
        price
        priceValue
        initialQuantity
        deliverySpeed
        catalogProductData(
          baseSiteId: $baseSiteId
          apiLang: $catalogLocale
        ) {
          ProductName
          CategoryDisplayNamePath
        }
        basePrices {
          currencyIso
          currencySymbol
          qty
          unit
          value
          valueFormatted
          valueFormattedGross
        }
        priceRows {
          dateRange
          minQtd
          unit
          value
        }
        quantityStepRanges {
          rangeTo
          rangeFrom
          rangeValue
        }
        fischerBestPrice {
          stockLevels {
            warehouse {
              code
            }
          }
        }
        partPackagingAllowed
      }
      discounts {
        absolute
        code
        discountScales {
          absolute
          baseValue {
            currencyIso
            currencySymbol
            formattedValue
            formattedValueOnly
            priceType
            value
          }
          diffToBaseValue {
            currencyIso
            currencySymbol
            formattedValue
            formattedValueOnly
            priceType
            value
          }
          discountConditionMet
          discountValueRelative
          scaleType
        }
        appliedValue {
          currencyIso
          currencySymbol
          formattedValue
          formattedValueOnly
          priceType
          value
        }
        value
      }
      appliedVouchers {
        code
        voucherCode
      }
      deliveryAddress {
        id
        companyName
        country {
          name
          isocode
        }
        firstName
        lastName
        name2
        name3
        name4
        postalCode
        region {
          countryIso
          isocode
          isocodeShort
          name
        }
        streetName
        streetNumber
        town
        sapCustomerID
        phone
      }
      billingAddress {
        id
        companyName
        country {
          name
          isocode
        }
        firstName
        lastName
        name2
        name3
        name4
        postalCode
        region {
          countryIso
          isocode
          isocodeShort
          name
        }
        streetName
        streetNumber
        town
        sapCustomerID
        phone
      }
      canNotUseBillingAddressForDelivery
    }
    errors
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var W={};function se(e){return e.filter(function(i){if(i.kind!=="FragmentDefinition")return!0;var a=i.name.value;return W[a]?!1:(W[a]=!0,!0)})}k.definitions=k.definitions.concat(se(V.definitions));function y(e,i){if(e.kind==="FragmentSpread")i.add(e.name.value);else if(e.kind==="VariableDefinition"){var a=e.type;a.kind==="NamedType"&&i.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(n){y(n,i)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(n){y(n,i)}),e.definitions&&e.definitions.forEach(function(n){y(n,i)})}var q={};(function(){k.definitions.forEach(function(i){if(i.name){var a=new Set;y(i,a),q[i.name.value]=a}})})();function j(e,i){for(var a=0;a<e.definitions.length;a++){var n=e.definitions[a];if(n.name&&n.name.value==i)return n}}function le(e,i){var a={kind:e.kind,definitions:[j(e,i)]};e.hasOwnProperty("loc")&&(a.loc=e.loc);var n=q[i]||new Set,s=new Set,d=new Set;for(n.forEach(function(t){d.add(t)});d.size>0;){var l=d;d=new Set,l.forEach(function(t){if(!s.has(t)){s.add(t);var r=q[t]||new Set;r.forEach(function(u){d.add(u)})}})}return s.forEach(function(t){var r=j(e,t);r&&a.definitions.push(r)}),a}le(k,"getCart");var C={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getIdsCartAsXML"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accessToken"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BaseSiteId"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getIdsCartAsXML"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accessToken"},value:{kind:"Variable",name:{kind:"Name",value:"accessToken"}}},{kind:"Argument",name:{kind:"Name",value:"baseSiteId"},value:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"xml"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:168}};C.loc.source={body:`query getIdsCartAsXML($accessToken:String!, $baseSiteId:BaseSiteId!) {
  getIdsCartAsXML(
    accessToken: $accessToken
    baseSiteId: $baseSiteId
  ) {
    xml
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function S(e,i){if(e.kind==="FragmentSpread")i.add(e.name.value);else if(e.kind==="VariableDefinition"){var a=e.type;a.kind==="NamedType"&&i.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(n){S(n,i)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(n){S(n,i)}),e.definitions&&e.definitions.forEach(function(n){S(n,i)})}var L={};(function(){C.definitions.forEach(function(i){if(i.name){var a=new Set;S(i,a),L[i.name.value]=a}})})();function J(e,i){for(var a=0;a<e.definitions.length;a++){var n=e.definitions[a];if(n.name&&n.name.value==i)return n}}function ue(e,i){var a={kind:e.kind,definitions:[J(e,i)]};e.hasOwnProperty("loc")&&(a.loc=e.loc);var n=L[i]||new Set,s=new Set,d=new Set;for(n.forEach(function(t){d.add(t)});d.size>0;){var l=d;d=new Set,l.forEach(function(t){if(!s.has(t)){s.add(t);var r=L[t]||new Set;r.forEach(function(u){d.add(u)})}})}return s.forEach(function(t){var r=J(e,t);r&&a.definitions.push(r)}),a}ue(C,"getIdsCartAsXML");var D={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"updateQuantity"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BaseSiteId"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accessToken"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"quantity"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isIds"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"cartId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"userId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateQuantity"},arguments:[{kind:"Argument",name:{kind:"Name",value:"baseSiteId"},value:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}}},{kind:"Argument",name:{kind:"Name",value:"accessToken"},value:{kind:"Variable",name:{kind:"Name",value:"accessToken"}}},{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"quantity"},value:{kind:"Variable",name:{kind:"Name",value:"quantity"}}},{kind:"Argument",name:{kind:"Name",value:"isIds"},value:{kind:"Variable",name:{kind:"Name",value:"isIds"}}},{kind:"Argument",name:{kind:"Name",value:"cartId"},value:{kind:"Variable",name:{kind:"Name",value:"cartId"}}},{kind:"Argument",name:{kind:"Name",value:"userId"},value:{kind:"Variable",name:{kind:"Name",value:"userId"}}}],directives:[]}]}}],loc:{start:0,end:307}};D.loc.source={body:`mutation updateQuantity($baseSiteId: BaseSiteId!, $accessToken: String!, $id: Int!, $quantity: Int!, $isIds: Boolean!, $cartId: String!, $userId: String!) {
  updateQuantity(baseSiteId: $baseSiteId, accessToken: $accessToken, id: $id, quantity: $quantity, isIds: $isIds, cartId: $cartId, userId: $userId)
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function b(e,i){if(e.kind==="FragmentSpread")i.add(e.name.value);else if(e.kind==="VariableDefinition"){var a=e.type;a.kind==="NamedType"&&i.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(n){b(n,i)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(n){b(n,i)}),e.definitions&&e.definitions.forEach(function(n){b(n,i)})}var B={};(function(){D.definitions.forEach(function(i){if(i.name){var a=new Set;b(i,a),B[i.name.value]=a}})})();function Y(e,i){for(var a=0;a<e.definitions.length;a++){var n=e.definitions[a];if(n.name&&n.name.value==i)return n}}function me(e,i){var a={kind:e.kind,definitions:[Y(e,i)]};e.hasOwnProperty("loc")&&(a.loc=e.loc);var n=B[i]||new Set,s=new Set,d=new Set;for(n.forEach(function(t){d.add(t)});d.size>0;){var l=d;d=new Set,l.forEach(function(t){if(!s.has(t)){s.add(t);var r=B[t]||new Set;r.forEach(function(u){d.add(u)})}})}return s.forEach(function(t){var r=Y(e,t);r&&a.definitions.push(r)}),a}me(D,"updateQuantity");function oe(){return this.$fischer.shop.isClosedShop()}const fe={mixins:[ie,Z,ee],emits:["get-cart-code"],data(){return{isAddingItemToCart:{},cart:{},mfvCode:[],deliveryAddressId:void 0,cartErrors:null}},computed:{useMemoList(){return oe.call(this)},getProductDetailsInCart(){return!1},isAddingToCart(){return Object.keys(this.isAddingItemToCart).length},invalidAccessToken:{get(){return this.$store.getters["cart/invalidToken"]}}},watch:{async invalidAccessToken(e){e&&await this.logoutIfTokenInvalid({message:"GraphQL error: Invalid token"})}},created(){this.$store.dispatch("cart/initialize",{apollo:this.$apollo,fischer:this.$fischer})},methods:{async getShoppingCart(){return this.$fischer.cartId()||await this.getCart(),this.$fischer.cartId()},async getCartId(){return this.useCartCode?this.cartCode?this.cartCode:new Promise((e,i)=>{this.$emit("get-cart-code",e,i)}):this.getShoppingCart()},async getCurrentCartId(){return await this.getCart(),this.$fischer.user.id()==="anonymous"&&this.cart.guid?this.cart.guid:this.$fischer.user.id()!=="anonymous"&&this.cart.id?this.cart.id:null},enterErrorState(...e){console.error(...e)},async removeCartPositions(e){try{this.isUpdating=!0,this.haveErrors=!1;const i=await this.getCartId(),a=e.map(n=>({entryNumber:parseInt(n.id,10)}));await this.$apollo.mutate({mutation:$,variables:{baseSiteId:this.$fischer.baseSiteId(),accessToken:this.$fischer.user.accessToken(),entries:JSON.stringify({orderEntries:a}),isIds:c(),cartId:i,userId:this.$fischer.user.id(),lang:this.$fischer.language_639_1()}}),this.trackRemoveFromCart(e),this.isReloadCart=!0,await this.getCart(!1),this.isReloadCart=!1,this.isUpdating=!1,this.quantityChanged=!1,this.$store.dispatch("notifications/openToastNotification",{name:"product-removed",message:{value:this.$dict.get("online-Shop.Global-Labels.Notifications.All-Products-Removed")},type:"success",icon:"check",close:!0,delayLong:!0})}catch(i){this.enterErrorState(i)}},async removeProduct(e){try{this.isUpdating=!0,this.haveErrors=!1;const i=await this.getCartId();await this.$apollo.mutate({mutation:T,variables:{baseSiteId:this.$fischer.baseSiteId(),accessToken:this.$fischer.user.accessToken(),id:parseInt(e.id,10),isIds:c(),cartId:i,userId:this.$fischer.user.id(),lang:this.$fischer.language_639_1()}}),this.trackRemoveFromCart([e]),this.isReloadCart=!0,await this.getCart(!1),this.isReloadCart=!1,this.isUpdating=!1,this.quantityChanged=!1,this.$store.dispatch("notifications/openToastNotification",{name:"product-removed",message:{value:this.$dict.get("online-Shop.Global-Labels.Notifications.Product-Removed")},type:"success",icon:"check",close:!0,delayLong:!0})}catch(i){this.enterErrorState(i)}},async addProductToCart({productID:e,productRequestedQuantity:i=0,productInitialQuantity:a,disableNotification:n,rethrowErrors:s,targetCart:d,disableTracking:l=!1,fromMemoList:t}){try{this.isUpdating=!0,this.isAddingItemToCart[e]=!0;const r=d||await this.getCartId(),{data:u,errors:m}=await this.$apollo.mutate({mutation:F,errorPolicy:"all",variables:{baseSiteId:this.$fischer.baseSiteId(),accessToken:this.$fischer.user.accessToken()?this.$fischer.user.accessToken():"",cartId:r,id:e,quantity:i||a,isIds:c(),userId:this.$fischer.user.id(),lang:this.$fischer.language_639_1()}});if(this.isUpdating=!1,delete this.isAddingItemToCart[e],m)return s||this.enterErrorState(m),{success:!1,errors:{graphQLErrors:m}};const o=u==null?void 0:u.addItem;if((o==null?void 0:o.addedItems)!==void 0){const{addedItems:v,requestedItems:w}=o;v!==w&&this.$store.dispatch("notifications/openToastNotification",{name:`toast-error-${Math.random()}`,message:{value:v?this.$dict.get("checkout.Cart.Could-Not-Add-All-Items",[w,v]):this.$dict.get("checkout.Cart.Could-Not-Add-Items",[w])},type:"error",icon:"alert-triangle",close:!0,persist:!0}),o.cartId&&o.cartId!=="current"&&!this.$fischer.cartId()&&o.cartId!==this.$fischer.cartId()&&this.$fischer.setCartId(o.cartId);const Q=v!==0;if(Q){this.cart.products?this.cart.products.push({articleNo:e}):this.cart.products=[{articleNo:e}],n||this.notifyCartChange();const H=i||a;if(!l){const K=await this.getCurrentCartId();this.trackAddToCart(K,e,parseInt(H,10),t)}return{success:Q}}return console.log("could not add item:",o.statusCode),{success:!1,errors:{error:"could not add item",statusCode:o.statusCode}}}const M="an error has occurred, got no addItem or addedItems";return s?{success:!1,errors:M}:(this.enterErrorState(M,u),{success:!1})}catch(r){return delete this.isAddingItemToCart[e],s||this.enterErrorState("error for addProductToCart",r),{success:!1,errors:r}}},async addMultipleProductsToCart({products:e,createNewCart:i=!1,disableNotification:a,rethrowErrors:n}){try{this.isUpdating=!0,e.forEach(({productID:m})=>{this.isAddingItemToCart[m]=!0});const s=await this.getCartId(),d=e.map(m=>({id:m.productID,quantity:m.productRequestedQuantity||m.productInitialQuantity||1})),{data:l}=await this.$apollo.mutate({mutation:I,errorPolicy:"all",variables:{baseSiteId:this.$fischer.baseSiteId(),accessToken:this.$fischer.user.accessToken(),userId:this.$fischer.user.id(),cartId:s,items:d,isIds:c(),createNewCart:i,lang:this.$fischer.language_639_1()}}),t=await this.getCurrentCartId();this.trackAddMultipleToCart(t,d),this.isUpdating=!1,e.forEach(({productID:m})=>{delete this.isAddingItemToCart[m]});const{addMultipleItems:r}=l;return r.cartId&&r.cartId!=="current"&&!this.$fischer.cartId()&&r.cartId!==this.$fischer.cartId()&&this.$fischer.setCartId(r.cartId),r.cartModifications.some(m=>m.statusCode==="success")&&(a||this.notifyCartChange()),r.cartModifications}catch(s){return e&&e.forEach(({productID:d})=>{delete this.isAddingItemToCart[d]}),n||this.enterErrorState("error for addMultipleItems",s),{success:!1,errors:s}}},async notifyCartChange(e){try{const i=await this.getCartPositionsCount();e||(x.$emit("ProductAddToCart",!0),x.$emit("ShoppingcartCounter",i)),this.updateShoppingcartCounter(i)}catch(i){this.enterErrorState("an error has occurred, notifyCartChange",i)}},async getCartPositionsCount(){return await this.$store.dispatch("cart/refetchPositionsCount"),this.$store.getters["cart/positionsCount"]||0},checkMfvCodes(e){this.mfvCode=[],e.forEach(i=>{i.startsWith("MFV-")?this.mfvCode.push(i):this.$fischer.user.getAssistedService()&&this.$store.dispatch("notifications/openToastNotification",{name:Math.random(),text:i,type:"error",close:!0,persist:!0,action:{label:""}})})},async getCart(e=!0,i=!1){var n,s,d;if(!this.$fischer.shop.supportsCart())return console.error("Cart not supported"),{success:!1};this.$fischer.user.id()==="anonymous"&&this.$fischer.cartId()&&!this.$fischer.cartId().includes("-")&&this.$fischer.setCartId("");const a=i||this.$fischer.shop.isRetailConnectCart();this.isUpdating=!0,e&&(this.isLoading=!0);try{const l=this.$fischer.user.getAssistedService(),{data:t}=await this.$apollo.query({query:k,fetchPolicy:"no-cache",variables:{baseSiteId:this.$fischer.baseSiteId(),accessToken:this.$fischer.user.accessToken(),userId:this.$fischer.user.id(),cartId:this.$fischer.cartId(),cacheDefeat:new Date().getTime(),catalogLocale:this.$fischer.catalogLocale(),noOrderSimulate:a,isIds:c(),idToken:l==null?void 0:l.idToken,lang:this.$fischer.language_639_1()},cachePolicy:"no-cache"}),r=t.getCart||{error:["Got no cart in response"]};this.cart=r.cart,(s=(n=this.cart)==null?void 0:n.deliveryAddress)!=null&&s.id&&(this.deliveryAddressId=this.cart.deliveryAddress.id),(d=this.cart)!=null&&d.guid&&(!this.$fischer.cartId()||this.$fischer.cartId()==="")&&this.$fischer.setCartId(r.cart.guid),this.isUpdating=!1,e&&(this.isLoading=!1),this.updateShoppingcartCounter(this.cart?this.cart.totalItems:0);const{errors:u}=t.getCart;if(u){const m=this.mfvCode.length;this.checkMfvCodes(u),!m&&this.mfvCode.length&&(await this.$nextTick(),this.$refs.mfvErrorMessage?this.$refs.mfvErrorMessage.trigger():console.log("Could not notify mfv-code",this.mfvCode))}return u!=null&&u.length&&u.length!==this.mfvCode.length?(console.log(r.errors),this.$store.dispatch("notifications/openGeneralErrorNotification",{vm:this}),this.haveErrors=!0):this.haveErrors=!1,this.cartErrors=u,{success:!0}}catch(l){return this.$store.dispatch("notifications/openGeneralErrorNotification",{vm:this}),this.haveErrors=!0,console.log(l),await this.logoutIfTokenInvalid(l),{success:!1}}},updateShoppingcartCounter(e){this.$store.dispatch("cart/setPositionsCount",e)},async updateQuantity(e,i){const a=parseInt(e),n=parseInt(i,10),s=this.savedCart?this.savedCart.products[n]||{}:this.cart.products[n]||{};if(parseInt(s.quantity,10)!==a)try{this.isUpdating=!0,this.haveErrors=!1;const{data:l}=await this.$apollo.mutate({mutation:D,variables:{baseSiteId:this.$fischer.baseSiteId(),accessToken:this.$fischer.user.accessToken(),id:n,quantity:a>0?a:1,isIds:c(),cartId:this.cartCode||this.$fischer.cartId(),userId:this.$fischer.user.id()}});l.updateQuantity&&(this.isReloadCart=!0,await this.getCart(!1))}catch(l){await this.logoutIfTokenInvalid(l),this.enterErrorState(l);return}this.isReloadCart=!1,this.isUpdating=!1,this.quantityChanged=!1},async sendCartToIds(e){this.isUpdating=!0;try{if(!e)throw new Error("missing cart instance");const{data:i}=await this.$apollo.query({query:C,variables:{baseSiteId:this.$fischer.baseSiteId(),accessToken:this.$fischer.user.accessToken()}});await this.postXMLToIds(i.getIdsCartAsXML.xml,e)}catch(i){this.enterErrorState("Error sending order",i)}},async postXMLToIds(e,i){return i.postCartToIDS(e)}}};export{fe as _,V as d,oe as u};