"use strict";exports.__esModule=!0,exports.default=createHistory;function createHistory(a){const b=[],c=a.render;let d=0;const e=b=>{if(!b)throw Error("\u65E0\u5BF9\u5E94\u7684\u5386\u53F2\u6808");return c.apply(a,[...b])},f=a=>{let c=a+d;return 0>c?c=0:c>b.length-1&&(c=b.length-1),d=c,e(b[d])},g=()=>(d=0,e(b[d]));return a.render=(...a)=>(b.splice(d),d++,b.push(a),e(a)),{go:f,home:g}}