diff --git a/.env.example b/.env.example index 6d7ef9a99be..968dba7a9d6 100644 --- a/.env.example +++ b/.env.example @@ -23,6 +23,7 @@ DB_PORT=3306 DB_DATABASE=monica DB_USERNAME=homestead DB_PASSWORD=secret +DB_PREFIX='' DB_TEST_DATABASE=monica_test DB_TEST_USERNAME=homestead DB_TEST_PASSWORD=secret @@ -96,4 +97,4 @@ AWS_KEY= AWS_SECRET= AWS_REGION=us-east-1 AWS_BUCKET= -AWS_SERVER= \ No newline at end of file +AWS_SERVER= diff --git a/CHANGELOG b/CHANGELOG index 5993fcebf63..8dd57e81812 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,11 +1,9 @@ UNRELEASED CHANGES: -<<<<<<< HEAD +* Add pets management * Activities made with contact now appears in the Journal * Add ability to rate how a day went in the Journal -======= * Add validation when changing email address ->>>>>>> master * Add ability to change account's password in the settings * Show a user's avatar when searching diff --git a/app/Contact.php b/app/Contact.php index e074f66c144..c757def700b 100644 --- a/app/Contact.php +++ b/app/Contact.php @@ -266,6 +266,16 @@ public function addresses() return $this->hasMany('App\Address'); } + /** + * Get the Pets records associated with the contact. + * + * @return HasMany + */ + public function pets() + { + return $this->hasMany('App\Pet'); + } + /** * Get the contact records associated with the account. * diff --git a/app/Http/Controllers/Contacts/PetsController.php b/app/Http/Controllers/Contacts/PetsController.php new file mode 100644 index 00000000000..4b4e4531951 --- /dev/null +++ b/app/Http/Controllers/Contacts/PetsController.php @@ -0,0 +1,109 @@ + $petCategory->id, + 'name' => $petCategory->name, + 'edit' => false, + ]; + $petCategoriesData->push($data); + } + + return $petCategoriesData; + } + + /** + * Get all the pets for this contact. + * @param Contact $contact + */ + public function get(Contact $contact) + { + $petsCollection = collect([]); + $pets = $contact->pets; + + foreach ($pets as $pet) { + $data = [ + 'id' => $pet->id, + 'name' => $pet->name, + 'pet_category_id' => $pet->pet_category_id, + 'category_name' => $pet->petCategory->name, + 'edit' => false, + ]; + $petsCollection->push($data); + } + + return $petsCollection; + } + + /** + * Store the pet. + */ + public function store(PetsRequest $request, Contact $contact) + { + $pet = $contact->pets()->create( + $request->only([ + 'pet_category_id', + 'name', + ]) + + [ + 'account_id' => auth()->user()->account->id, + ] + ); + + return $data = [ + 'id' => $pet->id, + 'name' => $pet->name, + 'pet_category_id' => $pet->pet_category_id, + 'category_name' => $pet->petCategory->name, + 'edit' => false, + ]; + } + + /** + * Update the pet. + */ + public function update(PetsRequest $request, Contact $contact, Pet $pet) + { + $pet->update( + $request->only([ + 'pet_category_id', + 'name', + ]) + + [ + 'account_id' => auth()->user()->account->id, + ] + ); + + return $data = [ + 'id' => $pet->id, + 'name' => $pet->name, + 'pet_category_id' => $pet->pet_category_id, + 'category_name' => $pet->petCategory->name, + 'edit' => false, + ]; + } + + public function trash(Contact $contact, Pet $pet) + { + $pet->delete(); + } +} diff --git a/app/Http/Requests/People/PetsRequest.php b/app/Http/Requests/People/PetsRequest.php new file mode 100644 index 00000000000..f21fa99ab86 --- /dev/null +++ b/app/Http/Requests/People/PetsRequest.php @@ -0,0 +1,31 @@ + 'max:255|nullable', + 'pet_category_id' => 'integer', + ]; + } +} diff --git a/app/Jobs/ExportAccountAsSQL.php b/app/Jobs/ExportAccountAsSQL.php index d1745fca9e3..1663bbdf98b 100644 --- a/app/Jobs/ExportAccountAsSQL.php +++ b/app/Jobs/ExportAccountAsSQL.php @@ -33,6 +33,7 @@ class ExportAccountAsSQL 'oauth_personal_access_clients', 'oauth_refresh_tokens', 'password_resets', + 'pet_categories', 'sessions', 'statistics', 'subscriptions', diff --git a/app/Pet.php b/app/Pet.php new file mode 100644 index 00000000000..2b1e5170967 --- /dev/null +++ b/app/Pet.php @@ -0,0 +1,57 @@ +belongsTo(Account::class); + } + + /** + * Get the contact record associated with the gift. + * + * @return BelongsTo + */ + public function contact() + { + return $this->belongsTo(Contact::class); + } + + /** + * Get the contact record associated with the gift. + * + * @return BelongsTo + */ + public function petCategory() + { + return $this->belongsTo(PetCategory::class); + } + + /** + * Set the name to null if it's an empty string. + * + * @param string $value + * @return void + */ + public function setNameAttribute($value) + { + $this->attributes['name'] = $value ?: null; + } +} diff --git a/app/PetCategory.php b/app/PetCategory.php new file mode 100644 index 00000000000..d6d4be17f74 --- /dev/null +++ b/app/PetCategory.php @@ -0,0 +1,39 @@ +where('is_common', 1); + } + + /** + * Get the name of the pet's category. + * + * @param string $value + * @return string + */ + public function getNameAttribute($value) + { + return $value; + } +} diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index e1eec8a7223..fdaa168c6be 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -4,6 +4,7 @@ use Route; use App\Day; +use App\Pet; use App\Debt; use App\Gift; use App\Note; @@ -124,6 +125,12 @@ public function boot() ->where('id', $value) ->firstOrFail(); }); + + Route::bind('pet', function ($value, $route) { + return Pet::where('account_id', auth()->user()->account_id) + ->where('id', $value) + ->firstOrFail(); + }); } /** diff --git a/config/database.php b/config/database.php index d517b5835ae..48f0723c15a 100644 --- a/config/database.php +++ b/config/database.php @@ -49,7 +49,7 @@ 'sqlite' => [ 'driver' => 'sqlite', 'database' => env('DB_DATABASE', database_path('database.sqlite')), - 'prefix' => '', + 'prefix' => env('DB_PREFIX', ''), ], 'mysql' => [ @@ -61,7 +61,7 @@ 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', - 'prefix' => '', + 'prefix' => env('DB_PREFIX', ''), 'strict' => false, 'engine' => null, ], @@ -86,7 +86,7 @@ 'username' => env('DB_USERNAME', 'forge'), 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', - 'prefix' => '', + 'prefix' => env('DB_PREFIX', ''), 'schema' => 'public', ], diff --git a/database/migrations/2017_12_24_115641_create_pets_table.php b/database/migrations/2017_12_24_115641_create_pets_table.php new file mode 100644 index 00000000000..a8d44bac5d5 --- /dev/null +++ b/database/migrations/2017_12_24_115641_create_pets_table.php @@ -0,0 +1,44 @@ +increments('id'); + $table->integer('account_id'); + $table->integer('contact_id'); + $table->integer('pet_category_id'); + $table->string('name')->nullable(); + $table->timestamps(); + }); + + Schema::create('pet_categories', function (Blueprint $table) { + $table->increments('id'); + $table->string('name'); + $table->boolean('is_common'); + $table->timestamps(); + }); + + DB::table('pet_categories')->insert(['name' => 'reptile', 'is_common' => false]); + DB::table('pet_categories')->insert(['name' => 'bird', 'is_common' => false]); + DB::table('pet_categories')->insert(['name' => 'cat', 'is_common' => true]); + DB::table('pet_categories')->insert(['name' => 'dog', 'is_common' => true]); + DB::table('pet_categories')->insert(['name' => 'fish', 'is_common' => true]); + DB::table('pet_categories')->insert(['name' => 'hamster', 'is_common' => false]); + DB::table('pet_categories')->insert(['name' => 'horse', 'is_common' => false]); + DB::table('pet_categories')->insert(['name' => 'rabbit', 'is_common' => false]); + DB::table('pet_categories')->insert(['name' => 'rat', 'is_common' => false]); + DB::table('pet_categories')->insert(['name' => 'small_animal', 'is_common' => false]); + DB::table('pet_categories')->insert(['name' => 'other', 'is_common' => false]); + } +} diff --git a/database/seeds/FakeContentTableSeeder.php b/database/seeds/FakeContentTableSeeder.php index a00cb7ea019..27969e71eea 100644 --- a/database/seeds/FakeContentTableSeeder.php +++ b/database/seeds/FakeContentTableSeeder.php @@ -92,6 +92,7 @@ public function run() $this->populateGifts(); $this->populateAddresses(); $this->populateContactFields(); + $this->populatePets(); $this->changeUpdatedAt(); $progress->advance(); @@ -431,6 +432,23 @@ public function populateEntries() } } + public function populatePets() + { + if (rand(1, 3) == 1) { + for ($j = 0; $j < rand(1, 3); $j++) { + $date = $this->faker->dateTimeThisYear(); + + $petId = DB::table('pets')->insertGetId([ + 'account_id' => $this->account->id, + 'contact_id' => $this->contact->id, + 'pet_category_id' => rand(1, 11), + 'name' => (rand(1, 3) == 1) ? $this->faker->firstName : null, + 'created_at' => $date, + ]); + } + } + } + public function populateDayRatings() { for ($j = 0; $j < rand(10, 100); $j++) { diff --git a/docker/test-server.sh b/docker/test-server.sh index bf7b15a9551..bbf6d2bb2a5 100755 --- a/docker/test-server.sh +++ b/docker/test-server.sh @@ -7,6 +7,8 @@ ${ARTISAN} migrate --force ${ARTISAN} storage:link ${ARTISAN} db:seed --class ActivityTypesTableSeeder --force ${ARTISAN} db:seed --class CountriesSeederTable --force +chown -R monica:apache /var/www/monica/storage/app/public/ +chmod -R g+rw /var/www/monica/storage/app/public/ httpd while true; do sleep 60 diff --git a/public/js/app.js b/public/js/app.js index 917134cd860..32509077a3d 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -1,2 +1,2 @@ -!function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=0)}({"++lf":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={data:function(){return{showDescription:!1,activity:[]}},ready:function(){this.prepareComponent()},mounted:function(){this.prepareComponent()},props:["journalEntry"],methods:{prepareComponent:function(){this.activity=this.journalEntry.object},toggleDescription:function(){this.showDescription=!this.showDescription},redirect:function(t){window.location.href="/people/"+t.id}}}},"/fug":function(t,e,n){var r=n("KIYQ");"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);n("rjj0")("3f8d3a4e",r,!0)},0:function(t,e,n){n("sV/x"),t.exports=n("xZZD")},"06co":function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(e,"__esModule",{value:!0});var o,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.default={data:function(){return{contactAddresses:[],countries:[],editMode:!1,addMode:!1,createForm:{country_id:0,name:"",street:"",city:"",province:"",postal_code:""},updateForm:{id:"",country_id:0,name:"",street:"",city:"",province:"",postal_code:""}}},ready:function(){this.prepareComponent()},mounted:function(){this.prepareComponent()},props:["contactId"],methods:(o={prepareComponent:function(){this.getAddresses(),this.getCountries()},getAddresses:function(){var t=this;axios.get("/people/"+this.contactId+"/addresses").then(function(e){t.contactAddresses=e.data})},getCountries:function(){var t=this;axios.get("/people/"+this.contactId+"/countries").then(function(e){t.countries=e.data})},store:function(){this.persistClient("post","/people/"+this.contactId+"/contactfield",this.createForm),this.addMode=!1},reinitialize:function(){this.createForm.country_id="",this.createForm.name="",this.createForm.street="",this.createForm.city="",this.createForm.province="",this.createForm.postal_code=""},toggleAdd:function(){this.addMode=!0,this.reinitialize()},toggleEdit:function(t){Vue.set(t,"edit",!t.edit),this.updateForm.id=t.id,this.updateForm.country_id=t.country_id,this.updateForm.name=t.name,this.updateForm.street=t.street,this.updateForm.city=t.city,this.updateForm.province=t.province,this.updateForm.postal_code=t.postal_code}},r(o,"store",function(){this.persistClient("post","/people/"+this.contactId+"/addresses",this.createForm),this.addMode=!1}),r(o,"update",function(t){this.persistClient("put","/people/"+this.contactId+"/addresses/"+t.id,this.updateForm)}),r(o,"trash",function(t){this.updateForm.id=t.id,this.persistClient("delete","/people/"+this.contactId+"/addresses/"+t.id,this.updateForm),this.contactAddresses.length<=1&&(this.editMode=!1)}),r(o,"persistClient",function(t,e,n){var r=this;n.errors={},axios[t](e,n).then(function(t){r.getAddresses()}).catch(function(t){"object"===i(t.response.data)?n.errors=_.flatten(_.toArray(t.response.data)):n.errors=["Something went wrong. Please try again."]})}),o)}},"08dD":function(t,e,n){e=t.exports=n("FZ+f")(void 0),e.push([t.i,".action-link[data-v-e79f7702]{cursor:pointer}.m-b-none[data-v-e79f7702]{margin-bottom:0}",""])},1:function(t,e){},"162o":function(t,e,n){function r(t,e){this._id=t,this._clearFn=e}var o=Function.prototype.apply;e.setTimeout=function(){return new r(o.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new r(o.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n("mypn"),e.setImmediate=setImmediate,e.clearImmediate=clearImmediate},"21It":function(t,e,n){"use strict";var r=n("FtD3");t.exports=function(t,e,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n)):t(n)}},"25Ok":function(t,e,n){var r=n("08dD");"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);n("rjj0")("732c1475",r,!0)},"3IRH":function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},"3i4B":function(t,e,n){var r=n("6xni");"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);n("rjj0")("f0ad775e",r,!0)},"4iso":function(t,e){var n=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"panel panel-default"},[n("div",{staticClass:"panel-heading"},[n("div",{staticStyle:{display:"flex","justify-content":"space-between","align-items":"center"}},[n("span",[t._v("\n OAuth Clients\n ")]),t._v(" "),n("a",{staticClass:"btn",on:{click:t.showCreateClientForm}},[t._v("\n Create New Client\n ")])])]),t._v(" "),n("div",{staticClass:"panel-body"},[0===t.clients.length?n("p",{staticClass:"m-b-none"},[t._v("\n You have not created any OAuth clients.\n ")]):t._e(),t._v(" "),t.clients.length>0?n("table",{staticClass:"table table-borderless m-b-none"},[t._m(0),t._v(" "),n("tbody",t._l(t.clients,function(e){return n("tr",[n("td",{staticStyle:{"vertical-align":"middle"}},[t._v("\n "+t._s(e.id)+"\n ")]),t._v(" "),n("td",{staticStyle:{"vertical-align":"middle"}},[t._v("\n "+t._s(e.name)+"\n ")]),t._v(" "),n("td",{staticStyle:{"vertical-align":"middle"}},[n("code",[t._v(t._s(e.secret))])]),t._v(" "),n("td",{staticStyle:{"vertical-align":"middle"}},[n("a",{staticClass:"action-link",on:{click:function(n){t.edit(e)}}},[t._v("\n Edit\n ")])]),t._v(" "),n("td",{staticStyle:{"vertical-align":"middle"}},[n("a",{staticClass:"action-link text-danger",on:{click:function(n){t.destroy(e)}}},[t._v("\n Delete\n ")])])])}))]):t._e()])]),t._v(" "),n("div",{staticClass:"modal fade",attrs:{id:"modal-create-client",tabindex:"-1",role:"dialog"}},[n("div",{staticClass:"modal-dialog"},[n("div",{staticClass:"modal-content"},[t._m(1),t._v(" "),n("div",{staticClass:"modal-body"},[t.createForm.errors.length>0?n("div",{staticClass:"alert alert-danger"},[t._m(2),t._v(" "),n("br"),t._v(" "),n("ul",t._l(t.createForm.errors,function(e){return n("li",[t._v("\n "+t._s(e)+"\n ")])}))]):t._e(),t._v(" "),n("form",{staticClass:"form-horizontal",attrs:{role:"form"}},[n("div",{staticClass:"form-group"},[n("label",{staticClass:"col-md-3 control-label"},[t._v("Name")]),t._v(" "),n("div",{staticClass:"col-md-7"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.createForm.name,expression:"createForm.name"}],staticClass:"form-control",attrs:{id:"create-client-name",type:"text"},domProps:{value:t.createForm.name},on:{keyup:function(e){if(!("button"in e)&&t._k(e.keyCode,"enter",13,e.key))return null;t.store(e)},input:function(e){e.target.composing||t.$set(t.createForm,"name",e.target.value)}}}),t._v(" "),n("span",{staticClass:"help-block"},[t._v("\n Something your users will recognize and trust.\n ")])])]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",{staticClass:"col-md-3 control-label"},[t._v("Redirect URL")]),t._v(" "),n("div",{staticClass:"col-md-7"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.createForm.redirect,expression:"createForm.redirect"}],staticClass:"form-control",attrs:{type:"text",name:"redirect"},domProps:{value:t.createForm.redirect},on:{keyup:function(e){if(!("button"in e)&&t._k(e.keyCode,"enter",13,e.key))return null;t.store(e)},input:function(e){e.target.composing||t.$set(t.createForm,"redirect",e.target.value)}}}),t._v(" "),n("span",{staticClass:"help-block"},[t._v("\n Your application's authorization callback URL.\n ")])])])])]),t._v(" "),n("div",{staticClass:"modal-footer"},[n("button",{staticClass:"btn btn-default",attrs:{type:"button","data-dismiss":"modal"}},[t._v("Close")]),t._v(" "),n("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:t.store}},[t._v("\n Create\n ")])])])])]),t._v(" "),n("div",{staticClass:"modal fade",attrs:{id:"modal-edit-client",tabindex:"-1",role:"dialog"}},[n("div",{staticClass:"modal-dialog"},[n("div",{staticClass:"modal-content"},[t._m(3),t._v(" "),n("div",{staticClass:"modal-body"},[t.editForm.errors.length>0?n("div",{staticClass:"alert alert-danger"},[t._m(4),t._v(" "),n("br"),t._v(" "),n("ul",t._l(t.editForm.errors,function(e){return n("li",[t._v("\n "+t._s(e)+"\n ")])}))]):t._e(),t._v(" "),n("form",{staticClass:"form-horizontal",attrs:{role:"form"}},[n("div",{staticClass:"form-group"},[n("label",{staticClass:"col-md-3 control-label"},[t._v("Name")]),t._v(" "),n("div",{staticClass:"col-md-7"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.editForm.name,expression:"editForm.name"}],staticClass:"form-control",attrs:{id:"edit-client-name",type:"text"},domProps:{value:t.editForm.name},on:{keyup:function(e){if(!("button"in e)&&t._k(e.keyCode,"enter",13,e.key))return null;t.update(e)},input:function(e){e.target.composing||t.$set(t.editForm,"name",e.target.value)}}}),t._v(" "),n("span",{staticClass:"help-block"},[t._v("\n Something your users will recognize and trust.\n ")])])]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",{staticClass:"col-md-3 control-label"},[t._v("Redirect URL")]),t._v(" "),n("div",{staticClass:"col-md-7"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.editForm.redirect,expression:"editForm.redirect"}],staticClass:"form-control",attrs:{type:"text",name:"redirect"},domProps:{value:t.editForm.redirect},on:{keyup:function(e){if(!("button"in e)&&t._k(e.keyCode,"enter",13,e.key))return null;t.update(e)},input:function(e){e.target.composing||t.$set(t.editForm,"redirect",e.target.value)}}}),t._v(" "),n("span",{staticClass:"help-block"},[t._v("\n Your application's authorization callback URL.\n ")])])])])]),t._v(" "),n("div",{staticClass:"modal-footer"},[n("button",{staticClass:"btn btn-default",attrs:{type:"button","data-dismiss":"modal"}},[t._v("Close")]),t._v(" "),n("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:t.update}},[t._v("\n Save Changes\n ")])])])])])])},r=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("thead",[n("tr",[n("th",[t._v("Client ID")]),t._v(" "),n("th",[t._v("Name")]),t._v(" "),n("th",[t._v("Secret")]),t._v(" "),n("th"),t._v(" "),n("th")])])},function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"modal-header"},[n("button",{staticClass:"close",attrs:{type:"button ","data-dismiss":"modal","aria-hidden":"true"}},[t._v("×")]),t._v(" "),n("h4",{staticClass:"modal-title"},[t._v("\n Create Client\n ")])])},function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("p",[n("strong",[t._v("Whoops!")]),t._v(" Something went wrong!")])},function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"modal-header"},[n("button",{staticClass:"close",attrs:{type:"button ","data-dismiss":"modal","aria-hidden":"true"}},[t._v("×")]),t._v(" "),n("h4",{staticClass:"modal-title"},[t._v("\n Edit Client\n ")])])},function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("p",[n("strong",[t._v("Whoops!")]),t._v(" Something went wrong!")])}];t.exports={render:n,staticRenderFns:r}},"57NF":function(t,e,n){e=t.exports=n("FZ+f")(void 0),e.push([t.i,"",""])},"5VQ+":function(t,e,n){"use strict";var r=n("cGG2");t.exports=function(t,e){r.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})}},"6BIF":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.default={data:function(){return{contactInformationData:[],contactFieldTypes:[],editMode:!1,addMode:!1,updateMode:!1,createForm:{contact_field_type_id:"",data:"",errors:[]},updateForm:{id:"",contact_field_type_id:"",data:"",edit:!1,errors:[]}}},ready:function(){this.prepareComponent()},mounted:function(){this.prepareComponent()},props:["contactId"],methods:{prepareComponent:function(){this.getContactInformationData(),this.getContactFieldTypes()},getContactInformationData:function(){var t=this;axios.get("/people/"+this.contactId+"/contactfield").then(function(e){t.contactInformationData=e.data})},getContactFieldTypes:function(){var t=this;axios.get("/people/"+this.contactId+"/contactfieldtypes").then(function(e){t.contactFieldTypes=e.data})},store:function(){this.persistClient("post","/people/"+this.contactId+"/contactfield",this.createForm),this.addMode=!1},toggleAdd:function(){this.addMode=!0,this.createForm.data="",this.createForm.contact_field_type_id=""},toggleEdit:function(t){Vue.set(t,"edit",!t.edit),this.updateForm.id=t.id,this.updateForm.data=t.data,this.updateForm.contact_field_type_id=t.contact_field_type_id},update:function(t){this.persistClient("put","/people/"+this.contactId+"/contactfield/"+t.id,this.updateForm)},trash:function(t){this.updateForm.id=t.id,this.persistClient("delete","/people/"+this.contactId+"/contactfield/"+t.id,this.updateForm),this.contactInformationData.length<=1&&(this.editMode=!1)},persistClient:function(t,e,n){var o=this;n.errors={},axios[t](e,n).then(function(t){o.getContactInformationData()}).catch(function(t){"object"===r(t.response.data)?n.errors=_.flatten(_.toArray(t.response.data)):n.errors=["Something went wrong. Please try again."]})}}}},"6xni":function(t,e,n){e=t.exports=n("FZ+f")(void 0),e.push([t.i,"",""])},"72za":function(t,e,n){var r,o,i;!function(n,a){o=[e,t],r=a,void 0!==(i="function"==typeof r?r.apply(e,o):r)&&(t.exports=i)}(0,function(t,e){"use strict";var n=function(t){function e(t){return{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function n(t){return(t[0]||t).nodeType}function r(){return{bindType:a.end,delegateType:a.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}}}function o(){if(window.QUnit)return!1;var t=document.createElement("bootstrap");for(var e in s)if(void 0!==t.style[e])return{end:s[e]};return!1}function i(e){var n=this,r=!1;return t(this).one(u.TRANSITION_END,function(){r=!0}),setTimeout(function(){r||u.triggerTransitionEnd(n)},e),this}var a=!1,s={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},u={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement:function(t){var e=t.getAttribute("data-target");return e||(e=t.getAttribute("href")||"",e=/^#[a-z]/i.test(e)?e:null),e},reflow:function(t){new Function("bs","return bs")(t.offsetHeight)},triggerTransitionEnd:function(e){t(e).trigger(a.end)},supportsTransitionEnd:function(){return Boolean(a)},typeCheckConfig:function(t,r,o){for(var i in o)if(o.hasOwnProperty(i)){var a=o[i],s=r[i],u=void 0;if(u=s&&n(s)?"element":e(s),!new RegExp(a).test(u))throw new Error(t.toUpperCase()+': Option "'+i+'" provided type "'+u+'" but expected type "'+a+'".')}}};return function(){a=o(),t.fn.emulateTransitionEnd=i,u.supportsTransitionEnd()&&(t.event.special[u.TRANSITION_END]=r())}(),u}(jQuery);e.exports=n})},"7GwW":function(t,e,n){"use strict";var r=n("cGG2"),o=n("21It"),i=n("DQCr"),a=n("oJlt"),s=n("GHBc"),u=n("FtD3"),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n("thJu");t.exports=function(t){return new Promise(function(e,l){var f=t.data,d=t.headers;r.isFormData(f)&&delete d["Content-Type"];var p=new XMLHttpRequest,h="onreadystatechange",v=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in p||s(t.url)||(p=new window.XDomainRequest,h="onload",v=!0,p.onprogress=function(){},p.ontimeout=function(){}),t.auth){var m=t.auth.username||"",g=t.auth.password||"";d.Authorization="Basic "+c(m+":"+g)}if(p.open(t.method.toUpperCase(),i(t.url,t.params,t.paramsSerializer),!0),p.timeout=t.timeout,p[h]=function(){if(p&&(4===p.readyState||v)&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in p?a(p.getAllResponseHeaders()):null,r=t.responseType&&"text"!==t.responseType?p.response:p.responseText,i={data:r,status:1223===p.status?204:p.status,statusText:1223===p.status?"No Content":p.statusText,headers:n,config:t,request:p};o(e,l,i),p=null}},p.onerror=function(){l(u("Network Error",t)),p=null},p.ontimeout=function(){l(u("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED")),p=null},r.isStandardBrowserEnv()){var y=n("p1b6"),_=(t.withCredentials||s(t.url))&&t.xsrfCookieName?y.read(t.xsrfCookieName):void 0;_&&(d[t.xsrfHeaderName]=_)}if("setRequestHeader"in p&&r.forEach(d,function(t,e){void 0===f&&"content-type"===e.toLowerCase()?delete d[e]:p.setRequestHeader(e,t)}),t.withCredentials&&(p.withCredentials=!0),t.responseType)try{p.responseType=t.responseType}catch(t){if("json"!==p.responseType)throw t}"function"==typeof t.onDownloadProgress&&p.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){p&&(p.abort(),l(t),p=null)}),void 0===f&&(f=null),p.send(f)})}},"7t+N":function(t,e,n){var r,o;!function(e,n){"use strict";"object"==typeof t&&"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)}("undefined"!=typeof window?window:this,function(n,i){"use strict";function a(t,e){e=e||at;var n=e.createElement("script");n.text=t,e.head.appendChild(n).parentNode.removeChild(n)}function s(t){var e=!!t&&"length"in t&&t.length,n=yt.type(t);return"function"!==n&&!yt.isWindow(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function u(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}function c(t,e,n){return yt.isFunction(e)?yt.grep(t,function(t,r){return!!e.call(t,r,t)!==n}):e.nodeType?yt.grep(t,function(t){return t===e!==n}):"string"!=typeof e?yt.grep(t,function(t){return ft.call(e,t)>-1!==n}):St.test(e)?yt.filter(e,t,n):(e=yt.filter(e,t),yt.grep(t,function(t){return ft.call(e,t)>-1!==n&&1===t.nodeType}))}function l(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function f(t){var e={};return yt.each(t.match(Nt)||[],function(t,n){e[n]=!0}),e}function d(t){return t}function p(t){throw t}function h(t,e,n,r){var o;try{t&&yt.isFunction(o=t.promise)?o.call(t).done(e).fail(n):t&&yt.isFunction(o=t.then)?o.call(t,e,n):e.apply(void 0,[t].slice(r))}catch(t){n.apply(void 0,[t])}}function v(){at.removeEventListener("DOMContentLoaded",v),n.removeEventListener("load",v),yt.ready()}function m(){this.expando=yt.expando+m.uid++}function g(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:Bt.test(t)?JSON.parse(t):t)}function y(t,e,n){var r;if(void 0===n&&1===t.nodeType)if(r="data-"+e.replace(Ht,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(r))){try{n=g(n)}catch(t){}Rt.set(t,e,n)}else n=void 0;return n}function _(t,e,n,r){var o,i=1,a=20,s=r?function(){return r.cur()}:function(){return yt.css(t,e,"")},u=s(),c=n&&n[3]||(yt.cssNumber[e]?"":"px"),l=(yt.cssNumber[e]||"px"!==c&&+u)&&Wt.exec(yt.css(t,e));if(l&&l[3]!==c){c=c||l[3],n=n||[],l=+u||1;do{i=i||".5",l/=i,yt.style(t,e,l+c)}while(i!==(i=s()/u)&&1!==i&&--a)}return n&&(l=+l||+u||0,o=n[1]?l+(n[1]+1)*n[2]:+n[2],r&&(r.unit=c,r.start=l,r.end=o)),o}function b(t){var e,n=t.ownerDocument,r=t.nodeName,o=Vt[r];return o||(e=n.body.appendChild(n.createElement(r)),o=yt.css(e,"display"),e.parentNode.removeChild(e),"none"===o&&(o="block"),Vt[r]=o,o)}function C(t,e){for(var n,r,o=[],i=0,a=t.length;i-1)o&&o.push(i);else if(c=yt.contains(i.ownerDocument,i),a=w(f.appendChild(i),"script"),c&&x(a),n)for(l=0;i=a[l++];)Yt.test(i.type||"")&&n.push(i);return f}function E(){return!0}function T(){return!1}function A(){try{return at.activeElement}catch(t){}}function S(t,e,n,r,o,i){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=void 0);for(s in e)S(t,s,n,r,e[s],i);return t}if(null==r&&null==o?(o=n,r=n=void 0):null==o&&("string"==typeof n?(o=r,r=void 0):(o=r,r=n,n=void 0)),!1===o)o=T;else if(!o)return t;return 1===i&&(a=o,o=function(t){return yt().off(t),a.apply(this,arguments)},o.guid=a.guid||(a.guid=yt.guid++)),t.each(function(){yt.event.add(this,e,o,r,n)})}function L(t,e){return u(t,"table")&&u(11!==e.nodeType?e:e.firstChild,"tr")?yt(">tbody",t)[0]||t:t}function O(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function j(t){var e=ae.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function D(t,e){var n,r,o,i,a,s,u,c;if(1===e.nodeType){if(Pt.hasData(t)&&(i=Pt.access(t),a=Pt.set(e,i),c=i.events)){delete a.handle,a.events={};for(o in c)for(n=0,r=c[o].length;n1&&"string"==typeof h&&!gt.checkClone&&ie.test(h))return t.each(function(o){var i=t.eq(o);v&&(e[0]=h.call(this,o,i.html())),I(i,e,n,r)});if(d&&(o=k(e,t[0].ownerDocument,!1,t,r),i=o.firstChild,1===o.childNodes.length&&(o=i),i||r)){for(s=yt.map(w(o,"script"),O),u=s.length;f=0&&nC.cacheLength&&delete t[e.shift()],t[n+" "]=r}var e=[];return t}function r(t){return t[P]=!0,t}function o(t){var e=j.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function i(t,e){for(var n=t.split("|"),r=n.length;r--;)C.attrHandle[n[r]]=e}function a(t,e){var n=e&&t,r=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function s(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&wt(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function u(t){return r(function(e){return e=+e,r(function(n,r){for(var o,i=t([],n.length,e),a=i.length;a--;)n[o=i[a]]&&(n[o]=!(r[o]=n[o]))})})}function c(t){return t&&void 0!==t.getElementsByTagName&&t}function l(){}function f(t){for(var e=0,n=t.length,r="";e1?function(e,n,r){for(var o=t.length;o--;)if(!t[o](e,n,r))return!1;return!0}:t[0]}function h(t,n,r){for(var o=0,i=n.length;o-1&&(r[c]=!(a[c]=f))}}else _=v(_===a?_.splice(m,_.length):_),i?i(null,a,_,u):Y.apply(a,_)})}function g(t){for(var e,n,r,o=t.length,i=C.relative[t[0].type],a=i||C.relative[" "],s=i?1:0,u=d(function(t){return t===e},a,!0),c=d(function(t){return J(e,t)>-1},a,!0),l=[function(t,n,r){var o=!i&&(r||n!==A)||((e=n).nodeType?u(t,n,r):c(t,n,r));return e=null,o}];s1&&p(l),s>1&&f(t.slice(0,s-1).concat({value:" "===t[s-2].type?"*":""})).replace(it,"$1"),n,s0,i=t.length>0,a=function(r,a,s,u,c){var l,f,d,p=0,h="0",m=r&&[],g=[],y=A,_=r||i&&C.find.TAG("*",c),b=B+=null==y?1:Math.random()||.1,w=_.length;for(c&&(A=a===j||a||c);h!==w&&null!=(l=_[h]);h++){if(i&&l){for(f=0,a||l.ownerDocument===j||(O(l),s=!N);d=t[f++];)if(d(l,a||j,s)){u.push(l);break}c&&(B=b)}o&&((l=!d&&l)&&p--,r&&m.push(l))}if(p+=h,o&&h!==p){for(f=0;d=n[f++];)d(m,g,a,s);if(r){if(p>0)for(;h--;)m[h]||g[h]||(g[h]=K.call(u));g=v(g)}Y.apply(u,g),c&&!r&&g.length>0&&p+n.length>1&&e.uniqueSort(u)}return c&&(B=b,A=y),m};return o?r(a):a}var _,b,C,w,x,k,E,T,A,S,L,O,j,D,N,I,$,F,M,P="sizzle"+1*new Date,R=t.document,B=0,H=0,U=n(),W=n(),q=n(),z=function(t,e){return t===e&&(L=!0),0},G={}.hasOwnProperty,V=[],K=V.pop,Q=V.push,Y=V.push,X=V.slice,J=function(t,e){for(var n=0,r=t.length;n+~]|"+tt+")"+tt+"*"),ut=new RegExp("="+tt+"*([^\\]'\"]*?)"+tt+"*\\]","g"),ct=new RegExp(rt),lt=new RegExp("^"+et+"$"),ft={ID:new RegExp("^#("+et+")"),CLASS:new RegExp("^\\.("+et+")"),TAG:new RegExp("^("+et+"|[*])"),ATTR:new RegExp("^"+nt),PSEUDO:new RegExp("^"+rt),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+tt+"*(even|odd|(([+-]|)(\\d*)n|)"+tt+"*(?:([+-]|)"+tt+"*(\\d+)|))"+tt+"*\\)|)","i"),bool:new RegExp("^(?:"+Z+")$","i"),needsContext:new RegExp("^"+tt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+tt+"*((?:-\\d)?\\d*)"+tt+"*\\)|)(?=[^-]|$)","i")},dt=/^(?:input|select|textarea|button)$/i,pt=/^h\d$/i,ht=/^[^{]+\{\s*\[native \w/,vt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,mt=/[+~]/,gt=new RegExp("\\\\([\\da-f]{1,6}"+tt+"?|("+tt+")|.)","ig"),yt=function(t,e,n){var r="0x"+e-65536;return r!==r||n?e:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},_t=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,bt=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},Ct=function(){O()},wt=d(function(t){return!0===t.disabled&&("form"in t||"label"in t)},{dir:"parentNode",next:"legend"});try{Y.apply(V=X.call(R.childNodes),R.childNodes),V[R.childNodes.length].nodeType}catch(t){Y={apply:V.length?function(t,e){Q.apply(t,X.call(e))}:function(t,e){for(var n=t.length,r=0;t[n++]=e[r++];);t.length=n-1}}}b=e.support={},x=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},O=e.setDocument=function(t){var e,n,r=t?t.ownerDocument||t:R;return r!==j&&9===r.nodeType&&r.documentElement?(j=r,D=j.documentElement,N=!x(j),R!==j&&(n=j.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Ct,!1):n.attachEvent&&n.attachEvent("onunload",Ct)),b.attributes=o(function(t){return t.className="i",!t.getAttribute("className")}),b.getElementsByTagName=o(function(t){return t.appendChild(j.createComment("")),!t.getElementsByTagName("*").length}),b.getElementsByClassName=ht.test(j.getElementsByClassName),b.getById=o(function(t){return D.appendChild(t).id=P,!j.getElementsByName||!j.getElementsByName(P).length}),b.getById?(C.filter.ID=function(t){var e=t.replace(gt,yt);return function(t){return t.getAttribute("id")===e}},C.find.ID=function(t,e){if(void 0!==e.getElementById&&N){var n=e.getElementById(t);return n?[n]:[]}}):(C.filter.ID=function(t){var e=t.replace(gt,yt);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},C.find.ID=function(t,e){if(void 0!==e.getElementById&&N){var n,r,o,i=e.getElementById(t);if(i){if((n=i.getAttributeNode("id"))&&n.value===t)return[i];for(o=e.getElementsByName(t),r=0;i=o[r++];)if((n=i.getAttributeNode("id"))&&n.value===t)return[i]}return[]}}),C.find.TAG=b.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):b.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,r=[],o=0,i=e.getElementsByTagName(t);if("*"===t){for(;n=i[o++];)1===n.nodeType&&r.push(n);return r}return i},C.find.CLASS=b.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&N)return e.getElementsByClassName(t)},$=[],I=[],(b.qsa=ht.test(j.querySelectorAll))&&(o(function(t){D.appendChild(t).innerHTML="",t.querySelectorAll("[msallowcapture^='']").length&&I.push("[*^$]="+tt+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||I.push("\\["+tt+"*(?:value|"+Z+")"),t.querySelectorAll("[id~="+P+"-]").length||I.push("~="),t.querySelectorAll(":checked").length||I.push(":checked"),t.querySelectorAll("a#"+P+"+*").length||I.push(".#.+[+~]")}),o(function(t){t.innerHTML="";var e=j.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&I.push("name"+tt+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&I.push(":enabled",":disabled"),D.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&I.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),I.push(",.*:")})),(b.matchesSelector=ht.test(F=D.matches||D.webkitMatchesSelector||D.mozMatchesSelector||D.oMatchesSelector||D.msMatchesSelector))&&o(function(t){b.disconnectedMatch=F.call(t,"*"),F.call(t,"[s!='']:x"),$.push("!=",rt)}),I=I.length&&new RegExp(I.join("|")),$=$.length&&new RegExp($.join("|")),e=ht.test(D.compareDocumentPosition),M=e||ht.test(D.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,r=e&&e.parentNode;return t===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):t.compareDocumentPosition&&16&t.compareDocumentPosition(r)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},z=e?function(t,e){if(t===e)return L=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(n=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&n||!b.sortDetached&&e.compareDocumentPosition(t)===n?t===j||t.ownerDocument===R&&M(R,t)?-1:e===j||e.ownerDocument===R&&M(R,e)?1:S?J(S,t)-J(S,e):0:4&n?-1:1)}:function(t,e){if(t===e)return L=!0,0;var n,r=0,o=t.parentNode,i=e.parentNode,s=[t],u=[e];if(!o||!i)return t===j?-1:e===j?1:o?-1:i?1:S?J(S,t)-J(S,e):0;if(o===i)return a(t,e);for(n=t;n=n.parentNode;)s.unshift(n);for(n=e;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===R?-1:u[r]===R?1:0},j):j},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==j&&O(t),n=n.replace(ut,"='$1']"),b.matchesSelector&&N&&!q[n+" "]&&(!$||!$.test(n))&&(!I||!I.test(n)))try{var r=F.call(t,n);if(r||b.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(t){}return e(n,j,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==j&&O(t),M(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==j&&O(t);var n=C.attrHandle[e.toLowerCase()],r=n&&G.call(C.attrHandle,e.toLowerCase())?n(t,e,!N):void 0;return void 0!==r?r:b.attributes||!N?t.getAttribute(e):(r=t.getAttributeNode(e))&&r.specified?r.value:null},e.escape=function(t){return(t+"").replace(_t,bt)},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,n=[],r=0,o=0;if(L=!b.detectDuplicates,S=!b.sortStable&&t.slice(0),t.sort(z),L){for(;e=t[o++];)e===t[o]&&(r=n.push(o));for(;r--;)t.splice(n[r],1)}return S=null,t},w=e.getText=function(t){var e,n="",r=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=w(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[r++];)n+=w(e);return n},C=e.selectors={cacheLength:50,createPseudo:r,match:ft,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(gt,yt),t[3]=(t[3]||t[4]||t[5]||"").replace(gt,yt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return ft.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&ct.test(n)&&(e=k(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(gt,yt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=U[t+" "];return e||(e=new RegExp("(^|"+tt+")"+t+"("+tt+"|$)"))&&U(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,n,r){return function(o){var i=e.attr(o,t);return null==i?"!="===n:!n||(i+="","="===n?i===r:"!="===n?i!==r:"^="===n?r&&0===i.indexOf(r):"*="===n?r&&i.indexOf(r)>-1:"$="===n?r&&i.slice(-r.length)===r:"~="===n?(" "+i.replace(ot," ")+" ").indexOf(r)>-1:"|="===n&&(i===r||i.slice(0,r.length+1)===r+"-"))}},CHILD:function(t,e,n,r,o){var i="nth"!==t.slice(0,3),a="last"!==t.slice(-4),s="of-type"===e;return 1===r&&0===o?function(t){return!!t.parentNode}:function(e,n,u){var c,l,f,d,p,h,v=i!==a?"nextSibling":"previousSibling",m=e.parentNode,g=s&&e.nodeName.toLowerCase(),y=!u&&!s,_=!1;if(m){if(i){for(;v;){for(d=e;d=d[v];)if(s?d.nodeName.toLowerCase()===g:1===d.nodeType)return!1;h=v="only"===t&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&y){for(d=m,f=d[P]||(d[P]={}),l=f[d.uniqueID]||(f[d.uniqueID]={}),c=l[t]||[],p=c[0]===B&&c[1],_=p&&c[2],d=p&&m.childNodes[p];d=++p&&d&&d[v]||(_=p=0)||h.pop();)if(1===d.nodeType&&++_&&d===e){l[t]=[B,p,_];break}}else if(y&&(d=e,f=d[P]||(d[P]={}),l=f[d.uniqueID]||(f[d.uniqueID]={}),c=l[t]||[],p=c[0]===B&&c[1],_=p),!1===_)for(;(d=++p&&d&&d[v]||(_=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==g:1!==d.nodeType)||!++_||(y&&(f=d[P]||(d[P]={}),l=f[d.uniqueID]||(f[d.uniqueID]={}),l[t]=[B,_]),d!==e)););return(_-=o)===r||_%r==0&&_/r>=0}}},PSEUDO:function(t,n){var o,i=C.pseudos[t]||C.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return i[P]?i(n):i.length>1?(o=[t,t,"",n],C.setFilters.hasOwnProperty(t.toLowerCase())?r(function(t,e){for(var r,o=i(t,n),a=o.length;a--;)r=J(t,o[a]),t[r]=!(e[r]=o[a])}):function(t){return i(t,0,o)}):i}},pseudos:{not:r(function(t){var e=[],n=[],o=E(t.replace(it,"$1"));return o[P]?r(function(t,e,n,r){for(var i,a=o(t,null,r,[]),s=t.length;s--;)(i=a[s])&&(t[s]=!(e[s]=i))}):function(t,r,i){return e[0]=t,o(e,null,i,n),e[0]=null,!n.pop()}}),has:r(function(t){return function(n){return e(t,n).length>0}}),contains:r(function(t){return t=t.replace(gt,yt),function(e){return(e.textContent||e.innerText||w(e)).indexOf(t)>-1}}),lang:r(function(t){return lt.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(gt,yt).toLowerCase(),function(e){var n;do{if(n=N?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===D},focus:function(t){return t===j.activeElement&&(!j.hasFocus||j.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:s(!1),disabled:s(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!C.pseudos.empty(t)},header:function(t){return pt.test(t.nodeName)},input:function(t){return dt.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:u(function(){return[0]}),last:u(function(t,e){return[e-1]}),eq:u(function(t,e,n){return[n<0?n+e:n]}),even:u(function(t,e){for(var n=0;n=0;)t.push(r);return t}),gt:u(function(t,e,n){for(var r=n<0?n+e:n;++r2&&"ID"===(a=i[0]).type&&9===e.nodeType&&N&&C.relative[i[1].type]){if(!(e=(C.find.ID(a.matches[0].replace(gt,yt),e)||[])[0]))return n;l&&(e=e.parentNode),t=t.slice(i.shift().value.length)}for(o=ft.needsContext.test(t)?0:i.length;o--&&(a=i[o],!C.relative[s=a.type]);)if((u=C.find[s])&&(r=u(a.matches[0].replace(gt,yt),mt.test(i[0].type)&&c(e.parentNode)||e))){if(i.splice(o,1),!(t=r.length&&f(i)))return Y.apply(n,r),n;break}}return(l||E(t,d))(r,e,!N,n,!e||mt.test(t)&&c(e.parentNode)||e),n},b.sortStable=P.split("").sort(z).join("")===P,b.detectDuplicates=!!L,O(),b.sortDetached=o(function(t){return 1&t.compareDocumentPosition(j.createElement("fieldset"))}),o(function(t){return t.innerHTML="","#"===t.firstChild.getAttribute("href")})||i("type|href|height|width",function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),b.attributes&&o(function(t){return t.innerHTML="",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||i("value",function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),o(function(t){return null==t.getAttribute("disabled")})||i(Z,function(t,e,n){var r;if(!n)return!0===t[e]?e.toLowerCase():(r=t.getAttributeNode(e))&&r.specified?r.value:null}),e}(n);yt.find=xt,yt.expr=xt.selectors,yt.expr[":"]=yt.expr.pseudos,yt.uniqueSort=yt.unique=xt.uniqueSort,yt.text=xt.getText,yt.isXMLDoc=xt.isXML,yt.contains=xt.contains,yt.escapeSelector=xt.escape;var kt=function(t,e,n){for(var r=[],o=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(o&&yt(t).is(n))break;r.push(t)}return r},Et=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},Tt=yt.expr.match.needsContext,At=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,St=/^.[^:#\[\.,]*$/;yt.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?yt.find.matchesSelector(r,t)?[r]:[]:yt.find.matches(t,yt.grep(e,function(t){return 1===t.nodeType}))},yt.fn.extend({find:function(t){var e,n,r=this.length,o=this;if("string"!=typeof t)return this.pushStack(yt(t).filter(function(){for(e=0;e1?yt.uniqueSort(n):n},filter:function(t){return this.pushStack(c(this,t||[],!1))},not:function(t){return this.pushStack(c(this,t||[],!0))},is:function(t){return!!c(this,"string"==typeof t&&Tt.test(t)?yt(t):t||[],!1).length}});var Lt,Ot=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(yt.fn.init=function(t,e,n){var r,o;if(!t)return this;if(n=n||Lt,"string"==typeof t){if(!(r="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:Ot.exec(t))||!r[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(r[1]){if(e=e instanceof yt?e[0]:e,yt.merge(this,yt.parseHTML(r[1],e&&e.nodeType?e.ownerDocument||e:at,!0)),At.test(r[1])&&yt.isPlainObject(e))for(r in e)yt.isFunction(this[r])?this[r](e[r]):this.attr(r,e[r]);return this}return o=at.getElementById(r[2]),o&&(this[0]=o,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):yt.isFunction(t)?void 0!==n.ready?n.ready(t):t(yt):yt.makeArray(t,this)}).prototype=yt.fn,Lt=yt(at);var jt=/^(?:parents|prev(?:Until|All))/,Dt={children:!0,contents:!0,next:!0,prev:!0};yt.fn.extend({has:function(t){var e=yt(t,this),n=e.length;return this.filter(function(){for(var t=0;t-1:1===n.nodeType&&yt.find.matchesSelector(n,t))){i.push(n);break}return this.pushStack(i.length>1?yt.uniqueSort(i):i)},index:function(t){return t?"string"==typeof t?ft.call(yt(t),this[0]):ft.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(yt.uniqueSort(yt.merge(this.get(),yt(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),yt.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return kt(t,"parentNode")},parentsUntil:function(t,e,n){return kt(t,"parentNode",n)},next:function(t){return l(t,"nextSibling")},prev:function(t){return l(t,"previousSibling")},nextAll:function(t){return kt(t,"nextSibling")},prevAll:function(t){return kt(t,"previousSibling")},nextUntil:function(t,e,n){return kt(t,"nextSibling",n)},prevUntil:function(t,e,n){return kt(t,"previousSibling",n)},siblings:function(t){return Et((t.parentNode||{}).firstChild,t)},children:function(t){return Et(t.firstChild)},contents:function(t){return u(t,"iframe")?t.contentDocument:(u(t,"template")&&(t=t.content||t),yt.merge([],t.childNodes))}},function(t,e){yt.fn[t]=function(n,r){var o=yt.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(o=yt.filter(r,o)),this.length>1&&(Dt[t]||yt.uniqueSort(o),jt.test(t)&&o.reverse()),this.pushStack(o)}});var Nt=/[^\x20\t\r\n\f]+/g;yt.Callbacks=function(t){t="string"==typeof t?f(t):yt.extend({},t);var e,n,r,o,i=[],a=[],s=-1,u=function(){for(o=o||t.once,r=e=!0;a.length;s=-1)for(n=a.shift();++s-1;)i.splice(n,1),n<=s&&s--}),this},has:function(t){return t?yt.inArray(t,i)>-1:i.length>0},empty:function(){return i&&(i=[]),this},disable:function(){return o=a=[],i=n="",this},disabled:function(){return!i},lock:function(){return o=a=[],n||e||(i=n=""),this},locked:function(){return!!o},fireWith:function(t,n){return o||(n=n||[],n=[t,n.slice?n.slice():n],a.push(n),e||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},yt.extend({Deferred:function(t){var e=[["notify","progress",yt.Callbacks("memory"),yt.Callbacks("memory"),2],["resolve","done",yt.Callbacks("once memory"),yt.Callbacks("once memory"),0,"resolved"],["reject","fail",yt.Callbacks("once memory"),yt.Callbacks("once memory"),1,"rejected"]],r="pending",o={state:function(){return r},always:function(){return i.done(arguments).fail(arguments),this},catch:function(t){return o.then(null,t)},pipe:function(){var t=arguments;return yt.Deferred(function(n){yt.each(e,function(e,r){var o=yt.isFunction(t[r[4]])&&t[r[4]];i[r[1]](function(){var t=o&&o.apply(this,arguments);t&&yt.isFunction(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,o?[t]:arguments)})}),t=null}).promise()},then:function(t,r,o){function i(t,e,r,o){return function(){var s=this,u=arguments,c=function(){var n,c;if(!(t=a&&(r!==p&&(s=void 0,u=[n]),e.rejectWith(s,u))}};t?l():(yt.Deferred.getStackHook&&(l.stackTrace=yt.Deferred.getStackHook()),n.setTimeout(l))}}var a=0;return yt.Deferred(function(n){e[0][3].add(i(0,n,yt.isFunction(o)?o:d,n.notifyWith)),e[1][3].add(i(0,n,yt.isFunction(t)?t:d)),e[2][3].add(i(0,n,yt.isFunction(r)?r:p))}).promise()},promise:function(t){return null!=t?yt.extend(t,o):o}},i={};return yt.each(e,function(t,n){var a=n[2],s=n[5];o[n[1]]=a.add,s&&a.add(function(){r=s},e[3-t][2].disable,e[0][2].lock),a.add(n[3].fire),i[n[0]]=function(){return i[n[0]+"With"](this===i?void 0:this,arguments),this},i[n[0]+"With"]=a.fireWith}),o.promise(i),t&&t.call(i,i),i},when:function(t){var e=arguments.length,n=e,r=Array(n),o=ut.call(arguments),i=yt.Deferred(),a=function(t){return function(n){r[t]=this,o[t]=arguments.length>1?ut.call(arguments):n,--e||i.resolveWith(r,o)}};if(e<=1&&(h(t,i.done(a(n)).resolve,i.reject,!e),"pending"===i.state()||yt.isFunction(o[n]&&o[n].then)))return i.then();for(;n--;)h(o[n],a(n),i.reject);return i.promise()}});var It=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;yt.Deferred.exceptionHook=function(t,e){n.console&&n.console.warn&&t&&It.test(t.name)&&n.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},yt.readyException=function(t){n.setTimeout(function(){throw t})};var $t=yt.Deferred();yt.fn.ready=function(t){return $t.then(t).catch(function(t){yt.readyException(t)}),this},yt.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--yt.readyWait:yt.isReady)||(yt.isReady=!0,!0!==t&&--yt.readyWait>0||$t.resolveWith(at,[yt]))}}),yt.ready.then=$t.then,"complete"===at.readyState||"loading"!==at.readyState&&!at.documentElement.doScroll?n.setTimeout(yt.ready):(at.addEventListener("DOMContentLoaded",v),n.addEventListener("load",v));var Ft=function(t,e,n,r,o,i,a){var s=0,u=t.length,c=null==n;if("object"===yt.type(n)){o=!0;for(s in n)Ft(t,e,s,n[s],!0,i,a)}else if(void 0!==r&&(o=!0,yt.isFunction(r)||(a=!0),c&&(a?(e.call(t,r),e=null):(c=e,e=function(t,e,n){return c.call(yt(t),n)})),e))for(;s1,null,!0)},removeData:function(t){return this.each(function(){Rt.remove(this,t)})}}),yt.extend({queue:function(t,e,n){var r;if(t)return e=(e||"fx")+"queue",r=Pt.get(t,e),n&&(!r||Array.isArray(n)?r=Pt.access(t,e,yt.makeArray(n)):r.push(n)),r||[]},dequeue:function(t,e){e=e||"fx";var n=yt.queue(t,e),r=n.length,o=n.shift(),i=yt._queueHooks(t,e),a=function(){yt.dequeue(t,e)};"inprogress"===o&&(o=n.shift(),r--),o&&("fx"===e&&n.unshift("inprogress"),delete i.stop,o.call(t,a,i)),!r&&i&&i.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return Pt.get(t,n)||Pt.access(t,n,{empty:yt.Callbacks("once memory").add(function(){Pt.remove(t,[e+"queue",n])})})}}),yt.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length\x20\t\r\n\f]+)/i,Yt=/^$|\/(?:java|ecma)script/i,Xt={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};Xt.optgroup=Xt.option,Xt.tbody=Xt.tfoot=Xt.colgroup=Xt.caption=Xt.thead,Xt.th=Xt.td;var Jt=/<|&#?\w+;/;!function(){var t=at.createDocumentFragment(),e=t.appendChild(at.createElement("div")),n=at.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),e.appendChild(n),gt.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="",gt.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var Zt=at.documentElement,te=/^key/,ee=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ne=/^([^.]*)(?:\.(.+)|)/;yt.event={global:{},add:function(t,e,n,r,o){var i,a,s,u,c,l,f,d,p,h,v,m=Pt.get(t);if(m)for(n.handler&&(i=n,n=i.handler,o=i.selector),o&&yt.find.matchesSelector(Zt,o),n.guid||(n.guid=yt.guid++),(u=m.events)||(u=m.events={}),(a=m.handle)||(a=m.handle=function(e){return void 0!==yt&&yt.event.triggered!==e.type?yt.event.dispatch.apply(t,arguments):void 0}),e=(e||"").match(Nt)||[""],c=e.length;c--;)s=ne.exec(e[c])||[],p=v=s[1],h=(s[2]||"").split(".").sort(),p&&(f=yt.event.special[p]||{},p=(o?f.delegateType:f.bindType)||p,f=yt.event.special[p]||{},l=yt.extend({type:p,origType:v,data:r,handler:n,guid:n.guid,selector:o,needsContext:o&&yt.expr.match.needsContext.test(o),namespace:h.join(".")},i),(d=u[p])||(d=u[p]=[],d.delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(p,a)),f.add&&(f.add.call(t,l),l.handler.guid||(l.handler.guid=n.guid)),o?d.splice(d.delegateCount++,0,l):d.push(l),yt.event.global[p]=!0)},remove:function(t,e,n,r,o){var i,a,s,u,c,l,f,d,p,h,v,m=Pt.hasData(t)&&Pt.get(t);if(m&&(u=m.events)){for(e=(e||"").match(Nt)||[""],c=e.length;c--;)if(s=ne.exec(e[c])||[],p=v=s[1],h=(s[2]||"").split(".").sort(),p){for(f=yt.event.special[p]||{},p=(r?f.delegateType:f.bindType)||p,d=u[p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=i=d.length;i--;)l=d[i],!o&&v!==l.origType||n&&n.guid!==l.guid||s&&!s.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(d.splice(i,1),l.selector&&d.delegateCount--,f.remove&&f.remove.call(t,l));a&&!d.length&&(f.teardown&&!1!==f.teardown.call(t,h,m.handle)||yt.removeEvent(t,p,m.handle),delete u[p])}else for(p in u)yt.event.remove(t,p+e[c],n,r,!0);yt.isEmptyObject(u)&&Pt.remove(t,"handle events")}},dispatch:function(t){var e,n,r,o,i,a,s=yt.event.fix(t),u=new Array(arguments.length),c=(Pt.get(this,"events")||{})[s.type]||[],l=yt.event.special[s.type]||{};for(u[0]=s,e=1;e=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==t.type||!0!==c.disabled)){for(i=[],a={},n=0;n-1:yt.find(o,this,null,[c]).length),a[o]&&i.push(r);i.length&&s.push({elem:c,handlers:i})}return c=this,u\x20\t\r\n\f]*)[^>]*)\/>/gi,oe=/\s*$/g;yt.extend({htmlPrefilter:function(t){return t.replace(re,"<$1>")},clone:function(t,e,n){var r,o,i,a,s=t.cloneNode(!0),u=yt.contains(t.ownerDocument,t);if(!(gt.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||yt.isXMLDoc(t)))for(a=w(s),i=w(t),r=0,o=i.length;r0&&x(a,!u&&w(t,"script")),s},cleanData:function(t){for(var e,n,r,o=yt.event.special,i=0;void 0!==(n=t[i]);i++)if(Mt(n)){if(e=n[Pt.expando]){if(e.events)for(r in e.events)o[r]?yt.event.remove(n,r):yt.removeEvent(n,r,e.handle);n[Pt.expando]=void 0}n[Rt.expando]&&(n[Rt.expando]=void 0)}}}),yt.fn.extend({detach:function(t){return $(this,t,!0)},remove:function(t){return $(this,t)},text:function(t){return Ft(this,function(t){return void 0===t?yt.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return I(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){L(this,t).appendChild(t)}})},prepend:function(){return I(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=L(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return I(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return I(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(yt.cleanData(w(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return yt.clone(this,t,e)})},html:function(t){return Ft(this,function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!oe.test(t)&&!Xt[(Qt.exec(t)||["",""])[1].toLowerCase()]){t=yt.htmlPrefilter(t);try{for(;n1)}}),yt.Tween=W,W.prototype={constructor:W,init:function(t,e,n,r,o,i){this.elem=t,this.prop=n,this.easing=o||yt.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=i||(yt.cssNumber[n]?"":"px")},cur:function(){var t=W.propHooks[this.prop];return t&&t.get?t.get(this):W.propHooks._default.get(this)},run:function(t){var e,n=W.propHooks[this.prop];return this.options.duration?this.pos=e=yt.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):W.propHooks._default.set(this),this}},W.prototype.init.prototype=W.prototype,W.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=yt.css(t.elem,t.prop,""),e&&"auto"!==e?e:0)},set:function(t){yt.fx.step[t.prop]?yt.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[yt.cssProps[t.prop]]&&!yt.cssHooks[t.prop]?t.elem[t.prop]=t.now:yt.style(t.elem,t.prop,t.now+t.unit)}}},W.propHooks.scrollTop=W.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},yt.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},yt.fx=W.prototype.init,yt.fx.step={};var ge,ye,_e=/^(?:toggle|show|hide)$/,be=/queueHooks$/;yt.Animation=yt.extend(Y,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return _(n.elem,t,Wt.exec(e),n),n}]},tweener:function(t,e){yt.isFunction(t)?(e=t,t=["*"]):t=t.match(Nt);for(var n,r=0,o=t.length;r1)},removeAttr:function(t){return this.each(function(){yt.removeAttr(this,t)})}}),yt.extend({attr:function(t,e,n){var r,o,i=t.nodeType;if(3!==i&&8!==i&&2!==i)return void 0===t.getAttribute?yt.prop(t,e,n):(1===i&&yt.isXMLDoc(t)||(o=yt.attrHooks[e.toLowerCase()]||(yt.expr.match.bool.test(e)?Ce:void 0)),void 0!==n?null===n?void yt.removeAttr(t,e):o&&"set"in o&&void 0!==(r=o.set(t,n,e))?r:(t.setAttribute(e,n+""),n):o&&"get"in o&&null!==(r=o.get(t,e))?r:(r=yt.find.attr(t,e),null==r?void 0:r))},attrHooks:{type:{set:function(t,e){if(!gt.radioValue&&"radio"===e&&u(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,r=0,o=e&&e.match(Nt);if(o&&1===t.nodeType)for(;n=o[r++];)t.removeAttribute(n)}}),Ce={set:function(t,e,n){return!1===e?yt.removeAttr(t,n):t.setAttribute(n,n),n}},yt.each(yt.expr.match.bool.source.match(/\w+/g),function(t,e){var n=we[e]||yt.find.attr;we[e]=function(t,e,r){var o,i,a=e.toLowerCase();return r||(i=we[a],we[a]=o,o=null!=n(t,e,r)?a:null,we[a]=i),o}});var xe=/^(?:input|select|textarea|button)$/i,ke=/^(?:a|area)$/i;yt.fn.extend({prop:function(t,e){return Ft(this,yt.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[yt.propFix[t]||t]})}}),yt.extend({prop:function(t,e,n){var r,o,i=t.nodeType;if(3!==i&&8!==i&&2!==i)return 1===i&&yt.isXMLDoc(t)||(e=yt.propFix[e]||e,o=yt.propHooks[e]),void 0!==n?o&&"set"in o&&void 0!==(r=o.set(t,n,e))?r:t[e]=n:o&&"get"in o&&null!==(r=o.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=yt.find.attr(t,"tabindex");return e?parseInt(e,10):xe.test(t.nodeName)||ke.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),gt.optSelected||(yt.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),yt.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){yt.propFix[this.toLowerCase()]=this}),yt.fn.extend({addClass:function(t){var e,n,r,o,i,a,s,u=0;if(yt.isFunction(t))return this.each(function(e){yt(this).addClass(t.call(this,e,J(this)))});if("string"==typeof t&&t)for(e=t.match(Nt)||[];n=this[u++];)if(o=J(n),r=1===n.nodeType&&" "+X(o)+" "){for(a=0;i=e[a++];)r.indexOf(" "+i+" ")<0&&(r+=i+" ");s=X(r),o!==s&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,o,i,a,s,u=0;if(yt.isFunction(t))return this.each(function(e){yt(this).removeClass(t.call(this,e,J(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(Nt)||[];n=this[u++];)if(o=J(n),r=1===n.nodeType&&" "+X(o)+" "){for(a=0;i=e[a++];)for(;r.indexOf(" "+i+" ")>-1;)r=r.replace(" "+i+" "," ");s=X(r),o!==s&&n.setAttribute("class",s)}return this},toggleClass:function(t,e){var n=typeof t;return"boolean"==typeof e&&"string"===n?e?this.addClass(t):this.removeClass(t):yt.isFunction(t)?this.each(function(n){yt(this).toggleClass(t.call(this,n,J(this),e),e)}):this.each(function(){var e,r,o,i;if("string"===n)for(r=0,o=yt(this),i=t.match(Nt)||[];e=i[r++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else void 0!==t&&"boolean"!==n||(e=J(this),e&&Pt.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":Pt.get(this,"__className__")||""))})},hasClass:function(t){var e,n,r=0;for(e=" "+t+" ";n=this[r++];)if(1===n.nodeType&&(" "+X(J(n))+" ").indexOf(e)>-1)return!0;return!1}});var Ee=/\r/g;yt.fn.extend({val:function(t){var e,n,r,o=this[0];{if(arguments.length)return r=yt.isFunction(t),this.each(function(n){var o;1===this.nodeType&&(o=r?t.call(this,n,yt(this).val()):t,null==o?o="":"number"==typeof o?o+="":Array.isArray(o)&&(o=yt.map(o,function(t){return null==t?"":t+""})),(e=yt.valHooks[this.type]||yt.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,o,"value")||(this.value=o))});if(o)return(e=yt.valHooks[o.type]||yt.valHooks[o.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(o,"value"))?n:(n=o.value,"string"==typeof n?n.replace(Ee,""):null==n?"":n)}}}),yt.extend({valHooks:{option:{get:function(t){var e=yt.find.attr(t,"value");return null!=e?e:X(yt.text(t))}},select:{get:function(t){var e,n,r,o=t.options,i=t.selectedIndex,a="select-one"===t.type,s=a?null:[],c=a?i+1:o.length;for(r=i<0?c:a?i:0;r-1)&&(n=!0);return n||(t.selectedIndex=-1),i}}}}),yt.each(["radio","checkbox"],function(){yt.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=yt.inArray(yt(t).val(),e)>-1}},gt.checkOn||(yt.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var Te=/^(?:focusinfocus|focusoutblur)$/;yt.extend(yt.event,{trigger:function(t,e,r,o){var i,a,s,u,c,l,f,d=[r||at],p=ht.call(t,"type")?t.type:t,h=ht.call(t,"namespace")?t.namespace.split("."):[];if(a=s=r=r||at,3!==r.nodeType&&8!==r.nodeType&&!Te.test(p+yt.event.triggered)&&(p.indexOf(".")>-1&&(h=p.split("."),p=h.shift(),h.sort()),c=p.indexOf(":")<0&&"on"+p,t=t[yt.expando]?t:new yt.Event(p,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=h.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),e=null==e?[t]:yt.makeArray(e,[t]),f=yt.event.special[p]||{},o||!f.trigger||!1!==f.trigger.apply(r,e))){if(!o&&!f.noBubble&&!yt.isWindow(r)){for(u=f.delegateType||p,Te.test(u+p)||(a=a.parentNode);a;a=a.parentNode)d.push(a),s=a;s===(r.ownerDocument||at)&&d.push(s.defaultView||s.parentWindow||n)}for(i=0;(a=d[i++])&&!t.isPropagationStopped();)t.type=i>1?u:f.bindType||p,l=(Pt.get(a,"events")||{})[t.type]&&Pt.get(a,"handle"),l&&l.apply(a,e),(l=c&&a[c])&&l.apply&&Mt(a)&&(t.result=l.apply(a,e),!1===t.result&&t.preventDefault());return t.type=p,o||t.isDefaultPrevented()||f._default&&!1!==f._default.apply(d.pop(),e)||!Mt(r)||c&&yt.isFunction(r[p])&&!yt.isWindow(r)&&(s=r[c],s&&(r[c]=null),yt.event.triggered=p,r[p](),yt.event.triggered=void 0,s&&(r[c]=s)),t.result}},simulate:function(t,e,n){var r=yt.extend(new yt.Event,n,{type:t,isSimulated:!0});yt.event.trigger(r,null,e)}}),yt.fn.extend({trigger:function(t,e){return this.each(function(){yt.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];if(n)return yt.event.trigger(t,e,n,!0)}}),yt.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(t,e){yt.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),yt.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),gt.focusin="onfocusin"in n,gt.focusin||yt.each({focus:"focusin",blur:"focusout"},function(t,e){var n=function(t){yt.event.simulate(e,t.target,yt.event.fix(t))};yt.event.special[e]={setup:function(){var r=this.ownerDocument||this,o=Pt.access(r,e);o||r.addEventListener(t,n,!0),Pt.access(r,e,(o||0)+1)},teardown:function(){var r=this.ownerDocument||this,o=Pt.access(r,e)-1;o?Pt.access(r,e,o):(r.removeEventListener(t,n,!0),Pt.remove(r,e))}}});var Ae=n.location,Se=yt.now(),Le=/\?/;yt.parseXML=function(t){var e;if(!t||"string"!=typeof t)return null;try{e=(new n.DOMParser).parseFromString(t,"text/xml")}catch(t){e=void 0}return e&&!e.getElementsByTagName("parsererror").length||yt.error("Invalid XML: "+t),e};var Oe=/\[\]$/,je=/\r?\n/g,De=/^(?:submit|button|image|reset|file)$/i,Ne=/^(?:input|select|textarea|keygen)/i;yt.param=function(t,e){var n,r=[],o=function(t,e){var n=yt.isFunction(e)?e():e;r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(t)||t.jquery&&!yt.isPlainObject(t))yt.each(t,function(){o(this.name,this.value)});else for(n in t)Z(n,t[n],e,o);return r.join("&")},yt.fn.extend({serialize:function(){return yt.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=yt.prop(this,"elements");return t?yt.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!yt(this).is(":disabled")&&Ne.test(this.nodeName)&&!De.test(t)&&(this.checked||!Kt.test(t))}).map(function(t,e){var n=yt(this).val();return null==n?null:Array.isArray(n)?yt.map(n,function(t){return{name:e.name,value:t.replace(je,"\r\n")}}):{name:e.name,value:n.replace(je,"\r\n")}}).get()}});var Ie=/%20/g,$e=/#.*$/,Fe=/([?&])_=[^&]*/,Me=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pe=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Re=/^(?:GET|HEAD)$/,Be=/^\/\//,He={},Ue={},We="*/".concat("*"),qe=at.createElement("a");qe.href=Ae.href,yt.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ae.href,type:"GET",isLocal:Pe.test(Ae.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":We,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":yt.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?nt(nt(t,yt.ajaxSettings),e):nt(yt.ajaxSettings,t)},ajaxPrefilter:tt(He),ajaxTransport:tt(Ue),ajax:function(t,e){function r(t,e,r,s){var c,d,p,b,C,w=e;l||(l=!0,u&&n.clearTimeout(u),o=void 0,a=s||"",x.readyState=t>0?4:0,c=t>=200&&t<300||304===t,r&&(b=rt(h,x,r)),b=ot(h,b,x,c),c?(h.ifModified&&(C=x.getResponseHeader("Last-Modified"),C&&(yt.lastModified[i]=C),(C=x.getResponseHeader("etag"))&&(yt.etag[i]=C)),204===t||"HEAD"===h.type?w="nocontent":304===t?w="notmodified":(w=b.state,d=b.data,p=b.error,c=!p)):(p=w,!t&&w||(w="error",t<0&&(t=0))),x.status=t,x.statusText=(e||w)+"",c?g.resolveWith(v,[d,w,x]):g.rejectWith(v,[x,w,p]),x.statusCode(_),_=void 0,f&&m.trigger(c?"ajaxSuccess":"ajaxError",[x,h,c?d:p]),y.fireWith(v,[x,w]),f&&(m.trigger("ajaxComplete",[x,h]),--yt.active||yt.event.trigger("ajaxStop")))}"object"==typeof t&&(e=t,t=void 0),e=e||{};var o,i,a,s,u,c,l,f,d,p,h=yt.ajaxSetup({},e),v=h.context||h,m=h.context&&(v.nodeType||v.jquery)?yt(v):yt.event,g=yt.Deferred(),y=yt.Callbacks("once memory"),_=h.statusCode||{},b={},C={},w="canceled",x={readyState:0,getResponseHeader:function(t){var e;if(l){if(!s)for(s={};e=Me.exec(a);)s[e[1].toLowerCase()]=e[2];e=s[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return l?a:null},setRequestHeader:function(t,e){return null==l&&(t=C[t.toLowerCase()]=C[t.toLowerCase()]||t,b[t]=e),this},overrideMimeType:function(t){return null==l&&(h.mimeType=t),this},statusCode:function(t){var e;if(t)if(l)x.always(t[x.status]);else for(e in t)_[e]=[_[e],t[e]];return this},abort:function(t){var e=t||w;return o&&o.abort(e),r(0,e),this}};if(g.promise(x),h.url=((t||h.url||Ae.href)+"").replace(Be,Ae.protocol+"//"),h.type=e.method||e.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(Nt)||[""],null==h.crossDomain){c=at.createElement("a");try{c.href=h.url,c.href=c.href,h.crossDomain=qe.protocol+"//"+qe.host!=c.protocol+"//"+c.host}catch(t){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=yt.param(h.data,h.traditional)),et(He,h,e,x),l)return x;f=yt.event&&h.global,f&&0==yt.active++&&yt.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Re.test(h.type),i=h.url.replace($e,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(Ie,"+")):(p=h.url.slice(i.length),h.data&&(i+=(Le.test(i)?"&":"?")+h.data,delete h.data),!1===h.cache&&(i=i.replace(Fe,"$1"),p=(Le.test(i)?"&":"?")+"_="+Se+++p),h.url=i+p),h.ifModified&&(yt.lastModified[i]&&x.setRequestHeader("If-Modified-Since",yt.lastModified[i]),yt.etag[i]&&x.setRequestHeader("If-None-Match",yt.etag[i])),(h.data&&h.hasContent&&!1!==h.contentType||e.contentType)&&x.setRequestHeader("Content-Type",h.contentType),x.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+We+"; q=0.01":""):h.accepts["*"]);for(d in h.headers)x.setRequestHeader(d,h.headers[d]);if(h.beforeSend&&(!1===h.beforeSend.call(v,x,h)||l))return x.abort();if(w="abort",y.add(h.complete),x.done(h.success),x.fail(h.error),o=et(Ue,h,e,x)){if(x.readyState=1,f&&m.trigger("ajaxSend",[x,h]),l)return x;h.async&&h.timeout>0&&(u=n.setTimeout(function(){x.abort("timeout")},h.timeout));try{l=!1,o.send(b,r)}catch(t){if(l)throw t;r(-1,t)}}else r(-1,"No Transport");return x},getJSON:function(t,e,n){return yt.get(t,e,n,"json")},getScript:function(t,e){return yt.get(t,void 0,e,"script")}}),yt.each(["get","post"],function(t,e){yt[e]=function(t,n,r,o){return yt.isFunction(n)&&(o=o||r,r=n,n=void 0),yt.ajax(yt.extend({url:t,type:e,dataType:o,data:n,success:r},yt.isPlainObject(t)&&t))}}),yt._evalUrl=function(t){return yt.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},yt.fn.extend({wrapAll:function(t){var e;return this[0]&&(yt.isFunction(t)&&(t=t.call(this[0])),e=yt(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this},wrapInner:function(t){return yt.isFunction(t)?this.each(function(e){yt(this).wrapInner(t.call(this,e))}):this.each(function(){var e=yt(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=yt.isFunction(t);return this.each(function(n){yt(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(t){return this.parent(t).not("body").each(function(){yt(this).replaceWith(this.childNodes)}),this}}),yt.expr.pseudos.hidden=function(t){return!yt.expr.pseudos.visible(t)},yt.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},yt.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(t){}};var ze={0:200,1223:204},Ge=yt.ajaxSettings.xhr();gt.cors=!!Ge&&"withCredentials"in Ge,gt.ajax=Ge=!!Ge,yt.ajaxTransport(function(t){var e,r;if(gt.cors||Ge&&!t.crossDomain)return{send:function(o,i){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest");for(a in o)s.setRequestHeader(a,o[a]);e=function(t){return function(){e&&(e=r=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===t?s.abort():"error"===t?"number"!=typeof s.status?i(0,"error"):i(s.status,s.statusText):i(ze[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=e(),r=s.onerror=e("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout(function(){e&&r()})},e=e("abort");try{s.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}}),yt.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),yt.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return yt.globalEval(t),t}}}),yt.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),yt.ajaxTransport("script",function(t){if(t.crossDomain){var e,n;return{send:function(r,o){e=yt(" diff --git a/resources/lang/cz/people.php b/resources/lang/cz/people.php index a525e7e83ca..01adf92fda3 100644 --- a/resources/lang/cz/people.php +++ b/resources/lang/cz/people.php @@ -332,4 +332,23 @@ 'contact_address_form_province' => 'Province (optional)', 'contact_address_form_postal_code' => 'Postal code (optional)', 'contact_address_form_country' => 'Country (optional)', + + // Pets + 'pets_kind' => 'Kind of pet', + 'pets_name' => 'Name (optional)', + 'pets_create_success' => 'The pet has been sucessfully added', + 'pets_update_success' => 'The pet has been updated', + 'pets_delete_success' => 'The pet has been deleted', + 'pets_title' => 'Pets', + 'pets_reptile' => 'Reptile', + 'pets_bird' => 'Bird', + 'pets_cat' => 'Cat', + 'pets_dog' => 'Dog', + 'pets_fish' => 'Fish', + 'pets_hamster' => 'Hamster', + 'pets_horse' => 'Horse', + 'pets_rabbit' => 'Rabbit', + 'pets_rat' => 'Rat', + 'pets_small_animal' => 'Small animal', + 'pets_other' => 'Other', ]; diff --git a/resources/lang/de/people.php b/resources/lang/de/people.php index 6279944d5e5..e7ded1e0d7d 100644 --- a/resources/lang/de/people.php +++ b/resources/lang/de/people.php @@ -334,4 +334,23 @@ 'contact_address_form_province' => 'Province (optional)', 'contact_address_form_postal_code' => 'Postal code (optional)', 'contact_address_form_country' => 'Country (optional)', + + // Pets + 'pets_kind' => 'Kind of pet', + 'pets_name' => 'Name (optional)', + 'pets_create_success' => 'The pet has been sucessfully added', + 'pets_update_success' => 'The pet has been updated', + 'pets_delete_success' => 'The pet has been deleted', + 'pets_title' => 'Pets', + 'pets_reptile' => 'Reptile', + 'pets_bird' => 'Bird', + 'pets_cat' => 'Cat', + 'pets_dog' => 'Dog', + 'pets_fish' => 'Fish', + 'pets_hamster' => 'Hamster', + 'pets_horse' => 'Horse', + 'pets_rabbit' => 'Rabbit', + 'pets_rat' => 'Rat', + 'pets_small_animal' => 'Small animal', + 'pets_other' => 'Other', ]; diff --git a/resources/lang/en/people.php b/resources/lang/en/people.php index a5b0dd4f3ef..7c5b34c38c5 100644 --- a/resources/lang/en/people.php +++ b/resources/lang/en/people.php @@ -335,4 +335,23 @@ 'contact_address_form_province' => 'Province (optional)', 'contact_address_form_postal_code' => 'Postal code (optional)', 'contact_address_form_country' => 'Country (optional)', + + // Pets + 'pets_kind' => 'Kind of pet', + 'pets_name' => 'Name (optional)', + 'pets_create_success' => 'The pet has been sucessfully added', + 'pets_update_success' => 'The pet has been updated', + 'pets_delete_success' => 'The pet has been deleted', + 'pets_title' => 'Pets', + 'pets_reptile' => 'Reptile', + 'pets_bird' => 'Bird', + 'pets_cat' => 'Cat', + 'pets_dog' => 'Dog', + 'pets_fish' => 'Fish', + 'pets_hamster' => 'Hamster', + 'pets_horse' => 'Horse', + 'pets_rabbit' => 'Rabbit', + 'pets_rat' => 'Rat', + 'pets_small_animal' => 'Small animal', + 'pets_other' => 'Other', ]; diff --git a/resources/lang/fr/people.php b/resources/lang/fr/people.php index e60796b7490..13031f8ffbd 100644 --- a/resources/lang/fr/people.php +++ b/resources/lang/fr/people.php @@ -338,4 +338,23 @@ 'contact_address_form_province' => 'Province (optionnel)', 'contact_address_form_postal_code' => 'Code postal (optionnel)', 'contact_address_form_country' => 'Pays (optionnel)', + + // Pets + 'pets_kind' => 'Sorte d\'animal', + 'pets_name' => 'Nom (optionel)', + 'pets_create_success' => 'L\'animal a été ajouté avec succès', + 'pets_update_success' => 'L\'animal a été mis à jour', + 'pets_delete_success' => 'L\'animal a été supprimé', + 'pets_title' => 'Pets', + 'pets_reptile' => 'Reptile', + 'pets_bird' => 'Oiseau', + 'pets_cat' => 'Chat', + 'pets_dog' => 'Chien', + 'pets_fish' => 'Poisson', + 'pets_hamster' => 'Hamster', + 'pets_horse' => 'Cheval', + 'pets_rabbit' => 'Lapin', + 'pets_rat' => 'Rat', + 'pets_small_animal' => 'Petit animal', + 'pets_other' => 'Autre', ]; diff --git a/resources/lang/it/people.php b/resources/lang/it/people.php index 170c20d85da..150e3bdad6c 100644 --- a/resources/lang/it/people.php +++ b/resources/lang/it/people.php @@ -327,4 +327,23 @@ 'contact_address_form_province' => 'Provincia (facoltativa)', 'contact_address_form_postal_code' => 'Codice postale (facoltativa)', 'contact_address_form_country' => 'Regione (facoltativa)', + + // Pets + 'pets_kind' => 'Kind of pet', + 'pets_name' => 'Name (optional)', + 'pets_create_success' => 'The pet has been sucessfully added', + 'pets_update_success' => 'The pet has been updated', + 'pets_delete_success' => 'The pet has been deleted', + 'pets_title' => 'Pets', + 'pets_reptile' => 'Reptile', + 'pets_bird' => 'Bird', + 'pets_cat' => 'Cat', + 'pets_dog' => 'Dog', + 'pets_fish' => 'Fish', + 'pets_hamster' => 'Hamster', + 'pets_horse' => 'Horse', + 'pets_rabbit' => 'Rabbit', + 'pets_rat' => 'Rat', + 'pets_small_animal' => 'Small animal', + 'pets_other' => 'Other', ]; diff --git a/resources/lang/pt-br/people.php b/resources/lang/pt-br/people.php index cc32416bd31..6de1ef7219e 100644 --- a/resources/lang/pt-br/people.php +++ b/resources/lang/pt-br/people.php @@ -333,4 +333,23 @@ 'contact_address_form_province' => 'Province (optional)', 'contact_address_form_postal_code' => 'Postal code (optional)', 'contact_address_form_country' => 'Country (optional)', + + // Pets + 'pets_kind' => 'Kind of pet', + 'pets_name' => 'Name (optional)', + 'pets_create_success' => 'The pet has been sucessfully added', + 'pets_update_success' => 'The pet has been updated', + 'pets_delete_success' => 'The pet has been deleted', + 'pets_title' => 'Pets', + 'pets_reptile' => 'Reptile', + 'pets_bird' => 'Bird', + 'pets_cat' => 'Cat', + 'pets_dog' => 'Dog', + 'pets_fish' => 'Fish', + 'pets_hamster' => 'Hamster', + 'pets_horse' => 'Horse', + 'pets_rabbit' => 'Rabbit', + 'pets_rat' => 'Rat', + 'pets_small_animal' => 'Small animal', + 'pets_other' => 'Other', ]; diff --git a/resources/lang/ru/people.php b/resources/lang/ru/people.php index 7e2a8de0916..97b98f07eed 100644 --- a/resources/lang/ru/people.php +++ b/resources/lang/ru/people.php @@ -333,4 +333,23 @@ 'contact_address_form_province' => 'Province (optional)', 'contact_address_form_postal_code' => 'Postal code (optional)', 'contact_address_form_country' => 'Country (optional)', + + // Pets + 'pets_kind' => 'Kind of pet', + 'pets_name' => 'Name (optional)', + 'pets_create_success' => 'The pet has been sucessfully added', + 'pets_update_success' => 'The pet has been updated', + 'pets_delete_success' => 'The pet has been deleted', + 'pets_title' => 'Pets', + 'pets_reptile' => 'Reptile', + 'pets_bird' => 'Bird', + 'pets_cat' => 'Cat', + 'pets_dog' => 'Dog', + 'pets_fish' => 'Fish', + 'pets_hamster' => 'Hamster', + 'pets_horse' => 'Horse', + 'pets_rabbit' => 'Rabbit', + 'pets_rat' => 'Rat', + 'pets_small_animal' => 'Small animal', + 'pets_other' => 'Other', ]; diff --git a/resources/views/people/dashboard/index.blade.php b/resources/views/people/dashboard/index.blade.php index 3c8e3689b6a..7320221ae6f 100644 --- a/resources/views/people/dashboard/index.blade.php +++ b/resources/views/people/dashboard/index.blade.php @@ -7,6 +7,9 @@ {{-- Progenitors --}} @include('people.progenitors.index') +{{-- Pets --}} + + {{-- Contact information --}} diff --git a/routes/web.php b/routes/web.php index 06cf28c819c..5779f98ad01 100644 --- a/routes/web.php +++ b/routes/web.php @@ -93,6 +93,13 @@ Route::delete('/people/{contact}/relationships/{partner}', 'Contacts\\RelationshipsController@destroy')->name('.relationships.delete'); Route::post('/people/{contact}/relationships/{partner}/unlink', 'Contacts\\RelationshipsController@unlink')->name('.relationships.unlink'); + // Pets + Route::get('/people/{contact}/pets', 'Contacts\\PetsController@get'); + Route::post('/people/{contact}/pet', 'Contacts\\PetsController@store'); + Route::put('/people/{contact}/pet/{pet}', 'Contacts\\PetsController@update'); + Route::delete('/people/{contact}/pet/{pet}', 'Contacts\\PetsController@trash'); + Route::get('/petcategories', 'Contacts\\PetsController@getPetCategories'); + // Reminders Route::get('/people/{contact}/reminders/add', 'Contacts\\RemindersController@create')->name('.reminders.add'); Route::post('/people/{contact}/reminders/store', 'Contacts\\RemindersController@store')->name('.reminders.store');