{"version":3,"sources":["webpack:///./src/plugins/api/dictionary/list.js"],"names":["getDataRequest","name","country","city","partner","service","isSub","request","Full","sname","CountryId","value","CityId","PartnerId","ServiceClassId","IsSubAgent","model","formatting","url","api","post","encodeURIComponent","JSON","stringify","id","time"],"mappings":"6JAEA,SAASA,EAAT,EAMGC,GAAM,IALPC,EAKO,EALPA,QACAC,EAIO,EAJPA,KACAC,EAGO,EAHPA,QACAC,EAEO,EAFPA,QAEO,IADPC,aACO,SACDC,EAAmB,cAATN,EAAuB,GAAK,CAC1CO,MAAM,GAEJC,EAAQ,GAqBZ,OApBIP,IACFK,EAAQG,UAAsC,qBAA1B,OAAOR,QAAP,IAAOA,OAAP,EAAOA,EAASS,OAAwBT,EAAUA,EAAQS,MAC9EF,GAAS,YAAJ,OAAgBF,EAAQG,YAE3BP,IACFI,EAAQK,OAAgC,qBAAvB,OAAOT,QAAP,IAAOA,OAAP,EAAOA,EAAMQ,OAAwBR,EAAOA,EAAKQ,MAClEF,GAAS,SAAJ,OAAaF,EAAQK,SAExBR,IACFG,EAAQM,UAAsC,qBAA1B,OAAOT,QAAP,IAAOA,OAAP,EAAOA,EAASO,OAAwBP,EAAUA,EAAQO,MAC9EF,GAAS,YAAJ,OAAgBF,EAAQM,YAE3BR,IACFE,EAAQO,eAA2C,qBAA1B,OAAOT,QAAP,IAAOA,OAAP,EAAOA,EAASM,OAAwBN,EAAUA,EAAQM,MACnFF,GAAS,YAAJ,OAAgBF,EAAQO,iBAE3BR,IACFC,EAAQQ,YAAa,EACrBN,GAAS,UAAJ,OAAcF,EAAQQ,aAEtB,CACLR,UACAE,SAIW,wBAAiD,6DAAJ,GAAjCR,EAAqC,EAArCA,KAAqC,IAA/Be,aAA+B,MAAvB,GAAuB,EAAnBC,EAAmB,EAAnBA,WACrCC,EAAM,sCAAH,OAAyCjB,EAAzC,SADqD,EAEnCD,EAAegB,EAAOf,GAAzCM,EAFsD,EAEtDA,QAASE,EAF6C,EAE7CA,MACjB,OAAOU,OACJC,KACCF,EAFG,kBAGQG,mBAAmBC,KAAKC,UAAUhB,IAH1C,oBAIH,CACEiB,GAAI,cAAF,OAAgBvB,GAAhB,OAAuBQ,GACzBgB,KAAM,EACNR","file":"js/chunk-2d0e4e7a.0bdbb2b4.js","sourcesContent":["import api from '..';\n\nfunction getDataRequest({\n country,\n city,\n partner,\n service,\n isSub = false,\n}, name) {\n const request = name === 'excursion' ? {} : {\n Full: true,\n };\n let sname = '';\n if (country) {\n request.CountryId = typeof country?.value === 'undefined' ? country : country.value;\n sname += `/country:${request.CountryId}`;\n }\n if (city) {\n request.CityId = typeof city?.value === 'undefined' ? city : city.value;\n sname += `/city:${request.CityId}`;\n }\n if (partner) {\n request.PartnerId = typeof partner?.value === 'undefined' ? partner : partner.value;\n sname += `/partner:${request.PartnerId}`;\n }\n if (service) {\n request.ServiceClassId = typeof service?.value === 'undefined' ? service : service.value;\n sname += `/service:${request.ServiceClassId}`;\n }\n if (isSub) {\n request.IsSubAgent = true;\n sname += `/isSub:${request.IsSubAgent}`;\n }\n return {\n request,\n sname,\n };\n}\n\nexport default function ({ name, model = {}, formatting } = {}) {\n const url = `/tourclient/masteragent/dictionary/${name}/list`;\n const { request, sname } = getDataRequest(model, name);\n return api\n .post(\n url,\n `request=${encodeURIComponent(JSON.stringify(request))}&removeZero=true`,\n {\n id: `dictionary/${name}${sname}`,\n time: 1,\n formatting,\n },\n );\n}\n"],"sourceRoot":""}