async function update_section(section_id, { updated_data, build_page = true }) {
	const original_section = get_section(section_id)
	let original_section_entries = _.cloneDeep(original_section.entries)

	const updated_section_entries = _.cloneDeep(updated_data.entries.filter(e => !e.page && !e.site && !e.page_type))

  const original_symbol = get_symbol(original_section.symbol || original_section.master?.symbol)

	// Page entries
	let original_page_entries = _.cloneDeep(get(active_page_store).entries)
	let updated_page_entries = _.cloneDeep(updated_data.entries.filter(e => e.page))

	// Site entries
	let original_site_entries = _.cloneDeep(get(stores.site).entries)
	let updated_site_entries = _.cloneDeep(updated_data.entries.filter(e => e.site))


  const changes = _.cloneDeep({
    section_entries: db_utils.generate_entry_changes(original_section.entries, updated_section_entries),
    symbol_fields: db_utils.generate_field_changes(original_symbol.fields, updated_data.fields),
		page_entries: db_utils.generate_entry_changes(original_page_entries, updated_page_entries),
		site_entries: db_utils.generate_entry_changes(original_site_entries, updated_site_entries)
  })

	let { entries: updated_symbol_entries } = helpers.sync_symbol_content_with_section_changes({
		original_symbol_entries: original_symbol.entries,
		original_symbol_fields: original_symbol.fields,
		updated_section_entries,
		updated_symbol_fields: updated_data.fields,
		section_content_changes: changes.section_entries,
		field_changes: changes.symbol_fields
	})

	let symbol_content_changes = db_utils.generate_entry_changes(original_symbol.entries, updated_symbol_entries)

	let section_content_changes = changes.section_entries
	let symbol_field_changes = _.cloneDeep(changes.symbol_fields)
	let updated_symbol_fields = _.cloneDeep(updated_data.fields)

	let page_content_changes = _.cloneDeep(changes.page_entries)
	let site_content_changes = _.cloneDeep(changes.site_entries)

	// TODO: Page Type entries changes
	let original_page_type_entries = _.cloneDeep(get(active_page_store).entries)
	let updated_page_type_entries = _.cloneDeep(updated_data.entries.filter(e => e.page))
	// let page_type_content_changes = _.cloneDeep(changes.entries.filter(c => c.dynamic === 'page-type'))

	// Symbol
	const symbol_id = original_section.symbol || original_section.master?.symbol
	const updated_symbol_code = updated_data.code

	let local_sibling_sections = helpers.generate_sibling_section_changes({
		section_id,
		symbol_id,
		field_changes: symbol_field_changes,
		original_fields: original_symbol.fields,
		updated_fields: updated_symbol_fields
	})
	let foreign_sibling_sections = [] // fetch and assign below to avoid delay


	await update_timeline({
		doing: async () => {

			// remap IDs for new items (necessary to refresh IDs when doing() after undoing())
			db_utils.remap_entries_and_fields({
				changes: {
					fields: symbol_field_changes,
					entries: [...section_content_changes, ...symbol_content_changes, ...local_sibling_sections.flatMap(s => s.changes)]
				},
				items: {
					fields: updated_symbol_fields,
					entries: [...updated_section_entries, ...updated_symbol_entries, ...local_sibling_sections.flatMap(s => s.entries)]
				}
			})
			
			if (page_content_changes.length > 0) {
				db_utils.remap_entries_and_fields({
					changes: {
						fields: [],
						entries: page_content_changes
					},
					items: {
						fields: [],
						entries: updated_page_entries
					}
				})
			}
			if (site_content_changes.length > 0) {
				db_utils.remap_entries_and_fields({
					changes: {
						fields: [],
						entries: site_content_changes
					},
					items: {
						fields: [],
						entries: updated_site_entries
					}
				})
			}

			// STORE: update Section entries
			store_actions.update_section(section_id, { entries: updated_section_entries })

			// STORE: update sibling Sections entries
			local_sibling_sections.forEach(({ id, entries }) => {
				store_actions.update_section(id, { entries })
			})

			// STORE: update Site entries
			if (site_content_changes.length > 0) {
				update_site({ entries: updated_site_entries })
			}

			// STORE: update Page entries
			if (page_content_changes.length > 0) {
				active_page_store.update(store => ({
					...store,
					entries: updated_page_entries
				}))
			}

			// STORE: update Symbol code, fields & entries
			store_actions.update_symbol(symbol_id, {
				fields: updated_symbol_fields,
				entries: updated_symbol_entries,
				code: updated_symbol_code
			})

			// DB: save Symbol code if changed
			if (!_.isEqual(original_symbol.code, updated_symbol_code)) {
				await db_actions.update_symbol(symbol_id, { code: updated_symbol_code })
			}

			// DB: save Symbol fields
			await helpers.handle_field_changes_new(symbol_field_changes, {
				symbol: symbol_id
			})

			// DB: save Section, Symbol, Site, and Page entries
			await Promise.all([
				helpers.handle_content_changes_new(section_content_changes, {
					section: section_id
				}),
				helpers.handle_content_changes_new(symbol_content_changes, {
					symbol: symbol_id
				}),
				helpers.handle_content_changes_new(site_content_changes, { site: get(stores.site).id}),
				helpers.handle_content_changes_new(page_content_changes, { page: get(active_page_store).id})
			])


			// DB: Update sibling Sections (only relevant is symbol entries have changes)
			if (symbol_content_changes.length > 0) {
				await Promise.all(
					local_sibling_sections.map(({ id, changes }) => 
						helpers.handle_content_changes_new(changes, {
							section: id
						})
					)
				)

				const fetched_foreign_sibling_sections = await db_helpers.get_off_page_sibling_sections(section_id, symbol_id)
				foreign_sibling_sections = helpers.generate_sibling_section_changes({
					section_id,
					symbol_id,
					field_changes: symbol_field_changes,
					original_fields: original_symbol.fields,
					updated_fields: updated_symbol_fields
				}, fetched_foreign_sibling_sections)

				await Promise.all(
					foreign_sibling_sections.map(({ id, changes }) => 
						helpers.handle_content_changes_new(changes, {
							section: id
						})
					)
				)
			}

			if (!_.isEqual(original_symbol.code, updated_symbol_code)) {
				update_symbol_file(get(stores.symbols).find(s => s.id === symbol_id))
			}

			if (build_page) {
				update_page_file(site_content_changes.length > 0)
			}
		},
		undoing: async () => {
			// Generate inverted changes
			const [ inverted_section_entry_changes, restored_section_entries ] = db_utils.generate_inverted_changes(section_content_changes, original_section_entries)
			
			const inverted_siblings = local_sibling_sections.map(sibling => {
				const [inverted_sibling_entry_changes, restored_sibling_entries] = db_utils.generate_inverted_changes(sibling.changes, sibling.entries)
				return { id: sibling.id, changes: inverted_sibling_entry_changes, entries: restored_sibling_entries}
			})

			const [ inverted_field_changes, restored_fields ] = db_utils.generate_inverted_changes(symbol_field_changes, original_symbol.fields)
			const [ inverted_symbol_entry_changes, restored_symbol_entries ] = db_utils.generate_inverted_changes(symbol_content_changes, original_symbol.entries)
			const [ inverted_site_entry_changes, restored_site_entries ] = db_utils.generate_inverted_changes(site_content_changes, original_site_entries)
			const [ inverted_page_entry_changes, restored_page_entries ] = db_utils.generate_inverted_changes(page_content_changes, original_page_entries)

			// STORE: restore section entries
			store_actions.update_section(section_id, { entries: original_section_entries })

			// STORE: restore on-page section entries
			inverted_siblings.forEach(sibling => 
				store_actions.update_section(sibling.id, { entries: sibling.entries })
			)

			// STORE: restore symbol fields, entries, and code
			store_actions.update_symbol(symbol_id, {
				fields: restored_fields,
				entries: restored_symbol_entries,
				code: original_symbol.code
			})

			// STORE: restore Site entries
			update_site({ entries: restored_site_entries })

			// STORE: restore Page entries
			active_page_store.update(store => ({
				...store,
				entries: restored_page_entries
			}))

			// DB: restore symbol code if changed
			if (!_.isEqual(original_symbol.code, updated_data.code)) {
				db_actions.update_symbol(original_symbol.id, { code: original_symbol.code })
			}

			// DB: restore symbol fields
			await helpers.handle_field_changes_new(inverted_field_changes, { symbol: symbol_id })

			// DB: revert section, sibling, symbol, page, and site entry changes
			await Promise.all([
				helpers.handle_content_changes_new(inverted_section_entry_changes, { section: section_id }),
				...inverted_siblings.map(sibling => 
					helpers.handle_content_changes_new(sibling.changes, { section: sibling.id }),
				),
				helpers.handle_content_changes_new(inverted_symbol_entry_changes, { symbol: symbol_id }),
				helpers.handle_content_changes_new(inverted_site_entry_changes, { site: get(stores.site).id }),
				helpers.handle_content_changes_new(inverted_page_entry_changes, { page: get(active_page_store).id })
			])

			// DB: Reverse foreign sibling section changes
			if (inverted_symbol_entry_changes.length > 0) {
				await Promise.all(
					foreign_sibling_sections.map(async ({ id, changes, entries }) => {
						const [ inverted_sibling_entry_changes ] = db_utils.generate_inverted_changes(changes, entries)
						await helpers.handle_content_changes_new(inverted_sibling_entry_changes, {
							section: id
						})
					})
				)
			}

			// restore original fields and entries (necessary for doing() w/ recreated items w/ new IDs)
			original_symbol.fields = restored_fields
			original_symbol.entries = restored_symbol_entries
			original_section_entries = restored_section_entries
			original_site_entries = restored_site_entries
			original_page_entries = restored_page_entries

			if (!_.isEqual(original_symbol.code, updated_data.code)) {
				update_symbol_file(get(stores.symbols).find(s => s.id === symbol_id))
			}
		
			if (build_page) {
				update_page_file(site_content_changes.length > 0)
			}
		}
	})
}
Updates a section with new data, syncronizes symbol updates, and applies changes

@async
@param {string} section_id - The ID of the section to update.
@param {Object} options - The options for updating the section.
@param {Object} options.updated_data - The updated data for the section.
@param {Object} options.changes - The changes to apply to the section.
@returns {Promise<void>}