webflow-contact-form
Advanced tools
Comparing version 1.0.6 to 1.0.7
/*! For license information please see main.bundle.js.LICENSE.txt */ | ||
(()=>{"use strict";var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};function e(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}function n(t){return"function"==typeof t}var r=!1,o={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack;r=t},get useDeprecatedSynchronousErrorHandling(){return r}};function i(t){setTimeout((function(){throw t}),0)}var u={closed:!0,next:function(t){},error:function(t){if(o.useDeprecatedSynchronousErrorHandling)throw t;i(t)},complete:function(){}},c=function(){return Array.isArray||function(t){return t&&"number"==typeof t.length}}();function s(t){return null!==t&&"object"==typeof t}var a=function(){function t(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t}(),l=function(){function t(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}return t.prototype.unsubscribe=function(){var e;if(!this.closed){var r=this,o=r._parentOrParents,i=r._ctorUnsubscribe,u=r._unsubscribe,l=r._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,o instanceof t)o.remove(this);else if(null!==o)for(var p=0;p<o.length;++p){o[p].remove(this)}if(n(u)){i&&(this._unsubscribe=void 0);try{u.call(this)}catch(t){e=t instanceof a?f(t.errors):[t]}}if(c(l)){p=-1;for(var h=l.length;++p<h;){var d=l[p];if(s(d))try{d.unsubscribe()}catch(t){e=e||[],t instanceof a?e=e.concat(f(t.errors)):e.push(t)}}}if(e)throw new a(e)}},t.prototype.add=function(e){var n=e;if(!e)return t.EMPTY;switch(typeof e){case"function":n=new t(e);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof t)){var r=n;(n=new t)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var o=n._parentOrParents;if(null===o)n._parentOrParents=this;else if(o instanceof t){if(o===this)return n;n._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return n;o.push(this)}var i=this._subscriptions;return null===i?this._subscriptions=[n]:i.push(n),n},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}},t.EMPTY=function(t){return t.closed=!0,t}(new t),t}();function f(t){return t.reduce((function(t,e){return t.concat(e instanceof a?e.errors:e)}),[])}var p=function(){return"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}(),h=function(t){function n(e,r,o){var i=t.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=u;break;case 1:if(!e){i.destination=u;break}if("object"==typeof e){e instanceof n?(i.syncErrorThrowable=e.syncErrorThrowable,i.destination=e,e.add(i)):(i.syncErrorThrowable=!0,i.destination=new d(i,e));break}default:i.syncErrorThrowable=!0,i.destination=new d(i,e,r,o)}return i}return e(n,t),n.prototype[p]=function(){return this},n.create=function(t,e,r){var o=new n(t,e,r);return o.syncErrorThrowable=!1,o},n.prototype.next=function(t){this.isStopped||this._next(t)},n.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},n.prototype._next=function(t){this.destination.next(t)},n.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},n.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},n.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},n}(l),d=function(t){function r(e,r,o,i){var c,s=t.call(this)||this;s._parentSubscriber=e;var a=s;return n(r)?c=r:r&&(c=r.next,o=r.error,i=r.complete,r!==u&&(n((a=Object.create(r)).unsubscribe)&&s.add(a.unsubscribe.bind(a)),a.unsubscribe=s.unsubscribe.bind(s))),s._context=a,s._next=c,s._error=o,s._complete=i,s}return e(r,t),r.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;o.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},r.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=o.useDeprecatedSynchronousErrorHandling;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):i(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;i(t)}}},r.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};o.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},r.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),o.useDeprecatedSynchronousErrorHandling)throw t;i(t)}},r.prototype.__tryOrSetError=function(t,e,n){if(!o.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return o.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):(i(e),!0)}return!1},r.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},r}(h);function b(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new y(t,e))}}var y=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new v(t,this.project,this.thisArg))},t}(),v=function(t){function n(e,n,r){var o=t.call(this,e)||this;return o.project=n,o.count=0,o.thisArg=r||o,o}return e(n,t),n.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},n}(h),m=function(t){function n(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return e(n,t),n.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},n.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),setInterval(t.flush.bind(t,this),n)},n.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)},n.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},n.prototype._execute=function(t,e){var n=!1,r=void 0;try{this.work(t)}catch(t){n=!0,r=!!t&&t||new Error(t)}if(n)return this.unsubscribe(),r},n.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,n=e.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},n}(function(t){function n(e,n){return t.call(this)||this}return e(n,t),n.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},n}(l)),_=function(){function t(e,n){void 0===n&&(n=t.now),this.SchedulerAction=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(n,e)},t.now=function(){return Date.now()},t}(),w=new(function(t){function n(e,r){void 0===r&&(r=_.now);var o=t.call(this,e,(function(){return n.delegate&&n.delegate!==o?n.delegate.now():r()}))||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return e(n,t),n.prototype.schedule=function(e,r,o){return void 0===r&&(r=0),n.delegate&&n.delegate!==this?n.delegate.schedule(e,r,o):t.prototype.schedule.call(this,e,r,o)},n.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},n}(_))(m);var E=function(){function t(t,e){this.dueTime=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new S(t,this.dueTime,this.scheduler))},t}(),S=function(t){function n(e,n,r){var o=t.call(this,e)||this;return o.dueTime=n,o.scheduler=r,o.debouncedSubscription=null,o.lastValue=null,o.hasValue=!1,o}return e(n,t),n.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(g,this.dueTime,this))},n.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},n.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var t=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}},n.prototype.clearDebounce=function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)},n}(h);function g(t){t.debouncedNext()}function A(){}function P(t,e,n){return function(r){return r.lift(new T(t,e,n))}}var T=function(){function t(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}return t.prototype.call=function(t,e){return e.subscribe(new O(t,this.nextOrObserver,this.error,this.complete))},t}(),O=function(t){function r(e,r,o,i){var u=t.call(this,e)||this;return u._tapNext=A,u._tapError=A,u._tapComplete=A,u._tapError=o||A,u._tapComplete=i||A,n(r)?(u._context=u,u._tapNext=r):r&&(u._context=r,u._tapNext=r.next||A,u._tapError=r.error||A,u._tapComplete=r.complete||A),u}return e(r,t),r.prototype._next=function(t){try{this._tapNext.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.next(t)},r.prototype._error=function(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)},r.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()},r}(h);const x="1.0.6";var I=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function k(t){return t}function j(t){return 0===t.length?k:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var C=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r=this.operator,i=function(t,e,n){if(t){if(t instanceof h)return t;if(t[p])return t[p]()}return t||e||n?new h(t,e,n):new h(u)}(t,e,n);if(r?i.add(r.call(i,this.source)):i.add(this.source||o.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),o.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){o.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),!function(t){for(;t;){var e=t,n=e.closed,r=e.destination,o=e.isStopped;if(n||o)return!1;t=r&&r instanceof h?r:null}return!0}(t)?console.warn(e):t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=N(e))((function(e,r){var o;o=n.subscribe((function(e){try{t(e)}catch(t){r(t),o&&o.unsubscribe()}}),r,e)}))},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[I]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:j(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=N(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}();function N(t){if(t||(t=o.Promise||Promise),!t)throw new Error("no Promise impl found");return t}function R(t){return t&&"function"==typeof t.schedule}var D=function(t){return function(e){for(var n=0,r=t.length;n<r&&!e.closed;n++)e.next(t[n]);e.complete()}};function L(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}var Y=L(),W=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t};function q(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}var z=function(t){if(t&&"function"==typeof t[I])return r=t,function(t){var e=r[I]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if(W(t))return D(t);if(q(t))return n=t,function(t){return n.then((function(e){t.closed||(t.next(e),t.complete())}),(function(e){return t.error(e)})).then(null,i),t};if(t&&"function"==typeof t[Y])return e=t,function(t){for(var n=e[Y]();;){var r=void 0;try{r=n.next()}catch(e){return t.error(e),t}if(r.done){t.complete();break}if(t.next(r.value),t.closed)break}return"function"==typeof n.return&&t.add((function(){n.return&&n.return()})),t};var e,n,r,o=s(t)?"an invalid object":"'"+t+"'";throw new TypeError("You provided "+o+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")};function F(t,e){return new C((function(n){var r=new l,o=0;return r.add(e.schedule((function(){o!==t.length?(n.next(t[o++]),n.closed||r.add(this.schedule())):n.complete()}))),r}))}function M(t,e){if(null!=t){if(function(t){return t&&"function"==typeof t[I]}(t))return function(t,e){return new C((function(n){var r=new l;return r.add(e.schedule((function(){var o=t[I]();r.add(o.subscribe({next:function(t){r.add(e.schedule((function(){return n.next(t)})))},error:function(t){r.add(e.schedule((function(){return n.error(t)})))},complete:function(){r.add(e.schedule((function(){return n.complete()})))}}))}))),r}))}(t,e);if(q(t))return function(t,e){return new C((function(n){var r=new l;return r.add(e.schedule((function(){return t.then((function(t){r.add(e.schedule((function(){n.next(t),r.add(e.schedule((function(){return n.complete()})))})))}),(function(t){r.add(e.schedule((function(){return n.error(t)})))}))}))),r}))}(t,e);if(W(t))return F(t,e);if(function(t){return t&&"function"==typeof t[Y]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new C((function(n){var r,o=new l;return o.add((function(){r&&"function"==typeof r.return&&r.return()})),o.add(e.schedule((function(){r=t[Y](),o.add(e.schedule((function(){if(!n.closed){var t,e;try{var o=r.next();t=o.value,e=o.done}catch(t){return void n.error(t)}e?n.complete():(n.next(t),this.schedule())}})))}))),o}))}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}function V(t,e){return e?M(t,e):t instanceof C?t:new C(z(t))}var U=function(t){function n(e){var n=t.call(this)||this;return n.parent=e,n}return e(n,t),n.prototype._next=function(t){this.parent.notifyNext(t)},n.prototype._error=function(t){this.parent.notifyError(t),this.unsubscribe()},n.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},n}(h),Z=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.notifyNext=function(t){this.destination.next(t)},n.prototype.notifyError=function(t){this.destination.error(t)},n.prototype.notifyComplete=function(){this.destination.complete()},n}(h);function $(t,e){if(!e.closed){if(t instanceof C)return t.subscribe(e);var n;try{n=z(t)(e)}catch(t){e.error(t)}return n}}function H(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?function(r){return r.pipe(H((function(n,r){return V(t(n,r)).pipe(b((function(t,o){return e(n,t,r,o)})))}),n))}:("number"==typeof e&&(n=e),function(e){return e.lift(new Q(t,n))})}var Q=function(){function t(t,e){void 0===e&&(e=Number.POSITIVE_INFINITY),this.project=t,this.concurrent=e}return t.prototype.call=function(t,e){return e.subscribe(new B(t,this.project,this.concurrent))},t}(),B=function(t){function n(e,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY);var o=t.call(this,e)||this;return o.project=n,o.concurrent=r,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return e(n,t),n.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)},n.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this.active++,this._innerSub(e)},n.prototype._innerSub=function(t){var e=new U(this),n=this.destination;n.add(e);var r=$(t,e);r!==e&&n.add(r)},n.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},n.prototype.notifyNext=function(t){this.destination.next(t)},n.prototype.notifyComplete=function(){var t=this.buffer;this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},n}(Z);function K(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),H(k,t)}function G(t,e){return e?F(t,e):new C(D(t))}function J(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Number.POSITIVE_INFINITY,r=null,o=t[t.length-1];return R(o)?(r=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof o&&(n=t.pop()),null===r&&1===t.length&&t[0]instanceof C?t[0]:K(n)(G(t,r))}function X(t,e,r,o){return n(r)&&(o=r,r=void 0),o?X(t,e,r).pipe(b((function(t){return c(t)?o.apply(void 0,t):o(t)}))):new C((function(n){tt(t,e,(function(t){arguments.length>1?n.next(Array.prototype.slice.call(arguments)):n.next(t)}),n,r)}))}function tt(t,e,n,r,o){var i;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){var u=t;t.addEventListener(e,n,o),i=function(){return u.removeEventListener(e,n,o)}}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){var c=t;t.on(e,n),i=function(){return c.off(e,n)}}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){var s=t;t.addListener(e,n),i=function(){return s.removeListener(e,n)}}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(var a=0,l=t.length;a<l;a++)tt(t[a],e,n,r,o)}r.add(i)}function et(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return R(n)?(t.pop(),F(t,n)):G(t)}function nt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return K(1)(et.apply(void 0,t))}function rt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return R(n)?(t.pop(),function(e){return nt(t,e,n)}):function(e){return nt(t,e)}}function ot(t,e){if(null==t)throw new Error(e||"Expected variable to be defined, but received ".concat(t))}function it(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ut(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ct(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}var st=function(){function t(e,n){var r,o,i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),ut(this,"name",void 0),ut(this,"selector",void 0),ut(this,"element",void 0),ut(this,"type",void 0),ut(this,"value$",void 0),this.name=e,this.selector=n,this.element=document.querySelector(this.selector),this.type=null!==(o=null===(r=this.element)||void 0===r?void 0:r.getAttribute("type"))&&void 0!==o?o:null,this.value$=(at(this.element)?"number"===this.type?function(t){var e=document.querySelector(t);return ot(e,'Expected "'.concat(t,'" to be defined')),X(e,"input").pipe(rt(0),b((function(){return e.valueAsNumber})))}(this.selector):function(t){var e=document.querySelector(t);return ot(e,'Expected "'.concat(t,'" to be defined')),X(e,"input").pipe(rt(0),b((function(){return e.value})))}(this.selector):function(t){var e=document.querySelector(t);return ot(e,'Expected "'.concat(t,'" to be defined')),X(e,"change").pipe(rt(0),b((function(){return e.selectedIndex})))}(this.selector)).pipe(b((function(t){return t})),P((function(t){return console.debug('[FormControl."'.concat(i.name,'"]: value'),t)}))),console.debug("[FormControl.ctor]: ",e,n)}var e,n,r;return e=t,(n=[{key:"getValue",value:function(){var t=this.element;if(at(t))return"number"===this.type?t.valueAsNumber:t.value;if(lt(t))return t.selectedIndex;throw new Error('Expected "'.concat(this.name," (").concat(this.selector,')" to be a valid form control'))}},{key:"setValue",value:function(t){console.debug("[FormControl.".concat(this.name,"]: setValue(").concat(t,")"));var e=this.element;if(at(e)){if("string"==typeof t)return void(e.value=t);if("number"==typeof t)return void(e.valueAsNumber=t)}else if(lt(e)&&"number"==typeof t)return void(e.selectedIndex=t);throw new Error('Could not set value "'.concat(t,'" on element "').concat(this.name," (").concat(this.selector,')"'))}}])&&it(e.prototype,n),r&&it(e,r),t}();function at(t){return ct(t,HTMLInputElement)}function lt(t){return ct(t,HTMLSelectElement)}function ft(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function pt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ht(t){return function(t){if(Array.isArray(t))return ft(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return ft(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ft(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var dt="".concat("#wf-form-Wycena-Przesy-ki"," #FS2 + div"),bt=function(){function t(){var e,n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n="controls",r=[new st("fromAddress","".concat(dt,' input[name="Adres-za-adunku"]')),new st("fromCity","".concat(dt,' input[name="Miejscowo-za-adunku"]')),new st("fromPostcode","".concat(dt,' input[name="Kod-pocztowy-za-adunku"]')),new st("toAddress","".concat(dt,' input[name="Adres-roz-adunku"]')),new st("toCity","".concat(dt,' input[name="Miejscowo-roz-adunku"]')),new st("toPostcode","".concat(dt,' input[name="Kod-pocztowy-roz-adunku"]'))],n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r}var e,n,r;return e=t,(n=[{key:"initialize",value:function(){this.controls.forEach((function(t){var e=localStorage.getItem("goasap-Address-".concat(t.name));e&&t.setValue(e)})),J.apply(void 0,ht(this.controls.map((function(t){return t.value$.pipe(b((function(e){return{value:e,name:t.name}})))})))).pipe(b((function(t){return localStorage.setItem("goasap-Address-".concat(t.name),t.value)}))).subscribe()}}])&&pt(e.prototype,n),r&&pt(e,r),t}();function yt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function vt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,c=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(c)throw o}}return i}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return yt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yt(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function _t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function wt(t){return function(t){if(Array.isArray(t))return mt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return mt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mt(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Et="".concat("#wf-form-Wycena-Przesy-ki"," #FS3 + div"),St=function(){function t(){var e,n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n="controls",r=[new st("fromCompanyName","".concat(Et,' input[name="Nazwa-firmy-za-adunek"]')),new st("fromFirstName","".concat(Et,' input[name="Imi-nadawcy"]')),new st("fromSurname","".concat(Et,' input[name="Nazwisko-nadawcy"]')),new st("fromPhone","".concat(Et,' input[name="Telefon-nadawcy"]'))],n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r}var e,n,r;return e=t,(n=[{key:"initialize",value:function(){this.controls.forEach((function(t){var e=localStorage.getItem("goasap-Address-".concat(t.name));e&&t.setValue(e)})),J.apply(void 0,wt(this.controls.map((function(t){return t.value$.pipe(b((function(e){return{value:e,name:t.name}})))})))).pipe(b((function(t){return localStorage.setItem("goasap-Address-".concat(t.name),t.value)}))).subscribe()}}])&&_t(e.prototype,n),r&&_t(e,r),t}();function gt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function At(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Pt(t){return function(t){if(Array.isArray(t))return gt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return gt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gt(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Tt="".concat("#wf-form-Wycena-Przesy-ki"," #FS4 + div"),Ot=function(){function t(){var e,n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n="controls",r=[new st("nip","".concat(Tt,' input[name="NIP-P-atnika"]')),new st("name","".concat(Tt,' input[name="Imi-p-atnika"]')),new st("surname","".concat(Tt,' input[name="Nazwisko-p-atnika"]')),new st("email","".concat(Tt,' input[name="Telefon-nadawcy-2"]'))],n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r}var e,n,r;return e=t,(n=[{key:"initialize",value:function(){this.controls.forEach((function(t){var e=localStorage.getItem("goasap-Address-".concat(t.name));e&&t.setValue(e)})),J.apply(void 0,Pt(this.controls.map((function(t){return t.value$.pipe(b((function(e){return{value:e,name:t.name}})))})))).pipe(b((function(t){return localStorage.setItem("goasap-Address-".concat(t.name),t.value)}))).subscribe()}}])&&At(e.prototype,n),r&&At(e,r),t}(),xt=function(){function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t}(),It=function(t){function n(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r}return e(n,t),n.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},n}(l),kt=function(t){function n(e){var n=t.call(this,e)||this;return n.destination=e,n}return e(n,t),n}(h),jt=function(t){function n(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return e(n,t),n.prototype[p]=function(){return new kt(this)},n.prototype.lift=function(t){var e=new Ct(this,this);return e.operator=t,e},n.prototype.next=function(t){if(this.closed)throw new xt;if(!this.isStopped)for(var e=this.observers,n=e.length,r=e.slice(),o=0;o<n;o++)r[o].next(t)},n.prototype.error=function(t){if(this.closed)throw new xt;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,n=e.length,r=e.slice(),o=0;o<n;o++)r[o].error(t);this.observers.length=0},n.prototype.complete=function(){if(this.closed)throw new xt;this.isStopped=!0;for(var t=this.observers,e=t.length,n=t.slice(),r=0;r<e;r++)n[r].complete();this.observers.length=0},n.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},n.prototype._trySubscribe=function(e){if(this.closed)throw new xt;return t.prototype._trySubscribe.call(this,e)},n.prototype._subscribe=function(t){if(this.closed)throw new xt;return this.hasError?(t.error(this.thrownError),l.EMPTY):this.isStopped?(t.complete(),l.EMPTY):(this.observers.push(t),new It(this,t))},n.prototype.asObservable=function(){var t=new C;return t.source=this,t},n.create=function(t,e){return new Ct(t,e)},n}(C),Ct=function(t){function n(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return e(n,t),n.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},n.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},n.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},n.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):l.EMPTY},n}(jt),Nt=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.notifyNext=function(t,e,n,r,o){this.destination.next(e)},n.prototype.notifyError=function(t,e){this.destination.error(t)},n.prototype.notifyComplete=function(t){this.destination.complete()},n}(h),Rt=function(t){function n(e,n,r){var o=t.call(this)||this;return o.parent=e,o.outerValue=n,o.outerIndex=r,o.index=0,o}return e(n,t),n.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},n.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},n.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},n}(h);function Dt(t,e,n,r,o){if(void 0===o&&(o=new Rt(t,n,r)),!o.closed)return e instanceof C?e.subscribe(o):z(e)(o)}var Lt={};var Yt=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new Wt(t,this.resultSelector))},t}(),Wt=function(t){function n(e,n){var r=t.call(this,e)||this;return r.resultSelector=n,r.active=0,r.values=[],r.observables=[],r}return e(n,t),n.prototype._next=function(t){this.values.push(Lt),this.observables.push(t)},n.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(var n=0;n<e;n++){var r=t[n];this.add(Dt(this,r,void 0,n))}}},n.prototype.notifyComplete=function(t){0==(this.active-=1)&&this.destination.complete()},n.prototype.notifyNext=function(t,e,n){var r=this.values,o=r[n],i=this.toRespond?o===Lt?--this.toRespond:this.toRespond:0;r[n]=e,0===i&&(this.resultSelector?this._tryResultSelector(r):this.destination.next(r.slice()))},n.prototype._tryResultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},n}(Nt);function qt(t,e){return"function"==typeof e?function(n){return n.pipe(qt((function(n,r){return V(t(n,r)).pipe(b((function(t,o){return e(n,t,r,o)})))})))}:function(e){return e.lift(new zt(t))}}var zt=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new Ft(t,this.project))},t}(),Ft=function(t){function n(e,n){var r=t.call(this,e)||this;return r.project=n,r.index=0,r}return e(n,t),n.prototype._next=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this._innerSub(e)},n.prototype._innerSub=function(t){var e=this.innerSubscription;e&&e.unsubscribe();var n=new U(this),r=this.destination;r.add(n),this.innerSubscription=$(t,n),this.innerSubscription!==n&&r.add(this.innerSubscription)},n.prototype._complete=function(){var e=this.innerSubscription;e&&!e.closed||t.prototype._complete.call(this),this.unsubscribe()},n.prototype._unsubscribe=function(){this.innerSubscription=void 0},n.prototype.notifyComplete=function(){this.innerSubscription=void 0,this.isStopped&&t.prototype._complete.call(this)},n.prototype.notifyNext=function(t){this.destination.next(t)},n}(Z);function Mt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Vt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ut(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Zt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,c=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(c)throw o}}return i}}(t,e)||Ht(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $t(t){return function(t){if(Array.isArray(t))return Mt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Ht(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ht(t,e){if(t){if("string"==typeof t)return Mt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mt(t,e):void 0}}var Qt,Bt,Kt,Gt,Jt,Xt,te,ee,ne,re,oe,ie,ue,ce,se,ae,le,fe,pe,he,de,be,ye,ve,me,_e,we,Ee,Se,ge,Ae,Pe,Te,Oe,xe,Ie,ke,je,Ce,Ne,Re,De,Le,Ye,We,qe,ze,Fe,Me,Ve,Ue,Ze,$e,He,Qe,Be,Ke,Ge,Je,Xe,tn,en,nn="".concat("#wf-form-Wycena-Przesy-ki"," #Step1 + div"),rn=1,on=function(){function t(){var e=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Ut(this,"initializeForm$$",new jt),Ut(this,"rows",[this.getFormRow(0)]),Ut(this,"insuranceInput",new st("insurance","".concat(nn," .data-input.insurance"))),Ut(this,"value$",function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=void 0,r=void 0;return R(t[t.length-1])&&(r=t.pop()),"function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&c(t[0])&&(t=t[0]),G(t,r).lift(new Yt(n))}([this.initializeForm$$.pipe(b((function(){return e.rows})),b((function(t){return t.map((function(t){return t.map((function(t){return t.value$}))})).flat(2)})),qt((function(t){return J.apply(void 0,$t(t))})),b((function(t){return e.rows}))),this.insuranceInput.value$]).pipe(b((function(t){var e=Zt(t,2),n=e[0];return{insurance:e[1],rows:n.map((function(t){return t.reduce((function(t,e){return t[e.name]=e.getValue(),t}),{})}))}})),P((function(t){return console.debug("[QuoteForm]: value",t)})))),setTimeout((function(){return e.initialize()}),5)}var e,n,r;return e=t,(n=[{key:"initialize",value:function(){var t=this;console.debug("[QuoteForm]. initialize()"),document.querySelector("".concat(nn," #btn-duplicate")).addEventListener("click",(function(){t.addRow(),setTimeout((function(){return t.initializeForm()}),1)})),this.initializeForm()}},{key:"initializeForm",value:function(){console.debug("[QuoteForm]: initializeForm()"),this.initializeForm$$.next()}},{key:"addRow",value:function(){var t=this;console.debug("[QuoteForm]: addRow()");var e,n,r=document.querySelector('[initial-row="0"]').cloneNode(!0);r.setAttribute("initial-row","".concat(rn)),e=r,(n=document.querySelector('[initial-row="'.concat(rn-1,'"]'))).parentNode.insertBefore(e,n.nextSibling),this.rows.push(this.getFormRow(rn));var o=++rn;r.querySelectorAll("input").forEach((function(t){t.setAttribute("data-name","".concat(t.getAttribute("data-name")," ").concat(o)),t.setAttribute("name","".concat(t.getAttribute("name")," ").concat(o)),t.setAttribute("id","".concat(t.getAttribute("id")," ").concat(o)),t.value=""})),r.querySelectorAll("select").forEach((function(t){t.setAttribute("data-name","".concat(t.getAttribute("data-name")," ").concat(o)),t.setAttribute("name","".concat(t.getAttribute("name")," ").concat(o)),t.setAttribute("id","".concat(t.getAttribute("id")," ").concat(o))}));var i=r.querySelector("#btn-delete");i.style.opacity="1",i.addEventListener("click",(function(){return t.deleteRow(r)}))}},{key:"deleteRow",value:function(t){rn--,t.remove(),this.rows.splice(rn,1),this.initializeForm(),console.debug("[QuoteForm]: deleteRow(".concat(rn,")"),this.rows)}},{key:"getFormRow",value:function(t){console.debug("[QuoteForm]: getFormRow(".concat(t,")"));var e="".concat(nn,' [initial-row="').concat(t,'"]');return[new st("type","".concat(e," select")),new st("height","".concat(e," input#Wysoko")),new st("weight","".concat(e," input#Waga")),new st("qty","".concat(e," input#Ilo"))]}}])&&Vt(e.prototype,n),r&&Vt(e,r),t}();function un(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function cn(t,e){return e=null!=e?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):function(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})),t}var sn={ZMIENNA_WARTOSC_PROCENT:null!==(ze=null===(Qt=window.quote)||void 0===Qt||null===(Bt=Qt.WARTOSCI)||void 0===Bt?void 0:Bt.ZMIENNA_WARTOSC_PROCENT)&&void 0!==ze?ze:0,UBEZPIECZENIE_PROCENT:null!==(Fe=null===(Kt=window.quote)||void 0===Kt||null===(Gt=Kt.WARTOSCI)||void 0===Gt?void 0:Gt.UBEZPIECZENIE_PROCENT)&&void 0!==Fe?Fe:0,VAT_PROCENT:null!==(Me=null===(Jt=window.quote)||void 0===Jt||null===(Xt=Jt.WARTOSCI)||void 0===Xt?void 0:Xt.VAT_PROCENT)&&void 0!==Me?Me:0,PALETA_TYPE_EURO:{Do_400_kilo:null!==(Ve=null===(te=window.quote)||void 0===te||null===(ee=te.WARTOSCI)||void 0===ee||null===(ne=ee.PALETA_TYPE_EURO)||void 0===ne?void 0:ne.Do_400_kilo)&&void 0!==Ve?Ve:0,Do_800_kilo:null!==(Ue=null===(re=window.quote)||void 0===re||null===(oe=re.WARTOSCI)||void 0===oe||null===(ie=oe.PALETA_TYPE_EURO)||void 0===ie?void 0:ie.Do_800_kilo)&&void 0!==Ue?Ue:0,Do_1000_kilo:null!==(Ze=null===(ue=window.quote)||void 0===ue||null===(ce=ue.WARTOSCI)||void 0===ce||null===(se=ce.PALETA_TYPE_EURO)||void 0===se?void 0:se.Do_1000_kilo)&&void 0!==Ze?Ze:0,Do_1200_kilo:null!==($e=null===(ae=window.quote)||void 0===ae||null===(le=ae.WARTOSCI)||void 0===le||null===(fe=le.PALETA_TYPE_EURO)||void 0===fe?void 0:fe.Do_1200_kilo)&&void 0!==$e?$e:0},PALETA_TYPE_PRZEMYSLOWA:{Do_400_kilo:null!==(He=null===(pe=window.quote)||void 0===pe||null===(he=pe.WARTOSCI)||void 0===he||null===(de=he.PALETA_TYPE_PRZEMYSLOWA)||void 0===de?void 0:de.Do_400_kilo)&&void 0!==He?He:0,Do_800_kilo:null!==(Qe=null===(be=window.quote)||void 0===be||null===(ye=be.WARTOSCI)||void 0===ye||null===(ve=ye.PALETA_TYPE_PRZEMYSLOWA)||void 0===ve?void 0:ve.Do_800_kilo)&&void 0!==Qe?Qe:0,Do_1000_kilo:null!==(Be=null===(me=window.quote)||void 0===me||null===(_e=me.WARTOSCI)||void 0===_e||null===(we=_e.PALETA_TYPE_PRZEMYSLOWA)||void 0===we?void 0:we.Do_1000_kilo)&&void 0!==Be?Be:0,Do_1200_kilo:null!==(Ke=null===(Ee=window.quote)||void 0===Ee||null===(Se=Ee.WARTOSCI)||void 0===Se||null===(ge=Se.PALETA_TYPE_PRZEMYSLOWA)||void 0===ge?void 0:ge.Do_1200_kilo)&&void 0!==Ke?Ke:0},PALETA_TYPE_PRZEMYSLOWA_PLUS:{Do_400_kilo:null!==(Ge=null===(Ae=window.quote)||void 0===Ae||null===(Pe=Ae.WARTOSCI)||void 0===Pe||null===(Te=Pe.PALETA_TYPE_PRZEMYSLOWA_PLUS)||void 0===Te?void 0:Te.Do_400_kilo)&&void 0!==Ge?Ge:0,Do_800_kilo:null!==(Je=null===(Oe=window.quote)||void 0===Oe||null===(xe=Oe.WARTOSCI)||void 0===xe||null===(Ie=xe.PALETA_TYPE_PRZEMYSLOWA_PLUS)||void 0===Ie?void 0:Ie.Do_800_kilo)&&void 0!==Je?Je:0,Do_1000_kilo:null!==(Xe=null===(ke=window.quote)||void 0===ke||null===(je=ke.WARTOSCI)||void 0===je||null===(Ce=je.PALETA_TYPE_PRZEMYSLOWA_PLUS)||void 0===Ce?void 0:Ce.Do_1000_kilo)&&void 0!==Xe?Xe:0,Do_1200_kilo:null!==(tn=null===(Ne=window.quote)||void 0===Ne||null===(Re=Ne.WARTOSCI)||void 0===Re||null===(De=Re.PALETA_TYPE_PRZEMYSLOWA_PLUS)||void 0===De?void 0:De.Do_1200_kilo)&&void 0!==tn?tn:0},PALETA_TYPE_POLPALETA:{Do_200_kilo:null!==(en=null===(Le=window.quote)||void 0===Le||null===(Ye=Le.WARTOSCI)||void 0===Ye||null===(We=Ye.PALETA_TYPE_POLPALETA)||void 0===We?void 0:We.Do_200_kilo)&&void 0!==en?en:0}};try{console.debug("[validatePalety]: version",x)}catch(t){console.error("could not print package.json version")}console.debug("[validatePalety]: quote config",window.quote);var an=function(t){var e=Object.entries(t).map((function(e){var n=vt(e,2),r=n[0],o=n[1];return null==o||0===o?r:"object"==typeof o?Object.entries(t||{}).map((function(t){var e=vt(t,2),n=e[0];if(void 0===e[1])return n})):void 0})).flat().filter(Boolean);return!e.length||(alert("Błąd w formularzu. Prosimy o kontakt.\n\nNie skonfigurowano wartości dla ".concat(e.join(", "))),!1)}(sn);if(console.debug("[validatePalety]: valid",an,sn),an&&!(null===(qe=window.quote)||void 0===qe?void 0:qe.DISABLED)){var ln,fn,pn,hn,dn=null!==(pn=null===(ln=window.quote)||void 0===ln?void 0:ln.ZA_WYSOKA_CENA)&&void 0!==pn?pn:2500,bn=null!==(hn=null===(fn=window.quote)||void 0===fn?void 0:fn.ZA_WYSOKA_CENA_MESSAGE)&&void 0!==hn?hn:"Prosimy o kontakt";setTimeout((function(){var t,e;(new on).value$.pipe(b((function(t){var e=t.rows,n=t.insurance;return e.map((function(t){return function(t,e){var n=t.PALETA_TYPE_EURO,r=t.PALETA_TYPE_POLPALETA,o=t.PALETA_TYPE_PRZEMYSLOWA,i=t.PALETA_TYPE_PRZEMYSLOWA_PLUS,u=t.UBEZPIECZENIE_PROCENT,c=t.VAT_PROCENT,s=t.ZMIENNA_WARTOSC_PROCENT,a=0,l=e.type,f=e.qty,p=e.weight,h=e.insurance,d=1===l?f:0,b=2===l?f:0,y=3===l?f:0,v=4===l?f:0,m=1===l?p:0,_=3===l?p:0,w=4===l?p:0,E=2===l?p:0;return l&&f&&p?(d>0&&(m<=400?a+=d*n.Do_400_kilo:m<=800?a+=d*n.Do_800_kilo:m<=1e3?a+=d*n.Do_1000_kilo:m<=1200&&(a+=d*n.Do_1200_kilo)),y>0&&(_<=400?a+=y*o.Do_400_kilo:_<=800?a+=y*o.Do_800_kilo:_<=1e3?a+=y*o.Do_1000_kilo:_<=1200&&(a+=y*o.Do_1200_kilo)),v>0&&(w<=400?a+=v*i.Do_400_kilo:w<=800?a+=v*i.Do_800_kilo:w<=1e3?a+=v*i.Do_1000_kilo:w<=1200&&(a+=v*i.Do_1200_kilo)),b>0&&E<=200&&(a+=b*r.Do_200_kilo),(a+(h=(h||0)<3e3?3e3:h)*(u/100))*((100+s)/100)*((100+c)/100)):0}(sn,cn(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){un(t,e,n[e])}))}return t}({},t),{insurance:n}))})).reduce((function(t,e){return t+e}),0)})),(t=250,void 0===e&&(e=w),function(n){return n.lift(new E(t,e))}),P((function(t){return console.debug("[QuoteForm]: price",t)})),b((function(t){return t>=dn?bn:"".concat(t.toFixed(2)," zł")})),P((function(t){return console.debug("[QuoteForm]: price label",t)})),P((function(t){return document.querySelector("#price").textContent=t}))).subscribe(),(new bt).initialize(),(new St).initialize(),(new Ot).initialize()}),1e3)}})(); | ||
(()=>{"use strict";var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};function e(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}function n(t){return"function"==typeof t}var r=!1,o={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack;r=t},get useDeprecatedSynchronousErrorHandling(){return r}};function i(t){setTimeout((function(){throw t}),0)}var u={closed:!0,next:function(t){},error:function(t){if(o.useDeprecatedSynchronousErrorHandling)throw t;i(t)},complete:function(){}},c=function(){return Array.isArray||function(t){return t&&"number"==typeof t.length}}();function s(t){return null!==t&&"object"==typeof t}var l=function(){function t(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t}(),a=function(){function t(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}return t.prototype.unsubscribe=function(){var e;if(!this.closed){var r=this,o=r._parentOrParents,i=r._ctorUnsubscribe,u=r._unsubscribe,a=r._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,o instanceof t)o.remove(this);else if(null!==o)for(var h=0;h<o.length;++h){o[h].remove(this)}if(n(u)){i&&(this._unsubscribe=void 0);try{u.call(this)}catch(t){e=t instanceof l?f(t.errors):[t]}}if(c(a)){h=-1;for(var p=a.length;++h<p;){var d=a[h];if(s(d))try{d.unsubscribe()}catch(t){e=e||[],t instanceof l?e=e.concat(f(t.errors)):e.push(t)}}}if(e)throw new l(e)}},t.prototype.add=function(e){var n=e;if(!e)return t.EMPTY;switch(typeof e){case"function":n=new t(e);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof t)){var r=n;(n=new t)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var o=n._parentOrParents;if(null===o)n._parentOrParents=this;else if(o instanceof t){if(o===this)return n;n._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return n;o.push(this)}var i=this._subscriptions;return null===i?this._subscriptions=[n]:i.push(n),n},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}},t.EMPTY=function(t){return t.closed=!0,t}(new t),t}();function f(t){return t.reduce((function(t,e){return t.concat(e instanceof l?e.errors:e)}),[])}var h=function(){return"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}(),p=function(t){function n(e,r,o){var i=t.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=u;break;case 1:if(!e){i.destination=u;break}if("object"==typeof e){e instanceof n?(i.syncErrorThrowable=e.syncErrorThrowable,i.destination=e,e.add(i)):(i.syncErrorThrowable=!0,i.destination=new d(i,e));break}default:i.syncErrorThrowable=!0,i.destination=new d(i,e,r,o)}return i}return e(n,t),n.prototype[h]=function(){return this},n.create=function(t,e,r){var o=new n(t,e,r);return o.syncErrorThrowable=!1,o},n.prototype.next=function(t){this.isStopped||this._next(t)},n.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},n.prototype._next=function(t){this.destination.next(t)},n.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},n.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},n.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},n}(a),d=function(t){function r(e,r,o,i){var c,s=t.call(this)||this;s._parentSubscriber=e;var l=s;return n(r)?c=r:r&&(c=r.next,o=r.error,i=r.complete,r!==u&&(n((l=Object.create(r)).unsubscribe)&&s.add(l.unsubscribe.bind(l)),l.unsubscribe=s.unsubscribe.bind(s))),s._context=l,s._next=c,s._error=o,s._complete=i,s}return e(r,t),r.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;o.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},r.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=o.useDeprecatedSynchronousErrorHandling;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):i(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;i(t)}}},r.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};o.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},r.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),o.useDeprecatedSynchronousErrorHandling)throw t;i(t)}},r.prototype.__tryOrSetError=function(t,e,n){if(!o.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return o.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):(i(e),!0)}return!1},r.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},r}(p);function b(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new v(t,e))}}var v=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new y(t,this.project,this.thisArg))},t}(),y=function(t){function n(e,n,r){var o=t.call(this,e)||this;return o.project=n,o.count=0,o.thisArg=r||o,o}return e(n,t),n.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},n}(p),_=function(t){function n(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return e(n,t),n.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},n.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),setInterval(t.flush.bind(t,this),n)},n.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)},n.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},n.prototype._execute=function(t,e){var n=!1,r=void 0;try{this.work(t)}catch(t){n=!0,r=!!t&&t||new Error(t)}if(n)return this.unsubscribe(),r},n.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,n=e.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},n}(function(t){function n(e,n){return t.call(this)||this}return e(n,t),n.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},n}(a)),m=function(){function t(e,n){void 0===n&&(n=t.now),this.SchedulerAction=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(n,e)},t.now=function(){return Date.now()},t}(),w=new(function(t){function n(e,r){void 0===r&&(r=m.now);var o=t.call(this,e,(function(){return n.delegate&&n.delegate!==o?n.delegate.now():r()}))||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return e(n,t),n.prototype.schedule=function(e,r,o){return void 0===r&&(r=0),n.delegate&&n.delegate!==this?n.delegate.schedule(e,r,o):t.prototype.schedule.call(this,e,r,o)},n.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},n}(m))(_);var E=function(){function t(t,e){this.dueTime=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new S(t,this.dueTime,this.scheduler))},t}(),S=function(t){function n(e,n,r){var o=t.call(this,e)||this;return o.dueTime=n,o.scheduler=r,o.debouncedSubscription=null,o.lastValue=null,o.hasValue=!1,o}return e(n,t),n.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(g,this.dueTime,this))},n.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},n.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var t=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}},n.prototype.clearDebounce=function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)},n}(p);function g(t){t.debouncedNext()}function A(){}function P(t,e,n){return function(r){return r.lift(new T(t,e,n))}}var T=function(){function t(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}return t.prototype.call=function(t,e){return e.subscribe(new O(t,this.nextOrObserver,this.error,this.complete))},t}(),O=function(t){function r(e,r,o,i){var u=t.call(this,e)||this;return u._tapNext=A,u._tapError=A,u._tapComplete=A,u._tapError=o||A,u._tapComplete=i||A,n(r)?(u._context=u,u._tapNext=r):r&&(u._context=r,u._tapNext=r.next||A,u._tapError=r.error||A,u._tapComplete=r.complete||A),u}return e(r,t),r.prototype._next=function(t){try{this._tapNext.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.next(t)},r.prototype._error=function(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)},r.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()},r}(p);const x="1.0.7";function I(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function k(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,c=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(c)throw o}}return i}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return I(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return I(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var j=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function R(t){return t}function D(t){return 0===t.length?R:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var N=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r=this.operator,i=function(t,e,n){if(t){if(t instanceof p)return t;if(t[h])return t[h]()}return t||e||n?new p(t,e,n):new p(u)}(t,e,n);if(r?i.add(r.call(i,this.source)):i.add(this.source||o.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),o.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){o.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),!function(t){for(;t;){var e=t,n=e.closed,r=e.destination,o=e.isStopped;if(n||o)return!1;t=r&&r instanceof p?r:null}return!0}(t)?console.warn(e):t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=C(e))((function(e,r){var o;o=n.subscribe((function(e){try{t(e)}catch(t){r(t),o&&o.unsubscribe()}}),r,e)}))},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[j]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:D(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=C(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}();function C(t){if(t||(t=o.Promise||Promise),!t)throw new Error("no Promise impl found");return t}function L(t){return t&&"function"==typeof t.schedule}var Y=function(t){return function(e){for(var n=0,r=t.length;n<r&&!e.closed;n++)e.next(t[n]);e.complete()}};function W(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}var q=W(),F=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t};function V(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}var M=function(t){if(t&&"function"==typeof t[j])return r=t,function(t){var e=r[j]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if(F(t))return Y(t);if(V(t))return n=t,function(t){return n.then((function(e){t.closed||(t.next(e),t.complete())}),(function(e){return t.error(e)})).then(null,i),t};if(t&&"function"==typeof t[q])return e=t,function(t){for(var n=e[q]();;){var r=void 0;try{r=n.next()}catch(e){return t.error(e),t}if(r.done){t.complete();break}if(t.next(r.value),t.closed)break}return"function"==typeof n.return&&t.add((function(){n.return&&n.return()})),t};var e,n,r,o=s(t)?"an invalid object":"'"+t+"'";throw new TypeError("You provided "+o+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")};function U(t,e){return new N((function(n){var r=new a,o=0;return r.add(e.schedule((function(){o!==t.length?(n.next(t[o++]),n.closed||r.add(this.schedule())):n.complete()}))),r}))}function Z(t,e){if(null!=t){if(function(t){return t&&"function"==typeof t[j]}(t))return function(t,e){return new N((function(n){var r=new a;return r.add(e.schedule((function(){var o=t[j]();r.add(o.subscribe({next:function(t){r.add(e.schedule((function(){return n.next(t)})))},error:function(t){r.add(e.schedule((function(){return n.error(t)})))},complete:function(){r.add(e.schedule((function(){return n.complete()})))}}))}))),r}))}(t,e);if(V(t))return function(t,e){return new N((function(n){var r=new a;return r.add(e.schedule((function(){return t.then((function(t){r.add(e.schedule((function(){n.next(t),r.add(e.schedule((function(){return n.complete()})))})))}),(function(t){r.add(e.schedule((function(){return n.error(t)})))}))}))),r}))}(t,e);if(F(t))return U(t,e);if(function(t){return t&&"function"==typeof t[q]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new N((function(n){var r,o=new a;return o.add((function(){r&&"function"==typeof r.return&&r.return()})),o.add(e.schedule((function(){r=t[q](),o.add(e.schedule((function(){if(!n.closed){var t,e;try{var o=r.next();t=o.value,e=o.done}catch(t){return void n.error(t)}e?n.complete():(n.next(t),this.schedule())}})))}))),o}))}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}function z(t,e){return e?Z(t,e):t instanceof N?t:new N(M(t))}var $=function(t){function n(e){var n=t.call(this)||this;return n.parent=e,n}return e(n,t),n.prototype._next=function(t){this.parent.notifyNext(t)},n.prototype._error=function(t){this.parent.notifyError(t),this.unsubscribe()},n.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},n}(p),H=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.notifyNext=function(t){this.destination.next(t)},n.prototype.notifyError=function(t){this.destination.error(t)},n.prototype.notifyComplete=function(){this.destination.complete()},n}(p);function Q(t,e){if(!e.closed){if(t instanceof N)return t.subscribe(e);var n;try{n=M(t)(e)}catch(t){e.error(t)}return n}}function B(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?function(r){return r.pipe(B((function(n,r){return z(t(n,r)).pipe(b((function(t,o){return e(n,t,r,o)})))}),n))}:("number"==typeof e&&(n=e),function(e){return e.lift(new K(t,n))})}var K=function(){function t(t,e){void 0===e&&(e=Number.POSITIVE_INFINITY),this.project=t,this.concurrent=e}return t.prototype.call=function(t,e){return e.subscribe(new G(t,this.project,this.concurrent))},t}(),G=function(t){function n(e,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY);var o=t.call(this,e)||this;return o.project=n,o.concurrent=r,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return e(n,t),n.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)},n.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this.active++,this._innerSub(e)},n.prototype._innerSub=function(t){var e=new $(this),n=this.destination;n.add(e);var r=Q(t,e);r!==e&&n.add(r)},n.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},n.prototype.notifyNext=function(t){this.destination.next(t)},n.prototype.notifyComplete=function(){var t=this.buffer;this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},n}(H);function J(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),B(R,t)}function X(t,e){return e?U(t,e):new N(Y(t))}function tt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Number.POSITIVE_INFINITY,r=null,o=t[t.length-1];return L(o)?(r=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof o&&(n=t.pop()),null===r&&1===t.length&&t[0]instanceof N?t[0]:J(n)(X(t,r))}function et(t,e,r,o){return n(r)&&(o=r,r=void 0),o?et(t,e,r).pipe(b((function(t){return c(t)?o.apply(void 0,t):o(t)}))):new N((function(n){nt(t,e,(function(t){arguments.length>1?n.next(Array.prototype.slice.call(arguments)):n.next(t)}),n,r)}))}function nt(t,e,n,r,o){var i;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){var u=t;t.addEventListener(e,n,o),i=function(){return u.removeEventListener(e,n,o)}}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){var c=t;t.on(e,n),i=function(){return c.off(e,n)}}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){var s=t;t.addListener(e,n),i=function(){return s.removeListener(e,n)}}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(var l=0,a=t.length;l<a;l++)nt(t[l],e,n,r,o)}r.add(i)}function rt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return L(n)?(t.pop(),U(t,n)):X(t)}function ot(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return J(1)(rt.apply(void 0,t))}function it(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return L(n)?(t.pop(),function(e){return ot(t,e,n)}):function(e){return ot(t,e)}}function ut(t,e){if(null==t)throw new Error(e||"Expected variable to be defined, but received ".concat(t))}function ct(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function st(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function lt(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}var at=function(){function t(e,n){var r,o,i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),st(this,"name",void 0),st(this,"selector",void 0),st(this,"element",void 0),st(this,"type",void 0),st(this,"value$",void 0),this.name=e,this.selector=n,this.element=document.querySelector(this.selector),this.type=null!==(o=null===(r=this.element)||void 0===r?void 0:r.getAttribute("type"))&&void 0!==o?o:null,this.value$=(ft(this.element)?"number"===this.type?function(t){var e=document.querySelector(t);return ut(e,'Expected "'.concat(t,'" to be defined')),et(e,"input").pipe(it(0),b((function(){return e.valueAsNumber})))}(this.selector):function(t){var e=document.querySelector(t);return ut(e,'Expected "'.concat(t,'" to be defined')),et(e,"input").pipe(it(0),b((function(){return e.value})))}(this.selector):function(t){var e=document.querySelector(t);return ut(e,'Expected "'.concat(t,'" to be defined')),et(e,"change").pipe(it(0),b((function(){return e.selectedIndex})))}(this.selector)).pipe(b((function(t){return t})),P((function(t){return console.debug('[FormControl."'.concat(i.name,'"]: value'),t)}))),console.debug("[FormControl.ctor]: ",e,n)}var e,n,r;return e=t,(n=[{key:"getValue",value:function(){var t=this.element;if(ft(t))return"number"===this.type?t.valueAsNumber:t.value;if(ht(t))return t.selectedIndex;throw new Error('Expected "'.concat(this.name," (").concat(this.selector,')" to be a valid form control'))}},{key:"setValue",value:function(t){console.debug("[FormControl.".concat(this.name,"]: setValue(").concat(t,")"));var e=this.element;if(ft(e)){if("string"==typeof t)return void(e.value=t);if("number"==typeof t)return void(e.valueAsNumber=t)}else if(ht(e)&&"number"==typeof t)return void(e.selectedIndex=t);throw new Error('Could not set value "'.concat(t,'" on element "').concat(this.name," (").concat(this.selector,')"'))}}])&&ct(e.prototype,n),r&&ct(e,r),t}();function ft(t){return lt(t,HTMLInputElement)}function ht(t){return lt(t,HTMLSelectElement)}function pt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function dt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function bt(t){return function(t){if(Array.isArray(t))return pt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return pt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pt(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var vt="".concat("#wf-form-Wycena-Przesy-ki"," #FS4 + div"),yt=function(){function t(){var e,n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n="controls",r=[new at("nip","".concat(vt,' input[name="NIP-P-atnika"]')),new at("name","".concat(vt,' input[name="Imi-p-atnika"]')),new at("surname","".concat(vt,' input[name="Nazwisko-p-atnika"]')),new at("email","".concat(vt,' input[name="Telefon-nadawcy-2"]'))],n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r}var e,n,r;return e=t,(n=[{key:"initialize",value:function(){this.controls.forEach((function(t){var e=localStorage.getItem("goasap-Address-".concat(t.name));e&&t.setValue(e)})),tt.apply(void 0,bt(this.controls.map((function(t){return t.value$.pipe(b((function(e){return{value:e,name:t.name}})))})))).pipe(b((function(t){return localStorage.setItem("goasap-Address-".concat(t.name),t.value)}))).subscribe()}}])&&dt(e.prototype,n),r&&dt(e,r),t}(),_t=function(){function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t}(),mt=function(t){function n(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r}return e(n,t),n.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},n}(a),wt=function(t){function n(e){var n=t.call(this,e)||this;return n.destination=e,n}return e(n,t),n}(p),Et=function(t){function n(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return e(n,t),n.prototype[h]=function(){return new wt(this)},n.prototype.lift=function(t){var e=new St(this,this);return e.operator=t,e},n.prototype.next=function(t){if(this.closed)throw new _t;if(!this.isStopped)for(var e=this.observers,n=e.length,r=e.slice(),o=0;o<n;o++)r[o].next(t)},n.prototype.error=function(t){if(this.closed)throw new _t;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,n=e.length,r=e.slice(),o=0;o<n;o++)r[o].error(t);this.observers.length=0},n.prototype.complete=function(){if(this.closed)throw new _t;this.isStopped=!0;for(var t=this.observers,e=t.length,n=t.slice(),r=0;r<e;r++)n[r].complete();this.observers.length=0},n.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},n.prototype._trySubscribe=function(e){if(this.closed)throw new _t;return t.prototype._trySubscribe.call(this,e)},n.prototype._subscribe=function(t){if(this.closed)throw new _t;return this.hasError?(t.error(this.thrownError),a.EMPTY):this.isStopped?(t.complete(),a.EMPTY):(this.observers.push(t),new mt(this,t))},n.prototype.asObservable=function(){var t=new N;return t.source=this,t},n.create=function(t,e){return new St(t,e)},n}(N),St=function(t){function n(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return e(n,t),n.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},n.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},n.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},n.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):a.EMPTY},n}(Et),gt=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.notifyNext=function(t,e,n,r,o){this.destination.next(e)},n.prototype.notifyError=function(t,e){this.destination.error(t)},n.prototype.notifyComplete=function(t){this.destination.complete()},n}(p),At=function(t){function n(e,n,r){var o=t.call(this)||this;return o.parent=e,o.outerValue=n,o.outerIndex=r,o.index=0,o}return e(n,t),n.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},n.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},n.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},n}(p);function Pt(t,e,n,r,o){if(void 0===o&&(o=new At(t,n,r)),!o.closed)return e instanceof N?e.subscribe(o):M(e)(o)}var Tt={};var Ot=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new xt(t,this.resultSelector))},t}(),xt=function(t){function n(e,n){var r=t.call(this,e)||this;return r.resultSelector=n,r.active=0,r.values=[],r.observables=[],r}return e(n,t),n.prototype._next=function(t){this.values.push(Tt),this.observables.push(t)},n.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(var n=0;n<e;n++){var r=t[n];this.add(Pt(this,r,void 0,n))}}},n.prototype.notifyComplete=function(t){0==(this.active-=1)&&this.destination.complete()},n.prototype.notifyNext=function(t,e,n){var r=this.values,o=r[n],i=this.toRespond?o===Tt?--this.toRespond:this.toRespond:0;r[n]=e,0===i&&(this.resultSelector?this._tryResultSelector(r):this.destination.next(r.slice()))},n.prototype._tryResultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},n}(gt);function It(t,e){return"function"==typeof e?function(n){return n.pipe(It((function(n,r){return z(t(n,r)).pipe(b((function(t,o){return e(n,t,r,o)})))})))}:function(e){return e.lift(new kt(t))}}var kt=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new jt(t,this.project))},t}(),jt=function(t){function n(e,n){var r=t.call(this,e)||this;return r.project=n,r.index=0,r}return e(n,t),n.prototype._next=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this._innerSub(e)},n.prototype._innerSub=function(t){var e=this.innerSubscription;e&&e.unsubscribe();var n=new $(this),r=this.destination;r.add(n),this.innerSubscription=Q(t,n),this.innerSubscription!==n&&r.add(this.innerSubscription)},n.prototype._complete=function(){var e=this.innerSubscription;e&&!e.closed||t.prototype._complete.call(this),this.unsubscribe()},n.prototype._unsubscribe=function(){this.innerSubscription=void 0},n.prototype.notifyComplete=function(){this.innerSubscription=void 0,this.isStopped&&t.prototype._complete.call(this)},n.prototype.notifyNext=function(t){this.destination.next(t)},n}(H);function Rt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Dt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Nt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ct(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,c=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(c)throw o}}return i}}(t,e)||Yt(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Lt(t){return function(t){if(Array.isArray(t))return Rt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Yt(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yt(t,e){if(t){if("string"==typeof t)return Rt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Rt(t,e):void 0}}var Wt,qt,Ft,Vt,Mt,Ut,Zt,zt,$t,Ht,Qt,Bt,Kt,Gt,Jt,Xt,te,ee,ne,re,oe,ie,ue,ce,se,le,ae,fe,he,pe,de,be,ve,ye,_e,me,we,Ee,Se,ge,Ae,Pe,Te,Oe,xe,Ie,ke,je,Re,De,Ne,Ce,Le,Ye,We,qe,Fe,Ve,Me,Ue,Ze,ze,$e="".concat("#wf-form-Wycena-Przesy-ki"," #Step1 + div"),He=1,Qe=function(){function t(){var e=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Nt(this,"initializeForm$$",new Et),Nt(this,"rows",[this.getFormRow(0)]),Nt(this,"insuranceInput",new at("insurance","".concat($e," .data-input.insurance"))),Nt(this,"value$",function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=void 0,r=void 0;return L(t[t.length-1])&&(r=t.pop()),"function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&c(t[0])&&(t=t[0]),X(t,r).lift(new Ot(n))}([this.initializeForm$$.pipe(b((function(){return e.rows})),b((function(t){return t.map((function(t){return t.map((function(t){return t.value$}))})).flat(2)})),It((function(t){return tt.apply(void 0,Lt(t))})),b((function(t){return e.rows}))),this.insuranceInput.value$]).pipe(b((function(t){var e=Ct(t,2),n=e[0];return{insurance:e[1],rows:n.map((function(t){return t.reduce((function(t,e){return t[e.name]=e.getValue(),t}),{})}))}})),P((function(t){return console.debug("[QuoteForm]: value",t)})))),setTimeout((function(){return e.initialize()}),5)}var e,n,r;return e=t,(n=[{key:"initialize",value:function(){var t=this;console.debug("[QuoteForm]. initialize()"),document.querySelector("".concat($e," #btn-duplicate")).addEventListener("click",(function(){t.addRow(),setTimeout((function(){return t.initializeForm()}),1)})),this.initializeForm()}},{key:"initializeForm",value:function(){console.debug("[QuoteForm]: initializeForm()"),this.initializeForm$$.next()}},{key:"addRow",value:function(){var t=this;console.debug("[QuoteForm]: addRow()");var e,n,r=document.querySelector('[initial-row="0"]').cloneNode(!0);r.setAttribute("initial-row","".concat(He)),e=r,(n=document.querySelector('[initial-row="'.concat(He-1,'"]'))).parentNode.insertBefore(e,n.nextSibling),this.rows.push(this.getFormRow(He));var o=++He;r.querySelectorAll("input").forEach((function(t){t.setAttribute("data-name","".concat(t.getAttribute("data-name")," ").concat(o)),t.setAttribute("name","".concat(t.getAttribute("name")," ").concat(o)),t.setAttribute("id","".concat(t.getAttribute("id")," ").concat(o)),t.value=""})),r.querySelectorAll("select").forEach((function(t){t.setAttribute("data-name","".concat(t.getAttribute("data-name")," ").concat(o)),t.setAttribute("name","".concat(t.getAttribute("name")," ").concat(o)),t.setAttribute("id","".concat(t.getAttribute("id")," ").concat(o))}));var i=r.querySelector("#btn-delete");i.style.opacity="1",i.addEventListener("click",(function(){return t.deleteRow(r)}))}},{key:"deleteRow",value:function(t){He--,t.remove(),this.rows.splice(He,1),this.initializeForm(),console.debug("[QuoteForm]: deleteRow(".concat(He,")"),this.rows)}},{key:"getFormRow",value:function(t){console.debug("[QuoteForm]: getFormRow(".concat(t,")"));var e="".concat($e,' [initial-row="').concat(t,'"]');return[new at("type","".concat(e," select")),new at("height","".concat(e," input#Wysoko")),new at("weight","".concat(e," input#Waga")),new at("qty","".concat(e," input#Ilo"))]}}])&&Dt(e.prototype,n),r&&Dt(e,r),t}();function Be(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ke(t,e){return e=null!=e?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):function(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})),t}var Ge={ZMIENNA_WARTOSC_PROCENT:null!==(ke=null===(Wt=window.quote)||void 0===Wt||null===(qt=Wt.WARTOSCI)||void 0===qt?void 0:qt.ZMIENNA_WARTOSC_PROCENT)&&void 0!==ke?ke:0,UBEZPIECZENIE_PROCENT:null!==(je=null===(Ft=window.quote)||void 0===Ft||null===(Vt=Ft.WARTOSCI)||void 0===Vt?void 0:Vt.UBEZPIECZENIE_PROCENT)&&void 0!==je?je:0,VAT_PROCENT:null!==(Re=null===(Mt=window.quote)||void 0===Mt||null===(Ut=Mt.WARTOSCI)||void 0===Ut?void 0:Ut.VAT_PROCENT)&&void 0!==Re?Re:0,PALETA_TYPE_EURO:{Do_400_kilo:null!==(De=null===(Zt=window.quote)||void 0===Zt||null===(zt=Zt.WARTOSCI)||void 0===zt||null===($t=zt.PALETA_TYPE_EURO)||void 0===$t?void 0:$t.Do_400_kilo)&&void 0!==De?De:0,Do_800_kilo:null!==(Ne=null===(Ht=window.quote)||void 0===Ht||null===(Qt=Ht.WARTOSCI)||void 0===Qt||null===(Bt=Qt.PALETA_TYPE_EURO)||void 0===Bt?void 0:Bt.Do_800_kilo)&&void 0!==Ne?Ne:0,Do_1000_kilo:null!==(Ce=null===(Kt=window.quote)||void 0===Kt||null===(Gt=Kt.WARTOSCI)||void 0===Gt||null===(Jt=Gt.PALETA_TYPE_EURO)||void 0===Jt?void 0:Jt.Do_1000_kilo)&&void 0!==Ce?Ce:0,Do_1200_kilo:null!==(Le=null===(Xt=window.quote)||void 0===Xt||null===(te=Xt.WARTOSCI)||void 0===te||null===(ee=te.PALETA_TYPE_EURO)||void 0===ee?void 0:ee.Do_1200_kilo)&&void 0!==Le?Le:0},PALETA_TYPE_PRZEMYSLOWA:{Do_400_kilo:null!==(Ye=null===(ne=window.quote)||void 0===ne||null===(re=ne.WARTOSCI)||void 0===re||null===(oe=re.PALETA_TYPE_PRZEMYSLOWA)||void 0===oe?void 0:oe.Do_400_kilo)&&void 0!==Ye?Ye:0,Do_800_kilo:null!==(We=null===(ie=window.quote)||void 0===ie||null===(ue=ie.WARTOSCI)||void 0===ue||null===(ce=ue.PALETA_TYPE_PRZEMYSLOWA)||void 0===ce?void 0:ce.Do_800_kilo)&&void 0!==We?We:0,Do_1000_kilo:null!==(qe=null===(se=window.quote)||void 0===se||null===(le=se.WARTOSCI)||void 0===le||null===(ae=le.PALETA_TYPE_PRZEMYSLOWA)||void 0===ae?void 0:ae.Do_1000_kilo)&&void 0!==qe?qe:0,Do_1200_kilo:null!==(Fe=null===(fe=window.quote)||void 0===fe||null===(he=fe.WARTOSCI)||void 0===he||null===(pe=he.PALETA_TYPE_PRZEMYSLOWA)||void 0===pe?void 0:pe.Do_1200_kilo)&&void 0!==Fe?Fe:0},PALETA_TYPE_PRZEMYSLOWA_PLUS:{Do_400_kilo:null!==(Ve=null===(de=window.quote)||void 0===de||null===(be=de.WARTOSCI)||void 0===be||null===(ve=be.PALETA_TYPE_PRZEMYSLOWA_PLUS)||void 0===ve?void 0:ve.Do_400_kilo)&&void 0!==Ve?Ve:0,Do_800_kilo:null!==(Me=null===(ye=window.quote)||void 0===ye||null===(_e=ye.WARTOSCI)||void 0===_e||null===(me=_e.PALETA_TYPE_PRZEMYSLOWA_PLUS)||void 0===me?void 0:me.Do_800_kilo)&&void 0!==Me?Me:0,Do_1000_kilo:null!==(Ue=null===(we=window.quote)||void 0===we||null===(Ee=we.WARTOSCI)||void 0===Ee||null===(Se=Ee.PALETA_TYPE_PRZEMYSLOWA_PLUS)||void 0===Se?void 0:Se.Do_1000_kilo)&&void 0!==Ue?Ue:0,Do_1200_kilo:null!==(Ze=null===(ge=window.quote)||void 0===ge||null===(Ae=ge.WARTOSCI)||void 0===Ae||null===(Pe=Ae.PALETA_TYPE_PRZEMYSLOWA_PLUS)||void 0===Pe?void 0:Pe.Do_1200_kilo)&&void 0!==Ze?Ze:0},PALETA_TYPE_POLPALETA:{Do_200_kilo:null!==(ze=null===(Te=window.quote)||void 0===Te||null===(Oe=Te.WARTOSCI)||void 0===Oe||null===(xe=Oe.PALETA_TYPE_POLPALETA)||void 0===xe?void 0:xe.Do_200_kilo)&&void 0!==ze?ze:0}};try{console.debug("[validatePalety]: version",x)}catch(t){console.error("could not print package.json version")}console.debug("[validatePalety]: quote config",window.quote);var Je=function(t){var e=Object.entries(t).map((function(e){var n=k(e,2),r=n[0],o=n[1];return null==o||0===o?r:"object"==typeof o?Object.entries(t||{}).map((function(t){var e=k(t,2),n=e[0];if(void 0===e[1])return n})):void 0})).flat().filter(Boolean);return!e.length||(alert("Błąd w formularzu. Prosimy o kontakt.\n\nNie skonfigurowano wartości dla ".concat(e.join(", "))),!1)}(Ge);if(console.debug("[validatePalety]: valid",Je,Ge),Je&&!(null===(Ie=window.quote)||void 0===Ie?void 0:Ie.DISABLED)){var Xe,tn,en,nn,rn=null!==(en=null===(Xe=window.quote)||void 0===Xe?void 0:Xe.ZA_WYSOKA_CENA)&&void 0!==en?en:2500,on=null!==(nn=null===(tn=window.quote)||void 0===tn?void 0:tn.ZA_WYSOKA_CENA_MESSAGE)&&void 0!==nn?nn:"Prosimy o kontakt";setTimeout((function(){var t,e;(new Qe).value$.pipe(b((function(t){var e=t.rows,n=t.insurance;return e.map((function(t){return function(t,e){var n=t.PALETA_TYPE_EURO,r=t.PALETA_TYPE_POLPALETA,o=t.PALETA_TYPE_PRZEMYSLOWA,i=t.PALETA_TYPE_PRZEMYSLOWA_PLUS,u=t.UBEZPIECZENIE_PROCENT,c=t.VAT_PROCENT,s=t.ZMIENNA_WARTOSC_PROCENT,l=0,a=e.type,f=e.qty,h=e.weight,p=e.insurance,d=1===a?f:0,b=2===a?f:0,v=3===a?f:0,y=4===a?f:0,_=1===a?h:0,m=3===a?h:0,w=4===a?h:0,E=2===a?h:0;return a&&f&&h?(d>0&&(_<=400?l+=d*n.Do_400_kilo:_<=800?l+=d*n.Do_800_kilo:_<=1e3?l+=d*n.Do_1000_kilo:_<=1200&&(l+=d*n.Do_1200_kilo)),v>0&&(m<=400?l+=v*o.Do_400_kilo:m<=800?l+=v*o.Do_800_kilo:m<=1e3?l+=v*o.Do_1000_kilo:m<=1200&&(l+=v*o.Do_1200_kilo)),y>0&&(w<=400?l+=y*i.Do_400_kilo:w<=800?l+=y*i.Do_800_kilo:w<=1e3?l+=y*i.Do_1000_kilo:w<=1200&&(l+=y*i.Do_1200_kilo)),b>0&&E<=200&&(l+=b*r.Do_200_kilo),(l+(p=(p||0)<3e3?3e3:p)*(u/100))*((100+s)/100)*((100+c)/100)):0}(Ge,Ke(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){Be(t,e,n[e])}))}return t}({},t),{insurance:n}))})).reduce((function(t,e){return t+e}),0)})),(t=250,void 0===e&&(e=w),function(n){return n.lift(new E(t,e))}),P((function(t){return console.debug("[QuoteForm]: price",t)})),b((function(t){return t>=rn?on:"".concat(t.toFixed(2)," zł")})),P((function(t){return console.debug("[QuoteForm]: price label",t)})),P((function(t){return document.querySelector("#price").textContent=t}))).subscribe(),(new yt).initialize()}),1e3)}})(); |
{ | ||
"name": "webflow-contact-form", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"devDependencies": { | ||
@@ -5,0 +5,0 @@ "@swc/cli": "^0.1.57", |
import { debounceTime, map, tap } from 'rxjs/operators'; | ||
import packageJson from '../package.json'; | ||
import { AddressForm } from './address-form'; | ||
import { PaletaConfig, calculateRow, validatePalety } from './calculate-shipping-price'; | ||
import { ContactForm } from './contact-form'; | ||
import { PaymentForm } from './payment-form'; | ||
@@ -107,6 +105,6 @@ import { QuoteForm } from './quote-form'; | ||
new AddressForm().initialize(); | ||
new ContactForm().initialize(); | ||
// new AddressForm().initialize(); | ||
// new ContactForm().initialize(); | ||
new PaymentForm().initialize(); | ||
}, 1000); | ||
} |
151562
604