the bola v2 website
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. /******/ (() => { // webpackBootstrap
  2. /******/ "use strict";
  3. /******/ // The require scope
  4. /******/ var __webpack_require__ = {};
  5. /******/
  6. /************************************************************************/
  7. /******/ /* webpack/runtime/define property getters */
  8. /******/ (() => {
  9. /******/ // define getter functions for harmony exports
  10. /******/ __webpack_require__.d = (exports, definition) => {
  11. /******/ for(var key in definition) {
  12. /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
  13. /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
  14. /******/ }
  15. /******/ }
  16. /******/ };
  17. /******/ })();
  18. /******/
  19. /******/ /* webpack/runtime/hasOwnProperty shorthand */
  20. /******/ (() => {
  21. /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
  22. /******/ })();
  23. /******/
  24. /******/ /* webpack/runtime/make namespace object */
  25. /******/ (() => {
  26. /******/ // define __esModule on exports
  27. /******/ __webpack_require__.r = (exports) => {
  28. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  29. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  30. /******/ }
  31. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  32. /******/ };
  33. /******/ })();
  34. /******/
  35. /************************************************************************/
  36. var __webpack_exports__ = {};
  37. /*!*********************************!*\
  38. !*** ./resources/js/api/API.js ***!
  39. \*********************************/
  40. __webpack_require__.r(__webpack_exports__);
  41. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  42. /* harmony export */ "default": () => (/* binding */ API)
  43. /* harmony export */ });
  44. function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
  45. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  46. function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
  47. function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  48. function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
  49. function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
  50. var server_url = "https://thebola.club";
  51. var API = /*#__PURE__*/function () {
  52. function API() {
  53. _classCallCheck(this, API);
  54. this.prefix = server_url;
  55. this.url = "/api";
  56. this.test = 200;
  57. }
  58. _createClass(API, [{
  59. key: "listState",
  60. value: function listState(_ref) {
  61. var _ref$_callback = _ref._callback,
  62. _callback = _ref$_callback === void 0 ? function () {} : _ref$_callback;
  63. var url = "".concat(this.prefix).concat(this.url, "/public/event/location/state");
  64. fetch(url).then(function (response) {
  65. return response.json();
  66. }).then(function (data) {
  67. return _callback(data);
  68. })["catch"](function (err) {
  69. return console.log(err);
  70. });
  71. }
  72. }, {
  73. key: "listLocation",
  74. value: function listLocation(_ref2) {
  75. var state = _ref2.state,
  76. city = _ref2.city,
  77. _ref2$_callback = _ref2._callback,
  78. _callback = _ref2$_callback === void 0 ? function () {} : _ref2$_callback;
  79. var url = "".concat(this.prefix).concat(this.url, "/public/event/location/field?") + new URLSearchParams({
  80. state: state,
  81. city: city
  82. });
  83. fetch(url).then(function (response) {
  84. return response.json();
  85. }).then(function (data) {
  86. return _callback(data);
  87. })["catch"](function (err) {
  88. return console.log(err);
  89. });
  90. }
  91. }, {
  92. key: "listField",
  93. value: function listField(_ref3) {
  94. var state = _ref3.state,
  95. city = _ref3.city,
  96. field_name = _ref3.field_name,
  97. _ref3$_callback = _ref3._callback,
  98. _callback = _ref3$_callback === void 0 ? function () {} : _ref3$_callback;
  99. var url = "".concat(this.prefix).concat(this.url, "/public/event/location?") + new URLSearchParams({
  100. state: state,
  101. city: city,
  102. field_name: field_name
  103. });
  104. fetch(url).then(function (response) {
  105. return response.json();
  106. }).then(function (data) {
  107. return _callback(data);
  108. })["catch"](function (err) {
  109. return console.log(err);
  110. });
  111. }
  112. }, {
  113. key: "enquiry",
  114. value: function enquiry(_ref4, _callback) {
  115. var email = _ref4.email,
  116. name = _ref4.name,
  117. message = _ref4.message;
  118. var url = "".concat(this.prefix).concat(this.url, "/public/enquiry");
  119. fetch(url, {
  120. method: "POST",
  121. headers: {
  122. 'Content-Type': 'application/json;charset=utf-8'
  123. },
  124. body: JSON.stringify({
  125. contact_email: email,
  126. contact_name: name,
  127. message: message
  128. })
  129. }).then(function (response) {
  130. return response.json();
  131. }).then(function (data) {
  132. return _callback(data);
  133. })["catch"](function (err) {
  134. return console.log(err);
  135. });
  136. }
  137. }]);
  138. return API;
  139. }();
  140. /******/ })()
  141. ;