1/*! For license information please see 1942.js.LICENSE.txt */ 2"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1942],{22485:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(45627),s=r.n(n),o=r(76798),i=r.n(o)()(s());i.push([e.id,".user-username[data-v-81d5a968]{line-height:48px}.user-selection[data-v-81d5a968]:hover{background-color:#dbdbdb}@media only screen and (max-width:1023px){.user-username[data-v-81d5a968]{line-height:inherit}}","",{version:3,sources:["webpack://./resources/js/components/Tools/ChooseUsers.vue"],names:[],mappings:"AAoIA,gCACA,gBACA,CACA,uCACA,wBACA,CAEA,0CACA,gCACA,mBACA,CACA",sourcesContent:['<template>\n\n <div>\n <input :ref=" refName || false " type="text" v-model="userInput" :class=" classes ? classes : \'input\' " :id="id" :placeholder=" placeholder " @keyup=" searchUsers ">\n <div class="box"\n v-if=" users.length ">\n <p class="is-size-7">\n <span class="dot" style="height:8px;width:8px;background-color: blue;"></span> Work Trader | <span class="dot" style="height:8px;width:8px;background-color: green;"></span> Active Member\n </p>\n <div class="cursor-pointer user-selection is-padded-05"\n v-for=" user in users "\n @click=" chooseUser(user) ">\n <xero-user\n :classes="dropClasses || \'\'"\n :image-size=" imageSize || \'\' "\n :avatar=" $avatar_url(user.avatar, showName ? user.addressee : user.username) "\n :username=" showName ? user.addressee : user.username "\n :paying-member=" !!user.paying_member "\n :is-work-trade=" !!user.is_work_trade "\n ></xero-user>\n </div>\n </div>\n </div>\n\n</template>\n\n<script>\n export default {\n name: \'Choose-User\',\n props: {\n routeSearchUsers: {\n type: String,\n required: true\n },\n classes: {\n type: String,\n required: false\n },\n id: {\n type: String,\n required: false,\n },\n dropClasses: {\n type: String,\n required: false\n },\n imageSize: {\n type: String,\n required: false\n },\n refName: {\n type: String,\n required: false\n },\n placeholder: {\n type: String,\n required: false,\n default: \'\'\n },\n showName: {\n type: Boolean,\n required: false,\n default: false\n }\n },\n data() {\n return {\n userInput: \'\',\n users: []\n };\n },\n methods: {\n searchUsers: async function (event) {\n this.$http.post(this.routeSearchUsers, {\n filter: this.userInput,\n limit: 6,\n _token: this.$store.state.csrfToken\n })\n .then(response => {\n this.$d(\'response\');\n this.$d(response);\n if (response.data.hasErrors) {\n this.$store.commit(\'errors\', response.data.errors);\n } else if (response.data.success === true) {\n if (response.data.users) {\n this.users = response.data.users;\n if(event.keyCode === 13 && this.users.length === 1) this.chooseUser(this.users[0]);\n }\n else this.users = [];\n } else {\n this.$store.commit(\'error\', response.data.message);\n }\n })\n .catch(error => {\n this.$displayError(error);\n });\n }
vendor: 5,559 bytes, line 2
2,\n chooseUser: function(data) {\n this.userInput = \'\';\n this.users = [];\n this.$emit(\'select\', data);\n }\n },\n mounted() {\n this.$nextTick(() => {\n if(this.refName) {\n this.$refs[this.refName].focus();\n }\n });\n }\n }\n<\/script>\n\n\n<style scoped>\n\n .user-username {\n line-height: 48px;\n }\n .user-selection:hover {\n background-color: #DBDBDB;\n }\n\n @media only screen and (max-width: 1023px) {\n .user-username {\n line-height: inherit;\n }\n }\n\n</style>\n'],sourceRoot:""}]);const a=i},81942:(e,t,r)=>{r.r(t),r.d(t,{default:()=>f});function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function s(){s=function(){return t};var e,t={},r=Object.prototype,o=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{h({},"")}catch(e){h=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var s=t&&t.prototype instanceof w?t:w,o=Object.create(s.prototype),a=new q(n||[]);return i(o,"_invoke",{value:L(e,r,a)}),o}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var d="suspendedStart",y="suspendedYield",m="executing",v="completed",g={};function w(){}function b(){}function x(){}var k={};h(k,u,(function(){return this}));var _=Object.getPrototypeOf,S=_&&_(_(I([])));S&&S!==r&&o.call(S,u)&&(k=S);var C=x.prototype=w.prototype=Object.create(k);function A(e){["next","throw","return"].forEach((function(t){h(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(s,i,a,u){var c=f(e[s],e,i);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==n(h)&&o.call(h,"__await")?t.resolve(h.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(h).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,s){r(e,n,t,s)}))}return s=s?s.then(o,o):o()}})}function L(t,r,n){var s=d;return function(o,i){if(s===m)throw new Error("Generator is already running");if(s===v){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=N(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(s===d)throw s=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);s=m;var c=f(t,r,n);if("normal"===c.type){if(s=n.done?v:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(s=v,n.method="throw",n.arg=c.arg)}}}function N(t,r){var n=r.method,s=t.iterator[n];if(s===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,N(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=f(s,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function $(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 U(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function q(e){this.tryEntries=[{tryLoc:"root"}],e.forEach($,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var s=-1,i=function r(){for(;++s<t.length;)if(o.call(t,s))return r.value=t[s],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(n(t)+" is not iterable")}return b.prototype=x,i(C,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:b,configurable:!0}),b.displayName=h(x,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,h(e,l,"GeneratorFunction")),e.prototype=Object.create(C),e},t.awrap=function(e){return{__await:e}},A(E.prototype),h(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,s,o){void 0===o&&(o=Promise);var i=new E(p(e,r,n,s),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},A(C),h(C,l,"Generator"),h(C,u,(function(){return this})),h(C,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,q.prototype={constructor:q,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEac
2h(U),!t)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,s){return a.type="throw",a.arg=t,r.next=n,s&&(r.method="next",r.arg=e),!!s}for(var s=this.tryEntries.length-1;s>=0;--s){var i=this.tryEntries[s],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),c=o.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var s=n;break}}s&&("break"===e||"continue"===e)&&s.tryLoc<=t&&t<=s.finallyLoc&&(s=null);var i=s?s.completion:{};return i.type=e,i.arg=t,s?(this.method="next",this.next=s.finallyLoc,g):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),g},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),U(r),g}},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 s=n.arg;U(r)}return s}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function o(e,t,r,n,s,o,i){try{var a=e[o](i),u=a.value}catch(e){return void r(e)}a.done?t(u):Promise.resolve(u).then(n,s)}var i,a;const u={name:"Choose-User",props:{routeSearchUsers:{type:String,required:!0},classes:{type:String,required:!1},id:{type:String,required:!1},dropClasses:{type:String,required:!1},imageSize:{type:String,required:!1},refName:{type:String,required:!1},placeholder:{type:String,required:!1,default:""},showName:{type:Boolean,required:!1,default:!1}},data:function(){return{userInput:"",users:[]}},methods:{searchUsers:(i=s().mark((function e(t){var r=this;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.$http.post(this.routeSearchUsers,{filter:this.userInput,limit:6,_token:this.$store.state.csrfToken}).then((function(e){r.$d("response"),r.$d(e),e.data.hasErrors?r.$store.commit("errors",e.data.errors):!0===e.data.success?e.data.users?(r.users=e.data.users,13===t.keyCode&&1===r.users.length&&r.chooseUser(r.users[0])):r.users=[]:r.$store.commit("error",e.data.message)})).catch((function(e){r.$displayError(e)}));case 1:case"end":return e.stop()}}),e,this)})),a=function(){var e=this,t=arguments;return new Promise((function(r,n){var s=i.apply(e,t);function a(e){o(s,r,n,a,u,"next",e)}function u(e){o(s,r,n,a,u,"throw",e)}a(void 0)}))},function(e){return a.apply(this,arguments)}),chooseUser:function(e){this.userInput="",this.users=[],this.$emit("select",e)}},mounted:function(){var e=this;this.$nextTick((function(){e.refName&&e.$refs[e.refName].focus()}))}};var c=r(40100),l=r.n(c),h=r(22485),p={insert:"head",singleton:!1};l()(h.A,p);h.A.locals;const f=(0,r(14486).A)(u,(function(){var e=this,t=e._self._c;return t("div",[t("input",{directives:[{name:"model",rawName:"v-model",value:e.userInput,expression:"userInput"}],ref:e.refName||!1,class:e.classes?e.classes:"input",attrs:{type:"text",id:e.id,placeholder:e.placeholder},domProps:{value:e.userInput}
2,on:{keyup:e.searchUsers,input:function(t){t.target.composing||(e.userInput=t.target.value)}}}),e._v(" "),e.users.length?t("div",{staticClass:"box"},[e._m(0),e._v(" "),e._l(e.users,(function(r){return t("div",{staticClass:"cursor-pointer user-selection is-padded-05",on:{click:function(t){return e.chooseUser(r)}}},[t("xero-user",{attrs:{classes:e.dropClasses||"","image-size":e.imageSize||"",avatar:e.$avatar_url(r.avatar,e.showName?r.addressee:r.username),username:e.showName?r.addressee:r.username,"paying-member":!!r.paying_member,"is-work-trade":!!r.is_work_trade}})],1)}))],2):e._e()])}),[function(){var e=this,t=e._self._c;return t("p",{staticClass:"is-size-7"},[t("span",{staticClass:"dot",staticStyle:{height:"8px",width:"8px","background-color":"blue"}}),e._v(" Work Trader    |   "),t("span",{staticClass:"dot",staticStyle:{height:"8px",width:"8px","background-color":"green"}}),e._v(" Active Member\n ")])}],!1,null,"81d5a968",null).exports}}]); 3//# sourceMappingURL=1942.js.map?id=cee9497ae967ab3f
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.