PageSourceSearch

https://agromiles.basf.ee/static/js/25.b6d8e7f6.chunk.js

js basf.ee collected 2026-10-08 17:27:00 UTC 11,927 bytes, 2 lines download raw bytes

1(this.webpackJsonpbasf_fe=this.webpackJsonpbasf_fe||[]).push([[25],{452:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(0),o=r(23),a=r(14),i=function(){var e=Object(o.b)(a.a.municipality),t=e.data,r=e.error,i=Object(n.useMemo)((function(){return!t&&!r}),[t,r]);return{municipality:t,error:r,loading:i}}},454:function(e,t,r){"use strict";r.d(t,"a",(function(){return O}));var n,o=r(3),a=r(6),i=r(198),c=r(100),l=r(0),s=["title","titleId"];function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u.apply(this,arguments)}function d(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function m(e,t){var r=e.title,o=e.titleId,a=d(e,s);return l.createElement("svg",u({width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":o},a),r?l.createElement("title",{id:o},r):null,n||(n=l.createElement("circle",{cx:9,cy:9,r:9,fill:"#004A96"})))}var b=l.forwardRef(m),p=(r.p,r(4)),f=r(147),j=Object(f.a)((function(e){return{root:Object(p.a)({paddingTop:e.spacing(.5)},e.breakpoints.down("xs"),{paddingTop:e.spacing(.75),fontSize:"16px",lineHeight:"29px"})}})),h=r(1),g=["title","noBubble"];function O(e){var t=e.title,r=e.noBubble,n=Object(a.a)(e,g),l=j();return Object(h.jsxs)(i.a,Object(o.a)(Object(o.a)({display:"flex",alignItems:"center"},n),{},{children:[!r&&Object(h.jsx)(i.a,{marginRight:2,display:"flex",alignItems:"center",children:Object(h.jsx)(b,{})}),Object(h.jsx)(c.a,{variant:"h5",color:"primary",className:l.root,children:t})]}))}},455:function(e,t,r){"use strict";r.d(t,"a",(function(){return m}));var n=r(198),o=r(401),a=r(114),i=r(4),c=r(147),l=r(292),s=Object(c.a)((function(e){return Object(l.a)({wrapper:Object(i.a)({display:"flex",flexDirection:"column",padding:"23px 0",height:48},e.breakpoints.up("md"),{flexDirection:"row-reverse",padding:0})})})),u=r(185),d=r(1);function m(e){var t=e.submitLabel,r=e.onCancel,i=e.loading,c=e.disabled,l=Object(a.a)().t,m=s();return Object(d.jsxs)(n.a,{className:m.wrapper,children:[Object(d.jsx)(u.a,{loading:i,label:t,variant:"contained",fullWidth:!0,type:"submit",disabled:i||c}),Object(d.jsx)(n.a,{marginRight:"10px",marginBottom:3}),Object(d.jsx)(o.a,{variant:"outlined",fullWidth:!0,onClick:r,children:l("buttons.cancel")})]})}},472:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(114),o={lt:{code:"LT-"},lv:{code:"LV-"},et:{code:"EE-"},en:{code:""}},a=function(){var e=Object(n.a)().i18n;return o[e.language]}},473:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n="^[0-9]*$"},533:function(e,t,r){"use strict";r.d(t,"a",(function(){return m})),r.d(t,"b",(function(){return b}));var n=r(29),o=r(3),a=r(8),i=r(16),c=r.n(i),l=r(0),s=r(23),u=r(14),d=r(27),m=function(){var e=Object(s.b)(u.a.order),t=e.data,r=e.error,i=e.mutate,m=Object(l.useState)(!1),b=Object(a.a)(m,2),p=b[0],f=b[1],j=Object(l.useState)(!1),h=Object(a.a)(j,2),g=h[0],O=h[1],x=Object(l.useMemo)((function(){var e;if(t){var r=t.order,n=t.userDetails;return{order:r,userDetails:Object(o.a)(Object(o.a)({},n),{},{regionId:null===n||void 0===n||null===(e=n.municipality)||void 0===e?void 0:e.id})}}}),[t]),v=Object(l.useMemo)((function(){return!g&&!r&&!t}),[t,r,g]),y=Object(l.useCallback)(function(){var e=Object(n.a)(c.a.mark((function e(t){var r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f(!0),"number"!==typeof(r=Object(o.a)({},t)).regionId&&"string"!==typeof r.regionId||(r.municipality=Number(r.regionId),r.regionId=void 0),e.next=5,Object(d.c)("post",u.a.completeOrder,r).then((function(e){return Object(s.c)(u.a.cart),Object(s.c)(u.a.profileBriefInfo),{success:!0}})).catch((function(e){var t,r;return{errors:null===e||void 0===e||null===(t=e.response)||void 0===t||null===(r=t.data)||void 0===r?void 0:r.formErrors,success:!1}})).finally((function(){f(!1)}));case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[]);return Object(l.useEffect)((function(){null!=t&&O(!0)}),[t]),{mappedOrder:x,order:t,loadingOrder:v,completeOrderLoader:p,orderError:r,completeOrder:y,mutateOrder:i}},b=function(){var e=Object(l.useState)(1),t=Object(a.a)(e,2),r=t[0],n=t[1],o=Object(s.b)("".concat(u.a.orders,"?page=").concat(r)),i=o.data,c=o.error,d=Object(l.useMemo)((function(){return!i&&!c}),[c,i]),m=Object(l.useMemo)((function(){return null===i||void 0===i?void 0:i.orders}),[null===i||void 0===i?void 0:i.orders]),b=Object(l.useMemo)((function(){return null===i||void 0===i?void 0:i.currentPage}),[null===i||void 0===i?void 0:i.currentPage]),p=Object(l.useMemo)((function(){return null===i||void 0===i?void 0:i.totalPages}),[null===i||void 0===i?void 0:i.totalPages]),f=Object(l.useCallback)((function(e){n(e)}),[]);return Object(l.useEffect)((function(){"number"===typeof b&&b!==r&&n(b)}),[b]),{orders:m,ordersLoading:d,totalPages:p,onPageChange:f,page:r}}},750:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return N}));
1var n=r(3),o=r(29),a=r(8),i=r(16),c=r.n(i),l=r(46),s=r(162),u=r(198),d=r(100),m=r(267),b=r(429),p=r(430),f=r(444),j=r(114),h=r(454),g=r(0),O=r(455),x=r(452),v=r(472),y=r(473),L=r(123),_=r(533),k=r(226),q=r(190),C=r(132),w=r(187),M=r(32),E=r(10),T=r(47),S=r(78),I=r(480),D=r(1);function N(){var e=function(){var e=Object(j.a)(),t=e.i18n,r=e.t,n=Object(g.useMemo)((function(){return"et"===(null===t||void 0===t?void 0:t.language)}),[t.language]),o=Object(g.useMemo)((function(){return"lt"===(null===t||void 0===t?void 0:t.language)}),[t.language]);return{controls:Object(g.useMemo)((function(){return[{type:b.MpControlType.text,key:"firstName",label:r("form.firstName"),placeholder:r("form.firstName"),required:!0,validations:{minLength:3,maxLength:24},messages:{required:r("form.required"),minLength:r("form.min_length"),maxLength:r("form.max_length")}},{type:b.MpControlType.text,key:"lastName",label:r("form.lastName"),placeholder:r("form.lastName"),required:!0,validations:{minLength:3,maxLength:24},messages:{required:r("form.required"),minLength:r("form.min_length"),maxLength:r("form.max_length")}},{type:b.MpControlType.text,key:"email",placeholder:r("prizes.email"),messages:{required:r("form.required"),minLength:r("form.min_length"),maxLength:r("form.max_length")},validations:{minLength:2,maxLength:75},label:r("form.email"),required:!0},{type:"phoneNumber",key:"phone",placeholder:r("form.phone_placeholder"),label:r("form.phone"),required:!0,validations:{minLength:n?7:8,maxLength:8},messages:{required:r("form.required"),minLength:r("form.min_length"),maxLength:r("form.max_length")}},{type:b.MpControlType.text,key:"personalCode",label:r("form.personalCode"),placeholder:r("form.personalCode"),required:!0,validations:{minLength:o?9:void 0,maxLength:o?11:120},messages:{required:r("form.required"),minLength:r("form.min_length"),maxLength:r("form.max_length")},tooltip:r("form.personal_code_tooltip")}]}),[n,o,r]),size:"small",variant:"outlined"}}(),t=function(){var e=Object(j.a)().t,t=Object(x.a)().municipality,r=Object(v.a)().code,n=Object(L.a)().isLV,o=Object(g.useMemo)((function(){var e;return null!==(e=null===t||void 0===t?void 0:t.map((function(e){var t;return{type:b.MpControlType.text,key:null===(t=e.id)||void 0===t?void 0:t.toString(),label:e.name}})))&&void 0!==e?e:[]}),[t]);return{controls:Object(g.useMemo)((function(){return[{type:"dropdown",key:"regionId",placeholder:e("form.region"),label:e("form.region"),required:!0,children:o,messages:{required:e("form.required")}},{type:b.MpControlType.text,key:"city",placeholder:e("form.city"),label:e("form.city"),required:!0,validations:{maxLength:32},messages:{required:e("form.required"),maxLength:e("form.max_length")}},{type:b.MpControlType.text,key:"address",placeholder:e("form.address_placeholder"),label:e("form.address"),required:!0,validations:{maxLength:255},messages:{required:e("form.required"),maxLength:e("form.max_length")}},{type:b.MpControlType.text,key:"postalCode",placeholder:e("form.postalCode_placeholder"),label:e("form.postalCode"),required:!0,validations:{minLength:n?4:5,maxLength:n?4:5,pattern:y.a},messages:{required:e("form.required"),minLength:e("form.min_length"),maxLength:e("form.max_length"),pattern:e("form.pattern")},startAdornment:"".concat(r)},{type:b.MpControlType.multiline,key:"note",placeholder:e("form.comment_placeholder"),label:e("form.note")}]}),[e,n,o,r]),size:"small",variant:"outlined"}}(),r=Object(_.a)(),i=r.mappedOrder,N=r.completeOrder,P=r.completeOrderLoader,B=r.loadingOrder,z=Object(p.useForm)(),F=z.reset,R=z.handleSubmit,V=z.setError,W=Object(f.a)().overridables,A=Object(j.a)().t,J=Object(l.a)(),H=Object(M.h)(),K=Object(T.a)(),$=Object(s.a)(J.breakpoints.down("md")),G=Object(g.useState)(!1),Q=Object(a.a)(G,2),U=Q[0],X=Q[1],Y=Object(I.a)().code,Z=Object(g.useCallback)((function(){var e;F(null!==(e=null===i||void 0===i?void 0:i.userDetails)&&void 0!==e?e:{}),H.push(K.cart)}),[F,null===i||void 0===i?void 0:i.userDetails,H,K.cart]),ee=Object(g.useCallback)((function(){H.push({pathname:K.home})}),[H,K.home]),te=Object(g.useCallback)(function(){var e=Object(o.a)(c.a.mark((function e(t){var r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,N(Object(n.a)(Object(n.a)({},t),{},{phone:Y+t.phone}));case 2:if(null!==(r=e.sent)&&void 0!==r&&r.success){e.next=7;break}
1return(null===r||void 0===r?void 0:r.errors).forEach((function(e){var t=e.field,r=e.message;V(t,{type:"apiError-".concat(t),message:r})})),e.abrupt("return");case 7:null!==r&&void 0!==r&&r.success&&(X(!0),F(t));case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[Y,N,F,V]);return Object(g.useEffect)((function(){i&&null!==i&&void 0!==i&&i.userDetails&&F(null===i||void 0===i?void 0:i.userDetails)}),[i,F]),B?Object(D.jsx)(S.a,{height:"60vh"}):i?Object(D.jsxs)(u.a,{display:"flex",flexDirection:$?"column":"row",justifyContent:"flex-end",children:[Object(D.jsx)("form",{onSubmit:R(te),noValidate:!0,children:Object(D.jsxs)(u.a,{pt:$?"55px":"79px",pb:"120px",maxWidth:540,m:"0 auto",children:[Object(D.jsx)(d.a,{variant:$?"h2":"h1",color:"primary",children:A("common.checkout")}),$&&Object(D.jsx)(u.a,{mb:1}),Object(D.jsx)(d.a,{variant:"subtitle2",children:A("form.all_fields_are_required")}),Object(D.jsx)(h.a,{title:A("form.contact_info"),pt:$?"34px":"47px",pb:$?"26px":"30px",noBubble:!0}),Object(D.jsx)(u.a,{pb:$?"34px":"62px",children:Object(D.jsx)(b.MpForm,Object(n.a)({overridables:W,useFormMethods:z},e))}),Object(D.jsx)(h.a,{title:A("form.delivery_info"),pb:$?"27px":"30px",noBubble:!0}),Object(D.jsx)(u.a,{pb:$?"55px":"56px",children:Object(D.jsx)(b.MpForm,Object(n.a)({overridables:W,useFormMethods:z},t))}),Object(D.jsx)(O.a,{submitLabel:A("buttons.complete_order"),onCancel:Z,loading:P})]})}),Object(D.jsx)(m.a,{mdDown:!0,children:Object(D.jsx)(u.a,{ml:$?0:"149px",mt:"80px",children:Object(D.jsx)(u.a,{width:$?1:375,children:Object(D.jsx)(u.a,{boxShadow:E.b.ordersList,children:Object(D.jsx)(k.a,{translationKey:"order"})})})})}),Object(D.jsx)(w.a,{open:U,onSubmit:ee,title:A("success.order_success"),buttonText:A("buttons.go_to_homepage"),onClose:ee})]}):Object(D.jsxs)(u.a,{pb:12,pt:4,children:[Object(D.jsx)(q.a,{icon:Object(D.jsx)(C.a,{}),info:A("cart.empty_bag"),link:A("cart.add_items"),path:K.prizes.replace("/:category?","")}),Object(D.jsx)(w.a,{open:U,onSubmit:ee,title:A("success.order_success"),buttonText:A("buttons.go_to_homepage"),onClose:ee})]})}}}]);
2//# sourceMappingURL=25.b6d8e7f6.chunk.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.