{"version":3,"file":"js/questionnaire_content.min.js","mappings":";;;;;;;;;;;AAAA;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL,CAAC;;;;;;UC7DD;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,eAAe,4BAA4B;WAC3C,eAAe;WACf,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA,8CAA8C;;;;;WCA9C;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;ACNmD;AACT;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,qDAAqD,iDAAiD;AACtG,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA,yDAAyD,iDAAiD;AAC1G;AACA;AACA,aAAa;AACb;AACA,kDAAkD,iDAAiD;AACnG;AACA,aAAa;AACb,SAAS;AACT;AACA,iDAAiD,iDAAiD;AAClG,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA,+CAA+C,iDAAiD;AAChG;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,YAAY;AACZ;AACA;AACA,gBAAgB;AAChB;AACA,gBAAgB;AAChB;AACA;AACA;AACA,+BAA+B,0BAA0B;AACzD,kDAAkD;AAClD;AACA;AACA;AACA;AACA,8DAA8D,qCAAqC;AACnG,iEAAiE,gDAAgD;AACjH;AACA,wBAAwB;AACxB;AACA;AACA,wBAAwB;AACxB,oBAAoB;AACpB;AACA,QAAQ;AACR,CAAC,E","sources":["webpack://laravel/./resources/src/css/home/questionnaire_content.scss","webpack://laravel/./resources/src/js/share/components/_fontSize.js","webpack://laravel/webpack/bootstrap","webpack://laravel/webpack/runtime/compat get default export","webpack://laravel/webpack/runtime/define property getters","webpack://laravel/webpack/runtime/hasOwnProperty shorthand","webpack://laravel/webpack/runtime/make namespace object","webpack://laravel/./resources/src/js/home/questionnaire_content.js"],"sourcesContent":["// extracted by mini-css-extract-plugin\nexport {};","$(function() {\r\n if ($('.font_size_ori').length == 0) return;\r\n\r\n const winW = $(window).width();\r\n const fontsize = $('.fontsize');\r\n const plus = $('.font_size_plus');\r\n const minus = $('.font_size_minus');\r\n const ori = $('.font_size_ori');\r\n let _this, fz, _fz;\r\n let num = 0;\r\n // let ori_fz = 16;\r\n // if (winW <= 950) ori_fz = 10;\r\n // if (winW <= 480) ori_fz = 12.65;\r\n fontsize.each(function(ind, obj) {\r\n _this = $(obj);\r\n fz = _this.css('font-size');\r\n // _fz = Math.round(parseFloat(fz)) / ori_fz + 'rem';\r\n _this.attr('ori', fz);\r\n });\r\n plus.click(function() {\r\n fontsize.each(function(ind, obj) {\r\n _this = $(obj);\r\n fz = _this.css('font-size');\r\n // _fz = (Math.round(parseFloat(fz)) + 1) / ori_fz + 'rem';\r\n _fz = (Math.round(parseFloat(fz)) + 1) + 'px';\r\n _this.css('font-size', _fz);\r\n });\r\n if (num < 3) {\r\n num++;\r\n minus.attr('disabled', false);\r\n } else {\r\n num++;\r\n $(this).attr('disabled', true);\r\n }\r\n });\r\n minus.click(function() {\r\n fontsize.each(function(ind, obj) {\r\n _this = $(obj);\r\n fz = _this.css('font-size');\r\n // _fz = (Math.round(parseFloat(fz)) - 1) / ori_fz + 'rem';\r\n _fz = (Math.round(parseFloat(fz)) - 1) + 'px';\r\n _this.css('font-size', _fz);\r\n });\r\n if (num > -3) {\r\n num--;\r\n plus.attr('disabled', false);\r\n } else {\r\n num--;\r\n $(this).attr('disabled', true);\r\n }\r\n });\r\n ori.click(function() {\r\n fontsize.each(function(ind, obj) {\r\n _this = $(obj);\r\n _fz = _this.attr('ori');\r\n _this.css('font-size', _fz);\r\n });\r\n num = 0;\r\n minus.attr('disabled', false);\r\n plus.attr('disabled', false);\r\n });\r\n});","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import '../../css/home/questionnaire_content.scss';\r\nimport \"../share/components/_fontSize.js\";\r\n\r\n$(function() {\r\n\r\n $('.required').each(function(i, o) {\r\n var _this = $(o);\r\n var _checkbox = _this.find('.checkboxStyle');\r\n _checkbox.change(function() {\r\n if (_this.find('.checkboxStyle:checked').length > 0) {\r\n _checkbox.removeAttr('required');\r\n } else {\r\n _checkbox.prop('required', true);\r\n }\r\n });\r\n });\r\n\r\n var sending = false;\r\n $('#form').submit(function(e) {\r\n e.preventDefault();\r\n if (sending) return alert('資料送出中');\r\n const formData = $('#form').serialize();\r\n console.log(formData);\r\n $.ajaxSetup({\r\n headers: {\r\n 'X-CSRF-TOKEN': $('meta[name=\"csrf-token\"]').attr('content')\r\n }\r\n });\r\n $.ajax({\r\n type: 'POST',\r\n url: '/questionnaire_submit',\r\n data: formData,\r\n beforeSend: function() {\r\n TweenLite.to($('#lb_loading'), .4, { opacity: 1, display: 'flex', ease: Circ.easeOut });\r\n },\r\n success: function(data) {\r\n if (data == 'captchacode failed') {\r\n $('.alert_txt').show();\r\n } else {\r\n $('.alert_txt').hide();\r\n TweenLite.to($('#lb_success'), .4, { opacity: 1, display: 'flex', ease: Circ.easeOut });\r\n lb_close();\r\n }\r\n },\r\n error: function(data) {\r\n TweenLite.to($('#lb_fail'), .4, { opacity: 1, display: 'flex', ease: Circ.easeOut });\r\n lb_close();\r\n },\r\n }).always(function(data, status) {\r\n console.log(data);\r\n TweenLite.to($('#lb_loading'), .2, { opacity: 0, display: 'none', ease: Circ.easeOut });\r\n });\r\n });\r\n\r\n function lb_close() {\r\n $('.confirm_btn').click(function() {\r\n TweenLite.to($('.lightbox'), .2, { opacity: 0, display: 'none', ease: Circ.easeOut });\r\n location.reload();\r\n });\r\n }\r\n\r\n $('.captcha_refresh').click(function() {\r\n $('.captcha_img').attr('src', '/validate_img?r=' + getRandomInt(3));\r\n });\r\n\r\n function getRandomInt(max) {\r\n return Math.floor(Math.random() * max);\r\n }\r\n // $('form').submit(function() {\r\n // $('.required').each(function(o, i) {\r\n // if ($('.required :checkbox:checked').length > 0) {\r\n // return true;\r\n // } else {\r\n // return false;\r\n // }\r\n // });\r\n // if( $('.required :checkbox:checked').length > 0 ){\r\n // alert(msg_email);\r\n // }else if ( !validateEmail(email) ){\r\n // alert(msg_wrongEmail);\r\n // }else{ \r\n // $.ajax({\r\n // type: 'POST',\r\n // url: 'assets/php/member_forget.php',\r\n // data: { email: email, type: 'acc'},\r\n // success: function (data) { console.log(data);\r\n // // if( data == 'registered' ) alert(msg_registered);\r\n // // if( data == 'connect error' ) alert(msg_reError);\r\n // if( data == 'not registered' ) alert(msg_registered);\r\n // if( data == 'success' ) {\r\n // TweenMax.to( '.lb_board', .4, {y: 0, ease: Back.easeOut.config(1.1)});\r\n // TweenMax.to( '#authNotice', .4, { opacity: 1, display: 'flex', ease: Circ.easeOut});\r\n // }\r\n // },\r\n // error: function (data) {\r\n // console.log(data);\r\n // }, \r\n // });\r\n // }\r\n // });\r\n});"],"names":[],"sourceRoot":""}