UNPKG

@senlinz/import-export

Version:
1 lines 55.5 kB
class e{static __wrap(t){const _=Object.create(e.prototype);return _.__wbg_ptr=t,c.register(_,_.__wbg_ptr,_),_}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,c.unregister(this),e}free(){const e=this.__destroy_into_raw();U.__wbg_dynamicexceldata_free(e,0)}constructor(e,t,_){const n=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),r=K,o=L(t,U.__wbindgen_malloc),i=K,a=L(_,U.__wbindgen_malloc),l=K,s=U.dynamicexceldata_new(n,r,o,i,a,l);return this.__wbg_ptr=s,c.register(this,this.__wbg_ptr,this),this}get headers(){const e=U.__wbg_get_dynamicexceldata_headers(this.__wbg_ptr);var t=E(e[0],e[1]).slice();return U.__wbindgen_free(e[0],4*e[1],4),t}get rows(){const e=U.__wbg_get_dynamicexceldata_rows(this.__wbg_ptr);var t=E(e[0],e[1]).slice();return U.__wbindgen_free(e[0],4*e[1],4),t}get sheet_name(){let e,t;try{const _=U.__wbg_get_dynamicexceldata_sheet_name(this.__wbg_ptr);return e=_[0],t=_[1],R(_[0],_[1])}finally{U.__wbindgen_free(e,t,1)}}set headers(e){const t=L(e,U.__wbindgen_malloc),_=K;U.__wbg_set_dynamicexceldata_headers(this.__wbg_ptr,t,_)}set rows(e){const t=L(e,U.__wbindgen_malloc),_=K;U.__wbg_set_dynamicexceldata_rows(this.__wbg_ptr,t,_)}set sheet_name(e){const t=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),_=K;U.__wbg_set_dynamicexceldata_sheet_name(this.__wbg_ptr,t,_)}}Symbol.dispose&&(e.prototype[Symbol.dispose]=e.prototype.free);class t{static __wrap(e){const _=Object.create(t.prototype);return _.__wbg_ptr=e,s.register(_,_.__wbg_ptr,_),_}static __unwrap(e){return e instanceof t?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,s.unregister(this),e}free(){const e=this.__destroy_into_raw();U.__wbg_excelcellformat_free(e,0)}constructor(){const e=U.excelcellformat_new();return this.__wbg_ptr=e,s.register(this,this.__wbg_ptr,this),this}withAlign(e){const _=this.__destroy_into_raw(),n=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),r=K,o=U.excelcellformat_withAlign(_,n,r);return t.__wrap(o)}withAlignVertical(e){const _=this.__destroy_into_raw(),n=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),r=K,o=U.excelcellformat_withAlignVertical(_,n,r);return t.__wrap(o)}withBackgroundColor(e){const _=this.__destroy_into_raw(),n=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),r=K,o=U.excelcellformat_withBackgroundColor(_,n,r);return t.__wrap(o)}withBold(e){const _=this.__destroy_into_raw(),n=U.excelcellformat_withBold(_,e);return t.__wrap(n)}withBorderColor(e){const _=this.__destroy_into_raw(),n=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),r=K,o=U.excelcellformat_withBorderColor(_,n,r);return t.__wrap(o)}withColor(e){const _=this.__destroy_into_raw(),n=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),r=K,o=U.excelcellformat_withColor(_,n,r);return t.__wrap(o)}withDateFormat(e){const _=this.__destroy_into_raw(),n=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),r=K,o=U.excelcellformat_withDateFormat(_,n,r);return t.__wrap(o)}withFontSize(e){const _=this.__destroy_into_raw(),n=U.excelcellformat_withFontSize(_,e);return t.__wrap(n)}withItalic(e){const _=this.__destroy_into_raw(),n=U.excelcellformat_withItalic(_,e);return t.__wrap(n)}withRule(e){const _=this.__destroy_into_raw(),n=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),r=K,o=U.excelcellformat_withRule(_,n,r);return t.__wrap(o)}withStrikethrough(e){const _=this.__destroy_into_raw(),n=U.excelcellformat_withStrikethrough(_,e);return t.__wrap(n)}withUnderline(e){const _=this.__destroy_into_raw(),n=U.excelcellformat_withUnderline(_,e);return t.__wrap(n)}withValue(e){const _=this.__destroy_into_raw(),n=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),r=K,o=U.excelcellformat_withValue(_,n,r);return t.__wrap(o)}get align_vertical(){let e,t;try{const _=U.__wbg_get_excelcellformat_align_vertical(this.__wbg_ptr);return e=_[0],t=_[1],R(_[0],_[1])}finally{U.__wbindgen_free(e,t,1)}}get align(){let e,t;try{const _=U.__wbg_get_excelcellformat_align(this.__wbg_ptr);return e=_[0],t=_[1],R(_[0],_[1])}finally{U.__wbindgen_free(e,t,1)}}get background_color(){let e,t;try{const _=U.__wbg_get_excelcellformat_background_color(this.__wbg_ptr);return e=_[0],t=_[1],R(_[0],_[1])}finally{U.__wbindgen_free(e,t,1)}}get bold(){return 0!==U.__wbg_get_excelcellformat_bold(this.__wbg_ptr)}get border_color(){const e=U.__wbg_get_excelcellformat_border_color(this.__wbg_ptr);let t;return 0!==e[0]&&(t=R(e[0],e[1]).slice(),U.__wbindgen_free(e[0],1*e[1],1)),t}get color(){let e,t;try{const _=U.__wbg_get_excelcellformat_color(this.__wbg_ptr);return e=_[0],t=_[1],R(_[0],_[1])}finally{U.__wbindgen_free(e,t,1)}}get date_format(){const e=U.__wbg_get_excelcellformat_date_format(this.__wbg_ptr);let t;return 0!==e[0]&&(t=R(e[0],e[1]).slice(),U.__wbindgen_free(e[0],1*e[1],1)),t}get font_size(){return U.__wbg_get_excelcellformat_font_size(this.__wbg_ptr)}get italic(){return 0!==U.__wbg_get_excelcellformat_italic(this.__wbg_ptr)}get rule(){let e,t;try{const _=U.__wbg_get_excelcellformat_rule(this.__wbg_ptr);return e=_[0],t=_[1],R(_[0],_[1])}finally{U.__wbindgen_free(e,t,1)}}get strikethrough(){return 0!==U.__wbg_get_excelcellformat_strikethrough(this.__wbg_ptr)}get underline(){return 0!==U.__wbg_get_excelcellformat_underline(this.__wbg_ptr)}get value(){let e,t;try{const _=U.__wbg_get_excelcellformat_value(this.__wbg_ptr);return e=_[0],t=_[1],R(_[0],_[1])}finally{U.__wbindgen_free(e,t,1)}}set align_vertical(e){const t=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),_=K;U.__wbg_set_excelcellformat_align_vertical(this.__wbg_ptr,t,_)}set align(e){const t=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),_=K;U.__wbg_set_excelcellformat_align(this.__wbg_ptr,t,_)}set background_color(e){const t=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),_=K;U.__wbg_set_excelcellformat_background_color(this.__wbg_ptr,t,_)}set bold(e){U.__wbg_set_excelcellformat_bold(this.__wbg_ptr,e)}set border_color(e){var t=O(e)?0:F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),_=K;U.__wbg_set_excelcellformat_border_color(this.__wbg_ptr,t,_)}set color(e){const t=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),_=K;U.__wbg_set_excelcellformat_color(this.__wbg_ptr,t,_)}set date_format(e){var t=O(e)?0:F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),_=K;U.__wbg_set_excelcellformat_date_format(this.__wbg_ptr,t,_)}set font_size(e){U.__wbg_set_excelcellformat_font_size(this.__wbg_ptr,e)}set italic(e){U.__wbg_set_excelcellformat_italic(this.__wbg_ptr,e)}set rule(e){const t=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),_=K;U.__wbg_set_excelcellformat_rule(this.__wbg_ptr,t,_)}set strikethrough(e){U.__wbg_set_excelcellformat_strikethrough(this.__wbg_ptr,e)}set underline(e){U.__wbg_set_excelcellformat_underline(this.__wbg_ptr,e)}set value(e){const t=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),_=K;U.__wbg_set_excelcellformat_value(this.__wbg_ptr,t,_)}}Symbol.dispose&&(t.prototype[Symbol.dispose]=t.prototype.free);class _{static __wrap(e){const t=Object.create(_.prototype);return t.__wbg_ptr=e,u.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof _?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,u.unregister(this),e}free(){const e=this.__destroy_into_raw();U.__wbg_excelcolumndata_free(e,0)}constructor(e,t){const _=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),n=K,r=F(t,U.__wbindgen_malloc,U.__wbindgen_realloc),o=K,i=U.excelcolumndata_bind_new(_,n,r,o);return this.__wbg_ptr=i,u.register(this,this.__wbg_ptr,this),this}static newGroup(e,t,n){const r=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),o=K,i=F(t,U.__wbindgen_malloc,U.__wbindgen_realloc),a=K,l=L(n,U.__wbindgen_malloc),c=K,s=U.excelcolumndata_newGroup(r,o,i,a,l,c);return _.__wrap(s)}static newRootGroup(e,t){const n=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),r=K,o=L(t,U.__wbindgen_malloc),i=K,a=U.excelcolumndata_newRootGroup(n,r,o,i);return _.__wrap(a)}withChildren(e){const t=this.__destroy_into_raw(),n=L(e,U.__wbindgen_malloc),r=K,o=U.excelcolumndata_withChildren(t,n,r);return _.__wrap(o)}get children(){const e=U.__wbg_get_excelcolumndata_children(this.__wbg_ptr);var t=E(e[0],e[1]).slice();return U.__wbindgen_free(e[0],4*e[1],4),t}get key(){let e,t;try{const _=U.__wbg_get_excelcolumndata_key(this.__wbg_ptr);return e=_[0],t=_[1],R(_[0],_[1])}finally{U.__wbindgen_free(e,t,1)}}get value(){let e,t;try{const _=U.__wbg_get_excelcolumndata_value(this.__wbg_ptr);return e=_[0],t=_[1],R(_[0],_[1])}finally{U.__wbindgen_free(e,t,1)}}set children(e){const t=L(e,U.__wbindgen_malloc),_=K;U.__wbg_set_excelcolumndata_children(this.__wbg_ptr,t,_)}set key(e){const t=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),_=K;U.__wbg_set_excelcolumndata_key(this.__wbg_ptr,t,_)}set value(e){const t=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),_=K;U.__wbg_set_excelcolumndata_value(this.__wbg_ptr,t,_)}}Symbol.dispose&&(_.prototype[Symbol.dispose]=_.prototype.free);class n{static __wrap(e){const t=Object.create(n.prototype);return t.__wbg_ptr=e,w.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof n?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,w.unregister(this),e}free(){const e=this.__destroy_into_raw();U.__wbg_excelcolumninfo_free(e,0)}constructor(e,t){const _=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),n=K,r=F(t,U.__wbindgen_malloc,U.__wbindgen_realloc),o=K,i=U.excelcolumninfo_bind_new(_,n,r,o);return this.__wbg_ptr=i,w.register(this,this.__wbg_ptr,this),this}withAllowedValues(e){const t=this.__destroy_into_raw(),_=L(e,U.__wbindgen_malloc),r=K,o=U.excelcolumninfo_withAllowedValues(t,_,r);return n.__wrap(o)}withDataGroup(e){const t=this.__destroy_into_raw(),_=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),r=K,o=U.excelcolumninfo_withDataGroup(t,_,r);return n.__wrap(o)}withDataGroupParent(e){const t=this.__destroy_into_raw(),_=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),r=K,o=U.excelcolumninfo_withDataGroupParent(t,_,r);return n.__wrap(o)}withDataType(e){const t=this.__destroy_into_raw(),_=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),r=K,o=U.excelcolumninfo_withDataType(t,_,r);return n.__wrap(o)}withFormat(e){const _=this.__destroy_into_raw();b(e,t);var r=e.__destroy_into_raw();const o=U.excelcolumninfo_withFormat(_,r);return n.__wrap(o)}withNote(e){const t=this.__destroy_into_raw(),_=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),r=K,o=U.excelcolumninfo_withNote(t,_,r);return n.__wrap(o)}withParent(e){const t=this.__destroy_into_raw(),_=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),r=K,o=U.excelcolumninfo_withParent(t,_,r);return n.__wrap(o)}withValueFormat(e){const t=this.__destroy_into_raw(),_=L(e,U.__wbindgen_malloc),r=K,o=U.excelcolumninfo_withValueFormat(t,_,r);return n.__wrap(o)}withWidth(e){const t=this.__destroy_into_raw(),_=U.excelcolumninfo_withWidth(t,e);return n.__wrap(_)}get allowed_values(){const e=U.__wbg_get_excelcolumninfo_allowed_values(this.__wbg_ptr);var t=E(e[0],e[1]).slice();return U.__wbindgen_free(e[0],4*e[1],4),t}get data_group_parent(){let e,t;try{const _=U.__wbg_get_excelcolumninfo_data_group_parent(this.__wbg_ptr);return e=_[0],t=_[1],R(_[0],_[1])}finally{U.__wbindgen_free(e,t,1)}}get data_group(){let e,t;try{const _=U.__wbg_get_excelcolumninfo_data_group(this.__wbg_ptr);return e=_[0],t=_[1],R(_[0],_[1])}finally{U.__wbindgen_free(e,t,1)}}get data_type(){let e,t;try{const _=U.__wbg_get_excelcolumninfo_data_type(this.__wbg_ptr);return e=_[0],t=_[1],R(_[0],_[1])}finally{U.__wbindgen_free(e,t,1)}}get format(){const e=U.__wbg_get_excelcolumninfo_format(this.__wbg_ptr);return 0===e?void 0:t.__wrap(e)}get key(){let e,t;try{const _=U.__wbg_get_excelcolumninfo_key(this.__wbg_ptr);return e=_[0],t=_[1],R(_[0],_[1])}finally{U.__wbindgen_free(e,t,1)}}get name(){let e,t;try{const _=U.__wbg_get_excelcolumninfo_name(this.__wbg_ptr);return e=_[0],t=_[1],R(_[0],_[1])}finally{U.__wbindgen_free(e,t,1)}}get note(){const e=U.__wbg_get_excelcolumninfo_note(this.__wbg_ptr);let t;return 0!==e[0]&&(t=R(e[0],e[1]).slice(),U.__wbindgen_free(e[0],1*e[1],1)),t}get parent(){let e,t;try{const _=U.__wbg_get_excelcolumninfo_parent(this.__wbg_ptr);return e=_[0],t=_[1],R(_[0],_[1])}finally{U.__wbindgen_free(e,t,1)}}get value_format(){const e=U.__wbg_get_excelcolumninfo_value_format(this.__wbg_ptr);var t=E(e[0],e[1]).slice();return U.__wbindgen_free(e[0],4*e[1],4),t}get width(){return U.__wbg_get_excelcolumninfo_width(this.__wbg_ptr)}set allowed_values(e){const t=L(e,U.__wbindgen_malloc),_=K;U.__wbg_set_excelcolumninfo_allowed_values(this.__wbg_ptr,t,_)}set data_group_parent(e){const t=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),_=K;U.__wbg_set_excelcolumninfo_data_group_parent(this.__wbg_ptr,t,_)}set data_group(e){const t=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),_=K;U.__wbg_set_excelcolumninfo_data_group(this.__wbg_ptr,t,_)}set data_type(e){const t=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),_=K;U.__wbg_set_excelcolumninfo_data_type(this.__wbg_ptr,t,_)}set format(e){let _=0;O(e)||(b(e,t),_=e.__destroy_into_raw()),U.__wbg_set_excelcolumninfo_format(this.__wbg_ptr,_)}set key(e){const t=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),_=K;U.__wbg_set_excelcolumninfo_key(this.__wbg_ptr,t,_)}set name(e){const t=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),_=K;U.__wbg_set_excelcolumninfo_name(this.__wbg_ptr,t,_)}set note(e){var t=O(e)?0:F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),_=K;U.__wbg_set_excelcolumninfo_note(this.__wbg_ptr,t,_)}set parent(e){const t=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),_=K;U.__wbg_set_excelcolumninfo_parent(this.__wbg_ptr,t,_)}set value_format(e){const t=L(e,U.__wbindgen_malloc),_=K;U.__wbg_set_excelcolumninfo_value_format(this.__wbg_ptr,t,_)}set width(e){U.__wbg_set_excelcolumninfo_width(this.__wbg_ptr,e)}}Symbol.dispose&&(n.prototype[Symbol.dispose]=n.prototype.free);class r{static __wrap(e){const t=Object.create(r.prototype);return t.__wbg_ptr=e,d.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,d.unregister(this),e}free(){const e=this.__destroy_into_raw();U.__wbg_exceldata_free(e,0)}constructor(e){const t=L(e,U.__wbindgen_malloc),_=K,n=U.exceldata_new(t,_);return this.__wbg_ptr=n,d.register(this,this.__wbg_ptr,this),this}get rows(){const e=U.__wbg_get_exceldata_rows(this.__wbg_ptr);var t=E(e[0],e[1]).slice();return U.__wbindgen_free(e[0],4*e[1],4),t}set rows(e){const t=L(e,U.__wbindgen_malloc),_=K;U.__wbg_set_exceldata_rows(this.__wbg_ptr,t,_)}}Symbol.dispose&&(r.prototype[Symbol.dispose]=r.prototype.free);class o{static __wrap(e){const t=Object.create(o.prototype);return t.__wbg_ptr=e,g.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,g.unregister(this),e}free(){const e=this.__destroy_into_raw();U.__wbg_excelinfo_free(e,0)}constructor(e,t,_,n,r){const o=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),i=K,a=F(t,U.__wbindgen_malloc,U.__wbindgen_realloc),l=K,c=L(_,U.__wbindgen_malloc),s=K,u=F(n,U.__wbindgen_malloc,U.__wbindgen_realloc),w=K,d=F(r,U.__wbindgen_malloc,U.__wbindgen_realloc),f=K,m=U.excelinfo_bind_new(o,i,a,l,c,s,u,w,d,f);if(m[2])throw M(m[1]);return this.__wbg_ptr=m[0],g.register(this,this.__wbg_ptr,this),this}withDefaultRowHeight(e){const t=this.__destroy_into_raw(),_=U.excelinfo_withDefaultRowHeight(t,e);return o.__wrap(_)}withHeaderRowHeight(e){const t=this.__destroy_into_raw(),_=U.excelinfo_withHeaderRowHeight(t,e);return o.__wrap(_)}withImageFetcher(e){const t=this.__destroy_into_raw(),_=U.excelinfo_withImageFetcher(t,e);return o.__wrap(_)}withIsHeaderFreeze(e){const t=this.__destroy_into_raw(),_=U.excelinfo_withIsHeaderFreeze(t,e);return o.__wrap(_)}withOffset(e,t){const _=this.__destroy_into_raw(),n=U.excelinfo_withOffset(_,e,t);return o.__wrap(n)}withProgressCallback(e){const t=this.__destroy_into_raw(),_=U.excelinfo_withProgressCallback(t,e);return o.__wrap(_)}withTitle(e){const t=this.__destroy_into_raw(),_=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),n=K,r=U.excelinfo_withTitle(t,_,n);return o.__wrap(r)}withTitleFormat(e){const _=this.__destroy_into_raw();b(e,t);var n=e.__destroy_into_raw();const r=U.excelinfo_withTitleFormat(_,n);return o.__wrap(r)}withTitleHeight(e){const t=this.__destroy_into_raw(),_=U.excelinfo_withTitleHeight(t,e);return o.__wrap(_)}get author(){let e,t;try{const _=U.__wbg_get_excelinfo_author(this.__wbg_ptr);return e=_[0],t=_[1],R(_[0],_[1])}finally{U.__wbindgen_free(e,t,1)}}get columns(){const e=U.__wbg_get_excelinfo_columns(this.__wbg_ptr);var t=E(e[0],e[1]).slice();return U.__wbindgen_free(e[0],4*e[1],4),t}get create_time(){let e,t;try{const _=U.__wbg_get_excelinfo_create_time(this.__wbg_ptr);return e=_[0],t=_[1],R(_[0],_[1])}finally{U.__wbindgen_free(e,t,1)}}get default_row_height(){const e=U.__wbg_get_excelinfo_default_row_height(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}get dx(){return U.__wbg_get_excelinfo_dx(this.__wbg_ptr)}get dy(){return U.__wbg_get_excelinfo_dy(this.__wbg_ptr)>>>0}get header_row_height(){const e=U.__wbg_get_excelinfo_header_row_height(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}get is_header_freeze(){return 0!==U.__wbg_get_excelinfo_is_header_freeze(this.__wbg_ptr)}get name(){let e,t;try{const _=U.__wbg_get_excelinfo_name(this.__wbg_ptr);return e=_[0],t=_[1],R(_[0],_[1])}finally{U.__wbindgen_free(e,t,1)}}get sheet_name(){let e,t;try{const _=U.__wbg_get_excelinfo_sheet_name(this.__wbg_ptr);return e=_[0],t=_[1],R(_[0],_[1])}finally{U.__wbindgen_free(e,t,1)}}get title_format(){const e=U.__wbg_get_excelinfo_title_format(this.__wbg_ptr);return 0===e?void 0:t.__wrap(e)}get title_height(){const e=U.__wbg_get_excelinfo_title_height(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}get title(){const e=U.__wbg_get_excelinfo_title(this.__wbg_ptr);let t;return 0!==e[0]&&(t=R(e[0],e[1]).slice(),U.__wbindgen_free(e[0],1*e[1],1)),t}set author(e){const t=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),_=K;U.__wbg_set_excelinfo_author(this.__wbg_ptr,t,_)}set columns(e){const t=L(e,U.__wbindgen_malloc),_=K;U.__wbg_set_excelinfo_columns(this.__wbg_ptr,t,_)}set create_time(e){const t=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),_=K;U.__wbg_set_excelinfo_create_time(this.__wbg_ptr,t,_)}set default_row_height(e){U.__wbg_set_excelinfo_default_row_height(this.__wbg_ptr,!O(e),O(e)?0:e)}set dx(e){U.__wbg_set_excelinfo_dx(this.__wbg_ptr,e)}set dy(e){U.__wbg_set_excelinfo_dy(this.__wbg_ptr,e)}set header_row_height(e){U.__wbg_set_excelinfo_header_row_height(this.__wbg_ptr,!O(e),O(e)?0:e)}set is_header_freeze(e){U.__wbg_set_excelinfo_is_header_freeze(this.__wbg_ptr,e)}set name(e){const t=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),_=K;U.__wbg_set_excelinfo_name(this.__wbg_ptr,t,_)}set sheet_name(e){const t=F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),_=K;U.__wbg_set_excelinfo_sheet_name(this.__wbg_ptr,t,_)}set title_format(e){let _=0;O(e)||(b(e,t),_=e.__destroy_into_raw()),U.__wbg_set_excelinfo_title_format(this.__wbg_ptr,_)}set title_height(e){U.__wbg_set_excelinfo_title_height(this.__wbg_ptr,!O(e),O(e)?0:e)}set title(e){var t=O(e)?0:F(e,U.__wbindgen_malloc,U.__wbindgen_realloc),_=K;U.__wbg_set_excelinfo_title(this.__wbg_ptr,t,_)}}Symbol.dispose&&(o.prototype[Symbol.dispose]=o.prototype.free);class i{static __wrap(e){const t=Object.create(i.prototype);return t.__wbg_ptr=e,f.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof i?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,f.unregister(this),e}free(){const e=this.__destroy_into_raw();U.__wbg_excelrowdata_free(e,0)}constructor(e){const t=L(e,U.__wbindgen_malloc),_=K,n=U.excelrowdata_new(t,_);return this.__wbg_ptr=n,f.register(this,this.__wbg_ptr,this),this}get columns(){const e=U.__wbg_get_excelrowdata_columns(this.__wbg_ptr);var t=E(e[0],e[1]).slice();return U.__wbindgen_free(e[0],4*e[1],4),t}set columns(e){const t=L(e,U.__wbindgen_malloc),_=K;U.__wbg_set_excelrowdata_columns(this.__wbg_ptr,t,_)}}function a(){const e={__proto__:null,__wbg_Error_92b29b0548f8b746:function(e,t){return Error(R(e,t))},__wbg___wbindgen_debug_string_c25d447a39f5578f:function(e,t){const _=F(p(t),U.__wbindgen_malloc,U.__wbindgen_realloc),n=K;I().setInt32(e+4,n,!0),I().setInt32(e+0,_,!0)},__wbg___wbindgen_is_function_1ff95bcc5517c252:function(e){return"function"==typeof e},__wbg___wbindgen_is_object_a27215656b807791:function(e){return"object"==typeof e&&null!==e},__wbg___wbindgen_is_undefined_c05833b95a3cf397:function(e){return void 0===e},__wbg___wbindgen_string_get_b0ca35b86a603356:function(e,t){const _="string"==typeof t?t:void 0;var n=O(_)?0:F(_,U.__wbindgen_malloc,U.__wbindgen_realloc),r=K;I().setInt32(e+4,r,!0),I().setInt32(e+0,n,!0)},__wbg___wbindgen_throw_344f42d3211c4765:function(e,t){throw new Error(R(e,t))},__wbg__wbg_cb_unref_fffb441def202758:function(e){e._wbg_cb_unref()},__wbg_call_a6e5c5dce5018821:function(){return N((function(e,t,_){return e.call(t,_)}),arguments)},__wbg_excelcellformat_new:function(e){return t.__wrap(e)},__wbg_excelcellformat_unwrap:function(e){return t.__unwrap(e)},__wbg_excelcolumndata_new:function(e){return _.__wrap(e)},__wbg_excelcolumndata_unwrap:function(e){return _.__unwrap(e)},__wbg_excelcolumninfo_new:function(e){return n.__wrap(e)},__wbg_excelcolumninfo_unwrap:function(e){return n.__unwrap(e)},__wbg_excelrowdata_new:function(e){return i.__wrap(e)},__wbg_excelrowdata_unwrap:function(e){return i.__unwrap(e)},__wbg_length_1f0964f4a5e2c6d8:function(e){return e.length},__wbg_new_b667d279fd5aa943:function(e,t){return new Error(R(e,t))},__wbg_new_cd45aabdf6073e84:function(e){return new Uint8Array(e)},__wbg_new_da52cf8fe3429cb2:function(){return new Object},__wbg_new_from_slice_77cdfb7977362f3c:function(e,t){return new Uint8Array(y(e,t))},__wbg_new_typed_1824d93f294193e5:function(e,t){try{var _={a:e,b:t};const n=new Promise(((e,t)=>{const n=_.a;_.a=0;try{return function(e,t,_,n){U.wasm_bindgen__convert__closures_____invoke__h2d1981627fd0d8f0(e,t,_,n)}(n,_.b,e,t)}finally{_.a=n}}));return n}finally{_.a=0}},__wbg_now_86c0d4ba3fa605b8:function(){return Date.now()},__wbg_prototypesetcall_4770620bbe4688a0:function(e,t,_){Uint8Array.prototype.set.call(y(e,t),_)},__wbg_queueMicrotask_0ab5b2d2393e99b9:function(e){return e.queueMicrotask},__wbg_queueMicrotask_6a09b7bc46549209:function(e){queueMicrotask(e)},__wbg_resolve_2191a4dfe481c25b:function(e){return Promise.resolve(e)},__wbg_set_8535240470bf2500:function(){return N((function(e,t,_){return Reflect.set(e,t,_)}),arguments)},__wbg_static_accessor_GLOBAL_4ef717fb391d88b7:function(){const e="undefined"==typeof global?null:global;return O(e)?0:m(e)},__wbg_static_accessor_GLOBAL_THIS_8d1badc68b5a74f4:function(){const e="undefined"==typeof globalThis?null:globalThis;return O(e)?0:m(e)},__wbg_static_accessor_SELF_146583524fe1469b:function(){const e="undefined"==typeof self?null:self;return O(e)?0:m(e)},__wbg_static_accessor_WINDOW_f2829a2234d7819e:function(){const e="undefined"==typeof window?null:window;return O(e)?0:m(e)},__wbg_then_16d107c451e9905d:function(e,t,_){return e.then(t,_)},__wbg_then_6ec10ae38b3e92f7:function(e,t){return e.then(t)},__wbindgen_cast_0000000000000001:function(e,t){const _=function(e,t,_){const n={a:e,b:t,cnt:1},r=(...e)=>{n.cnt++;const t=n.a;n.a=0;try{return _(t,n.b,...e)}finally{n.a=t,r._wbg_cb_unref()}};return r._wbg_cb_unref=()=>{0==--n.cnt&&(U.__wbindgen_destroy_closure(n.a,n.b),n.a=0,h.unregister(n))},h.register(r,n,n),r}(e,t,l);return _},__wbindgen_cast_0000000000000002:function(e){return e},__wbindgen_cast_0000000000000003:function(e,t){return R(e,t)},__wbindgen_init_externref_table:function(){const e=U.__wbindgen_externrefs,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)}};return{__proto__:null,"./imexport_wasm_bg.js":e}}function l(e,t,_){const n=U.wasm_bindgen__convert__closures_____invoke__h7ef56561fd5c8480(e,t,_);if(n[1])throw M(n[0])}Symbol.dispose&&(i.prototype[Symbol.dispose]=i.prototype.free);const c="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>U.__wbg_dynamicexceldata_free(e,1))),s="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>U.__wbg_excelcellformat_free(e,1))),u="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>U.__wbg_excelcolumndata_free(e,1))),w="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>U.__wbg_excelcolumninfo_free(e,1))),d="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>U.__wbg_exceldata_free(e,1))),g="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>U.__wbg_excelinfo_free(e,1))),f="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>U.__wbg_excelrowdata_free(e,1)));function m(e){const t=U.__externref_table_alloc();return U.__wbindgen_externrefs.set(t,e),t}function b(e,t){if(!(e instanceof t))throw new Error(`expected instance of ${t.name}`)}const h="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>U.__wbindgen_destroy_closure(e.a,e.b)));function p(e){const t=typeof e;if("number"==t||"boolean"==t||null==e)return`${e}`;if("string"==t)return`"${e}"`;if("symbol"==t){const t=e.description;return null==t?"Symbol":`Symbol(${t})`}if("function"==t){const t=e.name;return"string"==typeof t&&t.length>0?`Function(${t})`:"Function"}if(Array.isArray(e)){const t=e.length;let _="[";t>0&&(_+=p(e[0]));for(let n=1;n<t;n++)_+=", "+p(e[n]);return _+="]",_}const _=/\[object ([^\]]+)\]/.exec(toString.call(e));let n;if(!(_&&_.length>1))return toString.call(e);if(n=_[1],"Object"==n)try{return"Object("+JSON.stringify(e)+")"}catch(e){return"Object"}return e instanceof Error?`${e.name}: ${e.message}\n${e.stack}`:n}function E(e,t){e>>>=0;const _=I(),n=[];for(let r=e;r<e+4*t;r+=4)n.push(U.__wbindgen_externrefs.get(_.getUint32(r,!0)));return U.__externref_drop_slice(e,t),n}function y(e,t){return e>>>=0,T().subarray(e/1,e/1+t)}let A=null;function I(){return(null===A||!0===A.buffer.detached||void 0===A.buffer.detached&&A.buffer!==U.memory.buffer)&&(A=new DataView(U.memory.buffer)),A}function R(e,t){return function(e,t){P+=t,P>=S&&(v=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),v.decode(),P=t);return v.decode(T().subarray(e,e+t))}(e>>>0,t)}let D=null;function T(){return null!==D&&0!==D.byteLength||(D=new Uint8Array(U.memory.buffer)),D}function N(e,t){try{return e.apply(this,t)}catch(e){const t=m(e);U.__wbindgen_exn_store(t)}}function O(e){return null==e}function x(e,t){const _=t(1*e.length,1)>>>0;return T().set(e,_/1),K=e.length,_}function L(e,t){const _=t(4*e.length,4)>>>0;for(let t=0;t<e.length;t++){const n=m(e[t]);I().setUint32(_+4*t,n,!0)}return K=e.length,_}function F(e,t,_){if(void 0===_){const _=C.encode(e),n=t(_.length,1)>>>0;return T().subarray(n,n+_.length).set(_),K=_.length,n}let n=e.length,r=t(n,1)>>>0;const o=T();let i=0;for(;i<n;i++){const t=e.charCodeAt(i);if(t>127)break;o[r+i]=t}if(i!==n){0!==i&&(e=e.slice(i)),r=_(r,n,n=i+3*e.length,1)>>>0;const t=T().subarray(r+i,r+n);i+=C.encodeInto(e,t).written,r=_(r,n,i,1)>>>0}return K=i,r}function M(e){const t=U.__wbindgen_externrefs.get(e);return U.__externref_table_dealloc(e),t}let v=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});v.decode();const S=2146435072;let P=0;const C=new TextEncoder;"encodeInto"in C||(C.encodeInto=function(e,t){const _=C.encode(e);return t.set(_),{read:e.length,written:_.length}});let U,K=0;async function G(e){if(void 0!==U)return U;void 0!==e&&(Object.getPrototypeOf(e)===Object.prototype?({module_or_path:e}=e):console.warn("using deprecated parameters for the initialization function; pass a single object instead")),void 0===e&&(e=new URL("imexport_wasm_bg.wasm",import.meta.url));const t=a();("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e));const{instance:_,module:n}=await async function(e,t){if("function"==typeof Response&&e instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if(!e.ok||!function(e){switch(e){case"basic":case"cors":case"default":return!0}return!1}(e.type)||"application/wasm"===e.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const _=await e.arrayBuffer();return await WebAssembly.instantiate(_,t)}{const _=await WebAssembly.instantiate(e,t);return _ instanceof WebAssembly.Instance?{instance:_,module:e}:_}}(await e,t);return function(e){return U=e.exports,A=null,D=null,U.__wbindgen_start(),U}(_)}const W=new Set(["INVALID_DATA_TYPE_TYPE","INVALID_DATA_TYPE","INVALID_MAX_FILE_SIZE_BYTES","INVALID_ESCAPE_FORMULAS","FILE_TOO_LARGE","DEFINITION_NAME_REQUIRED","DEFINITION_COLUMNS_REQUIRED","COLUMN_KEY_REQUIRED","COLUMN_NAME_REQUIRED","DUPLICATE_COLUMN_KEY","COLUMN_PARENT_EMPTY","COLUMN_PARENT_SELF","COLUMN_PARENT_ORDER","DATA_GROUP_EMPTY","DUPLICATE_DATA_GROUP","DATA_GROUP_PARENT_EMPTY","DATA_GROUP_PARENT_SELF","DATA_GROUP_PARENT_ORDER","IMPORT_NUMBER_PARSE_FAILED","EXPORT_NUMBER_VALUE_INVALID","EXPORT_DATE_VALUE_INVALID","DYNAMIC_HEADER_ROW_INVALID","FILE_SELECTION_CANCELLED","FILE_READ_FAILED","FILE_READ_ABORTED","GROUPED_COLUMN_INVALID","WASM_FETCH_REQUIRED","WASM_ASSET_LOAD_FAILED","WASM_INIT_RETRY_FAILED","WASM_INIT_FAILED","HEADER_MISMATCH","COLUMN_KEY_MISSING","WORKBOOK_NO_WORKSHEETS","WORKSHEET_EMPTY","DYNAMIC_HEADER_ROW_MIN","DYNAMIC_HEADER_ROW_RANGE","DYNAMIC_HEADER_ROW_NOT_FOUND","DYNAMIC_HEADER_EMPTY","DYNAMIC_HEADER_DUPLICATE","IMAGE_FETCHER_EMPTY_DATA","IMAGE_PARSE_FAILED","IMAGE_FETCHER_CALL_FAILED","IMAGE_FETCHER_WAIT_FAILED","IMAGE_FETCHER_INVALID_DATA","IMAGE_FETCHER_REQUIRED","IMPORT_WORKBOOK_FAILED","IMPORT_DYNAMIC_WORKBOOK_FAILED","EXPORT_WORKBOOK_FAILED","TEMPLATE_WORKBOOK_FAILED","INVALID_DEFINITION"]),H={en:{INVALID_DATA_TYPE_TYPE:"Invalid dataType '{dataType}' for column '{columnKey}'. dataType values must be strings.",INVALID_DATA_TYPE:"Invalid dataType '{dataType}' for column '{columnKey}'. Supported values are: {supportedDataTypes}.",INVALID_MAX_FILE_SIZE_BYTES:"Invalid maxFileSizeBytes '{value}' for {context}. Expected a positive finite number in bytes.",INVALID_ESCAPE_FORMULAS:"Invalid escapeFormulas '{value}' for {context}. Expected a boolean.",FILE_TOO_LARGE:"Selected file '{fileName}' exceeds the {maxFileSize} limit (received {fileSize}).",DEFINITION_NAME_REQUIRED:"Excel definition must include a non-empty name.",DEFINITION_COLUMNS_REQUIRED:"Excel definition '{definitionName}' must include at least one column.",COLUMN_KEY_REQUIRED:"Excel definition '{definitionName}' contains a column with an empty key.",COLUMN_NAME_REQUIRED:"Column '{columnKey}' in definition '{definitionName}' must include a non-empty name.",DUPLICATE_COLUMN_KEY:"Duplicate column key '{columnKey}' found in definition '{definitionName}'.",COLUMN_PARENT_EMPTY:"Column '{columnKey}' has an empty parent reference.",COLUMN_PARENT_SELF:"Column '{columnKey}' cannot reference itself as a parent.",COLUMN_PARENT_ORDER:"Column '{columnKey}' references parent '{parentKey}', but parent columns must be declared before their children.",DATA_GROUP_EMPTY:"Column '{columnKey}' has an empty dataGroup value.",DUPLICATE_DATA_GROUP:"Duplicate dataGroup '{dataGroup}' found in definition '{definitionName}'.",DATA_GROUP_PARENT_EMPTY:"Column '{columnKey}' has an empty dataGroupParent value.",DATA_GROUP_PARENT_SELF:"Column '{columnKey}' cannot reference its own dataGroup '{dataGroupParent}' as dataGroupParent.",DATA_GROUP_PARENT_ORDER:"Column '{columnKey}' references dataGroupParent '{dataGroupParent}', but grouped parents must be declared before dependent columns.",IMPORT_NUMBER_PARSE_FAILED:"Failed to parse imported number '{value}' for column '{columnKey}'.",EXPORT_NUMBER_VALUE_INVALID:"Column '{columnKey}' expects a finite number value.",EXPORT_DATE_VALUE_INVALID:"Column '{columnKey}' expects a date string or Date instance.",DYNAMIC_HEADER_ROW_INVALID:"Dynamic import option 'headerRow' must be an integer greater than or equal to 1.",FILE_SELECTION_CANCELLED:"File selection cancelled.",FILE_READ_FAILED:"Failed to read import file.",FILE_READ_ABORTED:"Import file read was aborted.",GROUPED_COLUMN_INVALID:"Grouped column '{columnKey}' must be an object with a children array.",WASM_FETCH_REQUIRED:"WASM initialization requires a global fetch implementation in this runtime.",WASM_ASSET_LOAD_FAILED:"Failed to load the bundled Excel WASM asset from '{wasmUrl}'. HTTP {status}.",WASM_INIT_RETRY_FAILED:"Failed to initialize WASM runtime after {attempts} attempts. Last error: {lastError}",WASM_INIT_FAILED:"Failed to initialize the bundled Excel WASM runtime. {reason}",HEADER_MISMATCH:"Header mismatch at {cell} in sheet '{sheetName}': expected '{expected}', found '{actual}'",COLUMN_KEY_MISSING:"Column key '{columnKey}' is missing in definition",WORKBOOK_NO_WORKSHEETS:"Workbook contains no worksheets",WORKSHEET_EMPTY:"Worksheet contains no cells",DYNAMIC_HEADER_ROW_MIN:"Dynamic import option 'headerRow' must be greater than or equal to 1",DYNAMIC_HEADER_ROW_RANGE:"Dynamic import option 'headerRow' must point to a row within the used range. Received {headerRow}.",DYNAMIC_HEADER_ROW_NOT_FOUND:"Dynamic import could not find a non-empty header row in the worksheet",DYNAMIC_HEADER_EMPTY:"Dynamic import requires non-empty header names. Found an empty header at {cell}.",DYNAMIC_HEADER_DUPLICATE:"Dynamic import requires unique header names. Duplicate header '{header}' found at {cell}.",IMAGE_FETCHER_EMPTY_DATA:"Image fetcher returned empty data for URL: {url}",IMAGE_PARSE_FAILED:"Failed to parse image from URL '{url}': {reason}",IMAGE_FETCHER_CALL_FAILED:"Error calling image fetcher: {reason}",IMAGE_FETCHER_WAIT_FAILED:"Error waiting for image fetcher: {reason}",IMAGE_FETCHER_INVALID_DATA:"Image fetcher returned invalid data for URL: {url}",IMAGE_FETCHER_REQUIRED:"Image fetcher is not defined",IMPORT_WORKBOOK_FAILED:"Failed to import workbook '{definitionName}'. {reason}",IMPORT_DYNAMIC_WORKBOOK_FAILED:"Failed to dynamically import workbook. {reason}",EXPORT_WORKBOOK_FAILED:"Failed to export workbook '{definitionName}'. {reason}",TEMPLATE_WORKBOOK_FAILED:"Failed to generate template '{definitionName}'. {reason}",INVALID_DEFINITION:"Invalid definition: {reason}"},zh:{INVALID_DATA_TYPE_TYPE:"列 '{columnKey}' 的 dataType '{dataType}' 无效,dataType 必须是字符串。",INVALID_DATA_TYPE:"列 '{columnKey}' 的 dataType '{dataType}' 无效,支持的值为:{supportedDataTypes}。",INVALID_MAX_FILE_SIZE_BYTES:"{context} 的 maxFileSizeBytes '{value}' 无效,必须是正的有限字节数。",INVALID_ESCAPE_FORMULAS:"{context} 的 escapeFormulas '{value}' 无效,必须是布尔值。",FILE_TOO_LARGE:"选择的文件 '{fileName}' 超过 {maxFileSize} 限制(当前 {fileSize})。",DEFINITION_NAME_REQUIRED:"Excel definition 必须包含非空 name。",DEFINITION_COLUMNS_REQUIRED:"Excel definition '{definitionName}' 必须至少包含一列。",COLUMN_KEY_REQUIRED:"Excel definition '{definitionName}' 中存在 key 为空的列。",COLUMN_NAME_REQUIRED:"definition '{definitionName}' 中的列 '{columnKey}' 必须包含非空 name。",DUPLICATE_COLUMN_KEY:"definition '{definitionName}' 中存在重复的列 key '{columnKey}'。",COLUMN_PARENT_EMPTY:"列 '{columnKey}' 的 parent 引用不能为空。",COLUMN_PARENT_SELF:"列 '{columnKey}' 不能将自身作为 parent。",COLUMN_PARENT_ORDER:"列 '{columnKey}' 引用了 parent '{parentKey}',但父级列必须先于子级列声明。",DATA_GROUP_EMPTY:"列 '{columnKey}' 的 dataGroup 不能为空。",DUPLICATE_DATA_GROUP:"definition '{definitionName}' 中存在重复的 dataGroup '{dataGroup}'。",DATA_GROUP_PARENT_EMPTY:"列 '{columnKey}' 的 dataGroupParent 不能为空。",DATA_GROUP_PARENT_SELF:"列 '{columnKey}' 不能将自己的 dataGroup '{dataGroupParent}' 作为 dataGroupParent。",DATA_GROUP_PARENT_ORDER:"列 '{columnKey}' 引用了 dataGroupParent '{dataGroupParent}',但分组父级必须先于依赖列声明。",IMPORT_NUMBER_PARSE_FAILED:"无法将导入值 '{value}' 解析为列 '{columnKey}' 的数字。",EXPORT_NUMBER_VALUE_INVALID:"列 '{columnKey}' 需要有限数字值。",EXPORT_DATE_VALUE_INVALID:"列 '{columnKey}' 需要日期字符串或 Date 实例。",DYNAMIC_HEADER_ROW_INVALID:"动态导入选项 'headerRow' 必须是大于等于 1 的整数。",FILE_SELECTION_CANCELLED:"已取消文件选择。",FILE_READ_FAILED:"读取导入文件失败。",FILE_READ_ABORTED:"导入文件读取已中止。",GROUPED_COLUMN_INVALID:"分组列 '{columnKey}' 必须是带 children 数组的对象。",WASM_FETCH_REQUIRED:"当前运行时缺少全局 fetch,无法初始化 WASM。",WASM_ASSET_LOAD_FAILED:"加载内置 Excel WASM 资源 '{wasmUrl}' 失败,HTTP {status}。",WASM_INIT_RETRY_FAILED:"WASM 运行时初始化失败,已尝试 {attempts} 次。最后一次错误:{lastError}",WASM_INIT_FAILED:"初始化内置 Excel WASM 运行时失败。{reason}",HEADER_MISMATCH:"工作表 '{sheetName}' 的 {cell} 表头不匹配:期望 '{expected}',实际为 '{actual}'",COLUMN_KEY_MISSING:"definition 中缺少列 key '{columnKey}'",WORKBOOK_NO_WORKSHEETS:"工作簿不包含工作表",WORKSHEET_EMPTY:"工作表不包含单元格",DYNAMIC_HEADER_ROW_MIN:"动态导入选项 'headerRow' 必须大于等于 1",DYNAMIC_HEADER_ROW_RANGE:"动态导入选项 'headerRow' 必须指向已使用范围内的行,当前为 {headerRow}。",DYNAMIC_HEADER_ROW_NOT_FOUND:"动态导入无法在工作表中找到非空表头行",DYNAMIC_HEADER_EMPTY:"动态导入要求表头名称非空,在 {cell} 发现空表头。",DYNAMIC_HEADER_DUPLICATE:"动态导入要求表头名称唯一,在 {cell} 发现重复表头 '{header}'。",IMAGE_FETCHER_EMPTY_DATA:"imageFetcher 为 URL 返回了空数据:{url}",IMAGE_PARSE_FAILED:"解析 URL '{url}' 的图片失败:{reason}",IMAGE_FETCHER_CALL_FAILED:"调用 imageFetcher 失败:{reason}",IMAGE_FETCHER_WAIT_FAILED:"等待 imageFetcher 结果失败:{reason}",IMAGE_FETCHER_INVALID_DATA:"imageFetcher 为 URL 返回了无效数据:{url}",IMAGE_FETCHER_REQUIRED:"未定义 imageFetcher",IMPORT_WORKBOOK_FAILED:"导入工作簿 '{definitionName}' 失败。{reason}",IMPORT_DYNAMIC_WORKBOOK_FAILED:"动态导入工作簿失败。{reason}",EXPORT_WORKBOOK_FAILED:"导出工作簿 '{definitionName}' 失败。{reason}",TEMPLATE_WORKBOOK_FAILED:"生成模板 '{definitionName}' 失败。{reason}",INVALID_DEFINITION:"definition 无效:{reason}"}};function Y(e){return"zh"===e||"zh-CN"===e||"zh_CN"===e?"zh":"en"}function k(e){return Array.isArray(e)?e.map(k).join(", "):null==e?"":String(e)}function V(e,t){return e.replace(/\{([A-Za-z0-9_]+)\}/g,((e,_)=>Object.prototype.hasOwnProperty.call(t,_)?k(t[_]):e))}function z(e){return e instanceof Error?e.message:String(e)}function B(e){return{locale:null==e?void 0:e.locale,errorMessages:null==e?void 0:e.errorMessages,messages:null==e?void 0:e.messages}}class j extends Error{constructor(e,t={},_={},n={}){var r;super(null!==(r=n.message)&&void 0!==r?r:function(e,t={},_={},n){var r,o,i,a;const l=Y(_.locale),c=V(null!==(r=H[l][e])&&void 0!==r?r:H.en[e],t),s=null!==(i=null===(o=_.errorMessages)||void 0===o?void 0:o[e])&&void 0!==i?i:null===(a=_.messages)||void 0===a?void 0:a[e];return s?"function"==typeof s?s({code:e,locale:l,params:t,defaultMessage:c,cause:n}):V(s,t):c}(e,t,_,n.cause)),this.name=new.target.errorName,this.code=e,this.params=t,this.locale=Y(_.locale),this.cause=n.cause,Object.setPrototypeOf(this,new.target.prototype)}}j.errorName="ImportExportError";class $ extends j{}$.errorName="ValidationError";class Q extends j{}Q.errorName="WasmInitError";class X extends j{}X.errorName="ImportError";class q extends j{}function Z(e){return"string"==typeof e&&W.has(e)}function J(e){try{const t=JSON.parse(e);if(t&&"object"==typeof t&&Z(t.code)&&"object"==typeof t.params)return{code:t.code,params:t.params}}catch(e){return}}function ee(e,t,_,n={},r=j){var o;if(e instanceof j){return new(0,e.constructor)(e.code,e.params,t,{cause:null!==(o=e.cause)&&void 0!==o?o:e})}const i=function(e){if("object"!=typeof e||null===e)return;const t=e.code;return Z(t)?t:void 0}(e);if(i)return new r(i,function(e){if("object"!=typeof e||null===e)return{};const t=e.params;return"object"!=typeof t||null===t||Array.isArray(t)?{}:t}(e),t,{cause:e});const a=z(e),l=function(e){const t=e.trim();if(t.startsWith("{")&&t.endsWith("}")){const e=J(t);if(e)return e}const _=t.lastIndexOf("\n{");if(_>=0){const e=J(t.slice(_+1).trim());if(e)return e}let n;return n=/^Header mismatch at ([^\n]+) in sheet '([^\n']+)': expected '([^'\n]*)', found '([^'\n]*)'(?:[\s\S])*$/.exec(e),n?{code:"HEADER_MISMATCH",params:{cell:n[1],sheetName:n[2],expected:n[3],actual:n[4]}}:(n=/^Column key '([^'\n]*)' is missing in definition$/.exec(e),n?{code:"COLUMN_KEY_MISSING",params:{columnKey:n[1]}}:"Workbook contains no worksheets"===e?{code:"WORKBOOK_NO_WORKSHEETS",params:{}}:"Worksheet contains no cells"===e?{code:"WORKSHEET_EMPTY",params:{}}:"Dynamic import option 'headerRow' must be greater than or equal to 1"===e?{code:"DYNAMIC_HEADER_ROW_MIN",params:{}}:(n=/^Dynamic import option 'headerRow' must point to a row within the used range\. Received (\d+)\./.exec(e),n?{code:"DYNAMIC_HEADER_ROW_RANGE",params:{headerRow:Number(n[1])}}:"Dynamic import could not find a non-empty header row in the worksheet"===e?{code:"DYNAMIC_HEADER_ROW_NOT_FOUND",params:{}}:(n=/^Dynamic import requires non-empty header names\. Found an empty header at ([^\n.]+)\./.exec(e),n?{code:"DYNAMIC_HEADER_EMPTY",params:{cell:n[1]}}:(n=/^Dynamic import requires unique header names\. Duplicate header '(.*?)' found at ([^\n.]+)\./.exec(e),n?{code:"DYNAMIC_HEADER_DUPLICATE",params:{header:n[1],cell:n[2]}}:(n=/^Image fetcher returned empty data for URL: ([^\n]*)$/.exec(e),n?{code:"IMAGE_FETCHER_EMPTY_DATA",params:{url:n[1]}}:(n=/^Failed to parse image from URL '([^'\n]*)': ([^\n]*)(?:[\s\S])*$/.exec(e),n?{code:"IMAGE_PARSE_FAILED",params:{url:n[1],reason:n[2]}}:(n=/^Error calling image fetcher: ([^\n]*)(?:[\s\S])*$/.exec(e),n?{code:"IMAGE_FETCHER_CALL_FAILED",params:{reason:n[1]}}:(n=/^Error waiting for image fetcher: ([^\n]*)(?:[\s\S])*$/.exec(e),n?{code:"IMAGE_FETCHER_WAIT_FAILED",params:{reason:n[1]}}:(n=/^Image fetcher returned invalid data for URL: ([^\n]*)$/.exec(e),n?{code:"IMAGE_FETCHER_INVALID_DATA",params:{url:n[1]}}:"Image fetcher is not defined"===e?{code:"IMAGE_FETCHER_REQUIRED",params:{}}:(n=/^Invalid number value '([^'\n]*)' for column '([^'\n]*)': ([^\n]*)$/.exec(e),n?{code:"EXPORT_NUMBER_VALUE_INVALID",params:{value:n[1],columnKey:n[2],reason:n[3]}}:(n=/^Invalid date value '([^'\n]*)' for column '([^'\n]*)': ([^\n]*)$/.exec(e),n?{code:"EXPORT_DATE_VALUE_INVALID",params:{value:n[1],columnKey:n[2],reason:n[3]}}:(n=/^Invalid definition: ([^\n]*)$/.exec(e),n?{code:"INVALID_DEFINITION",params:{reason:n[1]}}:void 0))))))))))))}(a);return l?new r(l.code,l.params,t,{cause:e}):new r(_,Object.assign(Object.assign({},n),{reason:a}),t,{cause:e})}q.errorName="ExportError";const te=["text","number","date","image"],_e=26214400,ne=new Set(["=","+","-","@","\t","\r","\n","|",";"]),re="senlinzImportExportDownload";let oe=null,ie=!1;function ae(e,t,_){const n=null!=e?e:"text";if("string"!=typeof n)throw new $("INVALID_DATA_TYPE_TYPE",{dataType:String(n),columnKey:t},_);const r=n.trim().toLowerCase();if(!te.includes(r))throw new $("INVALID_DATA_TYPE",{dataType:e,columnKey:t,supportedDataTypes:te},_);return r}function le(e,t,_){if(void 0===e)return _e;if("number"!=typeof e||!Number.isFinite(e))throw new $("INVALID_MAX_FILE_SIZE_BYTES",{value:String(e),context:t},_);const n=Math.trunc(e);if(n<=0)throw new $("INVALID_MAX_FILE_SIZE_BYTES",{value:e,context:t},_);return n}function ce(e,t){if(!t||""===e)return e;const _=e[0];return ne.has(_)?`'${e}`:e}function se(e){const t=e/1048576;return`${t%1==0?t.toFixed(0):t.toFixed(1)} MB`}function ue(e){var t,_;const n=B(e);if(!(null===(t=e.name)||void 0===t?void 0:t.trim()))throw new $("DEFINITION_NAME_REQUIRED",{},n);if(!Array.isArray(e.columns)||0===e.columns.length)throw new $("DEFINITION_COLUMNS_REQUIRED",{definitionName:e.name},n);const r=new Set,o=new Set,i=e.name.trim(),a=`definition '${i}'`,l=le(e.maxFileSizeBytes,a,n),c=function(e,t,_){if(void 0===e)return!0;if("boolean"!=typeof e)throw new $("INVALID_ESCAPE_FORMULAS",{value:String(e),context:t},_);return e}(e.escapeFormulas,a,n),s=e.columns.map((t=>{var _,i;const a=null===(_=t.key)||void 0===_?void 0:_.trim(),l=null===(i=t.name)||void 0===i?void 0:i.trim();if(!a)throw new $("COLUMN_KEY_REQUIRED",{definitionName:e.name},n);if(!l)throw new $("COLUMN_NAME_REQUIRED",{columnKey:a,definitionName:e.name},n);if(r.has(a))throw new $("DUPLICATE_COLUMN_KEY",{columnKey:a,definitionName:e.name},n);const c=Object.assign(Object.assign({},t),{key:a,name:l,dataType:ae(t.dataType,a,n)});if(c.parent){const e=c.parent.trim();if(!e)throw new $("COLUMN_PARENT_EMPTY",{columnKey:a},n);if(e===a)throw new $("COLUMN_PARENT_SELF",{columnKey:a},n);if(!r.has(e))throw new $("COLUMN_PARENT_ORDER",{columnKey:a,parentKey:e},n);c.parent=e}if(c.dataGroup){const t=c.dataGroup.trim();if(!t)throw new $("DATA_GROUP_EMPTY",{columnKey:a},n);if(o.has(t))throw new $("DUPLICATE_DATA_GROUP",{dataGroup:t,definitionName:e.name},n);o.add(t),c.dataGroup=t}if(c.dataGroupParent){const e=c.dataGroupParent.trim();if(!e)throw new $("DATA_GROUP_PARENT_EMPTY",{columnKey:a},n);if(c.dataGroup===e)throw new $("DATA_GROUP_PARENT_SELF",{columnKey:a,dataGroupParent:e},n);if(!o.has(e))throw new $("DATA_GROUP_PARENT_ORDER",{columnKey:a,dataGroupParent:e},n);c.dataGroupParent=e}return r.add(a),c}));return Object.assign(Object.assign({},e),{name:i,sheetName:(null===(_=e.sheetName)||void 0===_?void 0:_.trim())||void 0,columns:s,maxFileSizeBytes:l,escapeFormulas:c})}const we={normalizeDefinition:ue,normalizeDynamicImportOptions:me,sanitizeTextCellValue:(e,t=!0)=>ce(e,t),defaultMaxFileSizeBytes:_e};function de(e,t,_){if(""===t)return"number"===e.dataType||"date"===e.dataType?null:t;if("number"===e.dataType){const n=Number(t);if(!Number.isFinite(n))throw new X("IMPORT_NUMBER_PARSE_FAILED",{value:t,columnKey:e.key},_);return n}return t}function ge(e,t,_,n){if(null==t)return"";const r=e.data_type.toLowerCase();if("number"===r){const _="number"==typeof t?t:Number(t);if(!Number.isFinite(_))throw new q("EXPORT_NUMBER_VALUE_INVALID",{columnKey:e.key,value:t},n);return _.toString()}if("date"===r){if(t instanceof Date)return Oe(t);if("string"==typeof t){const e=t.trim();return e||""}throw new q("EXPORT_DATE_VALUE_INVALID",{columnKey:e.key,value:t},n)}return"text"===r?ce(t.toString(),_):t.toString()}function fe(e){return e.rows.map((e=>{const t={};for(const _ of e.columns)t[_.key]=_.value;return t}))}function me(e={}){var t;const _=B(e);if(void 0!==e.headerRow&&(!Number.isInteger(e.headerRow)||e.headerRow<1))throw new $("DYNAMIC_HEADER_ROW_INVALID",{},_);return Object.assign(Object.assign({},e),{sheetName:(null===(t=e.sheetName)||void 0===t?void 0:t.trim())||void 0,headerRow:e.headerRow,maxFileSizeBytes:le(e.maxFileSizeBytes,"dynamic import options",_)})}async function be(e,t){const _=B(e);try{const n=function(e,t){b(e,o);var _=e.__destroy_into_raw();const n=x(t,U.__wbindgen_malloc),i=K,a=U.importData(_,n,i);if(a[2])throw M(a[1]);return r.__wrap(a[0])}(Ne(e),t),i=function(e,t,_){const n=[],r={};for(const e of t)r[e.key]=e;for(const t of e.rows){const e={};for(const n of t.columns){const t=r[n.key];t&&(e[n.key]=de(t,n.value,_))}n.push(e)}return n}(n,e.columns,_);return i}catch(t){throw ee(t,_,"IMPORT_WORKBOOK_FAILED",{definitionName:e.name,reason:z(t)},X)}}async function he(t,_){const n=B(_);try{const n=function(t,_,n){var r=O(t)?0:F(t,U.__wbindgen_malloc,U.__wbindgen_realloc),o=K;const i=x(n,U.__wbindgen_malloc),a=K,l=U.importDynamicData(r,o,O(_)?Number.MAX_SAFE_INTEGER:_>>>0,i,a);if(l[2])throw M(l[1]);return e.__wrap(l[0])}(_.sheetName,_.headerRow,t);return{sheetName:n.sheet_name,headers:[...n.headers],rows:fe(n)}}catch(e){throw ee(e,n,"IMPORT_DYNAMIC_WORKBOOK_FAILED",{reason:z(e)},X)}}function pe(e,t=26214400,_={}){return new Promise(((n,r)=>{var o;null===(o=document.querySelector("#senlinzImportExportInput"))||void 0===o||o.remove();const i=document.createElement("input");i.id="senlinzImportExportInput",i.style.display="none",i.type="file",i.accept=".xlsx,.xls,.xlsm,.xlsb,.xla,.xlam,.ods",document.body.appendChild(i);let a=!1;const l=()=>{i.removeEventListener("change",w),i.removeEventListener("cancel",u),i.remove()},c=e=>{a||(a=!0,l(),r(ee(e,_,"IMPORT_WORKBOOK_FAILED",{reason:z(e)},X)))},s=e=>{a||(a=!0,l(),n(e))},u=()=>{c(new X("FILE_SELECTION_CANCELLED",{},_))};function w(n){const r=n.target;if(!r||!r.files||0===r.files.length)return void c(new X("FILE_SELECTION_CANCELLED",{},_));const o=r.files[0];try{!function(e,t,_){if(e.size>t)throw new X("FILE_TOO_LARGE",{fileName:e.name,maxFileSizeBytes:t,fileSizeBytes:e.size,maxFileSize:se(t),fileSize:se(e.size)},_)}(o,t,_)}catch(e){return void c(e)}const i=new FileReader;i.onerror=()=>{var e,t;c(new X("FILE_READ_FAILED",{reason:null!==(t=null===(e=i.error)||void 0===e?void 0:e.message)&&void 0!==t?t:""},_,{cause:i.error}))},i.onabort=()=>{c(new X("FILE_READ_ABORTED",{},_))},i.onload=async()=>{try{const t=new Uint8Array(i.result),_=await e(t);s(_)}catch(e){c(e)}},i.readAsArrayBuffer(o)}i.addEventListener("change",w),i.addEventListener("cancel",u),i.click()}))}function Ee(e,t,n,r,o=""){const a=[];for(const c of e){const e=[];for(const i in c){const a=t[i],s=c[i];if(a&&void 0!==s)if(a.data_group){if(null!==s){if("object"!=typeof(l=s)||null===l||!Array.isArray(l.children))throw new q("GROUPED_COLUMN_INVALID",{columnKey:i},r);if(s.children.length){const l=Ee(s.children,t,n,r,i);o?e.push(_.newGroup(i,ge(a,s.value,n,r),l)):e.push(_.newRootGroup(i,l))}}}else e.push(new _(i,ge(a,s,n,r)))}a.push(new i(e))}var l;return a}async function ye(e,t){const _=B(e);try{const n=Ne(e),i=function(e){const t={};for(const _ of e.columns)t[_.key]=_;return t}(n),a=Ee(t,i,e.escapeFormulas,_),l=new r(a);return await function(e,t){b(e,o);var _=e.__destroy_into_raw();b(t,r);var n=t.__destroy_into_raw();return U.exportData(_,n)}(n,l)}catch(t){throw ee(t,_,"EXPORT_WORKBOOK_FAILED",{definitionName:e.name,reason:z(t)},q)}}async function Ae(e,t){return ye(ue(e),t)}async function Ie(e){const t=ue(e),_=B(t);try{return function(e){b(e,o);var t=e.__destroy_into_raw();const _=U.createTemplate(t);if(_[3])throw M(_[2]);var n=y(_[0],_[1]).slice();return U.__wbindgen_free(_[0],1*_[1],1),n}(Ne(t))}catch(e){throw ee(e,_,"TEMPLATE_WORKBOOK_FAILED",{definitionName:t.name,reason:z(e)},q)}}function Re(e,t,_="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"){var n;De(),null===(n=document.querySelector(`#${re}`))||void 0===n||n.remove();const r=document.createElement("a");r.id=re,r.download=t;const o=new B