@para-ui/core 3.0.115 → 3.0.117
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DragVerify/index.js +2 -0
- package/README.md +5 -6
- package/package.json +1 -1
- package/umd/DragVerify.js +1 -1
package/DragVerify/index.js
CHANGED
|
@@ -206,6 +206,7 @@ var DragVerify = function DragVerify(props) {
|
|
|
206
206
|
};
|
|
207
207
|
|
|
208
208
|
moveDom.onmousedown = function (e) {
|
|
209
|
+
e.preventDefault();
|
|
209
210
|
if (constData.current.padding) return;
|
|
210
211
|
sliderBox.classList.add("".concat(prefixCls, "-move"));
|
|
211
212
|
document.onmousemove = function (event) {
|
|
@@ -219,6 +220,7 @@ var DragVerify = function DragVerify(props) {
|
|
|
219
220
|
};
|
|
220
221
|
};
|
|
221
222
|
moveDom.ontouchstart = function (touchE) {
|
|
223
|
+
touchE.preventDefault();
|
|
222
224
|
if (constData.current.padding) return;
|
|
223
225
|
var e = touchE.touches[0];
|
|
224
226
|
sliderBox.classList.add("".concat(prefixCls, "-move"));
|
package/README.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
## 版本: 3.0.117
|
|
2
|
+
|
|
3
|
+
para-ui/core@3.0.117 发布
|
|
4
|
+
【滑块验证-DragVerify】移动端阻止滑块默认事件
|
|
5
|
+
|
|
1
6
|
## 版本: 3.0.115
|
|
2
7
|
|
|
3
8
|
para-ui/core@3.0.115 发布
|
|
@@ -113,12 +118,6 @@
|
|
|
113
118
|
para-ui/core@3.0.95 发布
|
|
114
119
|
【表单-form】修改校验文案
|
|
115
120
|
|
|
116
|
-
## 版本: 3.0.94
|
|
117
|
-
para-ui/core@3.0.94 发布
|
|
118
|
-
【树-tree】修复树空状态和loading同时出现的问题
|
|
119
|
-
【表格-Table】修复表格右侧固定,滚动不对齐问题
|
|
120
|
-
【下拉框-Select】修改下拉框初始值延迟问题
|
|
121
|
-
|
|
122
121
|
## 版本: 3.0.93
|
|
123
122
|
|
|
124
123
|
para-ui/core@3.0.93 发布
|
package/package.json
CHANGED
package/umd/DragVerify.js
CHANGED
|
@@ -25,4 +25,4 @@ object-assign
|
|
|
25
25
|
*
|
|
26
26
|
* This source code is licensed under the MIT license found in the
|
|
27
27
|
* LICENSE file in the root directory of this source tree.
|
|
28
|
-
*/t(27418);var n=t(8156),o=60103;if(r.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),r.Fragment=i("react.fragment")}var a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,r,t){var n,i={},c=null,u=null;for(n in void 0!==t&&(c=""+t),void 0!==r.key&&(c=""+r.key),void 0!==r.ref&&(u=r.ref),r)s.call(r,n)&&!l.hasOwnProperty(n)&&(i[n]=r[n]);if(e&&e.defaultProps)for(n in r=e.defaultProps)void 0===i[n]&&(i[n]=r[n]);return{$$typeof:o,type:e,key:c,ref:u,props:i,_owner:a.current}}r.jsx=c,r.jsxs=c},85893:function(e,r,t){"use strict";e.exports=t(75251)},75875:function(e,r,t){var n=t(93379),o=t(38271);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};n(o,i);e.exports=o.locals||{}},13267:function(e,r,t){var n=t(93379),o=t(5714);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};n(o,i);e.exports=o.locals||{}},93379:function(e,r,t){"use strict";var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},i=function(){var e={};return function(r){if(void 0===e[r]){var t=document.querySelector(r);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}e[r]=t}return e[r]}}(),a=[];function s(e){for(var r=-1,t=0;t<a.length;t++)if(a[t].identifier===e){r=t;break}return r}function l(e,r){for(var t={},n=[],o=0;o<e.length;o++){var i=e[o],l=r.base?i[0]+r.base:i[0],c=t[l]||0,u="".concat(l," ").concat(c);t[l]=c+1;var d=s(u),f={css:i[1],media:i[2],sourceMap:i[3]};-1!==d?(a[d].references++,a[d].updater(f)):a.push({identifier:u,updater:g(f,r),references:1}),n.push(u)}return n}function c(e){var r=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var o=t.nc;o&&(n.nonce=o)}if(Object.keys(n).forEach((function(e){r.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(r);else{var a=i(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(r)}return r}var u,d=(u=[],function(e,r){return u[e]=r,u.filter(Boolean).join("\n")});function f(e,r,t,n){var o=t?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=d(r,o);else{var i=document.createTextNode(o),a=e.childNodes;a[r]&&e.removeChild(a[r]),a.length?e.insertBefore(i,a[r]):e.appendChild(i)}}function p(e,r,t){var n=t.css,o=t.media,i=t.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var v=null,m=0;function g(e,r){var t,n,o;if(r.singleton){var i=m++;t=v||(v=c(r)),n=f.bind(null,t,i,!1),o=f.bind(null,t,i,!0)}else t=c(r),n=p.bind(null,t,r),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)};return n(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;n(e=r)}else o()}}e.exports=function(e,r){(r=r||{}).singleton||"boolean"==typeof r.singleton||(r.singleton=o());var t=l(e=e||[],r);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<t.length;n++){var o=s(t[n]);a[o].references--}for(var i=l(e,r),c=0;c<t.length;c++){var u=s(t[c]);0===a[u].references&&(a[u].updater(),a.splice(u,1))}t=i}}}},37464:function(e,r,t){"use strict";t.d(r,{W:function(){return n}});var n="paraui-v3"},5927:function(e,r,t){"use strict";var n=t(8156),o=t.n(n),i=t(61217),a=t(37464);t(13267);r.default=function(e){var r=e.className,t=e.style,s=e.opacity,l=void 0===s?.7:s,c=(0,n.useRef)(null);(0,n.useEffect)((function(){c&&c.current&&c.current.parentNode&&(c.current.parentNode.style.position||(c.current.parentNode.style.position="relative"))}),[]);var u;return o().createElement("div",{className:(u="".concat(a.W,"-loading"),r&&(u+=" "+r),u),style:t,ref:c},o().createElement("div",{className:"loading-box"},o().createElement(i.Z,null)),o().createElement("div",{className:"loading-mask",style:{opacity:l}}))}},65395:function(e){"use strict";e.exports=r},8156:function(r){"use strict";r.exports=e}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={id:e,exports:{}};return t[e](i,i.exports,o),i.exports}o.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(r,{a:r}),r},o.d=function(e,r){for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nc=void 0;var i={};return function(){"use strict";o.r(i),o.d(i,{DragVerify:function(){return w},default:function(){return j}});var e=o(8156),r=o.n(e);function t(e){var r,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(r=0;r<e.length;r++)e[r]&&(n=t(e[r]))&&(o&&(o+=" "),o+=n);else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}var n=o(85893),a=o(97435),s=function(e){return(0,n.jsx)(a.l,Object.assign({dataName:"DoubleRight",path:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("path",{d:"M476.757333 813.696a42.666667 42.666667 0 0 1 12.501334-30.165333l271.530666-271.573334-271.530666-271.488a42.666667 42.666667 0 0 1 60.330666-60.330666l301.696 301.653333a42.666667 42.666667 0 0 1 0 60.373333l-301.696 301.696a42.666667 42.666667 0 0 1-72.832-30.165333z"}),(0,n.jsx)("path",{d:"M160.256 813.696a42.666667 42.666667 0 0 1 12.501333-30.165333l271.530667-271.573334-271.530667-271.488a42.666667 42.666667 0 0 1 60.330667-60.330666l301.696 301.653333a42.666667 42.666667 0 0 1 0 60.373333l-301.696 301.696a42.666667 42.666667 0 0 1-72.832-30.165333z"})]})},e))},l=function(e){return(0,n.jsx)(a.l,Object.assign({dataName:"Close",path:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("path",{d:"M572.330667 512l183.168-183.168a42.666667 42.666667 0 0 0-60.330667-60.330667L512 451.669333 328.832 268.501333a42.666667 42.666667 0 0 0-60.330667 60.330667L451.669333 512l-183.168 183.168a42.666667 42.666667 0 1 0 60.330667 60.330667L512 572.330667l183.168 183.168a42.666667 42.666667 0 0 0 60.330667-60.330667z"})})},e))},c=function(e){return(0,n.jsx)(a.l,Object.assign({dataName:"Check",path:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("path",{d:"M854.528 283.221333a46.933333 46.933333 0 0 0-66.389333 0l-357.930667 357.973334-194.346667-194.304a46.933333 46.933333 0 0 0-66.389333 66.389333l227.541333 227.498667a46.933333 46.933333 0 0 0 66.389334 0c0.512-0.554667 0.682667-1.237333 1.194666-1.792s1.28-0.682667 1.792-1.194667l388.266667-388.266667a46.933333 46.933333 0 0 0-0.128-66.304z"})})},e))},u=o(37464),d=o(65395),f=o.n(d),p=function(e,t){var n=r().useContext(f()).intlFormat;return t.zh_CN=t.zh,t["zh-CN"]=t.zh,t.en_US=t.en,t["en-US"]=t.en,n&&n(e,t)},v={zh:{tryAgain:"再试一次",swipe:"向右滑动填充拼图"},en:{tryAgain:"Try again",swipe:"Swipe right to fill puzzle"}},m=o(5927);o(75875);function g(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function y(e,r,t,n,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void t(e)}s.done?r(l):Promise.resolve(l).then(n,o)}function h(e){return function(){var r=this,t=arguments;return new Promise((function(n,o){var i=e.apply(r,t);function a(e){y(i,n,o,a,s,"next",e)}function s(e){y(i,n,o,a,s,"throw",e)}a(void 0)}))}}function b(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,i=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(n=t.next()).done)&&(i.push(n.value),!r||i.length!==r);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}}(e,r)||function(e,r){if(!e)return;if("string"==typeof e)return g(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return g(e,r)}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var x=function(e,r){var t,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(t)throw new TypeError("Generator is already executing.");for(;a;)try{if(t=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=r.call(e,a)}catch(e){i=[6,e],n=0}finally{t=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},w=function(n){var o=n.className,i=n.style,a=n.refresh,d=n.getImgInfo,f=n.verify,g=n.width,y=n.height,w=p("DragVerify",v),j=b((0,e.useState)(),2),k=j[0],E=j[1],S=b((0,e.useState)(!1),2),O=S[0],N=S[1],C=(0,e.useRef)(null),M=(0,e.useRef)({getImgInfo:d,verify:f}),I=u.W+"-drag-verify";M.current.getImgInfo=d,M.current.verify=f,(0,e.useEffect)((function(){return A(),T(),function(){clearTimeout(M.current.timerError),clearTimeout(M.current.timerSuccess)}}),[a,k]);var F,T=(F=h((function(){var e;return x(this,(function(r){switch(r.label){case 0:return M.current.padding=!0,N(!0),[4,M.current.getImgInfo()];case 1:return e=r.sent(),M.current.imgInfo=e,L(),[2]}}))})),function(){return F.apply(this,arguments)}),_=function(){var e=h((function(e,r){var t;return x(this,(function(n){switch(n.label){case 0:return[4,M.current.verify(e,M.current.verify)];case 1:return t=n.sent(),r(t),[2]}}))}));return function(r,t){return e.apply(this,arguments)}}(),L=function(){var e;if(C.current){var r=document.createElement("img");r.setAttribute("src",null===(e=M.current.imgInfo)||void 0===e?void 0:e.sourceImage),r.style.display="none";var t=document.createElement("img");M.current.imgMove=t,t.className="slider-img-move",t.style.display="none";var n=C.current.querySelector(".slider-img"),o=C.current.querySelector(".refresh");n&&o&&(o.style.display="none",n.innerHTML="",n.append(r),r.onload=function(){var e;r.style.display="inline-block",t.setAttribute("src",null===(e=M.current.imgInfo)||void 0===e?void 0:e.newImage);var n=r.width;if(r.className="slider-img-bg",r.style.display="inline-block",C.current){var i=C.current.querySelector(".slider-img"),a=null==i?void 0:i.clientWidth;M.current.imgScale=n/a,null==i||i.append(t),t.onload=function(){var e;M.current.padding=!1,t.style.display="inline-block",o.style.display="inline-block",t.width=t.width/M.current.imgScale,t.style.top=(null===(e=M.current.imgInfo)||void 0===e?void 0:e.y)/M.current.imgScale+"px",N(!1)}}},z(r,t))}},z=function(e,r){var t=C.current;if(t){var n=t.querySelector(".slider-move-box"),o=t.querySelector(".slider-move-mask"),i=t.querySelector(".slider-move"),a=t.querySelector(".slider-move-text"),s=i.getBoundingClientRect(),l=n.getBoundingClientRect().width,c=s.width,u=function(t,i){var s=t.pageX-i.pageX;s<0&&(s=0),s+l>e.width&&(s=e.width-l),n.style.left="".concat(s-1,"px"),o.style.width="".concat(s<2?2:s,"px");var u=s/(c-l),d=(e.width-r.width)*u;r.style.left="".concat(d,"px"),a.innerHTML=""},d=function(){t.classList.remove("".concat(I,"-move")),M.current.padding=!0;var e=parseFloat(r.style.left)*M.current.imgScale;_(e,(function(e){if(!e)return t.classList.add("".concat(I,"-error")),void(M.current.timerError=setTimeout((function(){M.current.padding=!1,A(),a.innerHTML=w({id:"tryAgain"}),T()}),1e3));t.classList.add("".concat(I,"-success"))}))};n.onmousedown=function(e){M.current.padding||(t.classList.add("".concat(I,"-move")),document.onmousemove=function(r){u(r,e)},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null,d()})},n.ontouchstart=function(e){if(!M.current.padding){var r=e.touches[0];t.classList.add("".concat(I,"-move")),document.ontouchmove=function(e){var t=e.touches[0];u(t,r)},document.ontouchend=function(){document.ontouchmove=null,document.ontouchend=null,d()}}}}},A=function(){var e=C.current;if(e){e.classList.remove(I+"-success"),e.classList.remove(I+"-error");var r=e.querySelector(".slider-move-box"),t=e.querySelector(".slider-move-mask");e.querySelector(".slider-move-text").innerHTML=w({id:"swipe"}),r.style.left="-1px",t.style.width="0px",M.current.imgMove&&(M.current.imgMove.style.left="0px")}};return r().createElement("div",{className:function(){for(var e,r,n=0,o="";n<arguments.length;)(e=arguments[n++])&&(r=t(e))&&(o&&(o+=" "),o+=r);return o}(I,o),style:i,ref:C},r().createElement("svg",{onClick:function(){E(Math.random())},className:"refresh",width:"26.529",height:"26.017",viewBox:"0 0 26.529 26.017"},r().createElement("defs",null,r().createElement("filter",{id:"a",x:"0",y:"0",width:"26.529",height:"17",filterUnits:"userSpaceOnUse"},r().createElement("feOffset",{dy:"1"}),r().createElement("feGaussianBlur",{stdDeviation:"1",result:"b"}),r().createElement("feFlood",null),r().createElement("feComposite",{operator:"in",in2:"b"}),r().createElement("feComposite",{in:"SourceGraphic"})),r().createElement("filter",{id:"c",x:"0",y:"9.017",width:"26.529",height:"17",filterUnits:"userSpaceOnUse"},r().createElement("feOffset",{dy:"1"}),r().createElement("feGaussianBlur",{stdDeviation:"1",result:"d"}),r().createElement("feFlood",null),r().createElement("feComposite",{operator:"in",in2:"d"}),r().createElement("feComposite",{in:"SourceGraphic"}))),r().createElement("g",{style:{opacity:.7,isolation:"isolate"},transform:"translate(-286.735 -95.991)"},r().createElement("g",{transform:"translate(288 96)"},r().createElement("rect",{style:{fill:"none"},width:"24",height:"24"})),r().createElement("g",{transform:"translate(289.735 97.991)"},r().createElement("g",{style:{filter:"url(#a)"},transform:"matrix(1, 0, 0, 1, -3, -2)"},r().createElement("path",{style:{fill:"#FFFFFF"},d:"M577.409,536.791a1,1,0,0,0,1-1A8,8,0,0,1,592.817,531h0c.077.1.149.207.22.312l-1.911-.765a1,1,0,1,0-.743,1.856l3.7,1.483a1,1,0,0,0,1.3-.557l1.482-3.7a1,1,0,1,0-1.857-.744l-.448,1.12c-.048-.067-.093-.137-.143-.2h0a10,10,0,0,0-18.009,5.989A1,1,0,0,0,577.409,536.791Z",transform:"translate(-573.41 -523.79)"})),r().createElement("g",{style:{filter:"url(#c)"},transform:"matrix(1, 0, 0, 1, -3, -2)"},r().createElement("path",{style:{fill:"#FFFFFF"},d:"M595.938,534.808a1,1,0,0,0-1,1,8,8,0,0,1-14.409,4.79h0c-.076-.1-.148-.206-.219-.312l1.911.765a1,1,0,0,0,.743-1.857l-3.7-1.482a1,1,0,0,0-1.3.557l-1.482,3.7a1,1,0,0,0,1.856.743l.449-1.12c.047.067.093.136.142.2h0a10,10,0,0,0,18.009-5.989A1,1,0,0,0,595.938,534.808Z",transform:"translate(-573.41 -523.79)"}))))),r().createElement("div",{className:"slider-img",style:function(){var e={};if(g){var r=g;"number"==typeof g&&(r=g+"px"),e.width=r}if(y){var t=y;"number"==typeof y&&(t=y+"px"),e.height=t}return e}()}),r().createElement("div",{className:"slider-move"},r().createElement("div",{className:"slider-move-bg"}),r().createElement("div",{className:"slider-move-mask"},r().createElement("div",{className:"slider-move-box"},r().createElement(s,{className:"svg-right"}),r().createElement(l,{className:"svg-close"}),r().createElement(c,{className:"svg-check"}))),r().createElement("span",{className:"slider-move-text"},w({id:"swipe"}))),O&&r().createElement(m.default,null))},j=w}(),i}()}));
|
|
28
|
+
*/t(27418);var n=t(8156),o=60103;if(r.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),r.Fragment=i("react.fragment")}var a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,r,t){var n,i={},c=null,u=null;for(n in void 0!==t&&(c=""+t),void 0!==r.key&&(c=""+r.key),void 0!==r.ref&&(u=r.ref),r)s.call(r,n)&&!l.hasOwnProperty(n)&&(i[n]=r[n]);if(e&&e.defaultProps)for(n in r=e.defaultProps)void 0===i[n]&&(i[n]=r[n]);return{$$typeof:o,type:e,key:c,ref:u,props:i,_owner:a.current}}r.jsx=c,r.jsxs=c},85893:function(e,r,t){"use strict";e.exports=t(75251)},75875:function(e,r,t){var n=t(93379),o=t(38271);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};n(o,i);e.exports=o.locals||{}},13267:function(e,r,t){var n=t(93379),o=t(5714);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:"head",singleton:!1};n(o,i);e.exports=o.locals||{}},93379:function(e,r,t){"use strict";var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},i=function(){var e={};return function(r){if(void 0===e[r]){var t=document.querySelector(r);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}e[r]=t}return e[r]}}(),a=[];function s(e){for(var r=-1,t=0;t<a.length;t++)if(a[t].identifier===e){r=t;break}return r}function l(e,r){for(var t={},n=[],o=0;o<e.length;o++){var i=e[o],l=r.base?i[0]+r.base:i[0],c=t[l]||0,u="".concat(l," ").concat(c);t[l]=c+1;var d=s(u),f={css:i[1],media:i[2],sourceMap:i[3]};-1!==d?(a[d].references++,a[d].updater(f)):a.push({identifier:u,updater:g(f,r),references:1}),n.push(u)}return n}function c(e){var r=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var o=t.nc;o&&(n.nonce=o)}if(Object.keys(n).forEach((function(e){r.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(r);else{var a=i(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(r)}return r}var u,d=(u=[],function(e,r){return u[e]=r,u.filter(Boolean).join("\n")});function f(e,r,t,n){var o=t?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=d(r,o);else{var i=document.createTextNode(o),a=e.childNodes;a[r]&&e.removeChild(a[r]),a.length?e.insertBefore(i,a[r]):e.appendChild(i)}}function p(e,r,t){var n=t.css,o=t.media,i=t.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var v=null,m=0;function g(e,r){var t,n,o;if(r.singleton){var i=m++;t=v||(v=c(r)),n=f.bind(null,t,i,!1),o=f.bind(null,t,i,!0)}else t=c(r),n=p.bind(null,t,r),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)};return n(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;n(e=r)}else o()}}e.exports=function(e,r){(r=r||{}).singleton||"boolean"==typeof r.singleton||(r.singleton=o());var t=l(e=e||[],r);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<t.length;n++){var o=s(t[n]);a[o].references--}for(var i=l(e,r),c=0;c<t.length;c++){var u=s(t[c]);0===a[u].references&&(a[u].updater(),a.splice(u,1))}t=i}}}},37464:function(e,r,t){"use strict";t.d(r,{W:function(){return n}});var n="paraui-v3"},5927:function(e,r,t){"use strict";var n=t(8156),o=t.n(n),i=t(61217),a=t(37464);t(13267);r.default=function(e){var r=e.className,t=e.style,s=e.opacity,l=void 0===s?.7:s,c=(0,n.useRef)(null);(0,n.useEffect)((function(){c&&c.current&&c.current.parentNode&&(c.current.parentNode.style.position||(c.current.parentNode.style.position="relative"))}),[]);var u;return o().createElement("div",{className:(u="".concat(a.W,"-loading"),r&&(u+=" "+r),u),style:t,ref:c},o().createElement("div",{className:"loading-box"},o().createElement(i.Z,null)),o().createElement("div",{className:"loading-mask",style:{opacity:l}}))}},65395:function(e){"use strict";e.exports=r},8156:function(r){"use strict";r.exports=e}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={id:e,exports:{}};return t[e](i,i.exports,o),i.exports}o.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(r,{a:r}),r},o.d=function(e,r){for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nc=void 0;var i={};return function(){"use strict";o.r(i),o.d(i,{DragVerify:function(){return w},default:function(){return j}});var e=o(8156),r=o.n(e);function t(e){var r,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(r=0;r<e.length;r++)e[r]&&(n=t(e[r]))&&(o&&(o+=" "),o+=n);else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}var n=o(85893),a=o(97435),s=function(e){return(0,n.jsx)(a.l,Object.assign({dataName:"DoubleRight",path:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("path",{d:"M476.757333 813.696a42.666667 42.666667 0 0 1 12.501334-30.165333l271.530666-271.573334-271.530666-271.488a42.666667 42.666667 0 0 1 60.330666-60.330666l301.696 301.653333a42.666667 42.666667 0 0 1 0 60.373333l-301.696 301.696a42.666667 42.666667 0 0 1-72.832-30.165333z"}),(0,n.jsx)("path",{d:"M160.256 813.696a42.666667 42.666667 0 0 1 12.501333-30.165333l271.530667-271.573334-271.530667-271.488a42.666667 42.666667 0 0 1 60.330667-60.330666l301.696 301.653333a42.666667 42.666667 0 0 1 0 60.373333l-301.696 301.696a42.666667 42.666667 0 0 1-72.832-30.165333z"})]})},e))},l=function(e){return(0,n.jsx)(a.l,Object.assign({dataName:"Close",path:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("path",{d:"M572.330667 512l183.168-183.168a42.666667 42.666667 0 0 0-60.330667-60.330667L512 451.669333 328.832 268.501333a42.666667 42.666667 0 0 0-60.330667 60.330667L451.669333 512l-183.168 183.168a42.666667 42.666667 0 1 0 60.330667 60.330667L512 572.330667l183.168 183.168a42.666667 42.666667 0 0 0 60.330667-60.330667z"})})},e))},c=function(e){return(0,n.jsx)(a.l,Object.assign({dataName:"Check",path:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("path",{d:"M854.528 283.221333a46.933333 46.933333 0 0 0-66.389333 0l-357.930667 357.973334-194.346667-194.304a46.933333 46.933333 0 0 0-66.389333 66.389333l227.541333 227.498667a46.933333 46.933333 0 0 0 66.389334 0c0.512-0.554667 0.682667-1.237333 1.194666-1.792s1.28-0.682667 1.792-1.194667l388.266667-388.266667a46.933333 46.933333 0 0 0-0.128-66.304z"})})},e))},u=o(37464),d=o(65395),f=o.n(d),p=function(e,t){var n=r().useContext(f()).intlFormat;return t.zh_CN=t.zh,t["zh-CN"]=t.zh,t.en_US=t.en,t["en-US"]=t.en,n&&n(e,t)},v={zh:{tryAgain:"再试一次",swipe:"向右滑动填充拼图"},en:{tryAgain:"Try again",swipe:"Swipe right to fill puzzle"}},m=o(5927);o(75875);function g(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function y(e,r,t,n,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void t(e)}s.done?r(l):Promise.resolve(l).then(n,o)}function h(e){return function(){var r=this,t=arguments;return new Promise((function(n,o){var i=e.apply(r,t);function a(e){y(i,n,o,a,s,"next",e)}function s(e){y(i,n,o,a,s,"throw",e)}a(void 0)}))}}function b(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,i=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(n=t.next()).done)&&(i.push(n.value),!r||i.length!==r);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}}(e,r)||function(e,r){if(!e)return;if("string"==typeof e)return g(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return g(e,r)}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var x=function(e,r){var t,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(t)throw new TypeError("Generator is already executing.");for(;a;)try{if(t=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=r.call(e,a)}catch(e){i=[6,e],n=0}finally{t=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},w=function(n){var o=n.className,i=n.style,a=n.refresh,d=n.getImgInfo,f=n.verify,g=n.width,y=n.height,w=p("DragVerify",v),j=b((0,e.useState)(),2),k=j[0],E=j[1],S=b((0,e.useState)(!1),2),O=S[0],N=S[1],C=(0,e.useRef)(null),M=(0,e.useRef)({getImgInfo:d,verify:f}),I=u.W+"-drag-verify";M.current.getImgInfo=d,M.current.verify=f,(0,e.useEffect)((function(){return A(),T(),function(){clearTimeout(M.current.timerError),clearTimeout(M.current.timerSuccess)}}),[a,k]);var F,T=(F=h((function(){var e;return x(this,(function(r){switch(r.label){case 0:return M.current.padding=!0,N(!0),[4,M.current.getImgInfo()];case 1:return e=r.sent(),M.current.imgInfo=e,L(),[2]}}))})),function(){return F.apply(this,arguments)}),_=function(){var e=h((function(e,r){var t;return x(this,(function(n){switch(n.label){case 0:return[4,M.current.verify(e,M.current.verify)];case 1:return t=n.sent(),r(t),[2]}}))}));return function(r,t){return e.apply(this,arguments)}}(),L=function(){var e;if(C.current){var r=document.createElement("img");r.setAttribute("src",null===(e=M.current.imgInfo)||void 0===e?void 0:e.sourceImage),r.style.display="none";var t=document.createElement("img");M.current.imgMove=t,t.className="slider-img-move",t.style.display="none";var n=C.current.querySelector(".slider-img"),o=C.current.querySelector(".refresh");n&&o&&(o.style.display="none",n.innerHTML="",n.append(r),r.onload=function(){var e;r.style.display="inline-block",t.setAttribute("src",null===(e=M.current.imgInfo)||void 0===e?void 0:e.newImage);var n=r.width;if(r.className="slider-img-bg",r.style.display="inline-block",C.current){var i=C.current.querySelector(".slider-img"),a=null==i?void 0:i.clientWidth;M.current.imgScale=n/a,null==i||i.append(t),t.onload=function(){var e;M.current.padding=!1,t.style.display="inline-block",o.style.display="inline-block",t.width=t.width/M.current.imgScale,t.style.top=(null===(e=M.current.imgInfo)||void 0===e?void 0:e.y)/M.current.imgScale+"px",N(!1)}}},z(r,t))}},z=function(e,r){var t=C.current;if(t){var n=t.querySelector(".slider-move-box"),o=t.querySelector(".slider-move-mask"),i=t.querySelector(".slider-move"),a=t.querySelector(".slider-move-text"),s=i.getBoundingClientRect(),l=n.getBoundingClientRect().width,c=s.width,u=function(t,i){var s=t.pageX-i.pageX;s<0&&(s=0),s+l>e.width&&(s=e.width-l),n.style.left="".concat(s-1,"px"),o.style.width="".concat(s<2?2:s,"px");var u=s/(c-l),d=(e.width-r.width)*u;r.style.left="".concat(d,"px"),a.innerHTML=""},d=function(){t.classList.remove("".concat(I,"-move")),M.current.padding=!0;var e=parseFloat(r.style.left)*M.current.imgScale;_(e,(function(e){if(!e)return t.classList.add("".concat(I,"-error")),void(M.current.timerError=setTimeout((function(){M.current.padding=!1,A(),a.innerHTML=w({id:"tryAgain"}),T()}),1e3));t.classList.add("".concat(I,"-success"))}))};n.onmousedown=function(e){e.preventDefault(),M.current.padding||(t.classList.add("".concat(I,"-move")),document.onmousemove=function(r){u(r,e)},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null,d()})},n.ontouchstart=function(e){if(e.preventDefault(),!M.current.padding){var r=e.touches[0];t.classList.add("".concat(I,"-move")),document.ontouchmove=function(e){var t=e.touches[0];u(t,r)},document.ontouchend=function(){document.ontouchmove=null,document.ontouchend=null,d()}}}}},A=function(){var e=C.current;if(e){e.classList.remove(I+"-success"),e.classList.remove(I+"-error");var r=e.querySelector(".slider-move-box"),t=e.querySelector(".slider-move-mask");e.querySelector(".slider-move-text").innerHTML=w({id:"swipe"}),r.style.left="-1px",t.style.width="0px",M.current.imgMove&&(M.current.imgMove.style.left="0px")}};return r().createElement("div",{className:function(){for(var e,r,n=0,o="";n<arguments.length;)(e=arguments[n++])&&(r=t(e))&&(o&&(o+=" "),o+=r);return o}(I,o),style:i,ref:C},r().createElement("svg",{onClick:function(){E(Math.random())},className:"refresh",width:"26.529",height:"26.017",viewBox:"0 0 26.529 26.017"},r().createElement("defs",null,r().createElement("filter",{id:"a",x:"0",y:"0",width:"26.529",height:"17",filterUnits:"userSpaceOnUse"},r().createElement("feOffset",{dy:"1"}),r().createElement("feGaussianBlur",{stdDeviation:"1",result:"b"}),r().createElement("feFlood",null),r().createElement("feComposite",{operator:"in",in2:"b"}),r().createElement("feComposite",{in:"SourceGraphic"})),r().createElement("filter",{id:"c",x:"0",y:"9.017",width:"26.529",height:"17",filterUnits:"userSpaceOnUse"},r().createElement("feOffset",{dy:"1"}),r().createElement("feGaussianBlur",{stdDeviation:"1",result:"d"}),r().createElement("feFlood",null),r().createElement("feComposite",{operator:"in",in2:"d"}),r().createElement("feComposite",{in:"SourceGraphic"}))),r().createElement("g",{style:{opacity:.7,isolation:"isolate"},transform:"translate(-286.735 -95.991)"},r().createElement("g",{transform:"translate(288 96)"},r().createElement("rect",{style:{fill:"none"},width:"24",height:"24"})),r().createElement("g",{transform:"translate(289.735 97.991)"},r().createElement("g",{style:{filter:"url(#a)"},transform:"matrix(1, 0, 0, 1, -3, -2)"},r().createElement("path",{style:{fill:"#FFFFFF"},d:"M577.409,536.791a1,1,0,0,0,1-1A8,8,0,0,1,592.817,531h0c.077.1.149.207.22.312l-1.911-.765a1,1,0,1,0-.743,1.856l3.7,1.483a1,1,0,0,0,1.3-.557l1.482-3.7a1,1,0,1,0-1.857-.744l-.448,1.12c-.048-.067-.093-.137-.143-.2h0a10,10,0,0,0-18.009,5.989A1,1,0,0,0,577.409,536.791Z",transform:"translate(-573.41 -523.79)"})),r().createElement("g",{style:{filter:"url(#c)"},transform:"matrix(1, 0, 0, 1, -3, -2)"},r().createElement("path",{style:{fill:"#FFFFFF"},d:"M595.938,534.808a1,1,0,0,0-1,1,8,8,0,0,1-14.409,4.79h0c-.076-.1-.148-.206-.219-.312l1.911.765a1,1,0,0,0,.743-1.857l-3.7-1.482a1,1,0,0,0-1.3.557l-1.482,3.7a1,1,0,0,0,1.856.743l.449-1.12c.047.067.093.136.142.2h0a10,10,0,0,0,18.009-5.989A1,1,0,0,0,595.938,534.808Z",transform:"translate(-573.41 -523.79)"}))))),r().createElement("div",{className:"slider-img",style:function(){var e={};if(g){var r=g;"number"==typeof g&&(r=g+"px"),e.width=r}if(y){var t=y;"number"==typeof y&&(t=y+"px"),e.height=t}return e}()}),r().createElement("div",{className:"slider-move"},r().createElement("div",{className:"slider-move-bg"}),r().createElement("div",{className:"slider-move-mask"},r().createElement("div",{className:"slider-move-box"},r().createElement(s,{className:"svg-right"}),r().createElement(l,{className:"svg-close"}),r().createElement(c,{className:"svg-check"}))),r().createElement("span",{className:"slider-move-text"},w({id:"swipe"}))),O&&r().createElement(m.default,null))},j=w}(),i}()}));
|