diff --git a/extend.php b/extend.php index 98600b7..8146410 100644 --- a/extend.php +++ b/extend.php @@ -28,7 +28,6 @@ new Extend\Locales(__DIR__.'/locale'), (new Extend\Event()) - ->listen(Serializing::class, AddCountryFlagAttributes::class) ->listen(Saving::class, SaveCountryCodeToDatabase::class), (new Extend\ApiSerializer(UserSerializer::class)) diff --git a/js/dist/forum.js b/js/dist/forum.js index 9f88c24..829a37b 100644 --- a/js/dist/forum.js +++ b/js/dist/forum.js @@ -1,2 +1,2 @@ -module.exports=function(o){var a={};function n(e){if(a[e])return a[e].exports;var t=a[e]={i:e,l:!1,exports:{}};return o[e].call(t.exports,t,t.exports,n),t.l=!0,t.exports}return n.m=o,n.c=a,n.d=function(o,a,e){n.o(o,a)||Object.defineProperty(o,a,{enumerable:!0,get:e})},n.r=function(o){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},n.t=function(o,a){if(1&a&&(o=n(o)),8&a)return o;if(4&a&&"object"==typeof o&&o&&o.__esModule)return o;var e=Object.create(null);if(n.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:o}),2&a&&"string"!=typeof o)for(var t in o)n.d(e,t,function(a){return o[a]}.bind(null,t));return e},n.n=function(o){var a=o&&o.__esModule?function(){return o.default}:function(){return o};return n.d(a,"a",a),a},n.o=function(o,a){return Object.prototype.hasOwnProperty.call(o,a)},n.p="",n(n.s=11)}([function(o,a){o.exports=flarum.core.compat["forum/app"]},function(o,a){o.exports=flarum.core.compat["common/extend"]},function(o,a){o.exports=flarum.core.compat["forum/components/EditUserModal"]},,function(o,a){o.exports=flarum.core.compat["forum/components/SettingsPage"]},function(o,a){o.exports=flarum.core.compat["common/models/User"]},function(o,a){o.exports=flarum.core.compat["common/Model"]},function(o,a){o.exports=flarum.core.compat.Component},function(o,a){o.exports=flarum.core.compat["forum/components/UserCard"]},function(o,a){o.exports=flarum.core.compat["utils/Stream"]},,function(o,a,n){"use strict";n.r(a);var e=n(0),t=n.n(e),i=n(1),u=n(4),l=n.n(u),p=n(5),r=n.n(p),v=n(6),s=n.n(v);function c(o,a){return(c=Object.setPrototypeOf||function(o,a){return o.__proto__=a,o})(o,a)}var d=n(7),S=function(o){var a,n;function e(){return o.apply(this,arguments)||this}n=o,(a=e).prototype=Object.create(n.prototype),a.prototype.constructor=a,c(a,n);var i=e.prototype;return i.oninit=function(a){o.prototype.oninit.call(this,a),this.countryCode=t.a.session.user.countryCode()},i.view=function(o){return m("fieldset",{className:"Settings-theme"},m("legend",null,"Country Code"),m("select",{className:"FormControl countryCode",id:"country",name:"country",value:this.countryCode,onblur:this.saveValue.bind(this)},m("option",null,"select country"),m("option",{value:"AF"},"Afghanistan"),m("option",{value:"AX"},"Aland Islands"),m("option",{value:"AL"},"Albania"),m("option",{value:"DZ"},"Algeria"),m("option",{value:"AS"},"American Samoa"),m("option",{value:"AD"},"Andorra"),m("option",{value:"AO"},"Angola"),m("option",{value:"AI"},"Anguilla"),m("option",{value:"AQ"},"Antarctica"),m("option",{value:"AG"},"Antigua and Barbuda"),m("option",{value:"AR"},"Argentina"),m("option",{value:"AM"},"Armenia"),m("option",{value:"AW"},"Aruba"),m("option",{value:"AU"},"Australia"),m("option",{value:"AT"},"Austria"),m("option",{value:"AZ"},"Azerbaijan"),m("option",{value:"BS"},"Bahamas"),m("option",{value:"BH"},"Bahrain"),m("option",{value:"BD"},"Bangladesh"),m("option",{value:"BB"},"Barbados"),m("option",{value:"BY"},"Belarus"),m("option",{value:"BE"},"Belgium"),m("option",{value:"BZ"},"Belize"),m("option",{value:"BJ"},"Benin"),m("option",{value:"BM"},"Bermuda"),m("option",{value:"BT"},"Bhutan"),m("option",{value:"BO"},"Bolivia"),m("option",{value:"BQ"},"Bonaire, Sint Eustatius and Saba"),m("option",{value:"BA"},"Bosnia and Herzegovina"),m("option",{value:"BW"},"Botswana"),m("option",{value:"BV"},"Bouvet Island"),m("option",{value:"BR"},"Brazil"),m("option",{value:"IO"},"British Indian Ocean Territory"),m("option",{value:"BN"},"Brunei Darussalam"),m("option",{value:"BG"},"Bulgaria"),m("option",{value:"BF"},"Burkina Faso"),m("option",{value:"BI"},"Burundi"),m("option",{value:"KH"},"Cambodia"),m("option",{value:"CM"},"Cameroon"),m("option",{value:"CA"},"Canada"),m("option",{value:"CV"},"Cape Verde"),m("option",{value:"KY"},"Cayman Islands"),m("option",{value:"CF"},"Central African Republic"),m("option",{value:"TD"},"Chad"),m("option",{value:"CL"},"Chile"),m("option",{value:"CN"},"China"),m("option",{value:"CX"},"Christmas Island"),m("option",{value:"CC"},"Cocos (Keeling) Islands"),m("option",{value:"CO"},"Colombia"),m("option",{value:"KM"},"Comoros"),m("option",{value:"CG"},"Congo"),m("option",{value:"CD"},"Congo, Democratic Republic of the Congo"),m("option",{value:"CK"},"Cook Islands"),m("option",{value:"CR"},"Costa Rica"),m("option",{value:"CI"},"Cote D'Ivoire"),m("option",{value:"HR"},"Croatia"),m("option",{value:"CU"},"Cuba"),m("option",{value:"CW"},"Curacao"),m("option",{value:"CY"},"Cyprus"),m("option",{value:"CZ"},"Czech Republic"),m("option",{value:"DK"},"Denmark"),m("option",{value:"DJ"},"Djibouti"),m("option",{value:"DM"},"Dominica"),m("option",{value:"DO"},"Dominican Republic"),m("option",{value:"EC"},"Ecuador"),m("option",{value:"EG"},"Egypt"),m("option",{value:"SV"},"El Salvador"),m("option",{value:"GQ"},"Equatorial Guinea"),m("option",{value:"ER"},"Eritrea"),m("option",{value:"EE"},"Estonia"),m("option",{value:"ET"},"Ethiopia"),m("option",{value:"FK"},"Falkland Islands (Malvinas)"),m("option",{value:"FO"},"Faroe Islands"),m("option",{value:"FJ"},"Fiji"),m("option",{value:"FI"},"Finland"),m("option",{value:"FR"},"France"),m("option",{value:"GF"},"French Guiana"),m("option",{value:"PF"},"French Polynesia"),m("option",{value:"TF"},"French Southern Territories"),m("option",{value:"GA"},"Gabon"),m("option",{value:"GM"},"Gambia"),m("option",{value:"GE"},"Georgia"),m("option",{value:"DE"},"Germany"),m("option",{value:"GH"},"Ghana"),m("option",{value:"GI"},"Gibraltar"),m("option",{value:"GR"},"Greece"),m("option",{value:"GL"},"Greenland"),m("option",{value:"GD"},"Grenada"),m("option",{value:"GP"},"Guadeloupe"),m("option",{value:"GU"},"Guam"),m("option",{value:"GT"},"Guatemala"),m("option",{value:"GG"},"Guernsey"),m("option",{value:"GN"},"Guinea"),m("option",{value:"GW"},"Guinea-Bissau"),m("option",{value:"GY"},"Guyana"),m("option",{value:"HT"},"Haiti"),m("option",{value:"HM"},"Heard Island and Mcdonald Islands"),m("option",{value:"VA"},"Holy See (Vatican City State)"),m("option",{value:"HN"},"Honduras"),m("option",{value:"HK"},"Hong Kong"),m("option",{value:"HU"},"Hungary"),m("option",{value:"IS"},"Iceland"),m("option",{value:"IN"},"India"),m("option",{value:"ID"},"Indonesia"),m("option",{value:"IR"},"Iran, Islamic Republic of"),m("option",{value:"IQ"},"Iraq"),m("option",{value:"IE"},"Ireland"),m("option",{value:"IM"},"Isle of Man"),m("option",{value:"IL"},"Israel"),m("option",{value:"IT"},"Italy"),m("option",{value:"JM"},"Jamaica"),m("option",{value:"JP"},"Japan"),m("option",{value:"JE"},"Jersey"),m("option",{value:"JO"},"Jordan"),m("option",{value:"KZ"},"Kazakhstan"),m("option",{value:"KE"},"Kenya"),m("option",{value:"KI"},"Kiribati"),m("option",{value:"KP"},"Korea, Democratic People's Republic of"),m("option",{value:"KR"},"Korea, Republic of"),m("option",{value:"XK"},"Kosovo"),m("option",{value:"KW"},"Kuwait"),m("option",{value:"KG"},"Kyrgyzstan"),m("option",{value:"LA"},"Lao People's Democratic Republic"),m("option",{value:"LV"},"Latvia"),m("option",{value:"LB"},"Lebanon"),m("option",{value:"LS"},"Lesotho"),m("option",{value:"LR"},"Liberia"),m("option",{value:"LY"},"Libyan Arab Jamahiriya"),m("option",{value:"LI"},"Liechtenstein"),m("option",{value:"LT"},"Lithuania"),m("option",{value:"LU"},"Luxembourg"),m("option",{value:"MO"},"Macao"),m("option",{value:"MK"},"Macedonia, the Former Yugoslav Republic of"),m("option",{value:"MG"},"Madagascar"),m("option",{value:"MW"},"Malawi"),m("option",{value:"MY"},"Malaysia"),m("option",{value:"MV"},"Maldives"),m("option",{value:"ML"},"Mali"),m("option",{value:"MT"},"Malta"),m("option",{value:"MH"},"Marshall Islands"),m("option",{value:"MQ"},"Martinique"),m("option",{value:"MR"},"Mauritania"),m("option",{value:"MU"},"Mauritius"),m("option",{value:"YT"},"Mayotte"),m("option",{value:"MX"},"Mexico"),m("option",{value:"FM"},"Micronesia, Federated States of"),m("option",{value:"MD"},"Moldova, Republic of"),m("option",{value:"MC"},"Monaco"),m("option",{value:"MN"},"Mongolia"),m("option",{value:"ME"},"Montenegro"),m("option",{value:"MS"},"Montserrat"),m("option",{value:"MA"},"Morocco"),m("option",{value:"MZ"},"Mozambique"),m("option",{value:"MM"},"Myanmar"),m("option",{value:"NA"},"Namibia"),m("option",{value:"NR"},"Nauru"),m("option",{value:"NP"},"Nepal"),m("option",{value:"NL"},"Netherlands"),m("option",{value:"AN"},"Netherlands Antilles"),m("option",{value:"NC"},"New Caledonia"),m("option",{value:"NZ"},"New Zealand"),m("option",{value:"NI"},"Nicaragua"),m("option",{value:"NE"},"Niger"),m("option",{value:"NG"},"Nigeria"),m("option",{value:"NU"},"Niue"),m("option",{value:"NF"},"Norfolk Island"),m("option",{value:"MP"},"Northern Mariana Islands"),m("option",{value:"NO"},"Norway"),m("option",{value:"OM"},"Oman"),m("option",{value:"PK"},"Pakistan"),m("option",{value:"PW"},"Palau"),m("option",{value:"PS"},"Palestinian Territory, Occupied"),m("option",{value:"PA"},"Panama"),m("option",{value:"PG"},"Papua New Guinea"),m("option",{value:"PY"},"Paraguay"),m("option",{value:"PE"},"Peru"),m("option",{value:"PH"},"Philippines"),m("option",{value:"PN"},"Pitcairn"),m("option",{value:"PL"},"Poland"),m("option",{value:"PT"},"Portugal"),m("option",{value:"PR"},"Puerto Rico"),m("option",{value:"QA"},"Qatar"),m("option",{value:"RE"},"Reunion"),m("option",{value:"RO"},"Romania"),m("option",{value:"RU"},"Russian Federation"),m("option",{value:"RW"},"Rwanda"),m("option",{value:"BL"},"Saint Barthelemy"),m("option",{value:"SH"},"Saint Helena"),m("option",{value:"KN"},"Saint Kitts and Nevis"),m("option",{value:"LC"},"Saint Lucia"),m("option",{value:"MF"},"Saint Martin"),m("option",{value:"PM"},"Saint Pierre and Miquelon"),m("option",{value:"VC"},"Saint Vincent and the Grenadines"),m("option",{value:"WS"},"Samoa"),m("option",{value:"SM"},"San Marino"),m("option",{value:"ST"},"Sao Tome and Principe"),m("option",{value:"SA"},"Saudi Arabia"),m("option",{value:"SN"},"Senegal"),m("option",{value:"RS"},"Serbia"),m("option",{value:"CS"},"Serbia and Montenegro"),m("option",{value:"SC"},"Seychelles"),m("option",{value:"SL"},"Sierra Leone"),m("option",{value:"SG"},"Singapore"),m("option",{value:"SX"},"Sint Maarten"),m("option",{value:"SK"},"Slovakia"),m("option",{value:"SI"},"Slovenia"),m("option",{value:"SB"},"Solomon Islands"),m("option",{value:"SO"},"Somalia"),m("option",{value:"ZA"},"South Africa"),m("option",{value:"GS"},"South Georgia and the South Sandwich Islands"),m("option",{value:"SS"},"South Sudan"),m("option",{value:"ES"},"Spain"),m("option",{value:"LK"},"Sri Lanka"),m("option",{value:"SD"},"Sudan"),m("option",{value:"SR"},"Suriname"),m("option",{value:"SJ"},"Svalbard and Jan Mayen"),m("option",{value:"SZ"},"Swaziland"),m("option",{value:"SE"},"Sweden"),m("option",{value:"CH"},"Switzerland"),m("option",{value:"SY"},"Syrian Arab Republic"),m("option",{value:"TW"},"Taiwan, Province of China"),m("option",{value:"TJ"},"Tajikistan"),m("option",{value:"TZ"},"Tanzania, United Republic of"),m("option",{value:"TH"},"Thailand"),m("option",{value:"TL"},"Timor-Leste"),m("option",{value:"TG"},"Togo"),m("option",{value:"TK"},"Tokelau"),m("option",{value:"TO"},"Tonga"),m("option",{value:"TT"},"Trinidad and Tobago"),m("option",{value:"TN"},"Tunisia"),m("option",{value:"TR"},"Turkey"),m("option",{value:"TM"},"Turkmenistan"),m("option",{value:"TC"},"Turks and Caicos Islands"),m("option",{value:"TV"},"Tuvalu"),m("option",{value:"UG"},"Uganda"),m("option",{value:"UA"},"Ukraine"),m("option",{value:"AE"},"United Arab Emirates"),m("option",{value:"GB"},"United Kingdom"),m("option",{value:"US"},"United States"),m("option",{value:"UM"},"United States Minor Outlying Islands"),m("option",{value:"UY"},"Uruguay"),m("option",{value:"UZ"},"Uzbekistan"),m("option",{value:"VU"},"Vanuatu"),m("option",{value:"VE"},"Venezuela"),m("option",{value:"VN"},"Viet Nam"),m("option",{value:"VG"},"Virgin Islands, British"),m("option",{value:"VI"},"Virgin Islands, U.s."),m("option",{value:"WF"},"Wallis and Futuna"),m("option",{value:"EH"},"Western Sahara"),m("option",{value:"YE"},"Yemen"),m("option",{value:"ZM"},"Zambia"),m("option",{value:"ZW"},"Zimbabwe")))},i.saveValue=function(o){t.a.session.user.save({countryCode:o.target.value})},e}(n.n(d).a),f=n(8),y=n.n(f),C=n(2),M=n.n(C),b=n(9),g=n.n(b);t.a.initializers.add("justoverclock/user-country-info",(function(){r.a.prototype.countryCode=s.a.attribute("countryCode"),Object(i.extend)(l.a.prototype,"settingsItems",(function(o){o.add("countryFlag",m(S,null))})),Object(i.extend)(y.a.prototype,"infoItems",(function(o){var a=this.attrs.user.countryCode();if(""!==a){var n="https://purecatamphetamine.github.io/country-flag-icons/3x2/"+a+".svg";o.add("ipinfo",m("div",{className:"ipinfo",id:"countryCode"},m("img",{className:"countryFlag",src:n,width:"25",height:"25"})))}})),Object(i.extend)(M.a.prototype,"oninit",(function(){this.countryCode=g()(this.attrs.user.countryCode())})),Object(i.extend)(M.a.prototype,"fields",(function(o){o.add("countryCode",m("div",{className:"Form-group"},m("label",null,t.a.translator.trans("justoverclock-country-flags.forum.inputCountryCode")),m("input",{className:"FormControl",bidi:this.countryCode})),1)})),Object(i.extend)(M.a.prototype,"data",(function(o){var a=this.attrs.user;this.countryCode()!==a.countryCode()&&(o.countryCode=this.countryCode())}))}))}]); +module.exports=function(o){var a={};function n(e){if(a[e])return a[e].exports;var t=a[e]={i:e,l:!1,exports:{}};return o[e].call(t.exports,t,t.exports,n),t.l=!0,t.exports}return n.m=o,n.c=a,n.d=function(o,a,e){n.o(o,a)||Object.defineProperty(o,a,{enumerable:!0,get:e})},n.r=function(o){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},n.t=function(o,a){if(1&a&&(o=n(o)),8&a)return o;if(4&a&&"object"==typeof o&&o&&o.__esModule)return o;var e=Object.create(null);if(n.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:o}),2&a&&"string"!=typeof o)for(var t in o)n.d(e,t,function(a){return o[a]}.bind(null,t));return e},n.n=function(o){var a=o&&o.__esModule?function(){return o.default}:function(){return o};return n.d(a,"a",a),a},n.o=function(o,a){return Object.prototype.hasOwnProperty.call(o,a)},n.p="",n(n.s=11)}([function(o,a){o.exports=flarum.core.compat["forum/app"]},function(o,a){o.exports=flarum.core.compat["common/extend"]},function(o,a){o.exports=flarum.core.compat["forum/components/EditUserModal"]},,function(o,a){o.exports=flarum.core.compat["forum/components/SettingsPage"]},function(o,a){o.exports=flarum.core.compat["common/models/User"]},function(o,a){o.exports=flarum.core.compat["common/Model"]},function(o,a){o.exports=flarum.core.compat.Component},function(o,a){o.exports=flarum.core.compat["forum/components/UserCard"]},function(o,a){o.exports=flarum.core.compat["utils/Stream"]},,function(o,a,n){"use strict";n.r(a);var e=n(0),t=n.n(e),i=n(1),u=n(4),l=n.n(u),p=n(5),r=n.n(p),v=n(6),s=n.n(v);function c(o,a){return(c=Object.setPrototypeOf||function(o,a){return o.__proto__=a,o})(o,a)}var d=n(7),S=function(o){var a,n;function e(){return o.apply(this,arguments)||this}n=o,(a=e).prototype=Object.create(n.prototype),a.prototype.constructor=a,c(a,n);var i=e.prototype;return i.oninit=function(a){o.prototype.oninit.call(this,a),this.countryCode=t.a.session.user.countryCode()},i.view=function(o){return m("fieldset",{className:"Settings-theme"},m("legend",null,t.a.translator.trans("justoverclock-country-flags.forum.inputCountryCode")),m("select",{className:"FormControl countryCode",id:"country",name:"country",value:this.countryCode,onblur:this.saveValue.bind(this)},m("option",null,t.a.translator.trans("justoverclock-country-flags.forum.clickToSelectCountry")),m("option",{value:"AF"},"Afghanistan"),m("option",{value:"AX"},"Aland Islands"),m("option",{value:"AL"},"Albania"),m("option",{value:"DZ"},"Algeria"),m("option",{value:"AS"},"American Samoa"),m("option",{value:"AD"},"Andorra"),m("option",{value:"AO"},"Angola"),m("option",{value:"AI"},"Anguilla"),m("option",{value:"AQ"},"Antarctica"),m("option",{value:"AG"},"Antigua and Barbuda"),m("option",{value:"AR"},"Argentina"),m("option",{value:"AM"},"Armenia"),m("option",{value:"AW"},"Aruba"),m("option",{value:"AU"},"Australia"),m("option",{value:"AT"},"Austria"),m("option",{value:"AZ"},"Azerbaijan"),m("option",{value:"BS"},"Bahamas"),m("option",{value:"BH"},"Bahrain"),m("option",{value:"BD"},"Bangladesh"),m("option",{value:"BB"},"Barbados"),m("option",{value:"BY"},"Belarus"),m("option",{value:"BE"},"Belgium"),m("option",{value:"BZ"},"Belize"),m("option",{value:"BJ"},"Benin"),m("option",{value:"BM"},"Bermuda"),m("option",{value:"BT"},"Bhutan"),m("option",{value:"BO"},"Bolivia"),m("option",{value:"BQ"},"Bonaire, Sint Eustatius and Saba"),m("option",{value:"BA"},"Bosnia and Herzegovina"),m("option",{value:"BW"},"Botswana"),m("option",{value:"BV"},"Bouvet Island"),m("option",{value:"BR"},"Brazil"),m("option",{value:"IO"},"British Indian Ocean Territory"),m("option",{value:"BN"},"Brunei Darussalam"),m("option",{value:"BG"},"Bulgaria"),m("option",{value:"BF"},"Burkina Faso"),m("option",{value:"BI"},"Burundi"),m("option",{value:"KH"},"Cambodia"),m("option",{value:"CM"},"Cameroon"),m("option",{value:"CA"},"Canada"),m("option",{value:"CV"},"Cape Verde"),m("option",{value:"KY"},"Cayman Islands"),m("option",{value:"CF"},"Central African Republic"),m("option",{value:"TD"},"Chad"),m("option",{value:"CL"},"Chile"),m("option",{value:"CN"},"China"),m("option",{value:"CX"},"Christmas Island"),m("option",{value:"CC"},"Cocos (Keeling) Islands"),m("option",{value:"CO"},"Colombia"),m("option",{value:"KM"},"Comoros"),m("option",{value:"CG"},"Congo"),m("option",{value:"CD"},"Congo, Democratic Republic of the Congo"),m("option",{value:"CK"},"Cook Islands"),m("option",{value:"CR"},"Costa Rica"),m("option",{value:"CI"},"Cote D'Ivoire"),m("option",{value:"HR"},"Croatia"),m("option",{value:"CU"},"Cuba"),m("option",{value:"CW"},"Curacao"),m("option",{value:"CY"},"Cyprus"),m("option",{value:"CZ"},"Czech Republic"),m("option",{value:"DK"},"Denmark"),m("option",{value:"DJ"},"Djibouti"),m("option",{value:"DM"},"Dominica"),m("option",{value:"DO"},"Dominican Republic"),m("option",{value:"EC"},"Ecuador"),m("option",{value:"EG"},"Egypt"),m("option",{value:"SV"},"El Salvador"),m("option",{value:"GQ"},"Equatorial Guinea"),m("option",{value:"ER"},"Eritrea"),m("option",{value:"EE"},"Estonia"),m("option",{value:"ET"},"Ethiopia"),m("option",{value:"FK"},"Falkland Islands (Malvinas)"),m("option",{value:"FO"},"Faroe Islands"),m("option",{value:"FJ"},"Fiji"),m("option",{value:"FI"},"Finland"),m("option",{value:"FR"},"France"),m("option",{value:"GF"},"French Guiana"),m("option",{value:"PF"},"French Polynesia"),m("option",{value:"TF"},"French Southern Territories"),m("option",{value:"GA"},"Gabon"),m("option",{value:"GM"},"Gambia"),m("option",{value:"GE"},"Georgia"),m("option",{value:"DE"},"Germany"),m("option",{value:"GH"},"Ghana"),m("option",{value:"GI"},"Gibraltar"),m("option",{value:"GR"},"Greece"),m("option",{value:"GL"},"Greenland"),m("option",{value:"GD"},"Grenada"),m("option",{value:"GP"},"Guadeloupe"),m("option",{value:"GU"},"Guam"),m("option",{value:"GT"},"Guatemala"),m("option",{value:"GG"},"Guernsey"),m("option",{value:"GN"},"Guinea"),m("option",{value:"GW"},"Guinea-Bissau"),m("option",{value:"GY"},"Guyana"),m("option",{value:"HT"},"Haiti"),m("option",{value:"HM"},"Heard Island and Mcdonald Islands"),m("option",{value:"VA"},"Holy See (Vatican City State)"),m("option",{value:"HN"},"Honduras"),m("option",{value:"HK"},"Hong Kong"),m("option",{value:"HU"},"Hungary"),m("option",{value:"IS"},"Iceland"),m("option",{value:"IN"},"India"),m("option",{value:"ID"},"Indonesia"),m("option",{value:"IR"},"Iran, Islamic Republic of"),m("option",{value:"IQ"},"Iraq"),m("option",{value:"IE"},"Ireland"),m("option",{value:"IM"},"Isle of Man"),m("option",{value:"IL"},"Israel"),m("option",{value:"IT"},"Italy"),m("option",{value:"JM"},"Jamaica"),m("option",{value:"JP"},"Japan"),m("option",{value:"JE"},"Jersey"),m("option",{value:"JO"},"Jordan"),m("option",{value:"KZ"},"Kazakhstan"),m("option",{value:"KE"},"Kenya"),m("option",{value:"KI"},"Kiribati"),m("option",{value:"KP"},"Korea, Democratic People's Republic of"),m("option",{value:"KR"},"Korea, Republic of"),m("option",{value:"XK"},"Kosovo"),m("option",{value:"KW"},"Kuwait"),m("option",{value:"KG"},"Kyrgyzstan"),m("option",{value:"LA"},"Lao People's Democratic Republic"),m("option",{value:"LV"},"Latvia"),m("option",{value:"LB"},"Lebanon"),m("option",{value:"LS"},"Lesotho"),m("option",{value:"LR"},"Liberia"),m("option",{value:"LY"},"Libyan Arab Jamahiriya"),m("option",{value:"LI"},"Liechtenstein"),m("option",{value:"LT"},"Lithuania"),m("option",{value:"LU"},"Luxembourg"),m("option",{value:"MO"},"Macao"),m("option",{value:"MK"},"Macedonia, the Former Yugoslav Republic of"),m("option",{value:"MG"},"Madagascar"),m("option",{value:"MW"},"Malawi"),m("option",{value:"MY"},"Malaysia"),m("option",{value:"MV"},"Maldives"),m("option",{value:"ML"},"Mali"),m("option",{value:"MT"},"Malta"),m("option",{value:"MH"},"Marshall Islands"),m("option",{value:"MQ"},"Martinique"),m("option",{value:"MR"},"Mauritania"),m("option",{value:"MU"},"Mauritius"),m("option",{value:"YT"},"Mayotte"),m("option",{value:"MX"},"Mexico"),m("option",{value:"FM"},"Micronesia, Federated States of"),m("option",{value:"MD"},"Moldova, Republic of"),m("option",{value:"MC"},"Monaco"),m("option",{value:"MN"},"Mongolia"),m("option",{value:"ME"},"Montenegro"),m("option",{value:"MS"},"Montserrat"),m("option",{value:"MA"},"Morocco"),m("option",{value:"MZ"},"Mozambique"),m("option",{value:"MM"},"Myanmar"),m("option",{value:"NA"},"Namibia"),m("option",{value:"NR"},"Nauru"),m("option",{value:"NP"},"Nepal"),m("option",{value:"NL"},"Netherlands"),m("option",{value:"AN"},"Netherlands Antilles"),m("option",{value:"NC"},"New Caledonia"),m("option",{value:"NZ"},"New Zealand"),m("option",{value:"NI"},"Nicaragua"),m("option",{value:"NE"},"Niger"),m("option",{value:"NG"},"Nigeria"),m("option",{value:"NU"},"Niue"),m("option",{value:"NF"},"Norfolk Island"),m("option",{value:"MP"},"Northern Mariana Islands"),m("option",{value:"NO"},"Norway"),m("option",{value:"OM"},"Oman"),m("option",{value:"PK"},"Pakistan"),m("option",{value:"PW"},"Palau"),m("option",{value:"PS"},"Palestinian Territory, Occupied"),m("option",{value:"PA"},"Panama"),m("option",{value:"PG"},"Papua New Guinea"),m("option",{value:"PY"},"Paraguay"),m("option",{value:"PE"},"Peru"),m("option",{value:"PH"},"Philippines"),m("option",{value:"PN"},"Pitcairn"),m("option",{value:"PL"},"Poland"),m("option",{value:"PT"},"Portugal"),m("option",{value:"PR"},"Puerto Rico"),m("option",{value:"QA"},"Qatar"),m("option",{value:"RE"},"Reunion"),m("option",{value:"RO"},"Romania"),m("option",{value:"RU"},"Russian Federation"),m("option",{value:"RW"},"Rwanda"),m("option",{value:"BL"},"Saint Barthelemy"),m("option",{value:"SH"},"Saint Helena"),m("option",{value:"KN"},"Saint Kitts and Nevis"),m("option",{value:"LC"},"Saint Lucia"),m("option",{value:"MF"},"Saint Martin"),m("option",{value:"PM"},"Saint Pierre and Miquelon"),m("option",{value:"VC"},"Saint Vincent and the Grenadines"),m("option",{value:"WS"},"Samoa"),m("option",{value:"SM"},"San Marino"),m("option",{value:"ST"},"Sao Tome and Principe"),m("option",{value:"SA"},"Saudi Arabia"),m("option",{value:"SN"},"Senegal"),m("option",{value:"RS"},"Serbia"),m("option",{value:"CS"},"Serbia and Montenegro"),m("option",{value:"SC"},"Seychelles"),m("option",{value:"SL"},"Sierra Leone"),m("option",{value:"SG"},"Singapore"),m("option",{value:"SX"},"Sint Maarten"),m("option",{value:"SK"},"Slovakia"),m("option",{value:"SI"},"Slovenia"),m("option",{value:"SB"},"Solomon Islands"),m("option",{value:"SO"},"Somalia"),m("option",{value:"ZA"},"South Africa"),m("option",{value:"GS"},"South Georgia and the South Sandwich Islands"),m("option",{value:"SS"},"South Sudan"),m("option",{value:"ES"},"Spain"),m("option",{value:"LK"},"Sri Lanka"),m("option",{value:"SD"},"Sudan"),m("option",{value:"SR"},"Suriname"),m("option",{value:"SJ"},"Svalbard and Jan Mayen"),m("option",{value:"SZ"},"Swaziland"),m("option",{value:"SE"},"Sweden"),m("option",{value:"CH"},"Switzerland"),m("option",{value:"SY"},"Syrian Arab Republic"),m("option",{value:"TW"},"Taiwan, Province of China"),m("option",{value:"TJ"},"Tajikistan"),m("option",{value:"TZ"},"Tanzania, United Republic of"),m("option",{value:"TH"},"Thailand"),m("option",{value:"TL"},"Timor-Leste"),m("option",{value:"TG"},"Togo"),m("option",{value:"TK"},"Tokelau"),m("option",{value:"TO"},"Tonga"),m("option",{value:"TT"},"Trinidad and Tobago"),m("option",{value:"TN"},"Tunisia"),m("option",{value:"TR"},"Turkey"),m("option",{value:"TM"},"Turkmenistan"),m("option",{value:"TC"},"Turks and Caicos Islands"),m("option",{value:"TV"},"Tuvalu"),m("option",{value:"UG"},"Uganda"),m("option",{value:"UA"},"Ukraine"),m("option",{value:"AE"},"United Arab Emirates"),m("option",{value:"GB"},"United Kingdom"),m("option",{value:"US"},"United States"),m("option",{value:"UM"},"United States Minor Outlying Islands"),m("option",{value:"UY"},"Uruguay"),m("option",{value:"UZ"},"Uzbekistan"),m("option",{value:"VU"},"Vanuatu"),m("option",{value:"VE"},"Venezuela"),m("option",{value:"VN"},"Viet Nam"),m("option",{value:"VG"},"Virgin Islands, British"),m("option",{value:"VI"},"Virgin Islands, U.s."),m("option",{value:"WF"},"Wallis and Futuna"),m("option",{value:"EH"},"Western Sahara"),m("option",{value:"YE"},"Yemen"),m("option",{value:"ZM"},"Zambia"),m("option",{value:"ZW"},"Zimbabwe")))},i.saveValue=function(o){t.a.session.user.save({countryCode:o.target.value})},e}(n.n(d).a),f=n(8),y=n.n(f),C=n(2),M=n.n(C),b=n(9),g=n.n(b);t.a.initializers.add("justoverclock/user-country-info",(function(){r.a.prototype.countryCode=s.a.attribute("countryCode"),Object(i.extend)(l.a.prototype,"settingsItems",(function(o){o.add("countryFlag",m(S,null))})),Object(i.extend)(y.a.prototype,"infoItems",(function(o){var a=this.attrs.user.countryCode();if(""!==a){var n="https://purecatamphetamine.github.io/country-flag-icons/3x2/"+a+".svg";o.add("ipinfo",m("div",{className:"ipinfo",id:"countryCode"},m("img",{className:"countryFlag",src:n,width:"25",height:"25"})))}})),Object(i.extend)(M.a.prototype,"oninit",(function(){this.countryCode=g()(this.attrs.user.countryCode())})),Object(i.extend)(M.a.prototype,"fields",(function(o){o.add("countryCode",m("div",{className:"Form-group"},m("label",null,t.a.translator.trans("justoverclock-country-flags.forum.inputCountryCode")),m("input",{className:"FormControl",bidi:this.countryCode})),1)})),Object(i.extend)(M.a.prototype,"data",(function(o){var a=this.attrs.user;this.countryCode()!==a.countryCode()&&(o.countryCode=this.countryCode())}))}))}]); //# sourceMappingURL=forum.js.map \ No newline at end of file diff --git a/js/dist/forum.js.map b/js/dist/forum.js.map index 619eaff..89cf4d2 100644 --- a/js/dist/forum.js.map +++ b/js/dist/forum.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://@justoverclock/country-flags/webpack/bootstrap","webpack://@justoverclock/country-flags/external \"flarum.core.compat['forum/app']\"","webpack://@justoverclock/country-flags/external \"flarum.core.compat['common/extend']\"","webpack://@justoverclock/country-flags/external \"flarum.core.compat['forum/components/EditUserModal']\"","webpack://@justoverclock/country-flags/external \"flarum.core.compat['forum/components/SettingsPage']\"","webpack://@justoverclock/country-flags/external \"flarum.core.compat['common/models/User']\"","webpack://@justoverclock/country-flags/external \"flarum.core.compat['common/Model']\"","webpack://@justoverclock/country-flags/external \"flarum.core.compat['Component']\"","webpack://@justoverclock/country-flags/external \"flarum.core.compat['forum/components/UserCard']\"","webpack://@justoverclock/country-flags/external \"flarum.core.compat['utils/Stream']\"","webpack://@justoverclock/country-flags/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@justoverclock/country-flags/./src/forum/components/AddCountryCodeField.js","webpack://@justoverclock/country-flags/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@justoverclock/country-flags/./src/forum/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","flarum","core","compat","_setPrototypeOf","setPrototypeOf","__proto__","AddCountryCodeField","subClass","superClass","constructor","oninit","vnode","this","countryCode","app","session","user","view","className","id","onblur","saveValue","e","save","target","Component","initializers","add","User","Model","attribute","extend","SettingsPage","items","UserCard","countryFlag","attrs","flagImage","src","width","height","EditUserModal","Stream","translator","trans","bidi","data"],"mappings":"2BACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ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UAAU,eAE7CC,iBAAOC,IAAapC,UAAW,iBAAiB,SAAUqC,GACxDA,EAAMN,IAAI,cAAe,EAAC,EAAD,UAE3BI,iBAAOG,IAAStC,UAAW,aAAa,SAAUqC,GAChD,IACIE,EADSvB,KAAKwB,MAAMpB,KACDH,cACvB,GAAoB,KAAhBsB,EAAJ,CACA,IAAIE,EAAY,+DAAiEF,EAAc,OAE/FF,EAAMN,IACJ,SACA,SAAKT,UAAU,SAASC,GAAG,eACzB,SAAKD,UAAU,cAAcoB,IAAKD,EAAWE,MAAM,KAAKC,OAAO,aAIrET,iBAAOU,IAAc7C,UAAW,UAAU,WACxCgB,KAAKC,YAAc6B,IAAO9B,KAAKwB,MAAMpB,KAAKH,kBAE5CkB,iBAAOU,IAAc7C,UAAW,UAAU,SAAUqC,GAClDA,EAAMN,IACJ,cACA,SAAKT,UAAU,cACb,eAAQJ,IAAI6B,WAAWC,MAAM,uDAC7B,WAAO1B,UAAU,cAAc2B,KAAMjC,KAAKC,eAE5C,MAGJkB,iBAAOU,IAAc7C,UAAW,QAAQ,SAAUkD,GAChD,IAAM9B,EAAOJ,KAAKwB,MAAMpB,KACpBJ,KAAKC,gBAAkBG,EAAKH,gBAC9BiC,EAAKjC,YAAcD,KAAKC","file":"forum.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 11);\n","module.exports = flarum.core.compat['forum/app'];","module.exports = flarum.core.compat['common/extend'];","module.exports = flarum.core.compat['forum/components/EditUserModal'];","module.exports = flarum.core.compat['forum/components/SettingsPage'];","module.exports = flarum.core.compat['common/models/User'];","module.exports = flarum.core.compat['common/Model'];","module.exports = flarum.core.compat['Component'];","module.exports = flarum.core.compat['forum/components/UserCard'];","module.exports = flarum.core.compat['utils/Stream'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","import app from 'flarum/forum/app';\nimport Component from 'flarum/Component';\n\nexport default class AddCountryCodeField extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.countryCode = app.session.user.countryCode();\n }\n\n view(vnode) {\n return (\n
\n );\n }\n\n saveValue(e) {\n const user = app.session.user;\n user.save({\n countryCode: e.target.value,\n });\n }\n}\n","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport SettingsPage from 'flarum/forum/components/SettingsPage';\nimport User from 'flarum/common/models/User';\nimport Model from 'flarum/common/Model';\nimport AddCountryCodeField from './components/AddCountryCodeField';\nimport UserCard from 'flarum/forum/components/UserCard';\nimport EditUserModal from 'flarum/forum/components/EditUserModal';\nimport Stream from 'flarum/utils/Stream';\n\napp.initializers.add('justoverclock/user-country-info', () => {\n User.prototype.countryCode = Model.attribute('countryCode');\n\n extend(SettingsPage.prototype, 'settingsItems', function (items) {\n items.add('countryFlag',