You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
14 KiB
2 lines
14 KiB
/*! For license information please see 62.3640aa1b.chunk.js.LICENSE.txt */ |
|
(this["webpackJsonpsimpro-web"]=this["webpackJsonpsimpro-web"]||[]).push([[62],{2135:function(e,t,r){},2310:function(e,t,r){"use strict";r.r(t);var n=r(607),a=r(184),o=r(185),i=r(186),s=r(187),c=r(2),l=r.n(c),u=r(793),f=r(806),h=r(807),p=r(792),d=r(783),m=r(189),v=(r(2135),r(630)),g=r(923);function y(){y=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(S){s=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var a=t&&t.prototype instanceof f?t:f,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return N()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var s=x(i,r);if(s){if(s===u)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=l(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===u)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,i),o}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(S){return{type:"throw",arg:S}}}e.wrap=c;var u={};function f(){}function h(){}function p(){}var d={};s(d,a,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(L([])));v&&v!==t&&r.call(v,a)&&(d=v);var g=p.prototype=f.prototype=Object.create(d);function b(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,s){var c=l(e[a],e,o);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,i,s)}),(function(e){n("throw",e,i,s)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,s)}))}s(c.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=l(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:N}}function N(){return{value:void 0,done:!0}}return h.prototype=p,s(g,"constructor",p),s(p,"constructor",h),h.displayName=s(p,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,s(e,i,"GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},b(w.prototype),s(w.prototype,o,(function(){return this})),e.AsyncIterator=w,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new w(c(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(g),s(g,i,"Generator"),s(g,a,(function(){return this})),s(g,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=L,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),c=r.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:L(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}var b=function(e){Object(i.a)(r,e);var t=Object(s.a)(r);function r(e){var o;return Object(a.a)(this,r),(o=t.call(this,e)).loading=function(){return l.a.createElement("div",{className:"animated fadeIn pt-1 text-center"},"Loading...")},o.getLayerList=Object(n.a)(y().mark((function e(){var t,r;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={method:"GET",header:JSON.stringify({"Content-Type":"application/json"})},[],e.prev=2,e.next=5,fetch(v.D,t).then((function(e){return e.json()})).then((function(e){return e}));case 5:(r=e.sent).data&&r.data.length>0&&o.setState({layers:r.data},(function(){})),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(2),console.log(e.t0),alert(e.t0.message.toString());case 13:case"end":return e.stop()}}),e,null,[[2,9]])}))),o.handleChangeSearchLayer=function(e){e.preventDefault();var t=e.target.value.toLowerCase();o.setState({searchInput:t},(function(){o.returnSearchData(o.state.searchInput)}))},o.returnSearchData=function(e){return""===e?o.state.layers:o.state.layers.filter((function(e){for(var t in e)if(null!==e[t]&&e[t].toString().toLowerCase().includes(o.state.searchInput))return e[t].toString().toLowerCase().includes(o.state.searchInput)}))},o.renderList=function(){var e=o.returnSearchData(o.state.searchInput);return console.log("searchData",e),e.length>0?e.map((function(e,t){var r="layers/".concat(e.resourcebase_ptr_id),n=Object(g.f)(e.name);return l.a.createElement(u.a,{xl:12,md:12,xs:12,key:e.resourcebase_ptr_id},l.a.createElement(m.Link,{to:r},l.a.createElement(f.a,{className:"layer-list"},l.a.createElement(h.a,null,l.a.createElement(p.a,null,l.a.createElement(u.a,{xl:4,md:6,xs:12},l.a.createElement("div",{className:"img-wrap"},l.a.createElement("img",{className:"layer-image",src:n,alt:e.image_altText}))),l.a.createElement(u.a,{xl:8,md:6,xs:12},l.a.createElement("span",{className:"layer-title"},e.title_en)))))))})):l.a.createElement(u.a,{xl:12,md:12,xs:12},"No layer found")},o.state={layers:[],searchInput:""},o}return Object(o.a)(r,[{key:"componentDidMount",value:function(){this.getLayerList()}},{key:"render",value:function(){var e=this.state.searchInput;return l.a.createElement(c.Suspense,{fallback:this.loading()},l.a.createElement(p.a,null,l.a.createElement(u.a,{xl:4,md:4,xs:12},l.a.createElement("div",{className:"input-search-layer-wrapper"},l.a.createElement(d.a,{type:"text",placeholder:"Search Layer...",value:e,onChange:this.handleChangeSearchLayer.bind(this),className:"input-search-layer"})))),l.a.createElement(p.a,null,this.renderList()))}}]),r}(c.Component);t.default=b},783:function(e,t,r){"use strict";var n=r(23),a=r(59),o=r(583),i=r(33),s=r(2),c=r.n(s),l=r(80),u=r.n(l),f=r(562),h=r.n(f),p=r(569),d=["className","cssModule","type","bsSize","valid","invalid","tag","addon","plaintext","innerRef"],m={children:u.a.node,type:u.a.string,size:u.a.oneOfType([u.a.number,u.a.string]),bsSize:u.a.string,valid:u.a.bool,invalid:u.a.bool,tag:p.t,innerRef:u.a.oneOfType([u.a.object,u.a.func,u.a.string]),plaintext:u.a.bool,addon:u.a.bool,className:u.a.string,cssModule:u.a.object},v=function(e){function t(t){var r;return(r=e.call(this,t)||this).getRef=r.getRef.bind(Object(o.a)(r)),r.focus=r.focus.bind(Object(o.a)(r)),r}Object(i.a)(t,e);var r=t.prototype;return r.getRef=function(e){this.props.innerRef&&this.props.innerRef(e),this.ref=e},r.focus=function(){this.ref&&this.ref.focus()},r.render=function(){var e=this.props,t=e.className,r=e.cssModule,o=e.type,i=e.bsSize,s=e.valid,l=e.invalid,u=e.tag,f=e.addon,m=e.plaintext,v=e.innerRef,g=Object(a.a)(e,d),y=["radio","checkbox"].indexOf(o)>-1,b=new RegExp("\\D","g"),w=u||("select"===o||"textarea"===o?o:"input"),x="form-control";m?(x+="-plaintext",w=u||"input"):"file"===o?x+="-file":"range"===o?x+="-range":y&&(x=f?null:"form-check-input"),g.size&&b.test(g.size)&&(Object(p.w)('Please use the prop "bsSize" instead of the "size" to bootstrap\'s input sizing.'),i=g.size,delete g.size);var O=Object(p.p)(h()(t,l&&"is-invalid",s&&"is-valid",!!i&&"form-control-"+i,x),r);return("input"===w||u&&"function"===typeof u)&&(g.type=o),g.children&&!m&&"select"!==o&&"string"===typeof w&&"select"!==w&&(Object(p.w)('Input with a type of "'+o+'" cannot have children. Please use "value"/"defaultValue" instead.'),delete g.children),c.a.createElement(w,Object(n.a)({},g,{ref:v,className:O,"aria-invalid":l}))},t}(c.a.Component);v.propTypes=m,v.defaultProps={type:"text"},t.a=v},792:function(e,t,r){"use strict";var n=r(23),a=r(59),o=r(2),i=r.n(o),s=r(80),c=r.n(s),l=r(562),u=r.n(l),f=r(569),h=["className","cssModule","noGutters","tag","form","widths"],p=c.a.oneOfType([c.a.number,c.a.string]),d={tag:f.t,noGutters:c.a.bool,className:c.a.string,cssModule:c.a.object,form:c.a.bool,xs:p,sm:p,md:p,lg:p,xl:p},m={tag:"div",widths:["xs","sm","md","lg","xl"]},v=function(e){var t=e.className,r=e.cssModule,o=e.noGutters,s=e.tag,c=e.form,l=e.widths,p=Object(a.a)(e,h),d=[];l.forEach((function(t,r){var n=e[t];if(delete p[t],n){var a=!r;d.push(a?"row-cols-"+n:"row-cols-"+t+"-"+n)}}));var m=Object(f.p)(u()(t,o?"no-gutters":null,c?"form-row":"row",d),r);return i.a.createElement(s,Object(n.a)({},p,{className:m}))};v.propTypes=d,v.defaultProps=m,t.a=v},793:function(e,t,r){"use strict";var n=r(23),a=r(59),o=r(2),i=r.n(o),s=r(80),c=r.n(s),l=r(562),u=r.n(l),f=r(569),h=["className","cssModule","widths","tag"],p=c.a.oneOfType([c.a.number,c.a.string]),d=c.a.oneOfType([c.a.bool,c.a.number,c.a.string,c.a.shape({size:c.a.oneOfType([c.a.bool,c.a.number,c.a.string]),order:p,offset:p})]),m={tag:f.t,xs:d,sm:d,md:d,lg:d,xl:d,className:c.a.string,cssModule:c.a.object,widths:c.a.array},v={tag:"div",widths:["xs","sm","md","lg","xl"]},g=function(e,t,r){return!0===r||""===r?e?"col":"col-"+t:"auto"===r?e?"col-auto":"col-"+t+"-auto":e?"col-"+r:"col-"+t+"-"+r},y=function(e){var t=e.className,r=e.cssModule,o=e.widths,s=e.tag,c=Object(a.a)(e,h),l=[];o.forEach((function(t,n){var a=e[t];if(delete c[t],a||""===a){var o=!n;if(Object(f.n)(a)){var i,s=o?"-":"-"+t+"-",h=g(o,t,a.size);l.push(Object(f.p)(u()(((i={})[h]=a.size||""===a.size,i["order"+s+a.order]=a.order||0===a.order,i["offset"+s+a.offset]=a.offset||0===a.offset,i)),r))}else{var p=g(o,t,a);l.push(p)}}})),l.length||l.push("col");var p=Object(f.p)(u()(t,l),r);return i.a.createElement(s,Object(n.a)({},c,{className:p}))};y.propTypes=m,y.defaultProps=v,t.a=y},806:function(e,t,r){"use strict";var n=r(23),a=r(59),o=r(2),i=r.n(o),s=r(80),c=r.n(s),l=r(562),u=r.n(l),f=r(569),h=["className","cssModule","color","body","inverse","outline","tag","innerRef"],p={tag:f.t,inverse:c.a.bool,color:c.a.string,body:c.a.bool,outline:c.a.bool,className:c.a.string,cssModule:c.a.object,innerRef:c.a.oneOfType([c.a.object,c.a.string,c.a.func])},d=function(e){var t=e.className,r=e.cssModule,o=e.color,s=e.body,c=e.inverse,l=e.outline,p=e.tag,d=e.innerRef,m=Object(a.a)(e,h),v=Object(f.p)(u()(t,"card",!!c&&"text-white",!!s&&"card-body",!!o&&(l?"border":"bg")+"-"+o),r);return i.a.createElement(p,Object(n.a)({},m,{className:v,ref:d}))};d.propTypes=p,d.defaultProps={tag:"div"},t.a=d},807:function(e,t,r){"use strict";var n=r(23),a=r(59),o=r(2),i=r.n(o),s=r(80),c=r.n(s),l=r(562),u=r.n(l),f=r(569),h=["className","cssModule","innerRef","tag"],p={tag:f.t,className:c.a.string,cssModule:c.a.object,innerRef:c.a.oneOfType([c.a.object,c.a.string,c.a.func])},d=function(e){var t=e.className,r=e.cssModule,o=e.innerRef,s=e.tag,c=Object(a.a)(e,h),l=Object(f.p)(u()(t,"card-body"),r);return i.a.createElement(s,Object(n.a)({},c,{className:l,ref:o}))};d.propTypes=p,d.defaultProps={tag:"div"},t.a=d}}]); |